Skip to content

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
wolfSSL:masterfrom
aidangarske:fenrir-asn-strict
Open

Enforce RFC 5280 extension MUSTs under WOLFSSL_NO_ASN_STRICT and validate DTLS 1.3 legacy_session_id echo#10922
aidangarske wants to merge 5 commits into
wolfSSL:masterfrom
aidangarske:fenrir-asn-strict

Conversation

@aidangarske

@aidangarske aidangarske commented Jul 15, 2026

Copy link
Copy Markdown
Member
F-6821, F-6822, F-6823, F-6824, F-6707

Copilot AI review requested due to automatic review settings July 15, 2026 22:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_STRICT is enabled (duplicate extension rejection, unknown critical extension rejection, and directoryName nameConstraints applied to SANs).
  • Validate DTLS 1.3 legacy_session_id_echo content under WOLFSSL_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.

@aidangarske aidangarske marked this pull request as ready for review July 15, 2026 22:56
@github-actions

Copy link
Copy Markdown

retest this please

@Frauschi Frauschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐺 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

@Frauschi Frauschi assigned aidangarske and unassigned wolfSSL-Bot Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants