Use it when requesting a certificate from a CA.
CSR
A CSR (Certificate Signing Request) contains the public key and requested names, signed with the private key, and is sent to a CA to issue a certificate.
1. Generate key and CSR with SANs.
2. Inspect: openssl req -in req.csr -noout -text.
3. SANs correct? Key size?
4. Send to the CA; keep the key private.
5. Install the issued cert with its chain.
key pair → CSR with names → CA verifies and signs → certificate issued
For Certificates & TLS → CSR, continue with the first unproven Topic check: Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for CSR. If that boundary is healthy, advance to the adjacent check: Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
private key → CSR subject/SAN/extensions → CSR signature → CA policy/validation → issued certificate → verify issued identities against request
Healthy evidence: CSR signature is valid, SANs/subject/key are correct, sensitive data is absent and issued certificate matches approved request
Step 2 Verification and output interpretation Verify boundary
Verification chain. private key → CSR subject/SAN/extensions → CSR signature → CA policy/validation → issued certificate → verify issued identities against request
Step 3 Commands Verify boundary
openssl req -new -key key.pem -out req.csr -subj '/CN=web.example.com' -addext 'subjectAltName=DNS:web.example.com'
openssl req -in req.csr -noout -text
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: wrong key is used, SAN missing, subject is misleading, unwanted extensions are requested, CSR is sent to wrong CA or issued cert differs from request assumptions
Step 5 Common mistakes Narrow the fault
- Missing SAN entries.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Put all names in subjectAltName — browsers ignore the CN. Generate: openssl req -new -newkey rsa:2048 -nodes -keyout key.pem -out req.csr -subj '/CN=<name>' -addext 'subjectAltName=DNS:<name>,DNS:<alt>'. Check before sending.
openssl x509 -in <cert> -noout -subject -issuer -dates -ext subjectAltName— certificate detailsopenssl s_client -connect <host>:443 -servername <name> </dev/null— live chain and verificationopenssl verify -CAfile <ca> -untrusted <chain> <cert>— chain validationtrust list | head / ls /etc/ssl/certs— system trust store
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
CSR correctness is confirmed by inspecting requested identities/extensions and confirming the issued certificate actually contains the approved result; generation alone is not issuance.
CSR owns the request artifact; Certificates owns the issued X.509 object and CA Certificates/Chain own trust.
In depth
Certificate signing requests
A certificate signing request (CSR) carries the public key and the requested identity to a certificate authority. The private key never leaves the server. The openssl-req(1) manual page documents creating requests:
-newcreates a request, and-keynames an existing private key. Without-key, a new key is generated, RSA 2048 by default, and-newkeydoes that explicitly.-noencleaves a newly generated key unencrypted (-nodesis deprecated in OpenSSL 3).-subjsets the subject without prompting.-addextadds extensions such assubjectAltName = DNS:....-x509produces a self-signed certificate instead of a request (default validity 30 days, changed with-days).-verifychecks the request's self-signature, and-text -nooutdisplays it.
Subject and subject alternative names
Browsers and most TLS clients match the host name against the subjectAltName extension, not the Common Name. RFC 5280 notes that the subject name may be carried in the subject field and/or the subjectAltName extension. In practice, every name the certificate must cover belongs in subjectAltName.
Creating a CSR
| Approach | Command |
|---|---|
| One command, with SANs | openssl req -new -key www.key -subj "/CN=www.example.net" -addext "subjectAltName=DNS:www.example.net,DNS:example.net" -out www.csr |
| A new key and CSR together | openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:P-256 -noenc -keyout www.key -out www.csr -subj "/CN=www.example.net" |
| From a config file (many SANs) | openssl req -new -key www.key -config www.cnf -out www.csr |
| A self-signed test certificate | openssl req -x509 -key www.key -days 30 -subj "/CN=test.local" -out test.crt |
Checking a CSR before submitting it
| Check | Why |
|---|---|
-verify | Signature intact |
| SANs present and complete | Otherwise browsers reject the certificate |
| The key type and size the CA accepts | Avoid rejection |
| The public key matches the key you'll install | Avoid "key mismatch" later |
host$ openssl req -new -key /etc/ssl/private/www.key -subj "/C=DK/O=Example A-S/CN=www.example.net" \
-addext "subjectAltName=DNS:www.example.net,DNS:example.net" -out www.csr
host$ openssl req -in www.csr -noout -verify -subject
Certificate request self-signature verify OK
subject=C = DK, O = Example A-S, CN = www.example.net
host$ openssl req -in www.csr -noout -text | grep -A1 "Subject Alternative Name"
X509v3 Subject Alternative Name:
DNS:www.example.net, DNS:example.net
host$ openssl req -in www.csr -noout -pubkey | openssl sha256
host$ openssl pkey -in /etc/ssl/private/www.key -pubout | openssl sha256
Reading the result
The self-signature verifies, and both names are in the SAN extension. The public key digests (the last two lines) let you confirm that the CSR belongs to the installed key. Do that check before submitting the CSR, not after the certificate has arrived.
Documented example, not captured output.
How it works at runtime
CSR is part of Certificates & TLS → CSR. A Certificate Signing Request binds a requested subject/SAN/public key and requested extensions to a signature from the corresponding private key before CA issuance.
Topic-specific state model. A Certificate Signing Request binds a requested subject/SAN/public key and requested extensions to a signature from the corresponding private key before CA issuance.
Interpretation rule. - CSR generated successfully ≠ CA will issue the requested identities/extensions.
- CSR subject CN ≠ sufficient hostname coverage when SANs are required by clients.
Quick reference
A Certificate Signing Request carries the public key and requested identity to a CA.
openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -keyout web01.key -out web01.csr \
-subj "/CN=web01.example.com" \
-addext "subjectAltName=DNS:web01.example.com,DNS:www.example.com"
openssl req -in web01.csr -noout -text | grep -A1 'Subject Alternative Name'
Browsers validate only SANs, not CN. Many CAs ignore CSR extensions and use what you enter in their portal — check the issued certificate. With ACME (Let's Encrypt, internal ACME CAs) the client generates CSRs automatically.
Limits and how it fails
Primary failure point. CSR correctness is confirmed by inspecting requested identities/extensions and confirming the issued certificate actually contains the approved result; generation alone is not issuance.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. CSR owns the request artifact; Certificates owns the issued X.509 object and CA Certificates/Chain own trust.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Certificates & TLS → CSR. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.openssl.org/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
CSR operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for CSR.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | A Certificate Signing Request binds a requested subject/SAN/public key and requested extensions to a signature from the corresponding private key before CA issuance. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + boot/time + real identity/workload → identify authoritative policy/key/trust source → read back loaded/effective runtime state → reproduce one safe allow/deny/handshake test → correlate audit/service/kernel evidence → locate first failed boundary → make the smallest persistent change → repeat original workload + regression/recovery check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | private key → CSR subject/SAN/extensions → CSR signature → CA policy/validation → issued certificate → verify issued identities against request | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | CSR correctness is proven by inspecting requested identities/extensions and confirming the issued certificate actually contains the approved result; generation alone is not issuance. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux security/trust evidence can establish this proof path: private key → CSR subject/SAN/extensions → CSR signature → CA policy/validation → issued certificate → verify issued identities against request | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved identities, objects, policies, namespaces, endpoints or time periods. CSR correctness is proven by inspecting requested identities/extensions and confirming the issued certificate actually contains the approved result; generation alone is not issuance. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven security/trust boundary, capture the adjacent effective state and audit/handshake evidence, make only the demonstrated persistent change, then repeat the original workload plus recovery/regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
CSR · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | CSR |
|---|---|
| Topic path | Certificates & TLS → CSR |
| Runtime state | A Certificate Signing Request binds a requested subject/SAN/public key and requested extensions to a signature from the corresponding private key before CA issuance. |
| Fast checks | - Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for CSR. - Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. - Reproduce one safe allowed/denied or handshake/access test and correlate kernel/service/audit evidence at the first relevant boundary. - Apply the smallest persistent cause-specific change, then repeat the original test plus an adjacent regression/recovery check. |
| Verification chain | private key → CSR subject/SAN/extensions → CSR signature → CA policy/validation → issued certificate → verify issued identities against request Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | CSR correctness is proven by inspecting requested identities/extensions and confirming the issued certificate actually contains the approved result; generation alone is not issuance. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |