How to Manually Create a CSR (Certificate Signing Request) Using OpenSSL?

1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5 (1 votes, average: 5.00 out of 5, rated)
Loading...
Manually Generate CSR using OpenSSL

If you want to manually generate a certificate signing request for securing the server but aren’t aware of the know-how, there is no need to – fret! As you have landed on the right article. In this article, we will explore – “How to generate CSR manually using OpenSSL?”

Before exploring the step-by-step instructions to generate a CSR manually using OpenSSL, let’s analyze and comprehend – “What exactly is OpenSSL?” Understanding this will help you grasp the process in a better way and widen your knowledge in this respective domain.

What is OpenSSL?

OpenSSL is an open-source software library. It offers a commercial-grade and full-featured toolkit for Secure Sockets Layer protocols and is widely employed to shield communications over computer networks against cyber attacks like – eavesdropping.

The library also consists of cryptographic library functions that enable encryption and decryption, which maintains privacy and security in and during data exchanges.

Now that we have some understanding of OpenSSL let’s move on to the main topic – Creating CSR manually using OpenSSL.

Recommended: What is OpenSSL? Useful OpenSSL Commands to Work with SSL Certificates

How to Manually Create CSR Using OpenSSL?

Here are the steps to manually create CSR using OpenSSL:

Step 1: Download and Install OpenSSL

Step 2: Setup OpenSSL

Step 3: Generate a Certificate Signing Request using OpenSSL

Let’s explore each of these steps in-depth.

Step 1: Download and Install OpenSSL

Follow the steps mentioned below to download and install OpenSSL on your Windows device:

  • Click Search, placed on the taskbar.
  • Type Chrome and press Enter.
  • The Chrome browser window will open.
  • In the URL bar, type https://slproweb.com/products/Win32OpenSSL.html.
  • Press Enter.
  • Scroll to the Download Win32/Win64 OpenSSL table.
  • Select and download one of the non-light editions of the installer.
  • Double-click the OpenSSL file.
  • Follow the default settings to finish the OpenSSL installation.

Step 2: Setup OpenSSL

Follow the steps mentioned below to setup OpenSSL on your Windows device:

  • Click Search placed on the taskbar.
  • Type CMD and press Enter.
  • The Command Prompt window will appear.
  • Type the cd \OpenSSL-Win32 command and press Enter.
  • Verify that the line changed to C:\OpenSSL-Win32.
  • Type set OPENSSL_CONF=c:\OpenSSL-Win32\bin\openssl.cfg command and press Enter.
  • Restart your Windows device.

Step 3: Generate a Certificate Signing Request using OpenSSL

Follow the steps mentioned below to generate a code signing request using OpenSSL:

  • Click Search, placed on the taskbar.
  • Type CMD and press Enter.
  • The Command Prompt window will appear.
  • In the Command Prompt window, type cd \OpenSSL-Win32\bin command and press Enter.
  • Verify that the line changed to C:\OpenSSL-Win32\bin.
  • Type the openssl genrsa -out private-key.key 2048 command and press Enter.
  • Type the openssl req -new -key private-key.key -out csr.txt command and press Enter.
  • Enter the required information in the respective fields:
    • In the Country Name field, type the two-letter code of the country where the organization is situated.In the State field, type the name of the state where the organization requesting the SSL cert is located.In the City or Locality field, type the name of the city or town where the organization is situated or located.In the Company or Organization field, type the full legal name of the organization.In the OrganizationalOrganizational Unit field, type the department name or organization unit making the request.
    • In the Common Name field, type the Fully Qualified Domain Name that you want to shield.
  • Verify that a public/private key pair is created.
  • Type the commands given below to move the private key and CSR file to a centralized directory, and press Enter after entering each command:
    • md c:\certificate
    • move private-key.key c:\certificate
    • move csr.txt c:\certificate
  • The CSR file is ready to use for certificate enrollment.

How to Open the Certificate Signing Request File?

Follow the steps mentioned below to open the created code signing request file:

  • Click Search, placed on the taskbar.
  • Type CMD and press Enter.
  • The Command Prompt window will appear.
  • In the Command Prompt window, type the notepad c:\certificate\csr.txt command and press Enter. (Change the name of the file in the command.)
  • A Notepad will appear with the encoded data needed to enroll for an SSL cert.

Now, what’s left is to copy the encoded text and paste it into the required field to proceed with the SSL Certificate Installation!

Alternate Option: Save Time with Free Online CSR Generator Tools

<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 109.7 29.02"><defs><style>.cls-1{fill:#fff;}</style></defs><path class="cls-1" d="m5.38,22.85c-3.1-.26-5.3-1.92-5.38-4.8h3.6c.1,1.1.67,1.85,1.78,2.09v-4.58c-2.47-.62-5.38-1.32-5.38-4.87,0-2.83,2.26-4.68,5.38-4.92v-1.94h1.54v1.94c3,.24,5.02,1.85,5.23,4.7h-3.62c-.1-.94-.67-1.66-1.61-1.94v4.54c2.5.65,5.42,1.3,5.42,4.85,0,2.45-1.92,4.73-5.42,4.97v1.94h-1.54v-1.97Zm0-10.25v-4.15c-1.1.17-1.87.84-1.87,2.06,0,1.13.77,1.7,1.87,2.09Zm1.54,3.38v4.2c1.22-.22,1.94-1.06,1.94-2.14s-.82-1.68-1.94-2.06Z"/><path class="cls-1" d="m17.62,8.33h-2.33v-3.1h5.78v17.5h-3.46v-14.4Z"/><path class="cls-1" d="m28.27,17.81c.26,1.39,1.15,2.18,2.71,2.18,1.97,0,2.83-1.46,2.83-5.4-.74,1.03-2.16,1.63-3.7,1.63-3.02,0-5.45-1.9-5.45-5.59,0-3.5,2.21-5.81,5.91-5.81,4.75,0,6.22,3.22,6.22,8.76,0,5.95-1.32,9.17-5.95,9.17-3.72,0-5.5-2.38-5.69-4.94h3.12Zm5.23-7.15c0-1.92-1.1-2.98-2.81-2.98s-2.81,1.18-2.81,2.93c0,1.58.89,2.88,2.93,2.88,1.68,0,2.69-1.13,2.69-2.83Z"/><path class="cls-1" d="m41.28,22.9c-1.22,0-2.09-.86-2.09-1.97s.86-1.97,2.09-1.97,2.04.86,2.04,1.97-.86,1.97-2.04,1.97Z"/><path class="cls-1" d="m49.54,17.81c.26,1.39,1.15,2.18,2.71,2.18,1.97,0,2.83-1.46,2.83-5.4-.74,1.03-2.16,1.63-3.7,1.63-3.02,0-5.45-1.9-5.45-5.59,0-3.5,2.21-5.81,5.91-5.81,4.75,0,6.22,3.22,6.22,8.76,0,5.95-1.32,9.17-5.95,9.17-3.72,0-5.5-2.38-5.69-4.94h3.12Zm5.23-7.15c0-1.92-1.1-2.98-2.81-2.98s-2.81,1.18-2.81,2.93c0,1.58.89,2.88,2.93,2.88,1.68,0,2.69-1.13,2.69-2.83Z"/><path class="cls-1" d="m64.56,17.81c.26,1.39,1.15,2.18,2.71,2.18,1.97,0,2.83-1.46,2.83-5.4-.74,1.03-2.16,1.63-3.7,1.63-3.02,0-5.45-1.9-5.45-5.59,0-3.5,2.21-5.81,5.9-5.81,4.75,0,6.22,3.22,6.22,8.76,0,5.95-1.32,9.17-5.95,9.17-3.72,0-5.5-2.38-5.69-4.94h3.12Zm5.23-7.15c0-1.92-1.1-2.98-2.81-2.98s-2.81,1.18-2.81,2.93c0,1.58.89,2.88,2.93,2.88,1.68,0,2.69-1.13,2.69-2.83Z"/><path class="cls-1" d="m81.79,0h3.29l-6.48,27.07h-3.29L81.79,0Z"/><path class="cls-1" d="m96.89,9.43h3.58l-8.23,19.59h-3.58l2.88-6.62-5.33-12.96h3.77l3.43,9.29,3.48-9.29Z"/><path class="cls-1" d="m105.62,22.73h-3.36v-13.3h3.36v2.06c.84-1.37,2.23-2.26,4.08-2.26v3.53h-.89c-1.99,0-3.19.77-3.19,3.34v6.62Z"/></svg>