Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ada5aca
F-4262 - Reject negative stored array lengths when loading token objects
aidangarske Oct 6, 2026
8437bbf
F-5078 - Grow stored array buffers only as data is read
aidangarske Oct 6, 2026
8427035
F-13814 - Set data object lengths only after a successful storage read
aidangarske Oct 6, 2026
651c6c8
F-4264 - Reject stored private key records shorter than the tag
aidangarske Oct 6, 2026
2982321
F-4733 - Bound stored DH public key length to the key buffer
aidangarske Oct 6, 2026
4a951df
F-3641 - Reject stored trust records that are not the trust size
aidangarske Oct 6, 2026
4ab2ef3
F-3404 - Write the encoded TPM key into the caller's buffer
aidangarske Oct 6, 2026
af7c5da
F-8643 - Keep key buffer allocation errors in TPM RSA and ECC encoders
aidangarske Oct 6, 2026
004016c
F-13813 - Release DH and symmetric key data when encoding fails
aidangarske Oct 6, 2026
c240e05
F-3017 - Zeroize encoded private keys when RSA, ECC or ML-DSA encodin…
aidangarske Oct 6, 2026
bb0085e
F-3413 - Zeroize decrypted private key buffers on every decode path
aidangarske Oct 6, 2026
8086644
F-8667 - Scrub symmetric and DH key buffers after a failed decrypt
aidangarske Oct 6, 2026
0d8ae91
Keep the old key record when encoding fails
aidangarske Oct 13, 2026
885ac28
F-10400 - Authenticate stored object policy with the key encryption
aidangarske Oct 7, 2026
80fb604
Take the store lock before publishing the store batch slot
aidangarske Oct 13, 2026
e990c0d
Skip store batch recovery when token storage is disabled
aidangarske Oct 13, 2026
014bbf4
Hold the store batch locks until the token load finishes
aidangarske Oct 13, 2026
e17221d
Record store batch entries by file name
aidangarske Oct 13, 2026
d9ee4f2
Sync staged store files before commit
aidangarske Oct 13, 2026
05872b9
Correct the store batch setup comment
aidangarske Oct 13, 2026
84665b1
Rename WP11_FLAG_UNBOUND to WP11_FLAG_POLICY_EXCLUDED
aidangarske Oct 13, 2026
5ea1e48
Hold the token lock across the SO PIN change store
aidangarske Oct 15, 2026
e1e32f2
Clean up staged store files in the policy test
aidangarske Oct 13, 2026
e79a8d1
Test store failures with undecoded keys
aidangarske Oct 13, 2026
d8d715f
Cache the empty user PIN verdict when loading a token
aidangarske Oct 13, 2026
a5706b8
Test that a stored PIN change needs no logout to take effect
aidangarske Oct 15, 2026
64f8bcd
Tidy store batch comments
aidangarske Oct 13, 2026
c988a2f
Publish SO PIN changes under the token lock
aidangarske Oct 15, 2026
023ba80
F-5763 - Release the replaced operation when a new one is initialized
aidangarske Oct 6, 2026
92b96a5
F-8664 - Release operation state on terminating error paths
aidangarske Oct 6, 2026
6e40e9d
F-11514 - Free buffered AES-GCM data when GCM parameters are reset
aidangarske Oct 6, 2026
63a6306
F-11506 - Free AES and HMAC contexts when key setup fails
aidangarske Oct 6, 2026
a017615
F-12480 - Drop the session reference to a destroyed AES key read at o…
aidangarske Oct 6, 2026
91badc4
F-4071 - Scrub accumulated MAC input before growing or freeing it
aidangarske Oct 6, 2026
e52a716
F-8660 - Release accumulated MAC input when the session operation ends
aidangarske Oct 6, 2026
fbb7c6a
F-8641 - Require an active digest before saving operation state
aidangarske Oct 6, 2026
59d913b
F-5871 - Release the active operation before restoring saved state
aidangarske Oct 6, 2026
d85d878
F-11510 - Validate saved operation state before changing the session
aidangarske Oct 6, 2026
0af972a
F-5870 - Reject key handles when restoring a keyless operation state
aidangarske Oct 6, 2026
3bfe457
F-10394 - Cancel the active operation when Init is called with a NULL…
aidangarske Oct 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 135 additions & 68 deletions src/crypto.c

Large diffs are not rendered by default.

1,728 changes: 1,507 additions & 221 deletions src/internal.c

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions src/slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,8 +1842,13 @@ CK_RV C_SetOperationState(CK_SESSION_HANDLE hSession,
return rv;
}

(void)hEncryptionKey;
(void)hAuthenticationKey;
/* Only keyless digest states can be saved, so no key is ever needed. */
if (hEncryptionKey != CK_INVALID_HANDLE ||
hAuthenticationKey != CK_INVALID_HANDLE) {
rv = CKR_KEY_NOT_NEEDED;
WOLFPKCS11_LEAVE("C_SetOperationState", rv);
return rv;
}

rv = WP11_SetOperationState(session, pOperationState, ulOperationStateLen);
WOLFPKCS11_LEAVE("C_SetOperationState", rv);
Expand Down
22 changes: 22 additions & 0 deletions tests/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,22 @@ noinst_PROGRAMS += tests/login_pin_state_test
tests_login_pin_state_test_SOURCES = tests/login_pin_state_test.c
tests_login_pin_state_test_LDADD =

check_PROGRAMS += tests/object_store_decode_test
noinst_PROGRAMS += tests/object_store_decode_test
tests_object_store_decode_test_SOURCES = tests/object_store_decode_test.c
tests_object_store_decode_test_LDADD =

check_PROGRAMS += tests/object_policy_integrity_test
noinst_PROGRAMS += tests/object_policy_integrity_test
tests_object_policy_integrity_test_SOURCES = \
tests/object_policy_integrity_test.c
tests_object_policy_integrity_test_LDADD =

check_PROGRAMS += tests/session_op_lifecycle_test
noinst_PROGRAMS += tests/session_op_lifecycle_test
tests_session_op_lifecycle_test_SOURCES = tests/session_op_lifecycle_test.c
tests_session_op_lifecycle_test_LDADD =

if BUILD_STATIC
tests_pkcs11test_LDADD += src/libwolfpkcs11.la
tests_pkcs11mtt_LDADD += src/libwolfpkcs11.la
Expand Down Expand Up @@ -385,6 +401,9 @@ tests_set_pin_rekey_test_LDADD += src/libwolfpkcs11.la
tests_nss_configdir_prefix_test_LDADD += src/libwolfpkcs11.la
tests_logout_retire_test_LDADD += src/libwolfpkcs11.la
tests_login_pin_state_test_LDADD += src/libwolfpkcs11.la
tests_object_store_decode_test_LDADD += src/libwolfpkcs11.la
tests_object_policy_integrity_test_LDADD += src/libwolfpkcs11.la
tests_session_op_lifecycle_test_LDADD += src/libwolfpkcs11.la
else
tests_object_id_uniqueness_test_LDADD += src/libwolfpkcs11.la
tests_empty_pin_store_test_LDADD += src/libwolfpkcs11.la
Expand Down Expand Up @@ -442,6 +461,9 @@ tests_set_pin_rekey_test_LDADD += src/libwolfpkcs11.la
tests_nss_configdir_prefix_test_LDADD += src/libwolfpkcs11.la
tests_logout_retire_test_LDADD += src/libwolfpkcs11.la
tests_login_pin_state_test_LDADD += src/libwolfpkcs11.la
tests_object_store_decode_test_LDADD += src/libwolfpkcs11.la
tests_object_policy_integrity_test_LDADD += src/libwolfpkcs11.la
tests_session_op_lifecycle_test_LDADD += src/libwolfpkcs11.la
endif

EXTRA_DIST += tests/unit.h \
Expand Down
Loading
Loading