I've tried searching for this and all the documentation seems to be from the perspective of creating a new keystore and/or a new alias. However, I have the keystore with the alias I want as a PrivateKeyEntry and the soon-to-expire Globalsign code-signing certificate installed to it.
Now, I want to know the proper procedure for updating the certificate with a new one under the same alias/PrivateKeyEntry?
TIA for your help.
Regards, B.K.
I think I got it!
The answer is:
~ $ cp -a ~/.keystore.jks ~/baks/20140917.keystore.jks
~ $ keytool -certreq -v -alias myApp2 -file 20140917_myApp2_certreq.csr -keystore ~/.keystore.jks
~ $ keytool -importcert -v -alias gssha2root_r3 -keystore ./cacerts -file ./dls/GlobalSign/20140916_GlobalsignSHA256root_cert.cer
~ $ keytool -importcert -v -trustcacerts -alias myApp2 -keystore ~/.keystore.jks -file ./dls/Globalsign/OS201400000001.cer
Seems to work as expected. I am now signing my java applets with the new cert. And, the jars are verifying with the new certificate.
HTH.