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/common/src/com | |
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/common/src/com')
-rw-r--r-- | base/common/src/com/netscape/certsrv/key/KeyData.java | 34 | ||||
-rw-r--r-- | base/common/src/com/netscape/certsrv/key/KeyInfo.java | 10 |
2 files changed, 39 insertions, 5 deletions
diff --git a/base/common/src/com/netscape/certsrv/key/KeyData.java b/base/common/src/com/netscape/certsrv/key/KeyData.java index b71861470..82e23ed9e 100644 --- a/base/common/src/com/netscape/certsrv/key/KeyData.java +++ b/base/common/src/com/netscape/certsrv/key/KeyData.java @@ -42,6 +42,12 @@ public class KeyData { @XmlElement String p12Data; + @XmlElement + String algorithm; + + @XmlElement + Integer strength; + public KeyData() { // required for JAXB (defaults) } @@ -89,4 +95,32 @@ public class KeyData { public void setP12Data(String p12Data) { this.p12Data = p12Data; } + + /** + * @return the algorithm + */ + public String getAlgorithm() { + return algorithm; + } + + /** + * @param algorithm the algorithm to set + */ + public void setAlgorithm(String algorithm) { + this.algorithm = algorithm; + } + + /** + * @return the strength + */ + public Integer getStrength() { + return strength; + } + + /** + * @param strength the strength to set + */ + public void setStrength(Integer strength) { + this.strength = strength; + } } diff --git a/base/common/src/com/netscape/certsrv/key/KeyInfo.java b/base/common/src/com/netscape/certsrv/key/KeyInfo.java index a4f4e62f3..897fc3b1d 100644 --- a/base/common/src/com/netscape/certsrv/key/KeyInfo.java +++ b/base/common/src/com/netscape/certsrv/key/KeyInfo.java @@ -49,7 +49,7 @@ public class KeyInfo { protected String algorithm; @XmlElement - protected Integer size; + protected Integer strength; @XmlElement protected String ownerName; @@ -110,12 +110,12 @@ public class KeyInfo { this.algorithm = algorithm; } - public Integer getSize() { - return size; + public Integer getStrength() { + return strength; } - public void setSize(Integer size) { - this.size = size; + public void setStrength(Integer strength) { + this.strength = strength; } public String getOwnerName() { |