Skip to content

Add missing HAVE_PBKDF2 guards - #11958

Open
padelsbach wants to merge 1 commit into
wolfSSL:masterfrom
padelsbach:pbkdf2-guard
Open

padelsbach wants to merge 1 commit into
wolfSSL:masterfrom
padelsbach:pbkdf2-guard

Conversation

@padelsbach

Copy link
Copy Markdown
Contributor

Description

wc_PBKDF2() is only present with HAVE_PBKDF2 && !NO_HMAC, but several callers only check NO_PWDBASED or NO_HMAC.

Testing

Added CI coverage.

Checklist

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

Copilot AI balanced review requested due to automatic review settings November 2, 2026 19:17

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.

🟢 Approval recommended

No active review issues are reported for the PBKDF2 feature-guard changes.

No open issues 🎉

What changed in this PR

This PR aligns PBKDF2-dependent code with wolfCrypt’s feature availability, supporting builds that enable password-based cryptography but disable PBKDF2.

Changes:

  • Add HAVE_PBKDF2 guards to encryption code, OpenSSL compatibility wrappers, and benchmarks.
  • Guard PBKDF2-dependent PKCS#5, PKCS#8, and PKCS#12 tests.
  • Add a Linux CI configuration with password-based cryptography enabled and PBKDF2 disabled.
File Description
wolfcrypt/​src/​wc_encrypt.c Guard PKCS#5 v2 key derivation with PBKDF2 availability.
wolfcrypt/​src/​evp.c Align PBKDF2 wrapper guards with feature availability.
wolfcrypt/​benchmark/​benchmark.c Guard PBKDF2 benchmark registration, invocation, and implementation.
tests/​api/​test_pkcs12.c Guard PBKDF2-dependent PKCS#12 test cases.
tests/​api.c Guard PBKDF2-dependent PKCS#5 and PKCS#8 tests.
.github/​configs/​os-check-linux.json Add CI coverage for password-based cryptography without PBKDF2.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

@padelsbach

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

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.

3 participants