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!

keytool - Whats the difference between

843811Apr 19 2006 — edited Aug 21 2006
Please help. Its been 14 hours of no sleep and I cant find the answer.

Can someone please tell me why when using the keytool to create my keystore the "keystore password" and the "key password" must be the same?
---
When these values are the same, I can hit my Tomcat server over the https call?
---
So, the following will work, I can even change the changeit to anything that I want as long as 1. I enter the same value for the key password and 2. update the server.xml file in the tomcat/conf folder.
---
C:\>keytool -genkey -alias myProject -keyalg RSA
Enter keystore password:  changeit
What is your first and last name?
  [Unknown]:  localhost
What is the name of your organizational unit?
  [Unknown]:  Test
What is the name of your organization?
  [Unknown]:  Co
What is the name of your City or Locality?
  [Unknown]:  Johnstown
What is the name of your State or Province?
  [Unknown]:  PA
What is the two-letter country code for this unit?
  [Unknown]:  US
Is CN=localhost, OU=Test, O=Co, L=Johnstown, ST=PA, C=US correct?
  [no]:  y

Enter key password for <MIFI>
        (RETURN if same as keystore password):  changeit
---
However, if I were to use different values for the "keystore password" and the "key password" when I try and hit my server over https it fails.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2006
Added on Apr 19 2006
4 comments
1,628 views