cd ..

TLS Certificate Chain Inspector

Context: Independent, 2025 | Stack: Node.js crypto · Netlify Functions | Role: Design and build | Focus: PKI · chain signatures · revocation · pinning
Node.js Netlify Functions X.509 / ASN.1 Mozilla root store CRL · OCSP SPKI pinning SHA-1 detection

A misconfigured certificate chain is one of the most common, and most avoidable, causes of TLS outages. Missing intermediates, legacy SHA-1 signatures and stale pins tend to fail quietly until a client stricter than your browser rejects them. This tool catches them before a deploy does.

Give it a hostname, or paste a PEM chain. It captures the chain the server actually presents, verifies every signature against its issuer's public key, checks whether the chain anchors in Mozilla's root store, checks the leaf certificate's revocation status, flags SHA-1 signatures, and prints SPKI pin hashes, all from one serverless function. It reports only what it verified: anything it couldn't verify is labeled unknown or not checked, never good.

7+ Checks per certificate
30-day Expiry warning
SHA-256 SPKI pin hashes
0 Servers to maintain

Capabilities

Live chain fetch

Connects to the host on any port and records the chain the server sends in the TLS handshake (adding the root from the trust store when the server omits it), not a cached copy. Or paste a PEM chain.

Cryptographic verification

Verifies each certificate's signature with its issuer's public key, and checks that every issuer is a CA allowed to sign certificates. A bad signature is caught even when names and dates look right.

Revocation checking

Checks the leaf certificate against its CRL and its OCSP responder, including responses stapled into the handshake. An answer counts only if its signature verifies against the issuing CA and it is current; anything else is reported as unknown, never as good.

Trust anchoring

Checks whether the chain ends in a root from Mozilla's root store (the CA bundle curl ships), and whether a strict TLS handshake succeeds. Apple, Chrome and Microsoft run separate root programs, which the report marks as not checked instead of guessing.

SPKI pin hashes

Computes the base64 SHA-256 of every certificate's SubjectPublicKeyInfo, the value Android and iOS pinning configurations expect.

Security audit

Flags SHA-1 signatures anywhere in the chain (informational on a self-signed root), leaf certificates valid for longer than the CA/Browser Forum allowed on their issue date, and certificates that expire within 30 days or already have.

Anatomy of a Chain, and What Gets Checked

A TLS chain links the server's certificate to a root the client already trusts. A broken link anywhere breaks TLS for the user, so the inspector checks every link cryptographically instead of trusting the metadata.

Leaf certificate: sent first by the server
✓ signature ◄── issuing CA's key
✓ validity, 30-day expiry warning
✓ SANs listed, wildcard syntax checked
✓ revocation: signature-verified CRL or OCSP
Intermediate CA: also sent by the server, often forgotten
✓ signature ◄── root's key
✓ CA:TRUE, allowed to sign certs
✓ path-length constraints
Root CA: lives in the client's trust store
✓ present in Mozilla's root store
· servers needn't send it

For real output, run the live inspector (opens in new tab) against your own domain.

Cryptographic Signature Verification

Expiry monitors usually stop at metadata: dates, SANs and issuer names. For every link in the chain, the inspector also does the cryptography:

Why this matters for SRE: a certificate can carry the right dates and the right issuer name and still fail signature verification: a corrupted file, a mis-assembled bundle, or a certificate from a different CA that happens to use the same issuer name. Metadata checks pass all three. Signature verification fails all three.

Revocation in 2026: OCSP Is Fading

Revocation marks a certificate invalid before it expires: after a key compromise, a mis-issuance or a change of domain ownership. The ground has shifted. The CA/Browser Forum now requires publicly trusted CAs to publish CRLs and makes OCSP optional, and Let's Encrypt ended its OCSP service in 2025 in favour of CRLs. Many leaf certificates no longer list an OCSP responder at all, so a checker that relies on OCSP alone reports less and less.

That shift set the order of work here: CRL support came first. Every revocation source is treated as untrusted input. A response counts only if it is signed by the issuing CA (or by a responder the CA authorized), is current, and is about this exact certificate. The test suite feeds the checker tampered, stale, wrong-issuer and wrong-certificate responses, and none of them may come back as good.

OCSP (Online Certificate Status Protocol)

A certificate's Authority Information Access extension can list an OCSP responder. A checker sends it a request (RFC 6960) for the certificate's serial number, and the responder answers good, revoked or unknown. The inspector asks only the responder the certificate names, and verifies a response the server staples into the TLS handshake the same way.

CRL (Certificate Revocation List)

The CRL Distribution Points extension points at a CA-published list of revoked serial numbers. The inspector downloads the list, verifies its signature against the issuer's key, checks that it is current and from that issuer, and uses a partitioned CRL (Let's Encrypt and Google Trust Services publish them) only when its Issuing Distribution Point covers the certificate. Then it looks up the serial.

What the report checks

Checks the inspector runs, with pass and flag conditions
Check Passes when Flagged when
Chain signatures Every certificate verifies with its issuer's public key Any link fails verification
Trust anchor The chain ends in a root from Mozilla's root store Private, self-signed or untrusted root
Signature algorithm SHA-256 or stronger Any SHA-1 signature, with its position in the chain
Expiry More than 30 days left Warning under 30 days; failure once expired
Revocation (leaf) A signature-verified, current CRL or OCSP response says good Revoked; unknown when no source can be verified

SPKI Hashing for Certificate Pinning

Pinning trusts a specific public key instead of any certificate a CA will sign for the domain. The pin is SHA-256(SubjectPublicKeyInfo), base64-encoded, and the inspector prints one for every certificate in the chain.

Pin keys, not certificates, and always ship a backup pin. Leaf certificates already rotate every few months, and CA/Browser Forum ballot SC-081 is phasing the maximum lifetime of a publicly trusted TLS certificate down to 47 days by 2029, so a leaf pin is a scheduled outage unless the key is reused on purpose. Some CAs also issue from several intermediates and rotate them, so pinning a single intermediate is fragile too. Pin a set.

Output format: pin-sha256="base64…", the format the now-retired HTTP Public Key Pinning (HPKP) header used. The same hashes go into Android's network_security_config.xml or the pinned-domains dictionary under iOS's NSAppTransportSecurity.

Failure Scenarios This Tool Catches

The TLS failure modes that turn into incidents, each detectable before a deploy.

Serverless Architecture

The inspector runs as a Netlify Function, a Node.js function invoked on demand: nothing to patch and no idle cost. The work is bursty and stateless (connect, fetch, parse, verify), which suits the model.

Why no certificate library

Node's built-in X509Certificate and crypto cover parsing, names and every signature check, including the signatures on CRLs and OCSP responses. The extensions the checks need (key usage, extended key usage, basic constraints with path-length limits, policies and key identifiers) are read straight from the certificate's DER with a minimal reader, so RSA, ECDSA and EdDSA certificates are handled the same way. The only dependency left is a small OCSP request and response codec, and nothing needs a native build step.

Origin of this tool: built after a real incident. A deployment failed because a server sent an incomplete certificate chain (a missing intermediate); the browser showed a confusing error and curl's output was ambiguous. This tool would have pointed straight at the missing link.