Skip to content

Commit dca8ded

Browse files
committed
Creating direct-common 8.1.3.
Fixing issue with HSM private key objects where the objects were attempting to erroneously create KeySpec objects using non-key binary data.
1 parent 3b26163 commit dca8ded

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>direct-common</artifactId>
66
<name>Direct Project common APIs</name>
7-
<version>8.1.2</version>
7+
<version>8.1.3</version>
88
<description>Direct Project common APIs. Includes instrumentation, auditing, and other utility APIs</description>
99
<inceptionYear>2010</inceptionYear>
1010
<url>http://api.nhindirect.org/x/www/api.nhindirect.org/java/site/direct-common/${project.version}</url>

src/main/java/org/nhindirect/common/crypto/impl/StaticCachedPKCS11TokenKeyStoreProtectionManager.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import java.security.Key;
44
import java.security.KeyStore;
55

6-
import javax.crypto.spec.SecretKeySpec;
7-
86
import org.nhindirect.common.crypto.PKCS11Credential;
97
import org.nhindirect.common.crypto.exceptions.CryptoException;
108

@@ -66,20 +64,6 @@ public void initTokenStore() throws CryptoException
6664
keystoreProtectionKey = this.getKey(keyStorePassPhraseAlias);
6765
privateKeyProtectionKey = this.getKey(privateKeyPassPhraseAlias);
6866

69-
// some HSMs only store references to the keys in these objects and
70-
// and still have to go back to the HSM to pull the actual key data
71-
// create a key object from the encoded data
72-
73-
System.out.print("keystoreProtectionKey is null: " + (keystoreProtectionKey.getEncoded() != null));
74-
System.out.print("privateKeyProtectionKey is null: " + (privateKeyProtectionKey.getEncoded() != null));
75-
76-
if (keystoreProtectionKey.getEncoded() != null)
77-
keystoreProtectionKey = new SecretKeySpec(keystoreProtectionKey.getEncoded(), "");
78-
79-
if (privateKeyProtectionKey.getEncoded() != null)
80-
privateKeyProtectionKey = new SecretKeySpec(privateKeyProtectionKey.getEncoded(), "");
81-
82-
8367

8468
}
8569
catch (Exception e)

0 commit comments

Comments
 (0)