java - Always ask for the pin KeyStore PKCS11 -


i have applet digital signature. problem initialize keystore, remains open until close browser. how ask pin every time want sign?

this initialization code:

/* se obtiene el proveedor del contenedor de claves */ pkcs11config = "name=athena\nlibrary=c:\\windows\\system32\\asepkcs.dll"; byte[] pkcs11configbytes1 = pkcs11config.getbytes(); bytearrayinputstream configstream1 = new bytearrayinputstream(pkcs11configbytes1); bouncycastleprovider providerbc = new bouncycastleprovider();  security.addprovider(providerbc); //cargo el proveedor de la cipe providerpkcs11 = new sunpkcs11(configstream1); security.addprovider(providerpkcs11); ks = keystore.getinstance("pkcs11", providerpkcs11); ks.load(null, null);  

can tell me how fix it? thank you.

the pkcs#11 provider ask pin when required. , required per operation if cka_always_authenticate flag set token key being used. allow user pin entered, callback handler has implemented according pkcs#11 provider documentation.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -