Need the instructions for installing a new certificate into Web Viewer Apache Tomcat as the current one is due to expire.
Required steps:
1. The basic command to create a private key:
keytool -genkey -keyalg RSA -alias tomcat -keystore tomcatNew.jks -storepass tomcat -keysize 4096 -validity 730
Notes:
After typing the above command, the following values will be prompted for. To help knowing what values to enter this command on previous keystore will show what was entered to create that file: keytool -v -list -keystore yourOldKeystore.jks.
Answer the questions
What is your first and last name?
[Unknown]: First Name Last Name
What is the name of your organizational unit?
[Unknown]: askYourCA
What is the name of your organization?
[Unknown]: askYourCA
What is the name of your City or Locality?
[Unknown]: askYourCA
What is the name of your State or Province?
[Unknown]: Your State
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=First Name Last Name OU=askYourCA, O=askYourCA, L=askYourCA, ST=Your State, C=US correct?
[no]: yes
2. The basic command to generate a Certificate Signing Request (CSR) from the new keystore:
keytool -certreq -alias tomcat -file csr.txt -keystore tomcatNew.jks
3. Third party references:
Apache Tomcat 9 > SSL/TLS Configuration How-To > Installing a Certificate from a Certificate Authority
DigCert > Tomcat: Create CSR & Install SSL/TLS Certificate (Keytool)