diff options
author | Ade Lee <alee@redhat.com> | 2014-02-05 10:26:10 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2014-02-10 11:23:08 -0500 |
commit | b5cfe1746ca36861a0bf8039681f27275b9b9e59 (patch) | |
tree | d3b0459d11d7cb6484210ea73ed61444be6acc2b /base/kra | |
parent | 384766e25d952ba358d03ec22953a9481bb58d4b (diff) | |
download | pki-b5cfe1746ca36861a0bf8039681f27275b9b9e59.tar.gz pki-b5cfe1746ca36861a0bf8039681f27275b9b9e59.tar.xz pki-b5cfe1746ca36861a0bf8039681f27275b9b9e59.zip |
Add strength and algorithm to KeyData and KeyInfo classes
Make sure these are updated so that clients can get this information
when accessing a symmetric key. Also allow a default for generation
requests (but not for archival requests).
Diffstat (limited to 'base/kra')
-rw-r--r-- | base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java | 13 |
1 files changed, 12 insertions, 1 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 05995f614..42ab77c90 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 @@ -269,6 +269,7 @@ public class DRMTest { log("Getting key ID for symmetric key"); keyInfo = client.getKeyData(clientId, "active"); + printKeyInfo(keyInfo); KeyId keyId2 = keyInfo.getKeyId(); if (keyId2 == null) { log("No archived key found"); @@ -378,6 +379,7 @@ public class DRMTest { //Test 13: Get keyId for active passphrase with client ID log("Getting key ID for passphrase"); keyInfo = client.getKeyData(clientId, "active"); + printKeyInfo(keyInfo); keyId2 = keyInfo.getKeyId(); if (keyId2 == null) { log("No archived key found"); @@ -572,6 +574,7 @@ public class DRMTest { // test 29: Get keyId for active key with client ID log("Getting key ID for symmetric key"); keyInfo = client.getKeyData(clientId, "active"); + printKeyInfo(keyInfo); keyId2 = keyInfo.getKeyId(); if (keyId2 == null) { log("No archived key found"); @@ -661,6 +664,7 @@ public class DRMTest { //Test 37: Get keyId for active key with client ID log("Getting key ID for symmetric key"); keyInfo = client.getKeyData(clientId, "active"); + printKeyInfo(keyInfo); keyId2 = keyInfo.getKeyId(); if (keyId2 == null) { log("No archived key found"); @@ -713,8 +717,15 @@ public class DRMTest { } + private static void printKeyInfo(KeyInfo keyInfo) { + log("Printing keyInfo:"); + log("ClientID: " + keyInfo.getClientID()); + log("Key URL: " + keyInfo.getKeyURL()); + log("Algorithm: " + keyInfo.getAlgorithm()); + log("Strength: " + keyInfo.getStrength()); + } + private static void log(String string) { - // TODO Auto-generated method stub System.out.println(string); } |