diff options
author | Abhishek Koneru <akoneru@redhat.com> | 2014-05-23 10:58:26 -0400 |
---|---|---|
committer | Abhishek Koneru <akoneru@redhat.com> | 2014-07-28 19:52:45 -0400 |
commit | a57b356352261d5288949afcdeda7665abba3ae3 (patch) | |
tree | 35ea28d9241af31c3b52d448e23c1e3912c279bc /base/java-tools/src/com/netscape/cmstools | |
parent | 7883dc39b639b825e7b6aeb6cce75878fc1d3e63 (diff) | |
download | pki-a57b356352261d5288949afcdeda7665abba3ae3.tar.gz pki-a57b356352261d5288949afcdeda7665abba3ae3.tar.xz pki-a57b356352261d5288949afcdeda7665abba3ae3.zip |
Updated man page for pki key commands
Updated man page for all the new CLI commands added
for the Key and KeyRequest resources.
Also added missing code to retrieve a secret wrapped in a
user specified passphrase.
Ticket #945
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/key/KeyRetrieveCLI.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/key/KeyRetrieveCLI.java b/base/java-tools/src/com/netscape/cmstools/key/KeyRetrieveCLI.java index 98c243a82..5d882f7a6 100644 --- a/base/java-tools/src/com/netscape/cmstools/key/KeyRetrieveCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/key/KeyRetrieveCLI.java @@ -135,14 +135,20 @@ public class KeyRetrieveCLI extends CLI { } } else { + // Using command line options. String keyId = cmd.getOptionValue("keyID"); - clientEncryption = false; + String passphrase = cmd.getOptionValue("passphrase"); try { - keyData = keyCLI.keyClient.retrieveKey(new KeyId(keyId)); + if (passphrase != null) { + keyData = keyCLI.keyClient.retrieveKeyByPassphrase(new KeyId(keyId), passphrase); + } else { + keyData = keyCLI.keyClient.retrieveKey(new KeyId(keyId)); + clientEncryption = false; - // No need to return the encrypted data since encryption - //is done locally. - keyData.setEncryptedData(null); + // No need to return the encrypted data since encryption + //is done locally. + keyData.setEncryptedData(null); + } } catch (Exception e) { System.err.println(e.getMessage()); if (verbose) |