[Certificate Fundamentals Part 10] Certificate Troubleshooting: How Errors Appear, Isolation Steps, and a Series Wrap-Up

Certificate Fundamentals Part 10 Certificate Troubleshooting: How Errors Appear, Isolation Steps, and a Series Wrap-Up Certificates and PKI

“A certificate error appears, so for now I’m having people click ‘Advanced’ and proceed.”
“curl was failing with an error, so I got around it by adding -k.”

Both get you through the moment. But only the devices that bypass the error become defenseless against man-in-the-middle attacks, and the cause is still unsolved.

Through Part 9, we covered how certificates and TLS work, issuance and automation, and private PKI and the cloud. In Part 10, we use that knowledge to put together the steps for isolating the cause when a certificate error occurs. At the end, you will also find a quick-reference table and takeaways for the whole series.


Types of certificate errors and how they appear

The same cause looks different depending on the tool. Start by learning the correspondence.

Quick-reference diagram of errors and the commands to check them: NET::ERR_CERT_DATE_INVALID means expired or the device clock is off (openssl x509 -enddate, w32tm /query /status); COMMON_NAME_INVALID means a name mismatch (-ext subjectAltName); AUTHORITY_INVALID means an untrusted issuer, self-signed or root not distributed (Cert:\LocalMachine\Root, certutil -verify); a browser that works while curl returns 60 or error 21 means an intermediate certificate was not installed (count in s_client -showcerts); REVOKED means revoked (certutil -verify -urlfetch); VERSION_OR_CIPHER_MISMATCH means a TLS version or cipher suite mismatch (s_client -tls1_2, curl -v); KEY_USAGE_INCOMPATIBLE means a key usage (KU/EKU) mismatch (-ext keyUsage,extendedKeyUsage). The bottom line reads: if everyone sees it, suspect the server; if only some devices do, suspect the device (root, clock, path)
CauseChrome / Edgecurl (OpenSSL)PowerShell (SslStream)
ExpiredNET::ERR_CERT_DATE_INVALIDcertificate has expired (10)RemoteCertificateChainErrors (NotTimeValid)
Name mismatchNET::ERR_CERT_COMMON_NAME_INVALIDno alternative certificate subject name matches target hostnameRemoteCertificateNameMismatch
Untrusted issuer (self-signed, root not distributed)NET::ERR_CERT_AUTHORITY_INVALIDself-signed certificate (18), self-signed certificate in certificate chain (19)RemoteCertificateChainErrors (UntrustedRoot)
Incomplete chain (missing intermediate certificate)Usually not shown (filled in via AIA)unable to get local issuer certificate (20)Usually not shown (Windows also fills in via AIA)
RevokedNET::ERR_CERT_REVOKED (for example, when it is in CRLSets)Not checked by defaultNot checked by default
$ curl -sS https://expired.badssl.com/ -o /dev/null
curl: (60) SSL certificate OpenSSL verify result: certificate has expired (10)

badssl.com is a public test site for trying out how errors appear (expired, wrong.host, self-signed, untrusted-root, incomplete-chain, revoked, and more). curl’s verification errors return exit code 60. Note that browsers and curl often do not check revocation (Part 5). In November 2026, opening revoked.badssl.com in Edge on Windows 11 displayed the page without any warning.

Other errors

CauseChrome / Edgecurl / opensslWhat to check
Device clock is offNET::ERR_CERT_DATE_INVALID (a screen such as “Your clock is behind”)certificate is not yet valid (9) or has expired (10)timedatectl, w32tm /query /status
Old algorithm (SHA-1 signature)NET::ERR_CERT_WEAK_SIGNATURE_ALGORITHMCA signature digest algorithm too weak (68)Signature Algorithm in openssl x509 -noout -text
Key usage mismatch (Key Usage, EKU)ERR_SSL_KEY_USAGE_INCOMPATIBLE and similarunsuitable certificate purpose (error 26)digitalSignature in KU, serverAuth in EKU (Part 4)
Validity period too long (public certificates)NET::ERR_CERT_VALIDITY_TOO_LONGNo errorThe public CA maximum is currently 200 days (Part 6)
No CT record (public certificates)NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIREDNo errorThe certificate’s SCTs (Part 5)
TLS version or cipher suite mismatchERR_SSL_VERSION_OR_CIPHER_MISMATCHcurl: (35), unsupported protocolSee below

How to check that a device’s clock is correct (how to read chronyc tracking and w32tm /query /status), and the steps for isolating a clock that will not sync, are covered in Part 10 of the NTP Fundamentals series.

Starting with version 124, Edge (Chromium) always checks Key Usage, even for RSA certificates that chain to a private root. This is one cause of suddenly being unable to open a site that uses a self-signed certificate on an old device. In PowerShell, a usage mismatch shows up as NotValidForUsage.


Forgetting the intermediate certificate

We covered this in Part 5, but it is the most common trouble, so let’s look at it again.

Diagram showing that when the server sends only the server certificate, Chrome and Edge succeed by fetching the intermediate from the AIA URL; Firefox succeeds for public CAs using its bundle of preloaded intermediate certificates but fails for a private CA; curl, Java, and devices do not fill in and get unable to get local issuer certificate; and that the correct setup is to send two certificates

In addition to its own certificate, the server must also send the intermediate certificate (the chain without the root).

  • Even if it is forgotten, Chrome, Edge, and Windows fetch the intermediate certificate from the AIA URL in the certificate and fill it in, so it looks fine in a browser
  • Firefox does not use AIA, but it preloads the intermediate certificates of public CAs, so it is also hard to notice. With a private CA’s certificate, Firefox fails too
  • curl, openssl, Java, Python, and many devices do not fill it in, so it is discovered as “it opens in a browser, but only the API integration fails“

To check, look at how many certificates the server sent. If the Certificate chain in openssl s_client -showcerts has only number 0, something is missing. Opening in a browser does not mean the chain is correct.


TLS version and cipher suite mismatches

This is the case where the certificate is correct, but it fails at the negotiation stage. The symptoms are Chrome’s ERR_SSL_VERSION_OR_CIPHER_MISMATCH, curl’s exit code 35, and an old application’s “handshake failed.”

Diagram showing that an old client (TLS 1.0/1.1, RSA only) and a server (TLS 1.2/1.3, ECDSA) have nothing in common and get ERR_SSL_VERSION_OR_CIPHER_MISMATCH, that a middlebox drops the large X25519MLKEM768 ClientHello, and that with no SNI the default, different certificate is returned and looks like a name mismatch

The five common causes are:

  1. Old devices, Java, or .NET Framework cannot speak TLS 1.2 or later (TLS 1.0/1.1 are prohibited by RFC 8996; Part 7)
  2. The server has only an ECDSA certificate, and the client can handle only RSA
  3. Cipher suites were restricted too far
  4. An old client that does not send SNI gets a different, default certificate
  5. A middlebox that inspects traffic does not support the newer method (such as a PQC key exchange that makes the ClientHello large)
$ openssl s_client -connect www.example.com:443 -servername www.example.com -tls1_2 </dev/null | grep -E "^(New|Protocol)"
$ openssl s_client -connect www.example.com:443 -servername www.example.com </dev/null | grep "Negotiated"
Negotiated TLS1.3 group: X25519MLKEM768
$ curl -sv https://www.example.com/ -o /dev/null 2>&1 | grep "SSL connection"
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519MLKEM768 / id-ecPublicKey

On Windows, try connecting with a specified version (change Tls12 to Tls13 and compare). Check the cipher suites enabled on the server with Get-TlsCipherSuite.

PS> $t=New-Object Net.Sockets.TcpClient('www.example.com',443); $s=New-Object Net.Security.SslStream($t.GetStream())
PS> $s.AuthenticateAsClient('www.example.com',$null,[Security.Authentication.SslProtocols]::Tls12,$false); $s.SslProtocol

Isolation steps

Isolate a certificate error by checking, in this order: pin down the symptom → name and path → the certificate the server sends → verification on the device → TLS parameters. The diagram shows where to check each stage (the numbers match the steps in the table).

Diagram showing the stages (the device with its trust store and clock; DNS and path with LB and proxy; the server with its certificate and intermediate certificate; the CA's published locations, the AIA and CRL web servers) and the commands that check each, and that if everyone sees the error you suspect the server, and if only some do you start with the device
StepWhat to checkExample commandsWhat you learn
0 Pin down the symptomWho, on which device and browser, which URL, since when, and the error codeNote the error code on the screen (NET::ERR_…)Everyone or only some? Name, expiry, or trust?
1 Name and pathWhich IP does the name resolve to, and which device (LB, proxy) does it reach?dig, Resolve-DnsName, Test-NetConnection name -Port 443Are we reaching an unintended server or an inspection proxy?
2 Certificate the server sendsSubject, SAN, expiry, issuer, and the number of certificates in the chain sentopenssl s_client -showcerts, PowerShell SslStreamExpiration, name, missing intermediate certificate
3 Verification on the deviceIs the root in the trust store? The clock? Can it reach the CRL and AIA?certutil -verify -urlfetch, Get-ChildItem Cert:\LocalMachine\Root, w32tm /query /statusRoot not distributed, clock skew, revocation check location unreachable
4 TLS parametersVersion, cipher suite, SNI, client certificateopenssl s_client -tls1_2, curl -vNegotiation mismatch, no SNI so a different certificate is returned

As a rule, if everyone sees the error, suspect the server; if only some devices do, start by suspecting the device (root, clock, path).

And one important thing. Do not press “Advanced → Proceed” on a device to get around it, and do not leave curl -k in a configuration. Only the devices that bypass the error become defenseless against man-in-the-middle attacks (Part 1). Also, on a device that goes through an inspection proxy, the issuer appears replaced by the proxy’s CA.

The idea of changing where you check at each stage to find the boundary between the stage that is correct and the stage that is wrong is the same as in DNS troubleshooting. If you get stuck at step 1, name resolution, the isolation steps in Part 11 of DNS Fundamentals can help.


Checking with commands

On Linux and Mac, look at the number of certificates in the chain the server sent, and at the certificate’s expiry, name, and usage.

$ openssl s_client -connect www.example.com:443 -servername www.example.com -showcerts </dev/null
Certificate chain
 0 s:CN=www.example.com
   i:C=JP, O=Example Corp, CN=Example Issuing CA 01
   a:PKEY: RSA, 2048 (bit); sigalg: sha256WithRSAEncryption
   v:NotBefore: Jul 28 20:03:02 2026 GMT; NotAfter: Feb 13 20:03:01 2027 GMT
    Verify return code: 21 (unable to verify the first certificate)
(Excerpt. No certificate 1 = the intermediate certificate was not installed)

$ openssl x509 -in server.pem -noout -subject -issuer -enddate -ext subjectAltName,keyUsage,extendedKeyUsage
$ openssl x509 -in server.pem -noout -checkend 2592000   # exit code 1 if it expires within 30 days
$ openssl verify -crl_check -crl_download -untrusted chain.pem server.pem
error 23 at 0 depth lookup: certificate revoked

On Windows (PowerShell), connect and display the certificate and the verification result. Check revocation and AIA retrieval one by one with certutil -verify -urlfetch.

PS> $h='www.example.com'; $t=New-Object Net.Sockets.TcpClient($h,443)
PS> $s=New-Object Net.Security.SslStream($t.GetStream(),$false,{param($a,$c,$ch,$e) $global:pe=$e; $global:st=$ch.ChainStatus.Status -join ','; $true})
PS> $s.AuthenticateAsClient($h); $c=[Security.Cryptography.X509Certificates.X509Certificate2]$s.RemoteCertificate
PS> $c | Format-List Subject, Issuer, NotAfter, @{n='SAN';e={$c.Extensions['2.5.29.17'].Format($false)}}
PS> "$($s.SslProtocol) $pe $st"          # Example: Tls13 RemoteCertificateChainErrors NotTimeValid
PS> certutil -verify -urlfetch server.cer

Table of causes and commands to check

Here is everything so far in one table. It is handy to keep nearby during incident response.

CauseSymptom you seeCommand to check (Linux and Mac / Windows)Details
ExpiredDATE_INVALID, curl (60) has expiredopenssl x509 -noout -enddate / NotAfter in PowerShell, certutil -dumpPart 8
Name mismatchCOMMON_NAME_INVALIDopenssl x509 -noout -ext subjectAltName / $c.Extensions[‘2.5.29.17’]Part 4
Missing intermediate certificateBrowser is fine; only curl and Java fail with (60)Count in openssl s_client -showcerts / Get-ChildItem Cert:\LocalMachine\CA on the serverPart 5
Root not distributedAUTHORITY_INVALID on only some devicesopenssl verify -CAfile / Get-ChildItem Cert:\LocalMachine\Root, certutil -verifyPart 5
Revoked, or CRL unreachableREVOKED, or the connection is slow or failsopenssl verify -crl_check -crl_download / certutil -verify -urlfetchPart 5
Clock skewDATE_INVALID on only some devicestimedatectl / w32tm /query /status—
SHA-1, usage mismatchWEAK_SIGNATURE_ALGORITHM, KEY_USAGE_INCOMPATIBLEopenssl x509 -noout -text (Signature Algorithm, Key Usage) / certutil -dumpPart 4
TLS version, cipherVERSION_OR_CIPHER_MISMATCH, curl (35)openssl s_client -tls1_2, curl -v / Get-TlsCipherSuite (server side)Part 7

Series wrap-up: a quick-reference table of the key points in each part

Let’s look back over the whole series. When you are in trouble, return to the relevant part from this table.

PartThemeKey pointsWhen to use it
Parts 1-2Threats and cryptography basicsEavesdropping, tampering, impersonation; ECDHE and forward secrecy; HMAC versus signaturesExplaining how it works, design assumptions
Parts 3-4Trying it out, inside a certificateCreate and read with openssl and PowerShell. Verification uses the SAN; EKU, AIA, CDPChecking a certificate (Part 11, Problem 4)
Part 5PKI and trustChains and trust stores, the verification procedure, CRL is required and OCSP is optional, CT and CAAInvestigating why something is not trusted
Part 6Types and issuanceDV, OV, EV; a wildcard covers one level; CSRs; 200 days → 100 days → 47 daysObtaining certificates (Part 11, Problems 1 and 3)
Part 7How TLS worksTLS 1.3, TLS 1.0/1.1 prohibited, SNI and mTLS, PQC hybrid key exchangeReviewing settings, investigating connections
Part 8Lifecycle and automationInventory, ACME and ARI, monitoring expiry and CTPreparing for 47 days (Part 11, Problem 2)
Part 9Private PKI and the cloudAD CS two tiers and ESC countermeasures, ACM and Private CA, termination at the LB, VMCAInternal certificates, vSphere (Part 11, Problems 3 and 5)
Part 10TroubleshootingReading error codes, the forgotten intermediate certificate, the order of isolationIncident response (Part 11, Problem 4)

In every part, it helps to keep in mind “who trusts which key, for which name, on whose signature.”


Three things to take away

Diagram of three takeaways: 1. Verify the binding between name and key (SAN, chain, validity period, usage, and clock, using openssl s_client -showcerts or certutil -verify); 2. Count by names and reduce where certificates live (number of names = number of certificates; the private key in only one place, where TLS terminates); 3. Move renewal from people to systems (200 days → 100 days → 47 days, ACME and monitoring)

1. A certificate is the binding between a name and a public key
Don’t bypass errors. Check the name (SAN), chain, validity period, usage, and clock, in that order, with openssl s_client (on Windows, PowerShell and certutil).

2. Count certificates by names, not by number of servers, and decide where to place them by where TLS is terminated
The fewer places a private key lives, the safer it is, and the easier renewal gets.

3. Move renewal from people to systems
The validity period becomes 47 days in 2029. Start now on inventory, automation with ACME, and monitoring of expiry and CT, and build the private CA in two tiers and protect it as Tier 0.

To start, run openssl s_client -showcerts against a site you manage and check the chain sent and its expiry.

References

  • RFCs: 5280 (X.509 and CRL), 9525 (name verification), 9846 (TLS 1.3, replacing 8446 in 2026), 8996 (deprecation of TLS 1.0/1.1), 9325 (TLS recommendations), 8555 (ACME), 9773 (ARI), 6962 and 9162 (CT), 8659 (CAA), 6960 (OCSP), 2104 (HMAC)
  • CA/B Forum and root programs: Baseline Requirements and Ballot SC-081 (shorter validity periods), Chrome Root Program, Mozilla Root Store Policy, Microsoft Trusted Root Program, Apple Root Certificate Program
  • Official documentation: Microsoft Learn (AD CS, KB5014754), AWS Certificate Manager and AWS Private CA User Guides, Azure Key Vault documentation, Broadcom TechDocs (vSphere Authentication), OpenSSL manuals, Let’s Encrypt documentation

Summary

  • Don’t bypass errors. -k and “Proceed” leave just that device defenseless against man-in-the-middle attacks
  • The same cause looks different in different tools. Use the browser’s error code to get a first idea of the cause
  • A forgotten intermediate certificate is invisible in browsers and fails only in curl, Java, and devices
  • Even when the certificate is correct, it can fail because of the TLS version, cipher suite, SNI, or a middlebox
  • Isolate in this order: symptom → name and path → the server’s certificate → verification on the device → TLS parameters. If everyone sees it, suspect the server; if only some do, suspect the device

Next time is finally the last part. Using everything so far, we work through five design exercises.


The Certificate Fundamentals series (11 parts)

All 11 parts with a reading guide: Certificate Fundamentals

  1. Why Do We Need Certificates?
  2. Cryptography basics
  3. Trying it with openssl and PowerShell
  4. Inside an X.509 certificate
  5. PKI and how trust works
  6. Certificate types and issuance
  7. How TLS works
  8. Lifecycle and automation
  9. Private PKI and the cloud
  10. Certificate troubleshooting (this article)
  11. Certificate design exercises

This series is the English edition of 【証明書入門】, originally written in Japanese.

コメント

Copied title and URL