Generate a Certificate Signing Request (CSR) using Java Keytool
-
Navigate to the directory where the Keystore was generated earlier.
-
Run the following command:
keytool -certreq -alias <ALIAS> -file csr.txt -keystore <SITE_NAME>.jks –ext SAN=dns:<SITE_NAME> -
In the command above,
<SITE_NAME>is the name of the Keystore generated in earlier section and<ALIAS>is the name of the entry in the Keystore that defined in earlier section. The CSR will manifest itself as an output file based on the Certificate Info you entered earlier. You will also need to enter the Keystore password to proceed. -
The CSR output file is in the same current working directory, for example,
<SITE_NAME>.txt.
Backing Up the Keystore
Save and back up the Keystore file to a safe, secure location.