2 Replies Latest reply: Aug 3, 2011 3:32 AM by 835885 RSS

    Self Signed Certificate incorrect keystore password?

      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

      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?