Code Comments
Programming Forum and web based access to our favorite programming groups.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.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.