summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Magne <jmagne@redhat.com>2012-02-13 16:27:13 -0800
committerJack Magne <jmagne@redhat.com>2012-02-13 19:02:41 -0800
commit2f1ae9843d7239e970effa5e4692f3c4ab2eff6f (patch)
tree7ea9f519769ad7c13eeb06579092e5d766d1a3ac
parenta9680c7b7097c6b715c57c6581d4f24a5e4ee8b8 (diff)
downloadpki-2f1ae9843d7239e970effa5e4692f3c4ab2eff6f.tar.gz
pki-2f1ae9843d7239e970effa5e4692f3c4ab2eff6f.tar.xz
pki-2f1ae9843d7239e970effa5e4692f3c4ab2eff6f.zip
KRA symmetric key cmake support.
Changes to make the cmake build of this feature work. Change to the .classpath to allow the DRMTest.java test client to run under Eclipse, by adding additional jar paths to allow the client to run.
-rw-r--r--pki/.classpath5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequest.java2
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java11
-rw-r--r--pki/base/kra/src/CMakeLists.txt3
-rw-r--r--pki/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java6
5 files changed, 16 insertions, 11 deletions
diff --git a/pki/.classpath b/pki/.classpath
index c4d60d871..8ce6c7f85 100644
--- a/pki/.classpath
+++ b/pki/.classpath
@@ -28,5 +28,10 @@
<classpathentry kind="lib" path="/usr/share/candlepin/lib/jaxrs-api-2.2.1.GA.jar"/>
<classpathentry kind="lib" path="/usr/share/candlepin/lib/resteasy-jaxrs-2.2.1.GA.jar"/>
<classpathentry kind="lib" path="/usr/share/java/apache-commons-cli.jar"/>
+ <classpathentry kind="lib" path="/usr/share/java/jakarta-commons-httpclient.jar"/>
+ <classpathentry kind="lib" path="/usr/share/java/apache-commons-logging.jar"/>
+ <classpathentry kind="lib" path="/usr/share/java/commons-codec.jar"/>
+ <classpathentry kind="lib" path="/usr/share/candlepin/lib/jaxb-impl-2.1.12.jar"/>
+ <classpathentry kind="lib" path="/usr/share/candlepin/lib/resteasy-jaxb-provider-2.2.1.GA.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
index ec1f43fb3..e43856e2d 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
@@ -160,6 +160,8 @@ public interface IRequest {
public static final String SECURITY_DATA_SESS_PASS_PHRASE = "sessionWrappedPassphrase";
public static final String SECURITY_DATA_IV_STRING_IN = "iv_in";
public static final String SECURITY_DATA_IV_STRING_OUT = "iv_out";
+ public static final String SECURITY_DATA_SESS_WRAPPED_DATA = "sessWrappedSecData";
+ public static final String SECURITY_DATA_PASS_WRAPPED_DATA = "passPhraseWrappedData";
// requestor type values.
diff --git a/pki/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java b/pki/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java
index fd9d2d2c0..6a90a7c8f 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java
@@ -23,8 +23,6 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;
import com.netscape.certsrv.apps.CMS;
@@ -37,7 +35,6 @@ import com.netscape.certsrv.request.IRequestQueue;
import com.netscape.certsrv.request.RequestId;
import com.netscape.certsrv.request.RequestStatus;
import com.netscape.cms.servlet.request.model.RecoveryRequestData;
-import com.netscape.kra.SecurityDataRecoveryService;
/**
* @author alee
@@ -116,8 +113,8 @@ public class KeyDAO {
throw new EBaseException("Can't obtain Volatile requestParams in KeyDAO.getKey!");
}
- String sessWrappedKeyData = (String) requestParams.get(SecurityDataRecoveryService.ATTR_SESS_WRAPPED_DATA);
- String passWrappedKeyData = (String) requestParams.get(SecurityDataRecoveryService.ATTR_PASS_WRAPPED_DATA);
+ String sessWrappedKeyData = (String) requestParams.get(IRequest.SECURITY_DATA_SESS_WRAPPED_DATA);
+ String passWrappedKeyData = (String) requestParams.get(IRequest.SECURITY_DATA_PASS_WRAPPED_DATA);
String nonceData = (String) requestParams.get(IRequest.SECURITY_DATA_IV_STRING_OUT);
if (sessWrappedKeyData != null || passWrappedKeyData != null) {
@@ -164,8 +161,8 @@ public class KeyDAO {
nonceData = null;
keyData = new KeyData();
- sessWrappedKeyData = (String) requestParams.get(SecurityDataRecoveryService.ATTR_SESS_WRAPPED_DATA);
- passWrappedKeyData = (String) requestParams.get(SecurityDataRecoveryService.ATTR_PASS_WRAPPED_DATA);
+ sessWrappedKeyData = (String) requestParams.get(IRequest.SECURITY_DATA_SESS_WRAPPED_DATA);
+ passWrappedKeyData = (String) requestParams.get(IRequest.SECURITY_DATA_PASS_WRAPPED_DATA);
nonceData = (String) requestParams.get(IRequest.SECURITY_DATA_IV_STRING_OUT);
}
diff --git a/pki/base/kra/src/CMakeLists.txt b/pki/base/kra/src/CMakeLists.txt
index a023c00b2..d265eeecd 100644
--- a/pki/base/kra/src/CMakeLists.txt
+++ b/pki/base/kra/src/CMakeLists.txt
@@ -75,14 +75,17 @@ set(pki-kra_java_SRCS
com/netscape/kra/KeyRecoveryAuthority.java
com/netscape/kra/EnrollmentService.java
com/netscape/kra/RecoveryService.java
+ com/netscape/kra/SecurityDataRecoveryService.java
com/netscape/kra/TokenKeyRecoveryService.java
com/netscape/kra/EncryptionUnit.java
com/netscape/kra/KRAService.java
com/netscape/kra/NetkeyKeygenService.java
+ com/netscape/kra/SecurityDataService.java
com/netscape/kra/KRANotify.java
com/netscape/kra/KRAPolicy.java
com/netscape/kra/TransportKeyUnit.java
com/netscape/kra/StorageKeyUnit.java
+ com/netscape/kra/ArchiveOptions.java
)
diff --git a/pki/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java b/pki/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java
index b38730949..6673488e1 100644
--- a/pki/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java
+++ b/pki/base/kra/src/com/netscape/kra/SecurityDataRecoveryService.java
@@ -79,8 +79,6 @@ public class SecurityDataRecoveryService implements IService {
private ITransportKeyUnit mTransportUnit = null;
public static final String ATTR_SERIALNO = "serialNumber";
- public static final String ATTR_SESS_WRAPPED_DATA = "sessWrappedSecData";
- public static final String ATTR_PASS_WRAPPED_DATA = "passPhraseWrappedData";
public static final String ATTR_KEY_RECORD = "keyRecord";
public SecurityDataRecoveryService(IKeyRecoveryAuthority kra) {
@@ -200,7 +198,7 @@ public class SecurityDataRecoveryService implements IService {
pass);
}
- params.put(ATTR_PASS_WRAPPED_DATA, pbeWrappedData);
+ params.put(IRequest.SECURITY_DATA_PASS_WRAPPED_DATA, pbeWrappedData);
} catch (Exception e) {
throw new EBaseException("Can't unwrap pass phase! " + e.toString());
@@ -242,7 +240,7 @@ public class SecurityDataRecoveryService implements IService {
}
String wrappedKeyData = com.netscape.osutil.OSUtil.BtoA(key_data);
- params.put(ATTR_SESS_WRAPPED_DATA, wrappedKeyData);
+ params.put(IRequest.SECURITY_DATA_SESS_WRAPPED_DATA, wrappedKeyData);
params.put(IRequest.SECURITY_DATA_IV_STRING_OUT, ivStr);
}