Install SSL Certificate on Jasper Report Server

Pre-requisite:

  • Download and install OpenSSL, available here – https://slproweb.com/products/Win32OpenSSL.html

Step 1: Create OpenSSL Command

Use https://www.digicert.com/easy-csr/openssl.htm to generate OpenSSL command

Example:

openssl req -new -newkey rsa:2048 -nodes -out jasper_domain_com.csr -keyout jasper_domain_com.key -subj “/C=IN/ST=Tamilnadu/L=Chennai/O=IT/OU=itadminguide.com/CN=jasper.domain.com”

Step 2: Use OpenSSL tool to Create CSR, execute above generated command in OpenSSL tool installed during pre-requisite.

Step 3: Create certificate using the CSR generated in Step 2 

Step 4: Create PFS file from the certificate and key

openssl pkcs12 -export -name tomcat -in <location of CRT certificate file> -inkey <location of private key> -out <location of .pfx file to be generated>

Example:

All in One WordPress Hosting Starts at 30$ per month
All in One WordPress Hosting
WordPress
High optimized WordPress hosting, secure firewall, HTTPS, Backup, hack-fix guarantee and many others at 30$ per month

openssl pkcs12 -export -name tomcat -in C:\Dump\jasper\jasper_domain_com.crt -inkey C:\Dump\jasper\jasper_domain_com.key -out C:\Dump\jasper\jasper_domain_com.pfx

Note: Importing above pkcs12 file would cause error because AES is not support in JAVA8, so I have to import to my local PC, export as PFX.

Step 6: Import PFS to Local PC and export as PFX again (remember to export with Private Key)

Step 7: Copy the newly generated PFX file and Private Key to Jasper server under <Jasper_Installation_folder>\certificate folder. (create this certificate folder, it does not exist by default)

Step 6: Stop Jasper service

Step 7: Add this line to server.xml file

<Connector port=”443″ protocol=”org.apache.coyote.http11.Http11Protocol” SSLEnabled=”true” maxThreads=”150″ scheme=”https” secure=”true” keystoreFile=”C:\Jaspersoft\jasperreports-server-cp-6.4.0\certificate\jasper_domain_com.pfx” keystorePass=”changeit” clientAuth=”false” sslProtocol=”TLS” keystoreType=”PKCS12″ />

Step 8: Start Jasper service