Close Menu
DPC Virtual Tips
    Read More

    Docker Containers Not Starting on Boot? Fix Restart Policies

    August 30, 2026

    How to Troubleshoot Packet Drops on an ESXi Host

    August 16, 2026

    SlurmDBD Is Down: What Continues Working and What Does Not

    August 15, 2026
    • Home
    • About Us
    • Contact
    • Cookie Policy
    • Comment Policy
    • Privacy Policy
    • Terms of Use
    • Disclaimer
    Monday, August 31
    DPC Virtual Tips
    • Home
    • Operating Systems
    • HPC
    • Virtualization
    • About the Author
    • About Us
    • Contact
    DPC Virtual Tips
    Home » Creating a Certificate Request with OpenSSL
    Operating Systems

    Creating a Certificate Request with OpenSSL

    DaniloBy DaniloJanuary 17, 2023Updated:August 29, 2026No Comments4 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    OpenSSL certificate request
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Creating a Certificate Request with OpenSSL is a practical guide that explains how to generate a CSR (Certificate Signing Request) and private key using OpenSSL. In this lab environment, we will use OpenSSL on Windows to create the required files before submitting the certificate request to a Certificate Authority.

    What is a CSR and why you need it

    A Certificate Signing Request (CSR) is the standard way to ask a Certificate Authority for a signed certificate. The flow is always the same:

    1. You generate a private key and a CSR on your machine.
    2. You send the CSR to the CA (an internal CA, or a public one).
    3. The CA signs it and returns the final certificate.

    The private key never leaves your machine. Only the CSR (which contains the certificate’s identity details, not the key) is sent to the CA.

    In this lab, the goal is to create a CSR for an NSX Manager deployment, using OpenSSL on Windows. (This is part of a certificate series — see Creating an Internal Certificate Authority and Requesting a Certificate for an Internal CA.)

    OpenSSL is a widely used tool for digital certificates: it generates private keys, certificate requests, and manages cryptographic operations. You can download the Windows build from slproweb.com.

    Step 1 — Create the certificate details file

    The first step is creating a text file with the certificate details. You can use Notepad++ or any text editor.

    Create a new file and put the following content:

    [ req ]
    default_bits = 2048
    distinguished_name = req_distinguished_name
    req_extensions = req_ext
    prompt = no
    
    [ req_distinguished_name ]
    countryName = BR
    stateOrProvinceName = SP
    localityName = SP
    organizationName = DPC Virtual Tips
    organizationalUnitName = IT
    commonName = nsx.lab.local
    
    [ req_ext ]
    subjectAltName = @alt_names
    
    [alt_names]
    DNS.1 = nsx.lab.local
    DNS.2 = nsx-01.lab.local
    DNS.3 = nsx-02.lab.local
    DNS.4 = nsx-03.lab.local
    IP.1 = 10.0.0.1
    IP.2 = 10.0.0.2
    IP.3 = 10.0.0.3
    IP.4 = 10.0.0.4

    Let’s understand the important fields:

    • default_bits = 2048 — the RSA key size (2048 bits is the standard minimum today).
    • prompt = no — tells OpenSSL to read the values from this file instead of asking you interactively.
    • countryName, stateOrProvinceName, localityName, organizationName, organizationalUnitName — the certificate identity (Distinguished Name) fields. Adjust them to your organization.
    • commonName = nsx.lab.local — the main FQDN of the certificate.
    • subjectAltName (SAN) — this is the section that matters most today. Modern browsers and clients require the certificate to list all its valid hostnames and IPs in the SAN, not just in the commonName. Here we list the NSX Manager FQDNs (nsx.lab.local, nsx-01/02/03.lab.local) and their IPs (10.0.0.1–10.0.0.4).

    Save the file as nsx-cert.txt:

    Step 2 — Generate the CSR and the private key

    Open the Windows CMD and navigate to the openssl.exe directory:

    cd C:\Program Files (x86)\GnuWin32\bin

    Run the command below to generate the CSR and the private key:

    openssl.exe req -out C:\temp\nsx-cert.csr -newkey rsa:2048 -nodes -keyout C:\temp\nsx-cert.key -config C:\temp\nsx-cert.txt -sha256

    What each parameter does:

    -sha256 — the hash algorithm used to sign the request.

    -out C:\temp\nsx-cert.csr — the file that will contain the Certificate Request (CSR).

    -newkey rsa:2048 — generates a new 2048-bit RSA private key at the same time.

    -nodes — “no DES”: does not encrypt the private key with a password. This is important for services and automation (an NSX Manager or a web server needs to read the key without typing a password).

    -keyout C:\temp\nsx-cert.key — the file that contains the private key. Keep this file secure and do not share it.

    -config C:\temp\nsx-cert.txt — the file with the certificate details we created before.

    After running, in C:\temp you will see the files: nsx-cert.csr (the request) and nsx-cert.key (the private key):

    Step 3 — Submit the CSR to the CA

    At this point, the Certificate Request is done. The next step is to send the CSR file (nsx-cert.csr) to the CA (internal or public) so it can sign it and issue the final certificate. The private key (nsx-cert.key) stays on your machine.

    (If you need to install the resulting certificate, see How to Use a Custom SSL Certificate on ESXi and How to Use a Custom SSL Certificate on vCenter.)

    Reference

    • OpenSSL Windows build: https://slproweb.com/products/Win32OpenSSL.html
    • OpenSSL documentation: https://www.openssl.org/docs/
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleCreating an Internal Certificate Authority
    Next Article Requesting a Certificate for an Internal CA
    Danilo

    Infrastructure Engineer with experience in Virtualization, Linux, Windows Server and learning automation using Python. DPC Virtual Tips was created to share practical tutorials, lab experiences and troubleshooting guides focused on enterprise infrastructure technologies.

    Related Posts

    Docker Containers Not Starting on Boot? Fix Restart Policies

    August 30, 2026

    Linux Server Has Free Memory but Is Swapping: Why?

    August 13, 2026

    How to Determine Whether Packet Loss Is Local or Network Related on Linux

    August 12, 2026

    Comments are closed.

    Search
    Categories
    • HPC (12)
    • Operating Systems (86)
    • Virtualization (152)
    Read More
    Operating Systems

    Docker Containers Not Starting on Boot? Fix Restart Policies

    By DaniloAugust 30, 20260
    Virtualization

    How to Troubleshoot Packet Drops on an ESXi Host

    By DaniloAugust 16, 20260
    HPC

    SlurmDBD Is Down: What Continues Working and What Does Not

    By DaniloAugust 15, 20260
    HPC

    How to Investigate Jobs Stuck in COMPLETING State on Slurm

    By DaniloAugust 14, 20260
    Operating Systems

    Linux Server Has Free Memory but Is Swapping: Why?

    By DaniloAugust 13, 20260
    Latest Posts

    Docker Containers Not Starting on Boot? Fix Restart Policies

    August 30, 2026

    How to Troubleshoot Packet Drops on an ESXi Host

    August 16, 2026

    SlurmDBD Is Down: What Continues Working and What Does Not

    August 15, 2026
    Images from Gallery
    hpc main commands
    linux commands
    install rock linux
    lustre fs
    shell scripting
    vSAN Trace Files
    Categories
    • HPC
    • Operating Systems
    • Virtualization
    • Home
    • About Us
    • Contact
    • Cookie Policy
    • Comment Policy
    • Privacy Policy
    • Terms of Use
    • Disclaimer
    Copyright © 2026, DPC Virtual Tips. All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.

    We use cookies to ensure your best experience on our website. If you continue using our website, we'll assume you agree to our cookie policy