Forum Stats

  • 3,854,655 Users
  • 2,264,394 Discussions
  • 7,905,747 Comments

Discussions

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

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

Tagged:
This discussion has been closed.