TLS Certificate Errors Across Browsers
One bad certificate, five error strings. Compare how Chrome, Edge, Firefox, macOS and iOS report expiry, name mismatch and chain failures.
An expired certificate, a missing intermediate and a cipher mismatch can all end with a page that says your connection is not private, yet three different systems decide which message you read. Chrome and Edge speak the Chromium vocabulary, Firefox speaks NSS, and macOS and iOS translate the same failure into NSURLErrorDomain numbers. The error string names the layer that rejected the connection, which is the fact you need before changing any configuration.
The error names the layer, not just the fault
TLS validation is a sequence, not a single check. The client negotiates a protocol version and cipher suite, reads the server certificate, builds a chain to a trusted root, compares the certificate names with the host it requested, and tests the validity window against its own clock. A client that fails during the handshake never reads the certificate, so it cannot report an expiry problem. Start at the TLS error hub when you only have the message text, then decide which step the message belongs to.
Five failure families, five different owners
- Expired or not yet valid. The current time is outside the certificate's validity window. Node.js calls this CERT_HAS_EXPIRED or CERT_NOT_YET_VALID; browsers fold both into one date error.
- Hostname mismatch. The certificate is valid but does not cover the name in the URL, usually because the subject alternative names omit
wwwor an internal alias: ERR_CERT_COMMON_NAME_INVALID. - Untrusted chain or self-signed certificate. The leaf cannot be chained to a root the client trusts: ERR_CERT_AUTHORITY_INVALID, DEPTH_ZERO_SELF_SIGNED_CERT or UNABLE_TO_VERIFY_LEAF_SIGNATURE.
- Protocol or cipher mismatch. The handshake never reaches the certificate: ERR_SSL_PROTOCOL_ERROR when the bytes are not TLS at all, ERR_SSL_VERSION_OR_CIPHER_MISMATCH when no common version or suite exists.
- Client clock. A wrong clock makes a valid certificate look expired or future-dated and produces exactly the same tokens as a genuinely bad certificate.
Chrome and Edge: one network stack, one vocabulary
Chrome and Edge share the Chromium networking stack, so the same failure usually produces the same token in both, and that token is defined in the Chromium net error list. Two distinctions matter. ERR_CERT_DATE_INVALID covers both an expired certificate and one whose start date is in the future, so it never says which side of the window you are on. The ERR_SSL_* family means the browser rejected the connection during the handshake, so no date, name or chain check has happened yet.
Chromium validates the chain as it walks it. When a server sends only the leaf and omits the intermediate, the browser reports ERR_CERT_AUTHORITY_INVALID rather than a name error, even though the leaf is current and correctly named. This is also common on networks that re-sign traffic with a private certificate authority: the connection is technically valid, but the browser profile holds no matching trust anchor. Managed profiles with the right anchor load it, which is why one URL fails in a personal profile and works in a corporate one.
Firefox validates against a different trust store
Firefox links NSS rather than the platform TLS library and validates against Mozilla's own root store, so a certificate that Windows or macOS trusts is not automatically trusted in Firefox, and the reverse is also true. Its vocabulary is older and more granular: SEC_ERROR_EXPIRED_CERTIFICATE for a date failure, SSL_ERROR_BAD_CERT_DOMAIN for a name mismatch, SEC_ERROR_UNKNOWN_ISSUER for a chain that ends at an unknown root, MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT for a self-signed leaf, SSL_ERROR_UNSUPPORTED_VERSION for a protocol floor and SSL_ERROR_NO_CYPHER_OVERLAP when only the cipher list is disjoint.
That independence is a diagnostic. When Firefox fails on an internal site that Edge opens, the likely cause is a private root present in the platform store but absent from the Firefox profile. Enterprise builds can import operating-system roots, and the security.enterprise_roots.enabled preference does the same manually. Confirm the setting before calling it a server defect, and never ask users to click through the warning on a production host.
macOS and iOS: NSURLErrorDomain and the system trust store
Apps, and browsers that use the platform networking stack, surface TLS failures as negative numbers in NSURLErrorDomain. -1200 is a generic secure connection failure at the handshake. -1201 means the certificate has a bad date, -1202 that it is untrusted, -1203 that the chain ends at an unknown root, and -1204 that the certificate is not yet valid. -999 is a cancelled request and says nothing about TLS. The same numbers appear on macOS and iOS because both use the same Foundation error domain.
Trust comes from the operating system, not from the browser. macOS reads Keychain trust settings; iOS uses the built-in store plus any configuration profile that installed a root, and a manually installed root must also be enabled under Certificate Trust Settings. App Transport Security adds a floor on top: with default settings an app requires TLS 1.2 or later and forward-secret cipher suites, so a server that still negotiates an older protocol can fail inside an app while a browser on the same device only warns.
One failure, five vocabularies
| Failure | Chrome and Edge | Firefox | macOS and iOS | Usual owner |
|---|---|---|---|---|
| Expired certificate | ERR_CERT_DATE_INVALID | SEC_ERROR_EXPIRED_CERTIFICATE | -1201 | Server: renew and reload |
| Not yet valid | ERR_CERT_DATE_INVALID | MOZILLA_PKIX_ERROR_NOT_YET_VALID_CERTIFICATE | -1204 | Server or client clock |
| Hostname mismatch | ERR_CERT_COMMON_NAME_INVALID | SSL_ERROR_BAD_CERT_DOMAIN | No dedicated code; -1200 or -1202 | Server: reissue with the right names |
| Self-signed or unknown root | ERR_CERT_AUTHORITY_INVALID | MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT | -1202 or -1203 | Server, or client trust store for a private CA |
| Missing intermediate | ERR_CERT_AUTHORITY_INVALID | SEC_ERROR_UNKNOWN_ISSUER | -1203 | Server: send the full chain |
| Protocol or cipher | ERR_SSL_VERSION_OR_CIPHER_MISMATCH | SSL_ERROR_UNSUPPORTED_VERSION | -1200 | Server, proxy or client version |
| Not TLS at all | ERR_SSL_PROTOCOL_ERROR | SSL_ERROR_RX_RECORD_TOO_LONG | -1200 | Wrong port or proxy misconfiguration |
A decision path
- Read the family first. An
ERR_SSL_*,SSL_ERROR_*or-1200error points at the handshake, not the certificate. - Reproduce the connection outside the browser. Connect with the exact hostname and SNI, then check whether a certificate came back.
- Check the validity window. Compare
notBeforeandnotAfterin UTC with the clock on the failing client, not your own machine. - Read the names. Compare the hostname with every subject alternative name; modern clients ignore the legacy common name.
- Count the chain. One certificate and no root usually means a missing intermediate. Several certificates in the wrong order are equally broken.
- Compare clients. If one client fails and another succeeds, compare their trust stores and protocol policy before editing the server.
- Compare networks. If every client fails on one network and none fails on another, look for a proxy that re-signs traffic.
- Assign the owner. Bad dates, names, chain order or protocol floors are server defects. A wrong clock, a stale trust store or a pinned legacy client is a client defect.
Commands that answer the question
OpenSSL prints the chain and the negotiated protocol, which no browser error page shows you. Add -servername so the server selects the right virtual host, and -verify_hostname so OpenSSL performs the same name check as the browser. On a broken setup the verify lines name the depth and the reason.
# Chain, protocol and cipher for the exact hostname
echo | openssl s_client -connect www.example.com:443 -servername www.example.com -verify_hostname www.example.com -showcerts
# Dates, names and issuer of the certificate the server actually sends
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName
# The same check for a certificate file on disk
openssl x509 -in /etc/ssl/certs/site.pem -noout -dates -subject -ext subjectAltName
# How many certificates the server sends
echo | openssl s_client -connect www.example.com:443 -servername www.example.com -showcerts 2>/dev/null | grep -c "BEGIN CERTIFICATE"
curl is the faster check when you want one line per fact, and -vI shows the handshake, the certificate subject and the verification result without downloading a body. --resolve keeps the hostname and SNI intact while sending the connection to a specific address, which separates a DNS or load-balancer problem from a certificate problem.
# Handshake, certificate and verification result
curl -vI https://www.example.com --max-time 10
# Force one protocol version to test the server floor
curl -vI https://www.example.com --max-time 10 --tlsv1.2 --tls-max 1.2
# Test one address while keeping the hostname and SNI
curl -vI https://www.example.com --resolve www.example.com:443:203.0.113.10
# Machine-readable result: 0 means the chain verified
curl -s -o /dev/null -w '%{ssl_verify_result}
' https://www.example.com
Finally, test the client clock. date -u prints UTC on Linux and macOS, w32tm /query /status reports the Windows time service, and sudo sntp -sS time.apple.com resynchronises an Apple host. On iOS the equivalent is Date & Time set to automatic. A client a few minutes behind is enough to break a freshly issued certificate.
Server fix or client fix
The owner follows from the evidence, not from the error text. A certificate that is expired, issued for another name, missing an intermediate or signed by an untrusted root is a server defect: renew or reissue it, serve the full chain in order, and reload the service. A server that offers only a protocol version or cipher suite that current clients refuse is also a server defect, though the fix may belong to a proxy.
A client clock in the wrong year, a trust store that has not received a private root, an outdated client that cannot negotiate a current protocol, or a device that still pins an old certificate are client-side conditions. Fix them in the client or in its management policy. Disabling verification is not a fix; it removes the only signal that the traffic was intercepted.
Evidence worth escalating with
The certificate owner can act quickly when the report contains the facts the browser hides. Include the exact error string, the browser or app and its version, the hostname in the address bar, and whether the failure reproduces on another network. Add the certificate subject, issuer, serial number and subject alternative name list, the notBefore and notAfter values in UTC, the number of certificates the server sends, and the protocol and cipher that were negotiated. A curl -vI transcript and an openssl s_client transcript cover all of it in two attachments.
If only one client fails, say which clients succeed on the same host, and whether the failing client is managed by an organisation. If everything fails, say whether the failure began after a deployment or a certificate change. That detail usually decides whether the certificate owner, the network team or the client administrator is the right recipient.
Related TLS pages
The individual codes behind these families have their own pages: CERT_HAS_EXPIRED, CERT_NOT_YET_VALID, ERR_CERT_COMMON_NAME_INVALID, ERR_CERT_AUTHORITY_INVALID, DEPTH_ZERO_SELF_SIGNED_CERT, UNABLE_TO_VERIFY_LEAF_SIGNATURE, ERR_SSL_PROTOCOL_ERROR and ERR_SSL_VERSION_OR_CIPHER_MISMATCH. Browser-side hubs are Chrome, Edge and Firefox; platform-side hubs are macOS and iOS.
Sources
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3
- Chromium net error list
- Apple Developer: NSURLErrorDomain
- Mozilla Support: Secure connection failed
Search the code you are seeing
Every page links the official source and the date it was last checked.