Issue SSL Certificate and Configure Tomcat HTTPS
In this video we descried the following topics:
Generate private key and CSR using Java key tool
Issue certificate from CSR
Certificate formats: OpenSSL, PFX and JKS
Convert OpenSSL and PFX to JKS
Certificate Chain appending
Certificate Configurations in tomcat
Code used during video:
set JAVA_BIN=”C:Program FilesJavajre1.8.0_341bin”
cd %UserProfile%Desktop
# Generate the private key and create keystore
%JAVA_BIN%keytool -genkey -keypass tomcat -alias tomcat -keyalg RSA -keysize 2048 -keystore www_your-domain_com.jks -storepass tomcat -dname “CN=www.your-domain.com,OU=IT,O=Company,L=Lond,Riyadh=Riyadh,C=SA”
# Create Certificate sign request
%JAVA_BIN%keytool -certreq -alias tomcat -keystore www_your-domain_com.jks -storepass tomcat -file cert-req.txt
Tomcat server.xml config
port=”443″ protocol=”org.apache.coyote.http11.Http11Nio2Protocol” SSLEnabled=”true” keystoreFile=”conf/www_your-domain_com.jks” keystorePass=”tomcat”