Enforce RFC 5280 extension MUSTs under WOLFSSL_NO_ASN_STRICT and validate DTLS 1.3 legacy_session_id echo#10922
Open
aidangarske wants to merge 5 commits into
Open
Enforce RFC 5280 extension MUSTs under WOLFSSL_NO_ASN_STRICT and validate DTLS 1.3 legacy_session_id echo#10922aidangarske wants to merge 5 commits into
aidangarske wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens standards compliance in two critical areas: X.509 parsing under WOLFSSL_NO_ASN_STRICT (ensuring RFC 5280 “MUST” behaviors remain enforced), and DTLS 1.3 compatibility handling for legacy legacy_session_id_echo (ensuring that if an echo is accepted for interop, it must match what the client sent).
Changes:
- Enforce RFC 5280 extension MUSTs even when
WOLFSSL_NO_ASN_STRICTis enabled (duplicate extension rejection, unknown critical extension rejection, and directoryName nameConstraints applied to SANs). - Validate DTLS 1.3
legacy_session_id_echocontent underWOLFSSL_DTLS13_ECHO_LEGACY_SESSION_ID(echo must match client’s session id when non-empty). - Add/adjust regression tests and CI configurations to exercise the updated behaviors.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
wolfcrypt/src/asn.c |
Makes duplicate-extension detection unconditional for extensions using VERIFY_AND_SET_OID, always rejects unknown critical extensions, and applies directoryName nameConstraints to SAN directoryName entries even under WOLFSSL_NO_ASN_STRICT. |
wolfcrypt/test/test.c |
Adds new wolfcrypt-level tests for unknown critical extension rejection and duplicate extension rejection under WOLFSSL_TEST_CERT + ECC. |
tests/api.c |
Adds a focused NameConstraints test ensuring directoryName constraints apply to directoryName SAN entries (RFC 5280 4.2.1.10). |
tests/api/test_asn.c |
Updates certificatePolicies duplicate-extension test to apply regardless of WOLFSSL_NO_ASN_STRICT. |
tests/api/test_certman.c |
Updates expectations so directoryName SAN nameConstraints failures occur even under WOLFSSL_NO_ASN_STRICT. |
src/tls13.c |
For DTLS 1.3 compat mode that permits echoed legacy_session_id_echo, enforces that the echo matches the client’s value (or is empty). Updates related comments. |
src/dtls.c |
Comment alignment with RFC 9147 Section 5 language for legacy session id echo behavior in DTLS 1.3 stateless reply path. |
tests/api/test_dtls13.c |
Adds tests that (1) reject a bad echoed session id and (2) accept an empty echo (while expecting handshake failure for other reasons due to transcript rewrite). Refactors HRR magic random constant. |
tests/api/test_dtls13.h |
Registers the two new DTLS 1.3 compat echo tests in the DTLS 1.3 test group list. |
.github/workflows/os-check.yml |
Adds CI configurations to exercise WOLFSSL_NO_ASN_STRICT RFC 5280 MUST enforcement and DTLS 1.3 legacy session id echo compatibility option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
retest this please |
24182e4 to
bdb6035
Compare
a8df2e1 to
f41eeec
Compare
Frauschi
requested changes
Jul 16, 2026
Frauschi
left a comment
Contributor
There was a problem hiding this comment.
🐺 Skoll Code Review
Overall recommendation: REQUEST_CHANGES
Findings: 2 total — 1 posted, 1 skipped
Posted findings
- [High] permissions block inserted inside concurrency block breaks arduino.yml —
.github/workflows/arduino.yml:72-79
Skipped findings
- [Info] Redundant re-indent-only change to unrelated comment in test.c
Review generated by Skoll via Claude/Codex
f41eeec to
dd46074
Compare
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.
Uh oh!
There was an error while loading. Please reload this page.