Ask a Question

Advanced Search

Solution ID : SO2622

Last Modified : 05/02/2018

Generate a Certificate Signing Request (CSR) for Orion Web Server


How to generate a CSR for Orion Web Server
How do I generate a CSR for an Orion Web Server


To Generate a CSR for an Orion Web Server, perform the following steps:
Orion Webserver Keygen Instructions

Step 1: Generate a Keystore and a Keyentry (Private Key):

  1. Create a certificate keystore and private key by executing the following command:

    keytool -genkey -alias [enter_alias_name] -keyalg RSA -keystore [enter_keystore_name] -keysize 2048

  2. Enter and re-enter a keystore password.  Java servers use 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.

  3. 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:  Thawte 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 "".

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

    Note:  Make note of the private key and the keystore password.  If lost they cannot be retrieved.


Step 2: Backup Keystore file:

To backup the keystore file with the keyentry just created, please refer to the following solution:  SO1871


Step 3: Generate a CSR off the Keyentry:

  1. Run the following command to generate the CSR:

    keytool -certreq -alias [alias_name] -file certreq.csr -keystore [keystore_name]

    NoteCSRs generated using the MD5 digest (signature) algorithm are no longer allowed.
    CSRs must be generated using SHA-1 or SHA-256/384/512

    Alternatively, try to specify SHA-1 using the following command:

    keytool -certreq -alias [alias_name] -file certreq.csr -keystore [keystore_name] -sigalg SHA1withRSA
  2. 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]


Step 4: Creating a secure site

  1. Copy the default-web-site.xml config in the /config directory to secure-web-site.xml and edit it. 
  2. Add secure="true" as an attribute to the <web-site ...> <web-site> tag. 
  3. Add <ssl-config keystore="../my/keystore" keystore-password="123456" /> the keystore to the main body. 
  4. Install the site: this is done by adding %lt;web-site path="./secure-web-site.xml" /> the site to server.xml.


To install your certificate on Orion Web Server, follow the instructions in solution: SO3864