nuffnang

Friday 27 May 2011

How to create CSR using openSSL


To generate CSR using openSSL simply follow below steps:

(1) Go to your intend working directory

(2)Enter below command:-
Replace <hostname> with your hostname. (check your hostname (# uname -n))
# /usr/sfw/bin/openssl req -newkey rsa:1024 -nodes -out <hostname>.csr -keyout
<hostname>.key

(3) There is interactive text will come out. Fill in the blank as per below (see
"<<<"):-
********************************************************************************
Generating a 1024 bit RSA private key
........++++++
..................++++++
writing new private key to 'blessappdev.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) [US]:my <<<
State or Province Name (full name) [Some-State]:selangor <<<
Locality Name (eg, city) []:petaling jaya
Organization Name (eg, company) [Unconfigured OpenSSL Installation]:example <<<
Organizational Unit Name (eg, section) []:testing <<<
Common Name (eg, YOUR name) []:unknown <<<
Email Address []:unknown@example.com <<<
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:admin123 <<<
An optional company name []:example<<<
********************************************************************************

(4) You can check back your file using below command:-
# /usr/sfw/bin/openssl req -text -noout -in <hostname>.csr

(5) Check generated file using below command & email the file to your CA if you are using CA sign certificate.
# ls
# done.

1 comment:

  1. Great instructions! If you ever need to generate a CSR using a different computer software, check out the Secure128 site! http://www.secure128.com/geotrust-ssl/verisign-generate-csr-apache.aspx

    ReplyDelete