permaculture playing cards*
The moose likes Security and the fly likes Public keys in reply and keystore don't match Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Public keys in reply and keystore don Watch "Public keys in reply and keystore don New topic

Public keys in reply and keystore don't match

moneer mohammed
Ranch Hand

Joined: Feb 18, 2005
Posts: 66
after i create keystore and CSR using keytool i went to openssl to create certificate then using keytool i tried to import this certificate the our keystore but i got this exception
keytool error: java.lang.Exception: Public keys in reply and keystore don't match

greg stark
Ranch Hand

Joined: Aug 10, 2006
Posts: 220
There is an alias option (-alias) that is common to the genkeypair, certreq, and importcert command. You must use the same alias for each command. If that doesn't help, you'll need to provide details about each of the commands.

Nice to meet you.
Bhavin Langalia

Joined: Jun 18, 2010
Posts: 2
I am also facing the same kind of issue. I have already kept alias same everywhere. I need to have this to implement WS Security feature with my web services. I am testing it through self signed certs created by me.

Thanks in advance.. :-)
I agree. Here's the link:
subject: Public keys in reply and keystore don't match
Similar Threads
import signed certificate into tomcat
configuring ssl(.p7b) certificate for tomcat https
How to I validate and retireve a cert from a keystore programmatically?
keytool - import CA reply certificate error
Signature does not match