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/kra/functional/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/kra/functional/src')
| -rw-r--r-- | base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java index 1b96c1809..720bba2b9 100644 --- a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java +++ b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java @@ -693,7 +693,7 @@ public class DRMTest { } // Test 33: Verify the generated key pair. - if (isKeyPairValid(algs[i], keyData.getData(), Utils.base64decode(info.getPublicKey()))) { + if (isKeyPairValid(algs[i], keyData.getData(), info.getPublicKey())) { log("The key pair generated using " + algs[i] + " algorithm is valid."); } else { log("The key pair generated using " + algs[i] + " algorithm is invalid."); @@ -750,12 +750,8 @@ public class DRMTest { log("Status: " + keyInfo.getStatus()); if (keyInfo.getPublicKey() != null) { log("Public Key: "); - String publicKey = keyInfo.getPublicKey(); - int i = 0; - for (i = 0; i < publicKey.length() / 64; i++) { - log(publicKey.substring(i * 64, i * 64 + 64)); - } - log(publicKey.substring(i * 64)); + String publicKey = Utils.base64encode(keyInfo.getPublicKey()); + log(publicKey); } } |
