CSR: what a certificate signing request is for, and when you still need one

A CSR gets your public key signed without ever revealing the private key. What it contains, why automation made it invisible, and the cases where it still matters.

Published · 8 min read · Also available in: Français

For twenty years, getting a certificate started with the same command: creating a CSR. You pasted it into the certificate authority’s form, and the certificate came back by email.

Today, many teams manage hundreds of certificates without ever having seen one. Yet the CSR has not gone away: it is still there, at every issuance. It is simply made by a program. And there are still cases where creating it is up to you.

What a CSR is

CSR stands for Certificate Signing Request. It is a small file you hand to a certificate authority to say: “here is my public key and the names I want to protect, sign them”.

In the CSR
  • Your public key
  • The requested names: www.example.com, example.com
  • A signature made with your private key
Not in the CSR
  • The private key
  • The validity dates
  • The authority’s name
The CSR is a request. The dates and the issuer are added by the authority, in the certificate.

Each of the three items has a role:

A CSR is not a secret. It contains nothing that would let someone impersonate your site, and it can travel by email or through a portal. That is the whole point.

What it is for: getting the key signed without showing it

The certificate must be signed by the authority, but the private key must never leave your server. The CSR resolves that contradiction: it carries only the public half.

Youthe serverCertificateauthority
  1. 1. Generates the key pair. The private key stays here
  2. 2. Creates the CSR: public key and names, signed with the private key
  3. 3. Sends the CSR
  4. 4. Checks the CSR’s signature, and that you control the requested names
  5. 5. Adds the dates and its name, then signs: that is the certificate
  6. 6. Returns the certificate
  7. 7. The certificate is installed next to the private key, which never left the server
Only the CSR and the certificate travel. Both are public.

Step 4 has two separate parts. The CSR’s signature proves you hold the key. It does not prove the domain is yours: for that, the authority performs a domain validation, over DNS or HTTP.

An example by hand

Three commands are enough, run on the server that will use the certificate.

# 1. The private key (it will not leave this machine)
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out www.example.com.key

# 2. The CSR: the public key and the names, signed with the private key
openssl req -new -key www.example.com.key -out www.example.com.csr \
  -subj "/CN=www.example.com" \
  -addext "subjectAltName=DNS:www.example.com,DNS:example.com"

# 3. Read the request back before sending it
openssl req -in www.example.com.csr -noout -text -verify

The third command shows what the authority will receive:

Certificate request self-signature verify OK
Certificate Request:
        Subject: CN=www.example.com
        Subject Public Key Info:
            Public Key Algorithm: id-ecPublicKey
                Public-Key: (256 bit)
            Requested Extensions:
                X509v3 Subject Alternative Name:
                    DNS:www.example.com, DNS:example.com
    Signature Algorithm: ecdsa-with-SHA256

The file itself is text, recognisable by its first line:

-----BEGIN CERTIFICATE REQUEST-----
MIIBDjCBtgIBADAaMRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20wWTATBgcqhkjO…
-----END CERTIFICATE REQUEST-----

That is the .csr file you send. The .key file goes nowhere.

Why you no longer hear about it

Because the CSR is now created, sent and discarded by a program, at every renewal, without anyone seeing it.

By handopenssl req
  • You generate the key
  • You create the CSR
  • You submit it on the authority’s portal
  • You install the certificate
ACME clientCertbot, acme.sh, Caddy, cert-manager
  • The client generates the key
  • It creates the CSR and sends it
  • It installs the certificate
  • It starts again before expiry
Managed serviceAWS ACM, CDN, hosting provider
  • The provider does everything
  • You see neither the key nor the CSR
  • You only give the domain name
The CSR exists in all three cases. Only the first one shows it to you.

Three changes took it out of daily work:

The result: for a public website, the CSR has become an internal detail, like the TLS handshake. You know it happens, you no longer look at it.

The cases where the CSR still matters

As soon as an issuance is not automated end to end, the CSR is your business again. These are often the most sensitive certificates.

Case Who creates the CSR Who signs it What to watch
OV or EV certificate ordered on a paid authority’s portal You The public authority It replaces the organisation fields with the ones it verified
mTLS with a provider You, for your client certificate The provider’s authority Send the CSR, never the key
Internal authority of the company (AD CS, Vault, step-ca) The team requesting the certificate The PKI team Follow the imposed template: names, usages, key size
Appliance: firewall, load balancer, storage array, printer The appliance, from its interface Your authority, public or internal Do not regenerate a CSR before installing the certificate
Key in a hardware module (HSM, KMS, smart card) The module, or the tool driving it Depends on the use The CSR is the only thing that leaves the module
Intermediate authority The future intermediate authority The root authority A ceremony, not a script

Example 1: a client certificate for a provider

Your application has to call a bank’s API over mTLS. The bank signs its customers’ certificates itself. You generate the key on your gateway, then a CSR with the agreed name:

openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out client-bank-x.key
openssl req -new -key client-bank-x.key -out client-bank-x.csr \
  -subj "/O=Example Ltd/CN=client-example-prod"

You upload client-bank-x.csr to the bank’s portal. It returns client-bank-x.crt. No exchange carried a secret, and the bank will never be able to impersonate you.

If a provider offers to generate the key for you and send it over “to save time”, decline: a key that has travelled is no longer private.

Example 2: a network appliance

On a firewall or a load balancer, the key is created inside the appliance and often cannot be exported from it. The administration interface offers a “Generate CSR” button. You download the request, have it signed, then import the certificate in the same place.

The trap is well known: if someone clicks “Generate CSR” again before the import, the appliance creates a new key. The certificate being signed then matches the old one, and it will be rejected on import.

Example 3: the internal authority

In a company with its own authority, a team that needs a certificate for an internal service sends a CSR to the PKI team, through a portal or a ticket. The PKI team checks that the request follows the rules (allowed names, algorithm, lifetime) and signs.

Recent tools, such as HashiCorp Vault or step-ca, automate this step too, sometimes with ACME. The CSR then becomes invisible again, internally as on the Internet.

The most common mistakes

What this changes for tracking your certificates

The CSR says something about the certificate’s future: a certificate born from a hand-made CSR will be renewed by hand. No program will do it for you, and it is the one that will expire one day without warning.

These certificates are also the least visible. An mTLS client certificate, the one on an internal appliance or an intermediate authority’s appear neither in a scan of your sites nor in Certificate Transparency logs.

PkiZen does not create CSRs and never sees your keys: that is a choice. It tracks the result. Once the certificate arrives, you import its public part, and you write down what will be missing at the next renewal:

In summary