Linux and Windows Support  

make-it-great-again

Login or Register  

If you wish to contribute an article, please login or register.

Certificate Signing Request (CSR) Generation

PrintE-mail

Q. How do I generate a CSR?
A. Here are generic instructions on how to do that.

1. Generate Private Key

Generate a 2048 bit RSA private key and store it in the file www.domain.com.key (the name of the file is not important, this is just for your records):

openssl genrsa -des3 -out www.domain.com.key 2048

Note: When prompted for a pass phrase: enter a secure password and remember it, you will need it for every apache restart/server reboot. To bypass the pass phrase requirement, remove the -des3 option when generating the private key.

2. Generate the CSR

Type the following command at the prompt:

openssl req -new -key www.domain.com.key -out www.domain.com.csr

This command will prompt for the following certificate attributes:

Country Name: Use the two-letter code without punctuation for country, for example: US or CA.

State or Province: Spell out the state completely; do not abbreviate the state or province name, for example: California

Locality or City: The Locality field is the city or town name, for example: Berkeley. Do not abbreviate. For example: Saint Louis, not St. Louis

Company: If the company or department has an &, @, or any other symbol using the shift key in its name, the symbol must be spelled out or omitted, in order to enroll. Example: XY & Z Corporation would be XYZ Corporation or XY and Z Corporation.

Organizational Unit: This field is optional; but can be used to help identify certificates registered to an organization. The Organizational Unit (OU) field is the name of the department or organization unit making the request. To skip the OU field, press Enter on the keyboard.

Common Name: This is the most important part. You have to enter your domain name here. Depending on what you use, enter either "www.domain.com" or "domain.com".

Do not enter an email address, challenge password or an optional company name when generating the CSR.

A public/private key pair has now been created. The private key (www.domain.com.key) is stored locally on the server machine and is used for decryption. The public portion, in the form of a Certificate Signing Request (www.domain.com.csr), will be for certificate enrollment.

Comments (1)
PAY ATTENTION TO THE FIRST STEP
1 Friday, 19 October 2012 07:39
Dave
Unless you want to sit in front of the server every time you reboot it, you have to make sure you omit "-des3" in your fist line!!! Otherwise you will be prompted for the security question every time.

Add your comment

Your name:
Subject:
Comment:
  The word for verification. Lowercase letters only with no spaces.
Word verification:
yvComment v.1.24.0
   
Copyright © 1999 - 2017 Virtual Helpme | r | Original Template: Allrounder