Generate Csr From Public Key

Posted on  by 

Enter CSR and Private Key command. Generate a private key and CSR by running the following command: Here is the plain text version to copy and paste into your terminal: openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr. Note: Replace “server ” with the domain name you intend to secure. Enter your CSR details. Mar 31, 2015  Generating CSR In Apache With OpenSSL SSL Corp. How To Encrypt And Decrypt Files Using Private Public Keys With OpenSSL On Ubuntu. How To Generate. As the question title states, I want to make a CSR with only the public key. What I have been able to do is generate a CSR with the information of my choosing along with a new keypair. And then use something like this to force it to use the public key I want when making the certificate.

The CSR (Certificate Signing Request) is essential for the issuing of the certificate, as it contains the public key.

The public key will be generated by your web host or the administrators of the servers, on which the domain runs that you wish to secure with the SSL certificate.

Instructions on how to implement the CSR on the most popular web servers Apache and IIS are listed below.

Instructions for the installation on other servers can be found on the website of the respective certification authority. You only need to choose your platform: Thawte, Symantec (VeriSign), GeoTrust, RapidSSL.

Information for the CSR request

Apart from the public key, the CSR request also contains data about the certificate applicant. This data must correspond to the information about the applicant stated in the order. The following information must be forwarded to your webhost in order for the CSR request to be created.

For the generation of the CSR, following information is needed:

Common name: exact domain name (incl. www, if you would like to use it)
Organization: name of the applicant’s organisation (the same as stated in the order)
Organizational unit: department, purpose
City/locality: name of the city of the organisation's address
State/province: the state in which the organization resides
Country/region: country code
Key Size: 2048 Bit

Example:

Common name: www.test.com
Organization: A & B Ltd.
Organizational unit: Internet
City/locality: New York
State/province: New York
Country/region: USA
Key Size: 2048 Bit

Note: please make sure you enter the domain correctly when ordering an SSL certificate. If the domain name stated in the order includes www, you will get the version without www for free. E.g. if you order a certificate for www.zoner.com, the domain zoner.com will be automatically secured as well. However, this rule doesn’t work the other way round. As long as you don’t secure both versions with an SSL certificate a visitor can receive an error message, when visiting the website version without certificate. In this case an error message about an insecure connection will be displayed. For this reason it is important to use the correct spelling.

Generation of CSR for Apache and nginx

Linux servers use OpenSSL libraries when encrypting and working with keys. In those libraries you can create the CSR request for your certificate that is used by an Apache or nginx server. After successfully logging on to the server, you will create the CSR request (the public key). The certificate authority must be provided with this request. You just need to put the request into the order form at SSLmarket.
The CSR will be created in OpenSSL. In order to keep an overview of the certificates, we advise you to create a folder named ssl within the main file /etc and to use this file also for future certificates.

mkdir /etc/ssl/test.com && cd /etc/ssl/test.com

Now you are in the newly created file. By using the following command, OpenSSL is started and a new private key of 2048 Bits is generated.

openssl genrsa -out test.com.key 2048

The private key is used to decipher the communication encrypted with the certificate and must therefore be kept secure and out of reach for unauthorised access. The access to the private key must remain solely with the owner, i.e. the web server using the key.

chmod 600 test.com.key
chown www-data test.com.key

The public key is generated using the following command:

openssl req -new -key test.com.key -out test.com.csr

You will be asked to enter the information for the key and the prospective certificate. The most important specifications are common name the name of the domain, the certificate will be used for, and Country – USA. Without these specifications, the certificate cannot be requested. If you ordered a test version or a DV certificate, these two details are sufficient. However, if you ordered a certificate, that requires validation of the applicant (OV or EV certificate), you need to fill in all the details. Their meaning is described in the article working with OpenSSL – CSR and private key. Challenge password, the information asked for in the last step, need not be filled in.

Csr

The generated CSR must be inserted into your order. Open the CSR with the Nano Editor and copy it:

root@server:/etc/ssl/test.com# nano test.com.csr

By using the shortcut Ctrl + X you return to the terminal and you can copy/paste the CSR into the order of the SSL certificate.

How to generate csr from private key

Generation of CSR for Windows Server

Windows Server uses the Web Server IIS. From version 7 to version 8.5, the generation of the CSR request is basically the same. The server will ask you for the data entered into the CSR and will then save the text file along with the certificate request.

In the text below you will find a detailed description of this process.

Log into the server as the administrator and follow following path: Start-> Administrative Tools -> Internet Information Service Manager. Now you will the see the name of the server in the left column. In the next step, click on the Server. The item Server Certificates will appear.

Now, click on Server Certificates and Create Certificate Request. A new window will pop up, in which you can enter the necessary information for the CSR.

This is how you fill out the fields correctly – see above.

The most important specifications are Common name the name of the domain, the certificate is issued for and Country – US. Without these specifications, the certificate cannot be requested. If you ordered a test version or a DV certificate, these two details are sufficient. However, if you ordered a certificate that requires the validation of the applicant (OV or EV certificates) all details need to be specified.

When all required fields are filled out, click on Next to continue. In the next step the settings for the encryption need to be configured.

The pre-set cryptographic provider Microsoft RSA SChannel need not be changed. The pre-set key length is 1024. Please select a bit length of 2048 and click on Next.

Now you can choose the name and the memory location for the CSR file. Please enter txt as a file name. Click on Finish.

Open the CSR file with a text editor (e.g. Notepad). The text of the public key starts with „BEGIN NEW CERTIFICATE REQUEST' and ends with „END NEW CERTIFICATE REQUEST'. Afterwards you can add the public key to your order.

Adding CSR to SSLmarket

Enter the generated public key into the administrative interface of the ordered SSL certificate. Copy the entire content of the text file, view the details of the order and under Information about Public Key select Enter New Key. Make sure that SHA-2 is selected.

If the Key is correct, the status in the interface will change from N/A to OK. You can check the content and the correctness of the CSR with following tool: https://certlogik.com/decoder/. As soon as the validation is complete, the certificate authority will issue your certificate and it will be sent to your e-mail address by SSLmarket.

If you have further questions, do not hesitate to contact us.

Generate a certificate signing request

Before you can install a Secure Socket Layer (SSL) certificate, you must first generate a certificate signing request (CSR). You can do this by using one of the following methods:

OpenSSL

The following sections describe how to use OpenSSL to generate a CSR for a single host name. If you want to generate a CSR for multiple host names, we recommend using the Cloud Control Panel or the MyRackspace Portal.

Install OpenSSL

Check whether OpenSSL is installed by using the following command:

  • CentOS® and Red Hat® Enterprise Linux®

    The following output provides an example of what the command returns:

  • Debian® and the Ubuntu® operating system

    The following output provides an example of what the command returns:

If the preceding packages are not returned, install OpenSSL by running the following command:

  • CentOS and Red Hat

  • Debian and the Ubuntu operating system

Generate the RSA key

Run the following commands to create a directory in which to store your RSA key, substituting a directory name of your choice:

Run the following command to generate a private key:

Create a CSR

Run the following command to create a CSR with the RSA private key (output is in Privacy-Enhanced Mail (PEM) format):

When prompted, enter the necessary information for creating a CSR by using the conventions shown in the following table.

Note: You cannot use the following characters in the Organization Name or Organizational Unit fields: < > ~ ! @ # $ % ^ * / ( ) ? . , &

FieldExplanationExample
Common NameThe fully qualified domain name to which the certificate applies. The domain names example.com and www.example.com are distinct from each other, so be sure to submit your request for the right domain. If you are purchasing a wildcard certificate, use *.example.com.example.com
Organization NameThe exact legal name of your organization. The Certificate Authority (CA) might seek to confirm that your organization is real and legally registered, so don’t abbreviate words that aren’t abbreviated in the organization’s legal name.Example Inc.
Organizational UnitThe branch of your organization that is making the request.Marketing
City/localityThe city where your organization is legally located. Do not abbreviate the city name.San Antonio
State/provinceThe state or province where your organization is legally located. Do not abbreviate the state or province name.Texas
Country/regionThe two-letter International Standards Organization (ISO) abbreviation for your country.US

Warning: Leave the challenge password blank (press Enter).

Verify your CSR

Run the following command to verify your CSR:

After you have verified your CSR, you can submit it to a CA to purchase an SSL certificate.

Windows IIS Manager

Generate Csr From Public Key

Use the following steps to generate a CSR by using Windows IIS Manager:

Note: The following steps are for IIS 8 or IIS 8.5 on Windows Server 2012.

  1. Open IIS Manager.
  2. In the left-hand Connections pane, click the server for which you want to generate a CSR.
  3. In the center server Home pane under the IIS section, double-click Server Certificates.
  4. In the right-hand Actions pane, click Create Certificate Request.
  5. In the Request Certificate wizard, on the Distinguished Name Properties page, enter the following information and then click Next.

    FieldExplanationExample
    Common NameThe fully qualified domain name to which the certificate applies. The domain names example.com and www.example.com are distinct from each other, so be sure to submit your request for the right domain. If you are purchasing a wildcard certificate, use *.example.com.example.com
    Organization NameThe exact legal name of your organization. The CA might seek to confirm that your organization is real and legally registered, so don’t abbreviate words that aren’t abbreviated in the organization’s legal name.Example Inc.
    Organizational UnitThe branch of your organization that is making the request.Marketing
    City/localityThe city where your organization is legally located. Do not abbreviate the city name.San Antonio
    State/provinceThe state or province where your organization is legally located. Do not abbreviate the state or province name.Texas
    Country/regionThe two-letter ISO abbreviation for your country.US
  6. On the Cryptographic Server Provider Properties page, enter the following information and then click Next.

    • Cryptographic service provider: Unless you have a specific cryptographic provider, use the default selection.
    • Bit length: 2048 is the recommended bit length.
  7. On the File Name page, enter the location where you want to save the certificate request file and then click Finish.

After you have generated the CSR, you can submit it to a CA to purchase an SSL certificate.

Cloud Control Panel

Rackspace provides the CSR Generator for generating a CSR. The CSR Generator shows you the CSRs that you currently have and lets you create new CSRs with a simple form. After you have entered your details, the generator combines them with your private key so that you can submit the combined encoded information to a CA.

When you are done with the generator, you can return to the Cloud Control Panel by clicking any of the links in the top navigation or by going to login.rackspace.com and selecting Rackspace Cloud from the drop-down product menu in the top navigation bar.

Access the CSR Generator

Access the CSR Generator directly or through the Control Panel by using the following steps:

Generate Csr From Public Key West

  1. Log in to the Cloud Control Panel and select Rackspace Cloud from the drop-down product menu in the top navigation bar.
  2. In the top navigation bar, click Servers > Cloud Servers.
  3. Click the name of the server for which you want to generate a CSR.
  4. In the right-hand Managing Your Server section under Help me with, click Generate a CSR.

The generator lists your existing CSRs, if you have any, organized by domain name.

Generate a CSR

  1. Click Create CSR.

  2. Enter the following information, which will be associated with the CSR:

    FieldExplanationExample
    Domain NameThe fully qualified domain name to which the certificate applies. The domain names example.com and www.example.com are distinct from each other, so be sure to submit your request for the right domain. If you want to secure both domains, you can use the Alt Names field. If you are purchasing a wildcard certificate, use *.example.com.example.com
    Alt Names(Optional) Additional domains that you want to add to the request. Each CA treats these differently, and the CA might charge for additional names. You can submit a comma-separated list.www.example.com, secure.example.com
    Email Address(Optional) A contact email address for the certificate.support@example.com
    Organization NameThe exact legal name of your organization. The CA might seek to confirm that your organization is real and legally registered, so don’t abbreviate words that aren’t abbreviated in the organization’s legal name.Example Inc.
    Organizational Unit(Optional) The branch of your organization that is making the request.Marketing
    CityThe city where your organization is legally located. Do not abbreviate the city name.San Antonio
    State or ProvinceThe state or province where your organization is legally located. Do not abbreviate the state or province name.Texas
    CountryChoose your country from the drop-down menu. The two-letter ISO abbreviation for your country is included in the CSR.United States
    Private Key Bit LengthKey sizes smaller than 2048 are considered insecure and might not be accepted by a CA.1024,2048,4096
    Hashing AlgorithmBoth algorithms are currently trusted in mainstream browsers and offer industry recommended security. SHA-512 requires additional CPU processing.SHA-256, SHA-512

    Note: You cannot use the following characters in the Organization Name or Organizational Unit fields: < > ~ ! @ # $ % ^ * / ( ) ? . , &

  3. After you have entered all the required information, click Create CSR.

It can take between 5 and 60 seconds for the CSR to be generated. You might need to refresh the page that displays your CSRs before the new CSR is listed.

View CSR details

When CSR has been generated, you can click its UUID (unique identifier) in the CSR list to view its details screen.

This screen displays the information that you provided, the text of the CSR, and its associated private key.

Submit the CSR to the CA

The text in the Certificate Request field is the CSR. It contains encoded details of the CSR and your public key.

To request your SSL certificate, copy the Certificate Request text and submit it to your CA. Include all the text, including the BEGIN and END lines at the beginning and end of the text block.

Install the private key

Copy the private key to the server that will host the certificate. See your application documentation to determine where to install the private key and certificate on your server.

MyRackspace Portal

If you are a Managed or Dedicated customer, you can request a CSR through the MyRackspace Portal by using the following steps:

Openssl Generate Private Key Csr

  1. Log in to the MyRackspace Portal and select Dedicated Hosting from the drop-down product menu in the top navigation bar.
  2. In the top navigation bar, click Tickets > Create Ticket.
  3. On the Tickets / Create New Ticket page, select Generate Certificate Signing Request (CSR) from the Subject drop-down list.
  4. Enter the following information in the Ticket Details section:

    FieldExplanationExample
    Device(s)The server or servers for which you want to generate a CSR. Use the drop-down menu to select your servers.
    Common NameThe fully qualified domain name to which the certificate applies. The domain names example.com and www.example.com are distinct from each other, so be sure to submit your request for the right domain. If you want to secure both domains, you can use the Alt Names field. If you are purchasing a wildcard certificate, use *.example.com.example.com
    Alt. Names(Optional) Additional domains that you want to add to the request. Each CA treats these differently, and the CA might charge for additional names. You can submit a comma-separated list.www.example.com, secure.example.com
    Email Address(Optional) A contact email address for the certificate.support@example.com
    OrganizationThe exact legal name of your organization. The CA might seek to confirm that your organization is real and legally registered, so don’t abbreviate words that aren’t abbreviated in the organization’s legal name.Example Inc.
    Organizational Unit(Optional) The branch of your organization that is making the request.Marketing
    Locality (City)The city where your organization is legally located. Do not abbreviate the city name.San Antonio
    State or Province NameThe state or province where your organization is legally located. Do not abbreviate the state or province name.Texas
    CountryChoose your country from the drop-down menu. The two-letter ISO abbreviation for your country is included in the CSR.United States

    Note: The bit length is automatically set to 2048.

  5. Click Create Ticket.

Next steps

Reference

Generate Csr From Public Key System

Experience what Rackspace has to offer.

©2020 Rackspace US, Inc.

Generate Csr From Public Key Largo

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

Coments are closed