Certificate Signing Request (CSR) using openssl

Used the following mechanism to generate a CSR needed to buy an SSL certificate. The server in this case was a Linux server and certificate was a “wildcard certificate” purchased at GoDaddy.com

# openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr

Generating a 2048 bit RSA private key
.............................................................................+++
...............................................................................................................................+++
writing new private key to 'server.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) [XX]:US
State or Province Name (full name) []:California
Locality Name (eg, city) [Default City]:Los Angeles
Organization Name (eg, company) [Default Company Ltd]:Acme
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:*.acme.com
Email Address []:admin@acme.com

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

At this point, two files were created.

# ll
total 8
-rw-r--r-- 1 root root 1054 Dec 28 03:31 server.csr
-rw-r--r-- 1 root root 1704 Dec 28 03:31 server.key

The csr file can be used to purchase the certificate.

Advertisements

2 thoughts on “Certificate Signing Request (CSR) using openssl

  1. Pingback: Uploading GoDaddy SSL cert on AWS Load Balancer | Glass Onion Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s