Skip to content

Instantly share code, notes, and snippets.

@Chandrakanth339
Forked from xdu/certificateKeytool.md
Created June 21, 2018 03:26
Show Gist options
  • Save Chandrakanth339/12d0c4352fb58f74ba1e11d4757cedaf to your computer and use it in GitHub Desktop.
Save Chandrakanth339/12d0c4352fb58f74ba1e11d4757cedaf to your computer and use it in GitHub Desktop.

Revisions

  1. @xdu xdu revised this gist Nov 11, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion certificateKeytool.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    * Run this command:

    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks \
    -validity <days> -keysize 2048
    -validity <days> -keysize 2048

    Where <days> indicate the number of days for which the certificate will be valid.

  2. @xdu xdu revised this gist Nov 11, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion certificateKeytool.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,8 @@
    * Open a command prompt or terminal.
    * Run this command:

    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048
    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks \
    -validity <days> -keysize 2048

    Where <days> indicate the number of days for which the certificate will be valid.

  3. @xdu xdu revised this gist Nov 11, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions certificateKeytool.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    * Open a command prompt or terminal.
    * Run this command:

    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048
    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048

    Where <days> indicate the number of days for which the certificate will be valid.

    @@ -13,7 +13,7 @@
    * Confirm that the information entered is correct.
    * When prompted with Enter key password for <tomcat>, press Enter to use the same password as the keystore password.
    * Run this command to verify the contents of the keystore:

    keytool -list -v -keystore selfsigned.jks

    keytool -list -v -keystore selfsigned.jks

    9 When prompted, enter the keystore password note in Step 3. The basic information about the generated certificate is displayed. Verify that the Owner and Issuer are
    * When prompted, enter the keystore password note in Step 3. The basic information about the generated certificate is displayed. Verify that the Owner and Issuer are
  4. @xdu xdu renamed this gist Nov 11, 2015. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions certificateKeytool.txt → certificateKeytool.md
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,18 @@
    To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux:
    ## To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux:

    1 Open a command prompt or terminal.
    2 Run this command:
    * Open a command prompt or terminal.
    * Run this command:

    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048

    Where <days> indicate the number of days for which the certificate will be valid.

    3 Enter a password for the keystore. Note this password as you require this for configuring the server.
    4 When prompted for first name and last name, enter the domain name of the server. For example, myserver or myserver.mycompany.com.
    5 Enter the other details, such as Organizational Unit, Organization, City, State, and Country.
    6 Confirm that the information entered is correct.
    7 When prompted with Enter key password for <tomcat>, press Enter to use the same password as the keystore password.
    8 Run this command to verify the contents of the keystore:
    * Enter a password for the keystore. Note this password as you require this for configuring the server.
    * When prompted for first name and last name, enter the domain name of the server. For example, myserver or myserver.mycompany.com.
    * Enter the other details, such as Organizational Unit, Organization, City, State, and Country.
    * Confirm that the information entered is correct.
    * When prompted with Enter key password for <tomcat>, press Enter to use the same password as the keystore password.
    * Run this command to verify the contents of the keystore:

    keytool -list -v -keystore selfsigned.jks

  5. @dahernan dahernan created this gist Aug 10, 2011.
    19 changes: 19 additions & 0 deletions certificateKeytool.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux:

    1 Open a command prompt or terminal.
    2 Run this command:

    keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048

    Where <days> indicate the number of days for which the certificate will be valid.

    3 Enter a password for the keystore. Note this password as you require this for configuring the server.
    4 When prompted for first name and last name, enter the domain name of the server. For example, myserver or myserver.mycompany.com.
    5 Enter the other details, such as Organizational Unit, Organization, City, State, and Country.
    6 Confirm that the information entered is correct.
    7 When prompted with Enter key password for <tomcat>, press Enter to use the same password as the keystore password.
    8 Run this command to verify the contents of the keystore:

    keytool -list -v -keystore selfsigned.jks

    9 When prompted, enter the keystore password note in Step 3. The basic information about the generated certificate is displayed. Verify that the Owner and Issuer are