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. 

Comments

  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

Post a Comment

Popular posts from this blog

Streaming Spring boot logs to ELK stack

Keyboard Shortcuts That Work in All Web Browsers

How TOTP Works: Generating OTPs Without Internet Connection