Fix short pin tests for FIPS#193
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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
userPinLenconstants where tests pass explicit PIN lengths. - Add a new
debian/changelogentry for release2.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
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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