Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

A Revoked Certificate Breaks Your Site in Firefox First. Chrome Can Take Days.

This morning a certificate authority, SECOM, filed a preliminary incident report in Mozilla's CA program: serial numbers from fifteen of its issuing CAs could be reproduced, because they came from Java's SHA1PRNG seeded

This morning a certificate authority, SECOM, filed a preliminary incident report in Mozilla's CA program: serial numbers from fifteen of its issuing CAs could be reproduced, because they came from Java's SHA1PRNG seeded with a value derived from the CA system's startup time. At least 116,740 affected certificates are still valid. What happens to them, SECOM says, will be in its full report. It has not said they will be revoked.

Whatever SECOM decides, it is a good moment to know something most developers find out from a bug report: when a certificate is revoked, browsers do not find out at the same time. For a while, the same site is broken in one browser and fine in another.

How Firefox finds out

Since Firefox 137, Firefox on desktop has used a mechanism called CRLite. Mozilla's description: Firefox "periodically downloads a compact encoding of the set of all revoked certificates that appear in Certificate Transparency logs", "updates it every 12 hours, and queries it privately every time a new TLS connection is created".

So every revocation, for every certificate in the public logs, reaches desktop Firefox within about half a day.

How Chrome finds out

Chrome's security FAQ answers this directly. Its "primary mechanism for checking certificate revocation status is CRLSets", it honours stapled OCSP responses, and by default it does not perform "online" revocation checks at all. On coverage and timing it is careful: Chrome "enforces most security-relevant certificate revocations", and "most revocations should reach most users within a few days of appearing on a CA's CRL".

Two qualifiers in there matter: most, and security-relevant. Whether a particular revocation reaches Chrome, and when, is Chrome's call.

What that looks like from the outside

A certificate is revoked on Tuesday morning. By Tuesday evening, Firefox users on desktop can be getting a certificate error on your site. Chrome users, very often including the developer looking into it, may see nothing wrong for days.

So the bug report reads "your site says it's not secure", the developer opens it in Chrome, it loads, and the report is closed as something on the user's machine. For days it really does look like one person's problem, because that is how the information is distributed.

Checking it yourself in two minutes

You do not need to wait for a browser to tell you. Pull the certificate the site is actually serving, then ask its CA's own revocation list:

host=example.com
openssl s_client -connect "$host:443" -servername "$host" </dev/null 2>/dev/null \
  | openssl x509 > cert.pem

openssl x509 -in cert.pem -noout -issuer -serial
openssl x509 -in cert.pem -noout -ext crlDistributionPoints

The last line prints the URL of the issuer's CRL. Download it and look for your serial:

curl -s -o ca.crl "http://the-url-from-above.crl"
openssl crl -inform DER -in ca.crl -noout -text | grep -i "<serial from above>"

No output means your certificate is not on that list. A match means it is revoked, whatever Chrome is currently showing you. (I ran this against a Let's Encrypt certificate while writing: the CRL held 2,359 revoked serials, in the same hex format openssl x509 -serial prints, so a plain grep works.)

The first command alone is worth running today if you are anywhere near the SECOM news: -issuer tells you which CA signed your certificate, and the report lists the affected issuing CAs by name.

The general version

"It works in Chrome" is evidence about Chrome's state, not about your site's. Certificate revocation is one of the few failures where the browsers disagree by design, on a schedule, and between these two the disagreement runs in one direction: Firefox first. (I have not checked how Safari behaves, so do not read this as covering it.)

When a certificate error arrives from one browser and not another, ask which browser and when, and check the revocation list before deciding it is their machine.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.