summaryrefslogtreecommitdiffstats
path: root/base/common/src/com
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2017-05-01 18:25:59 -0400
committerAde Lee <alee@redhat.com>2017-05-06 10:06:42 -0400
commitbea446868e282955d9c70028be657530eaccbe29 (patch)
tree7cca08320ae943614b893649fafe99e09a2f6cd3 /base/common/src/com
parentf84bfab30647ae1492fcdca0a026bfa4d91350c9 (diff)
downloadpki-bea446868e282955d9c70028be657530eaccbe29.tar.gz
pki-bea446868e282955d9c70028be657530eaccbe29.tar.xz
pki-bea446868e282955d9c70028be657530eaccbe29.zip
Use AES-CBC in storage unit for archival in key wrapping
When AES-KW or AES-KWP is not available, we need to be sure to use a key wrap algorithm that is available for keywrap. This would be AES-CBC. Removes some TODOs. Refactor so that getWrappingParams is only defined on the StorageUnit, which is where it makes sense in any case. Part of Bugzilla BZ# 1386303 Change-Id: I28711f7fe0a00e9d12d26c6e170fb125418d6d51
Diffstat (limited to 'base/common/src/com')
-rw-r--r--base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java2
-rw-r--r--base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java6
2 files changed, 6 insertions, 2 deletions
diff --git a/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java b/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java
index add15cb81..e55713dd6 100644
--- a/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java
+++ b/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java
@@ -63,7 +63,5 @@ public interface IEncryptionUnit extends IToken {
SymmetricKey.Usage usage, WrappingParams params) throws Exception;
- public WrappingParams getWrappingParams() throws Exception;
-
public WrappingParams getOldWrappingParams();
}
diff --git a/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java b/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
index cd941438a..bfc601202 100644
--- a/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
+++ b/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
@@ -174,4 +174,10 @@ public interface IStorageKeyUnit extends IEncryptionUnit {
public PrivateKey unwrap(byte privateKey[], PublicKey pubKey, boolean temporary,
WrappingParams params) throws Exception;
+ /**
+ * Get the wrapping parameters for this storage unit
+ *
+ */
+ public WrappingParams getWrappingParams(boolean encrypt) throws Exception;
+
}