no start line SSL / TLS Origin: Network OSI layer 6 · Presentation Last updated 13 Oct 2026

OpenSSL: unable to load certificate / PEM routines:get_name:no start line (key values mismatch)

OpenSSL (or Nginx/Apache) couldn’t read the certificate or key — wrong file format, wrong file, or the key doesn’t match the certificate.

Exact message you may see no start linePEM routines:get_name:no start lineunable to load certificatekey values mismatchSSL_CTX_use_PrivateKey_file failed
Seen on: OpenSSL

Meaning

PEM files must contain -----BEGIN CERTIFICATE----- / -----BEGIN PRIVATE KEY----- blocks. DER/PFX files, Windows line endings, BOMs, copied text with extra spaces, or swapping cert and key cause “no start line”. “key values mismatch” means the key belongs to another certificate.

Common causes

  • File is DER/PFX, not PEM
  • Cert and key paths swapped
  • Extra characters/BOM or missing BEGIN line
  • Private key from a different CSR (key values mismatch)

⚡ Quick fix

  1. Convert formats (openssl x509 -inform der / openssl pkcs12)
  2. Check the first line of each file
  3. Compare cert and key modulus/public key hashes

Detailed fix by platform

Shell

  1. bash
    head -1 cert.pem key.pem
    openssl x509 -inform der -in cert.cer -out cert.pem
    openssl x509 -noout -pubkey -in cert.pem | sha256sum; openssl pkey -pubout -in key.pem | sha256sum

How to diagnose

  1. Format — BEGIN line present?
  2. Match — Public key hashes equal?
  3. Paths — ssl_certificate vs ssl_certificate_key

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

526 — Cloudflare Error 526: Invalid SSL Certificate (Cloudflare)526bad end line — PEM routines: bad end line / no start line — Windows CRLF line endings or truncated PEM file (SSL / TLS)bad end lineca md too weak / ee key too small — OpenSSL: error:0A00018E:SSL routines::ca md too weak / error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small (SSL / TLS)ca md too weak / ee k…Challenge failed for domain — Let’s Encrypt / Certbot: Challenge failed for domain example.com — Invalid response from http://example.com/.well-known/acme-challenge/x: 404 (SSL / TLS)Challenge failed for …doesn't include signing certificate — Provisioning profile "x" doesn't include signing certificate "Apple Development: Name (ID)" (iOS)doesn't include signi…ERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPPOR…ERR_SSL_VERSION_OR_CIPHER_MISMATCH — Chrome: This site can’t provide a secure connection — uses an unsupported protocol. ERR_SSL_VERSION_OR_CIPHER_MISMATCH (Browser)ERR_SSL_VERSION_OR_CI…failed to run custom build command for openssl-sys — Cargo: error: failed to run custom build command for `openssl-sys v0.9.99` — Could not find directory of OpenSSL installation / pkg-config not found (Rust)failed to run custom …no start …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.