Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can reload pkcs#11 (digital signature) ?

843811Feb 14 2008 — edited Mar 17 2008
Hi Iam working on DigitalSignature.
Iam using Aladdin eToken pro32k

Initially Iam able to load usb tokens through application and sign the pdf documents.

1) Iam giving right password and able to do sign on pdf document through crypto usb token.

After this i didn't disconnected my usb token and try to sign another pdf doc but at this time

Iam giving wrong password(PIN) to usb token but it is going to sign successfully.

Here is the code for load a usbtoken through application.

// The cfg file contains name = GNFCeToken
//library = c:\WINDOWS\system32\eTpkcs11.dll

String configName = "C:/pkcs11.cfg";
Provider provider = new sun.security.pkcs11.SunPKCS11(configName);
Security.addProvider(provider);
KeyStore keyStore = null;
keyStore = KeyStore.getInstance("PKCS11",provider);

keyStore.load(null,tokenPassword);
provider = keyStore.getProvider();

For signing a pdf doc second time I need to reload the usb token every time.

So how can I reload usb token through programatically?

Any replys will appriciate greatly.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2008
Added on Feb 14 2008
8 comments
1,310 views