Knowledgebase: Symantec
Certificate Signing Request (CSR) Generation Instructions- Tomcat
Posted by Gareth S on 30 October 2012 07:39 AM


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. You will have to request a new SSL Certificate and may be charged.

Step 1: Create a Keystore and Private Key

Note: The recommended key bit size is 2048-bit. All certificates that will expire after October, 2013 must have a 2048 bit key size

Please use JDK 1.3.1 or later:
If you are running a 1.3 JVM, download JSSE 1.0.2 (or later) from it either an installed extension on the system or set an environment variable JSSE_HOME that points to the directory where JSSE is installed.

  1. Create a certificate keystore and private key by executing the following command:
    Unix: $JAVA_HOME/bin/keytool -genkey -alias <your_alias_name> -keyalg RSA -keystore <your_keystore_filename> -keysize 2048
  2. For example:

  3. Enter and re-enter a keystore password.  Tomcat uses a default password of changeit.  Hit Enter if you want to keep the default password.  If you use a different password, you will need to specify a custom password in the server.xml configuration file.
  4. This command will prompt for the following X.509 attributes of the certificate:
    • First and last name (Common Name (CN)): Enter the domain of your website (i.e. in the "first- and lastname" field.. It looks like "" or "".
    • Organizational Unit (OU): 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.
    • Organization (O): 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  
    • Locality or City (L): The Locality field is the city or town name, for example: Mountain View. 
    • State or Province (S): Spell out the state completely; do not abbreviate the state or province name, for example: California 
    • Country Name (C): Use the two-letter code without punctuation for country, for example: US or CA
    • Note: Symantec certificates can only be used on Web servers using the Common Name specified during enrollment. For example, a certificate for the domain "" will receive a warning if accessing a site named "" or "", because "" and "" are different from "".

  5. When prompted for the password for the private key alias, press Enter.  This will set the private key password to the same password used for the keystore from the previous step.  Make note of the private key and the keystore password.  If lost they cannot be retrieved.
  6. For further information, please refer to the Tomcat Web site.

Step 2: Generate a CSR

  1. Run the following command to generate the CSR:
    keytool -certreq -keyalg RSA -alias <your_alias_name> -file certreq.csr -keystore <your_keystore_filename>
  2. For example:

  3. Verify your CSR
  4. Create a copy of the keystore file. Having a back-up file of the keystore at this point can help resolve installation issues that can occur when importing the certificate into the original keystore file. 
  5. To copy and paste the file certreq.csr into the enrollment form, open the file in a text editor that does not add extra characters (Notepad or Vi are recommended).  Make sure to include the "BEGIN CERTIFICATE REQUEST" and "END CERTIFICATE REQUEST" header and footer.
    The text file should look like this:
    [encoded data]

Note: When enrolling for your certificate, you will be prompted to select a server platform.  Please select Apache as the server platform to ensure that you receive the certificate in the correct format.

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
Full Name:
Leave Your Feedback:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

© 2012 All rights reserved • Privacy PolicyTerms of Service