How to Create a Self Signed Certificate using Java Keytool

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...
SSL Certificate is also important to secure java application using a self signing certificate. In most cases you must use a CA verified certificate but you can also use a self signed cert to secure your java app.
⏬ ⏬  Get rid of “⚠️ Not Secure” warning with these trusted SSL Certificates  ⏬ ⏬ 

95%
OFF

comodo-square-logo

Comodo Positive SSL

$6.55

Vendor Price: $41.73

Coupon Code: ASCSCPSSL4

Get It Now

78%
OFF

rapidssl-coupon-square-logo

RapidSSL Certificate

$13.45

Vendor Price: $69

Coupon Code: ASRSRSSL2

Get It Now

95%
OFF

comodo-square-logo

Comodo PositiveSSL Multi-Domain

$17.54 – 2 SAN Included

Vendor Price: $41.73

Coupon Code: ASCSCPMD4

Get It Now

Steps to create a Self Signed Certificate using Java Keytool

Step 1. Open the command console

Step 2. Run this command (Where indicate the number of days for which the certificate will be valid)
keytool -genkey -keyalg RSA -alias selfsigned -ystore keystore.jks -storepass password -validity 365 -keysize 2048

Step 3. Enter a password for the keystore. Note this password as you require this for configuring the server

Step 4. When prompted for first name and last name, enter the domain name of the server. For example, myserver or myserver.mycompany.com.

Step 5. Enter the other details, such as Organizational Unit, Organization, City, State, and Country.

Step 6. When prompted with Enter key password for , press Enter to use the same password as the keystore password

Step 7. Run this command to verify the contents of the keystore
keytool -list -v -keystore selfsigned.jks

Step 8. 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 the same. Also, you should see the information you provided in Step 4 and 5.

Related Articles:

Download Site Seal
comodo-trust-seal
SSL Checker