How To create Keytool SSL certificate request? We can divide the request in three steps:
- The creation of the certificate’s Private Key
- The generation of the CSR (This is the information that you must submit to your SSL provider for the creation of the certificate)
- The import of the certificate in your keystore via keytool
Below the commands for the described steps:
- Keytool -genkey -alias AliasName -keyalg RSA -keysize 2048 -keystore “PathKeystore”
- keytool -certreq -alias AliasName -keyalg RSA -file FileName.csr -keystore “PathKeystore” -ext SAN=dns:DNSName.it,Hostname,…
- keytool -import -alias AliasName -keystore “PathKeystore” -file FileName.cer
For more information check the Keytool Oracle Documentation