Wednesday, August 02, 2006

SSL, How can we generate CSR and CRT

# openssl genrsa -des3 -out domainname.key 1024
Generating RSA private key, 1024 bit long modulus
e is 65537 (0x10001)
Enter pass phrase for domainname.key:
Verifying - Enter pass phrase for domainname.key:

openssl req -new -key domainname.key -out domainname.csr
Enter pass phrase for domainname.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [GB]:TH
State or Province Name (full name) [Berkshire]:Bangkok
Locality Name (eg, city) [Newbury]:Test
Organization Name (eg, company) [My Company Ltd]:Test
Organizational Unit Name (eg, section) []:TEST
Common Name (eg, your name or your server's hostname) []
Email Address []

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

You'll have CSR file and if you want CRT file, you can

# openssl x509 -req -days 36500 -in domainname.csr -signkey domainname.key -out domainname.crt
Signature ok
Getting Private key
Enter pass phrase for domainname.key:


EV SSL said...

Well your information is quite right. We can also check which kind of SSL Certificate use other site. This post make my day very nice. Keep It up this good job.


RapidSSL said...

Finally, your blog has been solved my CSR and CRT generating issue with easy and quick steps as I have been browsing online more than 3 years hour today, yet I never found any resource like yours. Thanks for fixing my issue with help full text through blog at blogger.