Watch GeoTrust's Tutorial Videos for a more visual experience!
Note: If you are unable to view the video, please click here to go directly to the video source.
To generate a CSR, you will need to create a key pair for your server. These two items are a digital certificate key pair and cannot be separated. If you lose your public/private key file or your password and generate a new one, your SSL Certificate will no longer match and a replacement has to be made.
Step 1: Generate a Key Pair
NOTE: A key length of 1024 bit is the default, but GeoTrust recommends the use of a 2048 bit key.
If the request is intended for an Extended Validation certificate or a certificate with a validity period beyond December 31, 2013, the 2048 bit key length will need to be selected.
The utility "OpenSSL" is used to generate the key and CSR. This utility comes with the OpenSSL package and is usually installed under /usr/local/ssl/bin. If you have installed them elsewhere you will need to adjust these instructions appropriately.
Type the following command at the prompt for a non-encrypted key:
openssl genrsa -out www.yourdomain-example.com.key 2048
For an encrypted key use the below command (Please note, windows version of openssl is not compatible with password protected keys)
openssl genrsa -des3 -out www.yourdomain-example.com.key 2048
This command generates a 2048 bit RSA private key and stores it in the file www.youdomain-example.com.key.
When prompted for a pass phrase: enter a secure password and remember it, as this pass phrase is what protects the private key. Both the private key and the certificate are required to enable SSL.
NOTE: To bypass the pass phrase requirement, omit the -des3 option when generating the private key. If you leave the private key unprotected, GeoTrust recommends access to the server be restricted so that only authorized server administrators can access or read the private key file.
Step 2: Generate the CSR
Type the following command at the prompt:
openssl req -new -key www.yourdomain-example.com.key -out www.yourdomain-example.com.csr
This command will prompt for the following X.509 attributes of the certificate:
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 your company or department has an &, @, or any other symbol using the shift key in its name, you must spell out the symbol or omit it 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 your keyboard.
Common Name: The Common Name is the Host + Domain Name. It looks like "www.domain.com" or "domain.com". For wildcard certificate the syntax should look like *.domain.com
GeoTrust certificates can only be used on Web servers using the Common Name specified during enrollment. For example, a certificate for the domain "domain.com" will receive a warning if accessing a site named "secure.domain.com", because "secure.domain.com" is different from "domain.com".
NOTE: Please do not enter your 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.yourdomain-example.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 (certrequest.csr), will be for certificate enrollment.
To copy and paste the information into the enrollment form, open the file in a text editor such as Notepad or Vi and save it as a .txt file. Do not use Microsoft Word as it may insert extra hidden characters that will alter the contents of the CSR.
Once the CSR has been created, proceed to Enrollment.
Step 3: Backup your private key
GeoTrust recommends backing up the .key file and storing of the corresponding pass phrase. A good choice is to create a copy of this file onto a diskette or other removable media. While backing up the private key is not required, having one will be helpful in the instance of server failure.