Keytool SSL certificate request

How To create Keytool SSL certificate request? We can divide the request in three steps:

  1. The creation of the certificate’s Private Key
  2. The generation of the CSR (This is the information that you must submit to your SSL provider for the creation of the certificate)
  3. The import of the certificate in your keystore via keytool

Below the commands for the described steps:

  1. Keytool -genkey -alias AliasName -keyalg RSA -keysize 2048 -keystore “PathKeystore”
  2. keytool -certreq -alias AliasName -keyalg RSA -file FileName.csr -keystore “PathKeystore” -ext SAN=dns:DNSName.it,Hostname,…
  3. keytool -import -alias AliasName -keystore “PathKeystore” -file FileName.cer

For more information check the Keytool Oracle Documentation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s