CSR Generation: Java Based Web Servers (Tomcat) using keytool
Posted by Nick France on August 07 2006 08:06
Generating a Certificate Signing Request (CSR) using Java Based Web Servers
1. Create Keystore with Keytool
--> keytool -genkey -keyalg RSA -keysize 2048 -keystore domain.keystore
If you want to use an alias for the site certificate include -alias MY_SITE (where MY_SITE is the alias name), default is mykey.
(NOTE validity may vary)
The following questions will be asked if not known:
When you answer 'y' or 'yes' the password is then requested:
Alternative Keystore Generation Method
Alternatively, you can create the keystore without going through all of the prompts:
2. Create CSR with Keytool
--> keytool -certreq -keyalg RSA -file domain.csr -keystore domain.keystore
You will be prompted to enter the password.
If the password is correct then the CSR is created.