diff options
author | Abhishek Koneru <akoneru@redhat.com> | 2014-08-28 19:05:36 -0400 |
---|---|---|
committer | Abhishek Koneru <akoneru@redhat.com> | 2014-08-29 11:24:48 -0400 |
commit | a4c36d953281967d653ef8a1d33dae6a8ba34a77 (patch) | |
tree | 5f611a5d32899c785b7d2f06eee590dd57d3df84 /base/java-tools/src | |
parent | a7f8076a5f20812eceac31f7230e4156adf74471 (diff) | |
download | pki-a4c36d953281967d653ef8a1d33dae6a8ba34a77.tar.gz pki-a4c36d953281967d653ef8a1d33dae6a8ba34a77.tar.xz pki-a4c36d953281967d653ef8a1d33dae6a8ba34a77.zip |
Makes output of secrets consistent for all clients.
All the secrets/keys retrieved using the client API's using Java/python
clients will be of the type - byte array. This applies to output of the
retrieveKey method and the public key attribute of the KeyInfo object.
Diffstat (limited to 'base/java-tools/src')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/key/KeyCLI.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/key/KeyCLI.java b/base/java-tools/src/com/netscape/cmstools/key/KeyCLI.java index c6bb6933d..12bb1808a 100644 --- a/base/java-tools/src/com/netscape/cmstools/key/KeyCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/key/KeyCLI.java @@ -26,6 +26,7 @@ import com.netscape.certsrv.system.SystemCertClient; import com.netscape.certsrv.util.NSSCryptoProvider; import com.netscape.cmstools.cli.CLI; import com.netscape.cmstools.cli.MainCLI; +import com.netscape.cmsutil.util.Utils; /** * @author Endi S. Dewata @@ -97,7 +98,7 @@ public class KeyCLI extends CLI { // Print out the Base64 encoded public key in the form of a blob, // where the max line length is 64. System.out.println(" Public Key: \n"); - String publicKey = info.getPublicKey(); + String publicKey = Utils.base64encode(info.getPublicKey()); int i = 0; for(i=0;i<publicKey.length()/64;i++){ System.out.println(publicKey.substring(i*64, i*64 + 64)); |