OpenSSL provides different features about security and certificates. Public and Private Key cryptography also supported by OpenSSL. Websites, Firewalls and other applications uses Certificates in order to encrypt their network traffic or authenticate each other. In this tutorial we will look how to create Certificate Signing Request.
Generate the certificate with the CSR and the key and sign it with the CA's root key. Use the following command to create the certificate: openssl x509 -req -in fabrikam.csr -CA contoso.crt -CAkey contoso.key -CAcreateserial -out fabrikam.crt -days 365. In this article you’ll find how to generate CSR (Certificate Signing Request) using OpenSSL from the Linux command line, without being prompted for values which go in the certificate’s subject field. Below you’ll find two examples of creating CSR using OpenSSL. In the first example, i’ll show how to create both CSR and the new. $ openssl req -out codesigning.csr -key private.key -new Where private.key is the existing private key. As you can see you do not generate this CSR from your certificate (public key). Also you do not generate the 'same' CSR, just a new one to request a new certificate. Sep 11, 2018 The first thing to do would be to generate a 2048-bit RSA key pair locally. This pair will contain both your private and public key. You can use Java key tool or some other tool, but we will be working with OpenSSL. To generate a public and private key with a certificate signing request (CSR), run the following OpenSSL command. This tutorial provides a step-by-step guide on how to generate a WildCard SSL Certificate Signing Request (CSR) for Apache + Mod SSL + OpenSSL. Generate the. In this case, you can generate a new self-signed certificate that represents a Common Name your application can validate. This topic tells you how to generate self-signed SSL certificate requests using the OpenSSL toolkit to enable HTTPS connections. Run the following OpenSSL command to generate your private key and public certificate. Steps to generate a key and CSR. To configure Tableau Server to use SSL, you must have an SSL certificate. To obtain the SSL certificate, complete the steps: Set the OpenSSL configuration environment variable (optional). Generate a key file. Create a Certificate Signing Request (CSR).
Now we assume we do not have any Public and Private Key pair. If we have Public and Private key pair please skip to the second step. RSA is very popular and efficient asymmetric encryption algorithm used by a lot of security mechanisms.We can also use RSA in X509 certificates. In this step we will create create an RSA Private key with PEM
format. This key size will be 2048
bit.
Certificate signing means an Authority or Certificate Authority have checked provided certificate and signed it with its private key. After that step the entities trust Certificate Authority will see and check the sign of the Certificate Authority in the signed Certificate. In order to sign Certificate we need to create a Certificate Signing Request (CSR) which is described below.
We will generate a Certificate Signing Request (CSR) by pointing our private key. We will use req
verb of the OpenSSL. We will use -sha256
as digest algorithm. The Certificate Signing Request file will be specified with -out
option and will have .csr
extension.
After create a Certificate Signing Request we can view the files and review it. We will use req
verb again. We will use -noout
and -text
options to print to the shell.
The last step is sending this myrequest.csr
file to the Certificate Authorities like below. By the way naming our CSR with our URL will made is more practical and easy to read like poftut.csr
- Thawte
- RapidSSL
- Lets Encrypt
- Digicert
Creating a CSR and installing your SSL certificate for Amazon Web Services (AWS)

Use the instructions on this page to use OpenSSL to create your certificate signing request (CSR) and then upload and implement your SSL certificate in your AWS instance.
To create your CSR, see OpenSSL: How to Create Your CSR.
To install your SSL certificate, see AWS: How to Install Your SSL Certificate.
If you are looking for a simpler way to create CSRs and install and manage your SSL certificates, we recommend using the DigiCert® Certificate Utility for Windows. You can use the DigiCert Utility to generate your CSR and install your SSL certificate. See Amazon Web Services: SSL Certificate CSR Creation.
I. OpenSSL: How to Create Your CSR
Use the instructions below for using OpenSSL to create your own shell commands for generating your Amazon Web Service (AWS) CSR.
Recommended: Save yourself some time. Use the DigiCert OpenSSL CSR Wizard to generate an OpenSSL command for creating your AWS CSR. Just fill in the form details, click Generate, and paste your customized OpenSSL command into your terminal.
How to Generate a CSR for AWS Using OpenSSL
If you prefer, you can build your own shell commands for generating your AWS CSR.
Use your terminal client (ssh) to log into your server/workstation.
At the prompt, enter the following command:
Note: Make sure to replace server with the name of your server/workstation.
openssl req –new –newkey rsa:2048 –nodes –keyout server.key –out server.csr
You have now started the process for generating the following two files:
- Private-Key File – For the decryption of your SSL certificate
- CSR File – For ordering your SSL certificate
When prompted for the Common Name (domain name), type the fully qualified domain (FQDN) for the site that you are going to secure.
Note: If generating a AWS CSR for a DigiCert Wildcard SSL Certificate, the common name should begin with an asterisk (e.g., *.example.com).
When prompted, type your organizational information, beginning with your geographic information.
Note: You may have already set up default information.
Open the .csr file that you created with a text editor.
Copy the text, including the -----BEGIN NEW CERTIFICATE REQUEST----- and -----END NEW CERTIFICATE REQUEST----- tags, and paste it into the DigiCert order form.
Ready to order your SSL certificate.
Learn MoreBuy NowSave the (back up) the generated .key file. You need it later when installing your SSL certificate.
After receiving your SSL certificate form DigiCert, you can install it.
II. AWS: How to Install Your SSL Certificate
Openssl Generate Certificate From Csr And Key Pdf

Copy the Certificate File to Your Server/Workstation
Download your Intermediate (DigiCertCA.crt) and Primary Certificate (your_domain_name.crt) files from your DigiCert account, then copy them to the directory on your server/workstation where you will keep your certificate and key files. Make them readable by root only.
Upload Your SSL Certificate
Next, you need to upload the certificate files (your_domain_com.key, your_domain_com.crt, and DigiCertCA.crt) to your AWS account.
Implement Your SSL Certificate
To implement your SSL certificate for your instance of AWS, consult the AWS Documentation.
Note: Because all instances of Amazon Web Service (AWS) are unique, it is best to consult the Amazon documentation for instructions on how to install and configure your SSL certificate for you AWS instance.
Test Installation
Openssl Generate Csr San
If your website is publicly accessible, our DigiCert® SSL Installation Diagnostic Tool can help you diagnose common problems.