Enforce RFC 5280 extension MUSTs under WOLFSSL_NO_ASN_STRICT and validate DTLS 1.3 legacy_session_id echo#10922
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
Conversation
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
left a comment
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
|
Jenkins retest this please. |
Uh oh!
There was an error while loading. Please reload this page.