My notes using IBM Keyman
I've had great luck with IBM KeyMan. (I used a spare windows box to do the KeyMan stuff)
The existing SSL certs that we have for raydiance came from the vendor in PEM format.
I would like to convert them to a format that the Tomcat aplications server can use so that we can run a signed cert on zimbra.raydiance-inc.com
Some of the examples over at wiki.zimbra.com mention some java code involving Jetty, which is a Java HTTP server. Apparently some of the code that is a part of Jetty can convert a PKCS12 cert to a java keystore format. OpenSSL does the conversion from PEM to PKCS12. You can get Jetty Here:
http://heanet.dl.sourceforge.net/sou...etty-6.0.1.zip (yea, the class names must have changed, because i was unable to use this)
The Zimbra wiki article that I am working with is here:
http://wiki.zimbra.com/index.php?tit...omcat_.2F_Java
It works! My notes
-------------------------------
Convert the PEM format certificates to PKCS12 as per the zimbra wiki page.
Then use the IBM KeyMan utility as follows. (note when keyman opens multiple windows, they can talk to each other, so dont think everything has to happen in the same window)
1. Open up the pkcs12 certificate in one window.
2. Open another window and create a new keystore called zimbra_new_keystore. Save it to a file.
3. Go to the window with the PKCS12 certificate, and click export. It will ask you to where, and you tell it to put it in the keystore you created (it will be in a dropdown now), make sure to include private keys.
4. Go back to the zimbra_new_keystore window, you will note that there is a cert in here now, the one you exported from the PKCS12 store.
5. Now save the zimbra_new_keystore , this will write it out to the filename you previously set up.
Woohoo, now you have a complete zimbra_keystore, although the alias will be some random number, not "1" like on the zimbra wiki page
Copy this file back to your zimbra machine, we're going to need to do some keytool magic. Lets see what's in our nifty new keystore file shall we?
keytool -list -keystore ./zimbra_new_keystore
You will get back a listing that looks like this (after entering the password "zimbra").
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry
alias, Sep 28, 2006, keyEntry,
Certificate fingerprint (MD5): 00:00:00:00:00:00

D:00:00:00
The alias might be some random number, you need the whole alias without the comma at the end. Then run the following command to move it over to a new alias. oldalias is the wierd numeric automatic alias.
keytool -keystore ./zimbra_new_keystore -keyclone -alias oldalias -dest tomcat
Now if you list the keystore, using the following command, you will see both aliases.
keytool -list -keystore ./zimba_new_keystore
You should delete the old alias
keytool -delete -alias oldalias -keystore ./keystore
Now the cert is all shiny and ready, lets backup the old zimbra keystore and move in the new one, making sure to duplicate the permissions and ownership exactly. Let us proceed with great haste!
mv zimbra_new_keystore /opt/zimbra/tomcat/conf/
cd /opt/zimbra/tomcat/conf/
mv keystore keystore.bak
mv zimbra_new_keystore keystore
chmod 664 keystore
#now restart zimbra
zmcontrol stop
zmcontrol start