Announcements

SecurID® Discussions

Browse the SecurID discussion board to get product help and collaborate with other SecurID users.
CraigLarson
Beginner
Beginner

When I try to initialize a KeyStore object, I get an exception CKR_ATTRIBUTE_TYPE_INVALID. I create a CallBackHandler object in Java, and then call cardKeystoreBuilder.getKeyStore(). I am using a CAC card. I get prompted to enter my PIN, and then get t

Here is my sample code:

 

File acpkcs64bit = new File("C:\\Progra~2\\ActivIdentity\\ActivClient\\acpkcs211.dll");

File pkcsProperties = new File("C:\\TestDir\\pkcs11.properties");

 

Security.addProvider(new sun.security.pkcs11.SunPKCS11(pkcsProperties.getPath()));

 

CallbackHandler cardCallbackHandler = new CallbackHandler() {

     public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {} };

 

cardKeystoreBuilder = KeyStore.Builder.newInstance("PKCS11", null, new KeyStore.CallbackHandlerProtection(cardCallbackHandler());

 

KeyStore keyStore = cardKeystoreBuilder.getKeyStore();

 

When the code tries to initialize the KeyStore object, I get the exception CKR_ATTRIBUTE_TYPE_INVALID.

 

I do have ActivClient installed on my machine.

 

The contents of my pkcs11.properties file are as follows:

 

name=ActivClient

library = C:\Program~2\ActivIdentity\ActivClient\acpkcs211.dll

 

I apologize if I posted this in the wrong location.  I'd appreciate any help you can give me.

0 Likes
1 Reply
CraigLarson
Beginner
Beginner

Also, I am using Java JDK 1.7.0_45.

0 Likes