How to check a CSR
- Paste the request, from
-----BEGIN CERTIFICATE REQUEST-----to the matching END line, or drop the.csr/.reqfile on the box. - Check Subject, Subject Alt Names and Public key on the card.
- Optionally paste the private key below the CSR. Its card shows only the key type and size, and an SPKI SHA-256 pin you can compare with the CSR’s.
- Use Copy PEM or Download .der if the CA portal wants the request in another form.
What is inside a certificate signing request
A CSR (PKCS#10) is small: a subject name, a public key, optional attributes and a signature over all of it. The decoder lists them like this:
| Field | Notes |
|---|---|
| Subject | C=US, O=Example Corp, CN=app.example.com. For domain-validated certificates the CA keeps only what it validated, so organization fields are usually dropped. |
| Version | Always v1 for PKCS#10. |
| Public key | Type and size, e.g. RSA 2048 or EC P-256. This is the part that ends up in the certificate unchanged. |
| Signature algorithm | Usually sha256WithRSAEncryption or ecdsa-with-SHA256. |
| Subject Alt Names, Key usage, Extended key usage | Requested extensions. A CA may honour, rewrite or drop them. |
| Attributes | Other PKCS#9 attributes. A challengePassword is reported as set, with its value hidden. |
| SPKI SHA-256 pin | Hash of the public key. The issued certificate will have the same pin. |
Mistakes worth catching before you submit
- No Subject Alt Names. Browsers ignore the CN when matching hostnames. Public CAs typically copy the CN into the SAN for you; internal CAs often do not, and the result is a certificate that fails with a name mismatch.
- A missing name.
www.example.comandexample.comare two different entries. A wildcard*.example.comdoes not coverexample.comitself. - Key too small. Publicly trusted CAs require at least 2048-bit RSA. An RSA 1024 CSR will be rejected.
- Wrong key. A CSR generated on another server, or from an old key file, produces a certificate your server cannot use. Compare the pins.
- Typos in the subject. Cheap to fix now, expensive after an OV or EV validation has run.
The tool reads the CSR but does not check its self-signature. A truncated or edited request can still decode, so run openssl req -verify when in doubt.
Creating and verifying a CSR with OpenSSL
A new RSA key and a CSR with two hostnames in one step (OpenSSL 1.1.1 or later for -addext):
openssl req -new -newkey rsa:2048 -nodes -keyout app.key -out app.csr \
-subj "/CN=app.example.com" \
-addext "subjectAltName=DNS:app.example.com,DNS:www.app.example.com"
Check it, including the signature, and confirm it matches the key:
openssl req -in app.csr -noout -text -verify
diff <(openssl req -in app.csr -noout -pubkey) <(openssl pkey -in app.key -pubout) && echo "key matches"
The -verify line prints Certificate request self-signature verify OK for an intact request. More command-line recipes are on the OpenSSL page.
How a CSR looks in Base64
A CSR is DER wrapped in PEM, like a certificate. An RSA-2048 request is roughly 650–700 bytes of DER, so its Base64 starts MIIC; an EC P-256 request is closer to 300 bytes and starts MIIB. If what you received starts MIIC but the header says CERTIFICATE, it is a certificate. Paste it into the certificate decoder instead; the same widget handles both and tells you which one it found.
FAQ
How do I check which domains are in a CSR?
Paste the CSR and look at Subject Alt Names. That list decides which hostnames the certificate will cover; browsers ignore the CN in the subject. If the line is missing, the request carries no SAN extension.
How can I tell if a CSR matches my private key?
Paste the CSR and the private key together. If both cards show the same SPKI SHA-256 pin, they share one key pair. With OpenSSL, compare openssl req -in app.csr -noout -pubkey with openssl pkey -in app.key -pubout.
Does a CSR contain the private key?
No. A CSR holds the public key, the requested names and a signature made with the private key to prove you have it. It is safe to send to a CA, and the private key should stay on the server.
What is NEW CERTIFICATE REQUEST in the header?
An older label used by Java keytool and some Windows tools. The content is the same PKCS#10 structure, and the decoder reads it like any other CSR.