Enforce RFC 8446 SHA-1 certificate rule on TLS 1.3 chains - #11100
Open
embhorn wants to merge 4 commits into
Open
Enforce RFC 8446 SHA-1 certificate rule on TLS 1.3 chains#11100embhorn wants to merge 4 commits into
embhorn wants to merge 4 commits into
Conversation
embhorn
requested review from
wolfSSL-Fenrir-bot
and
a lite review from Copilot
August 7, 2026 13:18
Member
Author
|
retest this please |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/tls13.c:9976
- This comment says “self signed and therefore a trust anchor”, but IsSelfSignedCert() relies on DecodedCert->selfSigned, which is set from an issuer/subject name-hash compare (not a validated self-signature). That makes the comment misleading and can confuse future maintenance of the RFC 8446 trust-anchor exemption logic.
/* Certificate is self signed and therefore a trust anchor. RFC 8446
* Section 4.4.2.2 allows it to be left out of the chain entirely, so its
* signature does not constrain what may be sent.
*
src/tls13.c:10034
- The leaf certificate check exempts “self signed” certificates from the SHA-1 restriction. A leaf certificate cannot be omitted as a trust anchor per RFC 8446 (only the trust anchor/root can be omitted), so a self-signed SHA-1 leaf would incorrectly be allowed when the peer didn’t advertise SHA-1.
if (IsSha1SignedCert(ssl->buffers.certificate->buffer,
ssl->buffers.certificate->length) &&
!IsSelfSignedCert(ssl, ssl->buffers.certificate->buffer,
ssl->buffers.certificate->length)) {
ret = MATCH_SUITE_ERROR;
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11100
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Findings: 8
8 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
|
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.
Description
signature_algorithms_certwas parsed intossl->certHashSigAlgobut never read again, so a TLS 1.3 peer sent whatever chain was configured regardless of what the other side advertised.RFC 8446 Section 4.4.2.2 allows a fallback chain the peer did not advertise support for, but the chain MUST NOT use SHA-1 unless the peer's advertisement permits it. Section 4.4.2.3 applies the same rule to the client. Only that requirement is enforced; a chain that merely fails to match is still sent, as the RFC intends.
Fixes zd22288
Testing
Checklist