Description:
The following steps are used to create a SSL certificate in a specified location with the validity period. Secure Sockets Layer (SSL) is the most widely used protocol for implementing cryptography on the Web. SSL uses a combination of cryptographic processes to provide secure communication over a network. SSL provides a secure enhancement to the standard TCP/IP sockets protocol used for Internet communications.
Creating SSL Certificate Using Java :
Take command Prompt get it into any folder (eg : C:\Certfile or C:\jdk1.4.2\bin) .
Remember the alias name and password you are giving.copy the commands and give input.
C:\jdk1.4.2\bin>keytool -genkey -alias fst -keyalg RSA -validity 15 -keystore store
ore
Enter keystore password: first1
What is your first and last name?
[Unknown]: sak
What is the name of your organizational unit?
[Unknown]: ww
What is the name of your organization?
[Unknown]: ff
What is the name of your City or Locality?
[Unknown]: ff
What is the name of your State or Province?
[Unknown]: ff
What is the two-letter country code for this unit?
[Unknown]: in
Is CN=sak, OU=ww, O=ff, L=ff, ST=ff, C=in correct?
[no]: y
Enter key password for
(RETURN if same as keystore password):
C:\jdk1.4.2\bin>keytool -list -v -keystore store
Enter keystore password: first1
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: fst
Creation date: Apr 26, 2006
Entry type: keyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=sak, OU=ww, O=ff, L=ff, ST=ff, C=in
Issuer: CN=sak, OU=ww, O=ff, L=ff, ST=ff, C=in
Serial number: 444ef455
Valid from: Wed Apr 26 09:47:25 GMT+05:30 2006 until: Thu May 11 09:47:25 GMT+05
:30 2006
Certificate fingerprints:
MD5: A6:B0:7F:35:E6:A1:80:03:B6:4A:F6:48:C7:03:36:B9
SHA1: 32:5D:86:48:D6:F2:D5:9F:F9:7E:1C:BC:D1:29:7D:18:E4:67:0D:45
*******************************************
*******************************************
C:\jdk1.4.2\bin>keytool -export -alias fst -keystore store -rfc -file adhoc.cer
Enter keystore password: first1
Certificate stored in file
C:\jdk1.4.2\bin>keytool -import -alias fst -file adhoc.cer -keystore newadhoc
Enter keystore password: first1
Owner: CN=sak, OU=ww, O=ff, L=ff, ST=ff, C=in
Issuer: CN=sak, OU=ww, O=ff, L=ff, ST=ff, C=in
Serial number: 444ef455
Valid from: Wed Apr 26 09:47:25 GMT+05:30 2006 until: Thu May 11 09:47:25 GMT+05
:30 2006
Certificate fingerprints:
MD5: A6:B0:7F:35:E6:A1:80:03:B6:4A:F6:48:C7:03:36:B9
SHA1: 32:5D:86:48:D6:F2:D5:9F:F9:7E:1C:BC:D1:29:7D:18:E4:67:0D:45
Trust this certificate? [no]: y
Certificate was added to keystore
C:\jdk1.4.2\bin>
Sample ScreenShot:
|