Thursday, October 25, 2012

How to generate Self-Signed Certificate Using keytool

The example uses the keytool utility to create a new self signed certificate.

  1. Open the command console (Run as Administartor) on whatever operating system you are using and navigate to the directory where keytool.exe is located.
  2. Run the following command (where validity is the number of days before the certificate will expire):
    keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks  -keysize 1024
  3. Fill in the prompts for your organization information. 

This will create a keystore.jks file containing a private key and  self signed certificate. 

1 comment:

  1. I read about this process on many other blogs too but the way you have explained each step in such a detail is worth appreciating. Cheers for this well written article.
    digital certificates

    ReplyDelete

How TOPT Works: Generating OTPs Without Internet Connection

Introduction Have you ever wondered how authentication apps like RSA Authenticator generate One-Time Passwords (OTPs) without requiring an i...