Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error in getting Private Key from KeyStore

843811Jun 5 2003 — edited Dec 4 2005
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 1 2006
Added on Jun 5 2003
7 comments
5,492 views