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!

Self Signed Certificate incorrect keystore password?

FoobrotherAug 2 2011 — edited Aug 3 2011
Hi everybody,

I'm starting to learn how to make self-signed certificates using keytool. I use the Keytool page to learn: http://download.oracle.com/javase/1.3/docs/tooldocs/win32/keytool.html
However I'm having a problem with an error saying that my keystore password is incorrect?!

Here is what I do:
-------------------------------
C:\Program Files\Java\jdk1.5.0_11\bin>keytool -genkey -dname "cn=Paul Smith, ou=myOU, o=myO, c=US" -alias psmith -keypass kpassword -keystore psmisth.ks -storepass spassword -validity 360

C:\Program Files\Java\jdk1.5.0_11\bin>keytool -export -alias psmith -file psmith.cer
Enter keystore password: kpassword
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect

C:\Program Files\Java\jdk1.5.0_11\bin>keytool -list -v -keystore psmith.ks
Enter keystore password: kpassword

Keystore type: jks
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: psmith
Creation date: 02-Aug-2011
Entry type: keyEntry
Certificate chain length: 1
Certificate[1]:
[...]
-----------------------------------

I have tried to delete the .ks file and try again but nothing changed. I don't have any .keystore file in my folder.

Why does it say that my password is incorrect?
This post has been answered by sabre150 on Aug 2 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2011
Added on Aug 2 2011
2 comments
1,419 views