How To Generate A Self Signed Certificate Using The Java Keytool

This article shows you how to generate a self signed certificate using the Java Keytool. To generate a self signed certificate:

  1. Log into the PC as a local administrator
  2. Navigate to the Bin directory of your Java installation (typically C:\Program Files (x86)\Java\jre7\bin)
  3. Run the following command (feel free to change the password to something more secure):

    keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 36000 -keysize 2048

  4. Follow the onscreen prompts and enter your certificate details

A keystore file will then be generated in your working directory, called keystore.jks. This is your Java self signed certificate and contains the public and private keye information.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Leave a comment

Your email address will not be published. Required fields are marked *