For the need of my application which i developed inside windows XP i need to move existing mozilla keystore data to a jdeveloper java keystore. I have found a very "useful" article at address:
http://developers.sun.com/prodtech/appserver/reference/techart/keymgmt.html For this funxction first i need to add a provider to my java.security file. I added this line security.provider.7=sun.security.pkcs11.SunPKCS11 c:/cert/pkcs11.cfg with this data inside pkcs11.cfg name=PKCS11 library=C:\\jdeveloper\\jdk\\jre\\bin\\softokn3.dll this doesnt work because jdeveloper returns error: What have i done wrong=?? Anybody has a working pkcs11.cfg file?? Exception in thread "main" java.security.ProviderException: Initialization failed I also tried to add this provider with modutil tools but wthou success. All i got was C:\>modutil -add pkcs11 -libfile C:\NSS\nss-3.11.4\bin\softok3n.dll -dbdir c:/cert -secmod secmod.db WARNING: Performing this operation while the browser is running could causecorruption of your security databases. If the browser is currently running, you should exit browser before continuing this operation. Type 'q <enter>' to abort, or <enter> to continue: Using database directory c:/cert... ERROR: Failed to add module "pkcs11". Probable cause : "error 126". When using this code written in article and by adding provider dynamic String ksloc = "mytestkeystore.jks"; char[] kspwd = "123456".toCharArray(); String pkcs11cfg = "pkcs11.cfg"; char[] pk11pwd = "123456".toCharArray(); loadNSSLibrary(); Provider p = new SunPKCS11(pkcs11cfg); Security.addProvider(p); Provider[] providers = Security.getProviders(); for ( int i=0; i < providers.length; i++ ) { System.out.println("Provider " +i+ ": " + providers[i].getName()); } # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c47a64, pid=720, tid=2368 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [MSVCRT.dll+0x37a64] # # An error report file with more information is saved as hs_err_pid720.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Thanx for all responses, i am stuck and i cant get out! Blaz _______________________________________________ dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto