From 3e413200912690b4680f65efc2c9dc11f3a18fab Mon Sep 17 00:00:00 2001 From: Andrew Wnuk Date: Fri, 15 Nov 2013 18:35:01 -0800 Subject: REST interface extension This patch provides REST interface extension allowing recovery of asymmetric keys. Ticket #439. --- .../src/com/netscape/certsrv/key/KeyData.java | 16 +++++++++++ .../netscape/certsrv/key/KeyRecoveryRequest.java | 33 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) (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 2ee7d1b92..b71861470 100644 --- a/base/common/src/com/netscape/certsrv/key/KeyData.java +++ b/base/common/src/com/netscape/certsrv/key/KeyData.java @@ -39,6 +39,9 @@ public class KeyData { @XmlElement String nonceData; + @XmlElement + String p12Data; + public KeyData() { // required for JAXB (defaults) } @@ -73,4 +76,17 @@ public class KeyData { this.nonceData = nonceData; } + /** + * @return the p12Data + */ + public String getP12Data() { + return p12Data; + } + + /** + * @param p12Data the p12Data to set + */ + public void setP12Data(String p12Data) { + this.p12Data = p12Data; + } } diff --git a/base/common/src/com/netscape/certsrv/key/KeyRecoveryRequest.java b/base/common/src/com/netscape/certsrv/key/KeyRecoveryRequest.java index d14f61241..aa69d8336 100644 --- a/base/common/src/com/netscape/certsrv/key/KeyRecoveryRequest.java +++ b/base/common/src/com/netscape/certsrv/key/KeyRecoveryRequest.java @@ -64,6 +64,12 @@ public class KeyRecoveryRequest { @XmlElement protected String nonceData; + @XmlElement + protected String certificate; + + @XmlElement + protected String passphrase; + public KeyRecoveryRequest() { // required for JAXB (defaults) } @@ -152,4 +158,31 @@ public class KeyRecoveryRequest { this.nonceData = nonceData; } + /** + * @return the certificate + */ + public String getCertificate() { + return certificate; + } + + /** + * @param certificate the certificate to set + */ + public void setCertificate(String certificate) { + this.certificate = certificate; + } + + /** + * @return the passphrase + */ + public String getPassphrase() { + return passphrase; + } + + /** + * @param passphrase the passphrase to set + */ + public void setPassphrase(String passphrase) { + this.passphrase = passphrase; + } } -- cgit