nettrace: don't pin Let's Encrypt intermediate in TestTLSCertErrors - #91
Merged
Merged
Conversation
TestTLSCertErrors/wrong_host asserted that the certificate served by
wrong.host.badssl.com is issued by an intermediate whose common name
matches "R" followed by one or two digits. Let's Encrypt has since moved
to a new generation of intermediates (YE1, YE2, YR1, YR2), badssl.com
renewed onto one of them on 2026-07-28, and every run of the amd64 test
job has failed since:
Expected
<string>: CN=YR2,O=Let's Encrypt,C=US
to match regular expression
<string>: ^CN=R\d{1,2},O=Let's Encrypt,C=US$
Let's Encrypt states it may begin issuing from any of its backup
intermediates at any time without warning, so enumerating the current
names would only postpone the same breakage, and a future rotation could
just as well land on an ECDSA intermediate. What the subtest exists to
prove is that a failed TLS handshake still yields a parsed issuer and
subject in the trace, not that Let's Encrypt keeps a particular naming
scheme. Match only the stable portion of the issuer DN.
The assertion still distinguishes this endpoint from its two siblings,
whose issuers are fixed: the expired-certificate case is signed by
COMODO and never renewed, and the untrusted-root case is self-signed by
BadSSL.
Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
milan-zededa
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestTLSCertErrors/wrong_hostreaches out towrong.host.badssl.comand asserts that the certificate it gets back was issued by a Let's Encrypt intermediate namedRfollowed by one or two digits. Let's Encrypt has moved to a new generation of intermediates — the currently active set isYE1,YE2,YR1,YR2— and badssl.com renewed onto one of them on 2026-07-28. Every amd64 run since has failed:The last green
Build and Testonmainwas 2026-07-26, just before that renewal. This is not specific to any one PR — #88, #89 and #90 are all red on it, and every new PR will be until this lands.Let's Encrypt says of its backup intermediates that it "may begin issuing Subscriber certificates from them at any time, without warning", so enumerating today's names would only defer the same breakage; a future rotation could also land on an ECDSA intermediate rather than an RSA one. The subtest exists to prove that a failed TLS handshake still surfaces a parsed issuer and subject in the trace — not to police Let's Encrypt's naming. So this matches only the portion of the issuer DN that survives rotation.
The assertion stays meaningful: it still requires a well-formed single-CN DN under
O=Let's Encrypt,C=US, which distinguishes this endpoint from its two siblings, whose issuers are genuinely fixed (the expired-certificate case is COMODO-signed and never renewed; the untrusted-root case is self-signed by BadSSL).Testing
Run against the live endpoint, since these subtests skip themselves when badssl.com resets the handshake before presenting a certificate:
FAIL, with exactly the CI signature above.PASS.YE1/YE2/YR1/YR2and the retiredR3/R10, and rejects the BadSSL and COMODO issuers used by the sibling subtests.go build ./...,go vet ./nettrace/andgofmt -l nettrace/are all clean.