Skip to content

Instantly share code, notes, and snippets.

View Chandrakanth339's full-sized avatar
Working from home

Chandrakanth_c Chandrakanth339

Working from home
  • India
View GitHub Profile
Chandrakanth339 /
Created June 21, 2018 03:26 — forked from xdu/
generate self signed certificate with keytool

To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux:

  • Open a command prompt or terminal.

  • Run this command:

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

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