Skip to content

Fix short pin tests for FIPS#193

Merged
dgarske merged 2 commits into
wolfSSL:masterfrom
LinuxJedi:fix/fips-short-pin
Jun 18, 2026
Merged

Fix short pin tests for FIPS#193
dgarske merged 2 commits into
wolfSSL:masterfrom
LinuxJedi:fix/fips-short-pin

Conversation

@LinuxJedi

Copy link
Copy Markdown
Member

Some of the tests used pins too short for HMAC_FIPS_MIN_KEY. This updates the tests and also updates the Debian version to 2.1.0

Seven tests used the 11-byte user PIN "someUserPin", which is below the 14-byte HMAC key minimum (HMAC_FIPS_MIN_KEY) that FIPS enforces on the PBKDF2 PIN hash. Under a FIPS + NSS build C_InitPIN therefore failed with CKR_FUNCTION_FAILED for these tests.

None of them exercise short-PIN behaviour, so switch to the suite's standard 15-byte user PIN "wolfpkcs11-test" (updating the hardcoded userPinLen to match). The FIPS HMAC minimum is deliberate, so the tests are brought into compliance rather than weakening the PIN hash to accept short keys.
configure.ac is already at 2.1.0; add the matching debian/changelog entry so the package version tracks the release.
Copilot AI review requested due to automatic review settings June 18, 2026 12:52

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

Updates the test suite to use a longer USER PIN so tests pass under FIPS key-length requirements, and bumps the Debian package changelog to version 2.1.0.

Changes:

  • Replace short USER PIN strings in multiple test programs with a longer "wolfpkcs11-test" value.
  • Update corresponding userPinLen constants where tests pass explicit PIN lengths.
  • Add a new debian/changelog entry for release 2.1.0.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/pkcs11_compliance_test.c Updates USER PIN used for login-related compliance tests to a longer value.
tests/pbkdf2_keygen_attrs_test.c Updates USER PIN and userPinLen for PBKDF2 keygen attribute tests.
tests/operation_active_test.c Updates USER PIN and userPinLen for operation-active regression test setup/login.
tests/find_objects_null_template_test.c Updates USER PIN and userPinLen for NULL template find-objects test setup/login.
tests/ecb_check_value_error_test.c Updates USER PIN and userPinLen for ECB check-value error propagation test setup/login.
tests/aes_keygen_attrs_test.c Updates USER PIN and userPinLen for AES keygen attribute tests.
tests/aes_cbc_pad_padding_test.c Updates USER PIN and userPinLen for AES-CBC-PAD padding validation tests.
debian/changelog Adds Debian changelog entry for 2.1.0.

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

@dgarske dgarske merged commit 82bcb06 into wolfSSL:master Jun 18, 2026
78 checks passed
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