This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Security and the fly likes modify keystore Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Security
Bookmark "modify keystore" Watch "modify keystore" New topic

modify keystore

Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
I want to modify the keystore file and change its validity. Is it something possible? I created the keystore using the following command

keytool -genkey -alias test -keystore test.keystore

the validity of this keystore is 3 months (using default) and the certificate that I added to the keystore is valid for 3 years. Is there anything I could do. because now when I launch the website and view the certificate its validity is only three months but when I check the certificate by double clicking it its validity is 3 years.

If this is not possible then can I make a new keystore and add the certificate to this new keystore.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
You can remove a certificate from a keystore by using the keytool -delete option.
Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
ok now here is my question then. What is happening is when I view the certificate in the browser it actually shows me the details of the keystore for example the valid dates of keystore not the certificate. so in browser when I say view certificate it shows me the keystore not the certificate.

Why do you think it is?
Thanks for your reply.
Don't get me started about those stupid light bulbs.
subject: modify keystore
jQuery in Action, 3rd edition