Saturday, April 4, 2009

GENERATE KEYSTORE AND CONVERT INTO .cer File

GENERATE KEYSTORE AND CONVERT INTO .cer File

C:\>keytool -genkey -alias alias -keystore .keystore
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: rajesh
What is the name of your organizational unit?
[Unknown]: VIDYUT INFO SOLUTIONS PVT LTD
What is the name of your organization?
[Unknown]: VIDYUTINFO
What is the name of your City or Locality?
[Unknown]: chennai
What is the name of your State or Province?
[Unknown]: TN
What is the two-letter country code for this unit?
[Unknown]: IN
Is CN=vijitraj, OU=VIDYUT INFO SOLUTIONS PVT LTD, O=VIDYUTINFO, L=chennai, ST=TN
, C=IN correct?
[no]: yes

Enter key password for
(RETURN if same as keystore password):


To create a 1024-bit RSA key:
C:\>keytool -genkey -keyalg RSA -keysize 1024 -alias ali -keystore .keystore

Enter keystore password:
What is your first and last name?
[Unknown]: rajesh
What is the name of your organizational unit?
[Unknown]: VIDYUT INFO SOLUTIONS PVT LTD
What is the name of your organization?
[Unknown]: VIDYUTINFO
What is the name of your City or Locality?
[Unknown]: chennai
What is the name of your State or Province?
[Unknown]: TN
What is the two-letter country code for this unit?
[Unknown]: IN
Is CN=vijitraj, OU=VIDYUT INFO SOLUTIONS PVT LTD, O=VIDYUTINFO, L=chennai, ST=TN
, C=IN correct?
[no]: yes

Enter key password for
(RETURN if same as keystore password):


To create .cer file

C:\>keytool -storepass tomcat -keystore .keystore -alias ali -export -rfc -file raj.cer

cert file generated successfully

No comments: