use existing SSL certificate for JIRA/Tomcat – pkcs12 format

I mantain a self-hosted JIRA instance and wanted to also use my existing domain SSL certificate for it.

1. prepare your existing certificate (crt), private key and the CA cert (you can re-download them from your SSL vendor if needed or directly from cpanel)

2. generate the p12 format from your existing cert and choose a pass:
openssl pkcs12 -export -in yourcert.crt -inkey yourprivate.key -out yourcert.p12 -name tomcat -CAfile CA.crt -caname root -chain

3. configure jira/tomcat editing conf/server.xml making sure you have:
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
URIEncoding="UTF-8" keystorePass="changeit"
keystoreType="pkcs12" keystoreFile="/path where you have/yourcert.p12" />

4. restart JIRA