Skip to content

Fix alert type for missing cert. Prevent building with RNG disabled and blinding enabled by default. Enforce bounds for AES CMAC size in verify.#10462

Open
kareem-wolfssl wants to merge 6 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd21507
Open

Conversation

@kareem-wolfssl
Copy link
Copy Markdown
Contributor

Description

Fixes zd#21507, F-2624, F-3084.

Testing

Built in tests

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kareem-wolfssl kareem-wolfssl self-assigned this May 12, 2026
Copilot AI review requested due to automatic review settings May 12, 2026 00:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR hardens cryptographic configuration and CMAC verification behavior, and corrects a TLS 1.3 alert for missing client certificates.

Changes:

  • Prevent builds that combine WC_NO_RNG with blinding options (unless explicitly acknowledged).
  • Enforce AES-CMAC tag length bounds in verify APIs and return MAC_CMP_FAILED_E on mismatch.
  • Send TLS 1.3 certificate_required alert when the client can’t provide a required certificate; update docs/tests accordingly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
wolfssl/wolfcrypt/settings.h Avoid enabling Curve25519 blinding when RNG is disabled; add build-time error for blinding+no-RNG configurations.
wolfcrypt/src/cmac.c Enforce CMAC tag-size bounds; prevent callback-driven size tampering; return consistent mismatch error.
tests/api/test_cmac.c Add coverage for CMAC verify bounds, truncation behavior, and mismatch return code.
src/tls13.c Fix TLS 1.3 alert to certificate_required for missing client certificate.
doc/formats/html/doxygen_warnings Adds a doxygen warnings output file.
doc/dox_comments/header_files/cmac.h Update doxygen docs for new CMAC verify behavior and examples.
.wolfssl_known_macro_extras Add an acknowledgment macro to the known-macros list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wolfssl/wolfcrypt/settings.h
Comment thread .wolfssl_known_macro_extras Outdated
Comment thread doc/formats/html/doxygen_warnings Outdated
Comment thread tests/api/test_cmac.c
Comment thread doc/dox_comments/header_files/cmac.h
Comment thread doc/dox_comments/header_files/cmac.h Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

MemBrowse Memory Report

No memory changes detected for:

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.

2 participants