Ask a Question

Advanced Search

Alert ID : INFO1947

Last Modified : 05/17/2018

Managed PKI for SSL - Certificate Signing Request (CSR) Generation Instructions for Apache SSL


This document provides instructions for generating CSR for Apache. If you are unable to use these instructions for your server, Symantec recommends that you contact either the vendor of your software or an organization that supports Apache SSL.
NOTE: To generate a CSR, a key pair must be created for the server. These two items are a digital certificate key pair and cannot be separated. If the public/private key file or password is lost or changed before the SSL certificate is installed, the SSL certificate will need to be replaced. The private key, CSR, and certificate must all match in order for the installation to be successful.
Step 1: Generate Private Key

         NOTE: All certificates that will expire after December 2013 must have a minimum 2048 bit key size.
  1. 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 the utility was installed elsewhere, these instructions will need to be adjusted accordingly.
  2. Type the following command at the prompt:

    openssl genrsa -des3 -out <private key file name>.key 2048

    For example:

    This command generates a 2048 bit RSA private key and stores it in the file privatekey.key.
  3. 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 the private key is left
    unprotected, Symantec 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
  1. Type the following command at the prompt:

    openssl req -new -key <private key file name>.key -out <csr file name>.csr

    For example:

    NOTE: If using openSSL on Windows, you may need to specify the path to openssl.cnf such as the following:
    openssl req -new -key <private key file name>.key -config "c:\Apache Software Foundation\Apache2.2\conf\openssl.cnf" -out <csr file name>.csr
  2. This command will prompt for the following X.509 attributes of the certificate:

  • Country Name: Enter the two-character abbreviation of country in which organization resides (e.g. US).
  • State or Province: Enter the full name of your state or province.
    Note: Make sure the State or Province is not abbreviated (e.g. California).
  • Locality or City: Usually the city of your organization's main office, or a main office for your organization.
  • Company: The full legal name of your company.
  • 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.
  • Common Name: The fully-qualified domain name to which your certificate will be issued.

    NOTE: Please do not enter an email address, challenge password or an optional company name when generating the CSR.
  1. The private key has now been created. The private key (privatekey.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.

  2. 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.

  3. Verify your CSR

  4. Once the CSR has been created, proceed to Enrollment.
Step 3: Backup the private key

        Symantec 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 removable media. While backing up the private key is not required, having one will be helpful in the instance
        of server failure.