Error in getting Private Key from KeyStore
843811Jun 5 2003 — edited Dec 4 2005Hi,
I am using JKS java keystore. I have successfully added two private keys and associated certificates into the keystore. When I try to access my first private key using the method keystore.getKey(alias,password) I get the key successfully, but when I try to access the second key by using the same method, I get the following exception:
java.security.UnrecoverableKeyException: excess private key
at sun.security.provider.KeyProtector.recover(KeyProtector.java:314)
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:106)
at java.security.KeyStore.getKey(KeyStore.java:250)
Any ideas to fix this problem?
Regards
YK