Skip to content

wc_PKCS7_PwriKek_KeyUnWrap: use a ct cmp#9915

Merged
douzzer merged 1 commit into
wolfSSL:masterfrom
julek-wolfssl:fenrir/378
Mar 7, 2026
Merged

wc_PKCS7_PwriKek_KeyUnWrap: use a ct cmp#9915
douzzer merged 1 commit into
wolfSSL:masterfrom
julek-wolfssl:fenrir/378

Conversation

@julek-wolfssl

Copy link
Copy Markdown
Member

F-378

Copilot AI review requested due to automatic review settings March 6, 2026 16:43
@julek-wolfssl julek-wolfssl self-assigned this Mar 6, 2026
@julek-wolfssl julek-wolfssl added the For This Release Release version 5.9.2 label Mar 6, 2026

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 updates wc_PKCS7_PwriKek_KeyUnWrap to use constant-time comparisons when validating the unwrapped key data.

Changes:

  • Replaces early-return validation checks with constant-time mask accumulation (fail |= ...).
  • Consolidates validation failures into a single cleanup/return path.
  • Adds an additional constant-time check against outSz.

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

Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
@douzzer douzzer added the Staged Staged for merge pending final test results and review label Mar 6, 2026
@douzzer douzzer merged commit e74d52a into wolfSSL:master Mar 7, 2026
447 of 450 checks passed
@julek-wolfssl julek-wolfssl deleted the fenrir/378 branch May 12, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.2 Staged Staged for merge pending final test results and review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants