From b5cfe1746ca36861a0bf8039681f27275b9b9e59 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Wed, 5 Feb 2014 10:26:10 -0500 Subject: 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). --- .../src/com/netscape/certsrv/key/KeyData.java | 34 ++++++++++++++++++++++ .../src/com/netscape/certsrv/key/KeyInfo.java | 10 +++---- 2 files changed, 39 insertions(+), 5 deletions(-) (limited to 'base/common/src/com/netscape/certsrv/key') 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() { -- cgit