I am trying to generate keystore for my application using keytool command follows:
keytool -genkey -alias tomcat -keystore tomcat.keystore -keyalg RSA -keysize 2048 < keystore.data.txt
And it's working fine with JDK5 and not working with JDK6. FYI:
When executing with JDK5
Enter keystore password: What is your first and last name?
[Unknown]: What is the name of your organizational unit?
[Unknown]: What is the name of your organization?
[Unknown]: What is the name of your City or Locality?
[Unknown]: What is the name of your State or Province?
[Unknown]: What is the two-letter country code for this unit?
[Unknown]: Is CN=tpserver-hostname, OU=MyCompany, O=MyOrg., L=MyCity, ST=MyState (ST), C=IN correct?
[no]:
Enter key password for <tomcat>
(RETURN if same as keystore password):
When executing same with JDK6
Enter keystore password: Re-enter new password: They don't match. Try again
Enter keystore password: Re-enter new password: They don't match. Try again
Enter keystore password: Re-enter new password: They don't match. Try again
Too many failures - try later
Please Help me.
Yes, you are correc. 'Re-enter new password' is added since JDK6. So you have to enter after password