Skip to Main Content

Java APIs

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!

keytool error: java.lang.Exception: Public keys in reply and keystore don't match

712319cc-4f1f-4a66-9d4b-b5fbcba7bf2eOct 8 2014 — edited Oct 8 2014

I have this problem when I import a certification file into keystore:

keytool error: java.lang.Exception: Public keys in reply and keystore don't match

I do this this operation:

1) create my keystore on the server :

keytool -genkey -keystore C:\keystore.keystore -alias pippo -keyalg RSA

2) i have domain.pfx and convert it whit this command:

  • openssl pkcs12 -in domain.pfx -clcerts -nokeys -out domain.cer
  • openssl pkcs12 -in domain.pfx -nocerts -nodes -out domain_encrypted.key
  • openssl rsa -in domain_encrypted.key -out domain.key

Now I have 3 new files:

  • domain.cer
  • domain_encrypted.key
  • domain.key

3) In the end, Import the domain.cer into C:\keystore.keystore in the jboss alias:

keytool -import -alias pippo -keystore C:\keystore.keystore -file C:\cert\domain.cer

But i Have this error:

keytool error: java.lang.Exception: Public keys in reply and keystore don't match

What is the problem?

Thanks Fabrizio

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2014
Added on Oct 8 2014
0 comments
1,727 views