Java + SSL + Keystore = Royal PITA
I just spent all morning reading and trying things from every SSL guide and support ticket on these forums and got nowhere.
I’ve finally figured out and documented the steps that actually work to get a signed SSL certificate installed on Openfire.
Note: Java’s keytool DOES NOT WORK for importing Openfire’s keystore!
- Set Openfire’s keystore to JKS mode:
xmpp.socket.ssl.storeType = JKS
- Convert yourdomain.net.au cert to pkcs12 with private key:
openssl pkcs12 -export -in yourdomain.net.au.crt -inkey yourdomain.net.au.key -out yourdomain.net.au.key.pkcs12 -name yourdomain.net.au
- Copy pkcs12 to workstation and install keystore-explorer
Create a new JKS KeyStore in keystore-explorer
Import pkcs12 to keystore-explorer
Append to cert chain all other upstream certs in zip file from your ssl provider
Save the keystore with changeit as keystore password
Copy keystore back to Openfire
scp keystore root@int-jabber-01:/usr/share/openfire/resources/security/keystore
- Fix permissions
chmod 644 /usr/share/openfire/resources/security/keystore
chown openfire:openfire /usr/share/openfire/resources/security/keystore
- Restart Openfire
service openfire restart