For Programmers: Free Programming Magazines  


Home > Archive > Java Security > March 2004 > Java Secure Socket Extension (JSSE): multiple key entries in keystore when initializi









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Java Secure Socket Extension (JSSE): multiple key entries in keystore when initializi
Perro

2004-03-19, 8:54 pm

Is it possible to have multiple key entries in the keystore used by the
KeyManagerFactory when using the reference implementation?
(SunJSSE included in J2SE 1.4.2)

I'm using keystore type "jks".
I call the init method of my KeyManagerFactory instance with the
appropriate KeyStore instance and the password of a specific key
in that keystore as parameters. This only works when all key entries
are protected by the same password. Otherwise I get the following
exception:

java.security.UnrecoverableKeyException: Cannot recover key
at sun.security.provider.KeyProtector.recover(KeyProtector.java:301)
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:103)
at java.security.KeyStore.getKey(KeyStore.java:289)
at com.sun.net.ssl.internal.ssl.X509KeyManagerImpl.<init>(DashoA6275)
at com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl.engineInit(DashoA6275)
at javax.net.ssl.KeyManagerFactory.init(DashoA6275)
at client.SSLClient.main(SSLClient.java:24)

Is there a way to somehow select a specific key entry in the keystore
when initializing the KeyManagerFactory instance or to have arbitrary
key entries in your keystore.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com