Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 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
a0a0715
F-2769 - Blank pad fixed-length info fields
aidangarske Oct 7, 2026
cda47ad
F-6230 - Report the token clock only when a valid UTC time is available
aidangarske Oct 7, 2026
b985c99
F-6053 - Advertise wrap and unwrap only for mechanisms C_WrapKey supp…
aidangarske Oct 7, 2026
d8d206d
F-12477 - Report generic secret key generation sizes in bits
aidangarske Oct 7, 2026
bf8e0b1
F-13248 - Advertise PBKDF2 and PKCS#12 PBE key generation only with HMAC
aidangarske Oct 7, 2026
6708b01
F-8634 - Report C_OpenSession failures instead of returning CKR_OK
aidangarske Oct 7, 2026
5eb1dc9
F-10370 - Document how C_Initialize uses pInitArgs
aidangarske Oct 7, 2026
efc1770
F-10371 - Remove the wrong NULL pulCount return from C_GetMechanismLi…
aidangarske Oct 7, 2026
ea063a1
F-10372 - Document CKR_PIN_LEN_RANGE for C_InitToken PIN length
aidangarske Oct 7, 2026
b000e3a
F-10373 - Document CKR_PIN_LEN_RANGE for C_InitPIN PIN length
aidangarske Oct 7, 2026
3088517
F-10374 - Document CKR_PIN_LEN_RANGE for the C_SetPIN new PIN length
aidangarske Oct 7, 2026
c825ec0
F-9413 - Correct the WP11_Slot_UserLogin return code docs
aidangarske Oct 7, 2026
8895ce1
Require CKA_VALUE_LEN on ECB unwrap only when ambiguous
aidangarske Oct 13, 2026
7a10138
Return CKR_KEY_SIZE_RANGE for unaligned ECB wraps
aidangarske Oct 13, 2026
5d086ab
Refuse an unaligned AES-ECB wrap before encrypting
aidangarske Oct 14, 2026
61ac0c8
Add an AES-ECB unit test build
aidangarske Oct 14, 2026
707181a
F-10378 - Fix file store path lookup build with WOLFPKCS11_NO_ENV
aidangarske Oct 6, 2026
0b29427
F-10379 - Keep token object count intact when an object store fails
aidangarske Oct 6, 2026
3a1a71e
F-10386 - Report token store commit failures to the caller
aidangarske Oct 6, 2026
9852432
F-10384 - Keep the stored token record until the new one is committed
aidangarske Oct 6, 2026
c3d56c1
F-11505 - Report token store failures from C_Finalize
aidangarske Oct 6, 2026
d8f04dc
F-8645 - Undo partial library initialization on failure
aidangarske Oct 6, 2026
fcbeeb2
F-10385 - Handle a failed object allocation without freeing NULL
aidangarske Oct 6, 2026
42963ca
F-13243 - Report token object unstore failures from object destroy
aidangarske Oct 6, 2026
0966e80
F-2791 - Zeroize token state with wc_ForceZero on finalize
aidangarske Oct 6, 2026
26dd0a5
F-11502 - Propagate token flag read errors during token load
aidangarske Oct 6, 2026
4b93de5
Prefer the token store error in object destroy
aidangarske Oct 13, 2026
0a19745
Document both CKR_FUNCTION_FAILED cases of C_Finalize
aidangarske Oct 13, 2026
6df3664
Test a close failure in wolfPKCS11_Store_CloseCommit
aidangarske Oct 13, 2026
4870e54
Test C_DeriveKey reporting a token store failure
aidangarske Oct 13, 2026
80948e8
Test library initialization rollback when allocation fails
aidangarske Oct 13, 2026
1ffe6e5
Skip store failure tests when the directory stays writable
aidangarske Oct 13, 2026
cc1d926
Set the no_env default token path with configure
aidangarske Oct 15, 2026
aebbd51
F-10386 - Stage TPM store records in memory until commit
aidangarske Oct 6, 2026
8677b12
F-10380 - Size and index post-quantum key records in the TPM store
aidangarske Oct 6, 2026
d3796c4
Map TPM NV delete errors to failures
aidangarske Oct 13, 2026
c22b333
Reject TPM records over the NV index limit
aidangarske Oct 13, 2026
f241a31
Test grown and overflowing TPM store records
aidangarske Oct 13, 2026
6eec333
Map TPM store commit errors to a negative error
aidangarske Oct 14, 2026
ea8d42d
Skip the threaded C_SetPIN race in single-threaded builds
aidangarske Oct 15, 2026
c06a744
Fail one store write in the interrupted TPM PIN change test
aidangarske Oct 15, 2026
80e50cd
F-10396 - Reject ECDH shared data when the KDF is CKD_NULL
aidangarske Oct 6, 2026
fbf2881
F-4272 - Bound the ECDH public data length before sizing the secret
aidangarske Oct 6, 2026
ec6c0d3
F-1610 - Keep the raw point fallback for an unsupported DER length form
aidangarske Oct 6, 2026
1a0b5d4
F-5159 - Bound the DER point length by the ECDH public data length
aidangarske Oct 6, 2026
3eb444b
F-10383 - Clear the ECDH key RNG before freeing the stack RNG
aidangarske Oct 6, 2026
43faec6
F-6959 - Require user login to derive a private key object
aidangarske Oct 6, 2026
7527014
F-13818 - Set derived key initial states before adding the object
aidangarske Oct 6, 2026
4da47e5
F-13816 - Derive key historical flags from the base key history
aidangarske Oct 6, 2026
ab91479
F-3403 - Map derived key length failures to a PKCS#11 return value
aidangarske Oct 6, 2026
128a0da
Test ECDH derive with well-formed points of the wrong size
aidangarske Oct 13, 2026
01bcdfe
F-4687 - Reject HKDF salt and info lengths beyond 32 bits
aidangarske Oct 6, 2026
7b9ca13
F-4804 - Reject an extended master secret session hash length beyond …
aidangarske Oct 6, 2026
68fe5e0
F-4274 - Bound the DH peer public value length by the largest support…
aidangarske Oct 6, 2026
7bb3ce6
F-5077 - Reject an AES-CBC encrypt-data length beyond 32 bits
aidangarske Oct 6, 2026
584c8fb
F-10389 - Require whole-byte sizes for each TLS key material field
aidangarske Oct 6, 2026
091e10c
F-10381 - Use one feature guard for the derive key locals and helpers
aidangarske Oct 6, 2026
601c796
F-11518 - Require TLS random and session hash pointers before deriving
aidangarske Oct 6, 2026
2253198
F-4066 - Report an unsupported TLS master secret version as a paramet…
aidangarske Oct 6, 2026
7185f2b
F-13245 - Reject a derived key length larger than the derived secret
aidangarske Oct 6, 2026
2f35597
F-3636 - Set derive historical flags on TLS key material keys
aidangarske Oct 6, 2026
fc815ae
F-4074 - Add TLS key material keys only after all attributes are set
aidangarske Oct 6, 2026
bb9e83e
F-8644 - Require an HKDF salt key handle to be a symmetric secret key
aidangarske Oct 6, 2026
147e5a2
Pad the DH derived secret to the prime length
aidangarske Oct 13, 2026
2e72047
F-11503 - Default companion RSA public key to a session object on unwrap
aidangarske Oct 6, 2026
c07d9e7
F-12460 - Validate CKA_TOKEN as a boolean attribute
aidangarske Oct 6, 2026
e8bbc56
F-5255 - Reject oversized attribute counts in SetAttributeValue
aidangarske Oct 6, 2026
fa62103
F-5254 - Reject oversized attribute counts in C_GetAttributeValue
aidangarske Oct 6, 2026
4ea0aea
F-5256 - Use a CK_ULONG index in C_FindObjects
aidangarske Oct 6, 2026
2329917
F-13831 - Reject post-creation changes to copy-only attributes
aidangarske Oct 6, 2026
666a0bd
F-11511 - Reject derived key state attributes in creation templates
aidangarske Oct 6, 2026
9b374b0
F-8670 - Reject a conflicting CKA_CLASS during object creation
aidangarske Oct 6, 2026
793584f
F-13242 - Validate the whole template before applying attribute updates
aidangarske Oct 6, 2026
9441571
F-4268 - Reject attribute lengths that do not fit the object setters
aidangarske Oct 6, 2026
93949fe
F-2773 - Reject CKA_ALWAYS_AUTHENTICATE since it cannot be enforced
aidangarske Oct 6, 2026
67a569c
F-11517 - Reject NULL values with a non-zero length for data attributes
aidangarske Oct 6, 2026
42da18c
F-6234 - Accept an empty CKA_START_DATE or CKA_END_DATE to clear the …
aidangarske Oct 6, 2026
7ab3203
F-12462 - Keep the previous attribute value when a replacement fails
aidangarske Oct 6, 2026
4191d2e
F-2030 - Read CKA_CERTIFICATE_CATEGORY as a full CK_ULONG
aidangarske Oct 6, 2026
a26a049
Use a bounded handle array in the find test
aidangarske Oct 13, 2026
4306076
F-11500 - Reject key material changes on existing objects
aidangarske Oct 6, 2026
017fb58
F-10387 - Validate a secret key update before replacing the key
aidangarske Oct 6, 2026
f423dfb
F-10399 - Clear the whole DH key buffer before storing a private value
aidangarske Oct 6, 2026
f7d79f4
F-11515 - Test that asymmetric private components stay fixed after cr…
aidangarske Oct 6, 2026
fdf3e5a
F-13815 - Require the EC curve before importing EC key material
aidangarske Oct 6, 2026
b0b549d
F-5158 - Reject RSA modulus sizes larger than the supported maximum
aidangarske Oct 6, 2026
9f04059
F-12458 - Keep the certificate value when an update omits CKA_VALUE
aidangarske Oct 6, 2026
4915408
F-4528 - Allocate the new certificate value before freeing the old one
aidangarske Oct 6, 2026
213c56a
F-11501 - Drop the storage alias when replacing a loaded certificate …
aidangarske Oct 7, 2026
a08aa6a
F-4318 - Reject DH domain parameters larger than the supported key size
aidangarske Oct 7, 2026
9f0f7e6
Return template errors for bad RSA, EC and DH keys
aidangarske Oct 13, 2026
3066c0e
Test the secret key setter through a derive
aidangarske Oct 13, 2026
6bb4dcc
Describe key material tests as read-only gate tests
aidangarske Oct 13, 2026
9513697
F-6660 - Require a certificate value when creating a certificate object
aidangarske Oct 7, 2026
179a406
F-6661 - Require a key value when creating a secret key object
aidangarske Oct 7, 2026
d9d063e
F-11507 - Require RSA and EC key material when creating key objects
aidangarske Oct 7, 2026
044705d
F-6662 - Allow data objects to be created without CKA_VALUE
aidangarske Oct 7, 2026
2846fa4
F-10382 - Report unavailable EC and PQ key attributes as errors
aidangarske Oct 7, 2026
420ff70
F-6955 - Return CKA_CERTIFICATE_CATEGORY from certificate objects
aidangarske Oct 7, 2026
24427d9
F-6956 - Expose key CKA_SUBJECT and restrict issuer and serial to certs
aidangarske Oct 7, 2026
4895fc4
F-6658 - Preserve CKA_LOCAL when copying an object
aidangarske Oct 7, 2026
ff10cc6
F-4061 - Set the ML-DSA parameter set length on a successful read
aidangarske Oct 7, 2026
49ecd0a
F-4062 - Answer size queries for trust object certificate hashes
aidangarske Oct 7, 2026
bcbad12
F-6235 - Check the buffer size before encoding the EC curve OID
aidangarske Oct 7, 2026
616c657
Expect CKR_ATTRIBUTE_TYPE_INVALID for unavailable EC attributes
aidangarske Oct 13, 2026
6734f94
Reject issuer and serial on non-certificates up front
aidangarske Oct 13, 2026
5650a8d
F-10377 - Report AES-CBC-PAD final block length from C_EncryptFinal
aidangarske Oct 6, 2026
c1b6f64
F-10393 - Reject OAEP source data that is NULL with a non-zero length
aidangarske Oct 6, 2026
e230093
F-11513 - Restrict AES-CCM nonce length to 7 through 13 bytes
aidangarske Oct 6, 2026
85159b9
F-3143 - Fix AES-CTR C_Decrypt size query to check the output buffer
aidangarske Oct 6, 2026
4bd53f7
F-2378 - Reject AES-CBC and AES-ECB data that is not block aligned
aidangarske Oct 6, 2026
e677ac3
F-12459 - Test the AES check value for each key size
aidangarske Oct 15, 2026
c03c248
F-4963 - Reject out-of-range AES-GCM parameter lengths at init
aidangarske Oct 6, 2026
5197e68
F-4959 - Reject out-of-range AES-CCM parameter and MAC lengths at init
aidangarske Oct 6, 2026
0cd6709
F-4735 - Reject OAEP source lengths that do not fit an int
aidangarske Oct 6, 2026
4ed7e03
F-6669 - Reject oversized AES-CTR and AES-CTS single-part lengths
aidangarske Oct 6, 2026
2eb1f1a
F-8671 - Reject oversized AES key unwrap ciphertext lengths
aidangarske Oct 6, 2026
6fda593
F-5156 - Compare the AES-GCM C_DecryptFinal buffer length without nar…
aidangarske Oct 6, 2026
91d3ffe
F-5153 - Compare C_EncryptFinal buffer lengths without narrowing
aidangarske Oct 6, 2026
efc212e
F-4801 - Reject oversized AES-CTR, AES-GCM and AES-CTS C_EncryptUpdat…
aidangarske Oct 6, 2026
c5393e5
F-5079 - Reject oversized AES-CTR C_DecryptUpdate parts
aidangarske Oct 6, 2026
1642900
F-4800 - Reject oversized and cumulative AES-GCM C_DecryptUpdate lengths
aidangarske Oct 6, 2026
9084d05
F-10403 - Cap the buffered AES-GCM length at INT_MAX
aidangarske Oct 6, 2026
ccab6c1
Use WP11_Session_AbortOp on AES length errors
aidangarske Oct 13, 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
15 changes: 15 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ jobs:
with:
config: --enable-singlethreaded

aesecb:
uses: ./.github/workflows/build-workflow.yml
with:
config: --enable-aesecb

tpm:
uses: ./.github/workflows/build-workflow.yml
with:
config: --enable-singlethreaded --enable-wolftpm --disable-dh C_EXTRA_FLAGS="-DWOLFPKCS11_TPM_STORE"
check: ./tests/pkcs11str && ./tests/pkcs11test && ./tests/rsa_session_persistence_test
tpm_debug:
uses: ./.github/workflows/build-workflow.yml
with:
config: --enable-singlethreaded --enable-wolftpm --disable-dh --enable-debug C_EXTRA_FLAGS="-DWOLFPKCS11_TPM_STORE"
check: ./tests/token_store_test

tpm_no_store:
uses: ./.github/workflows/build-workflow.yml
Expand Down Expand Up @@ -56,6 +66,11 @@ jobs:
uses: ./.github/workflows/build-workflow.yml
with:
config: CFLAGS="-DWOLFPKCS11_NO_STORE"
no_env:
uses: ./.github/workflows/build-workflow.yml
with:
config: C_EXTRA_FLAGS="-DWOLFPKCS11_NO_ENV" --with-default-token-path=./store/default
check: mkdir -p store && ./tests/pkcs11test
no_aesgcm:
uses: ./.github/workflows/build-workflow.yml
with:
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ if(NOT WOLFPKCS11_SINGLE_THREADED)
"-D_POSIX_THREADS")
endif()
else()
set(SINGLE_THREADED 1)
list(APPEND WOLFPKCS11_DEFINITIONS "-DSINGLE_THREADED")
list(APPEND WOLFPKCS11_DEFINITIONS "-DWOLFPKCS11_SINGLE_THREADED")
endif()


Expand Down
4 changes: 2 additions & 2 deletions cmake/options.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ extern "C" {
#endif
#undef DEBUG_WOLFPKCS11
#cmakedefine DEBUG_WOLFPKCS11
#undef SINGLE_THREADED
#cmakedefine SINGLE_THREADED
#undef WOLFPKCS11_SINGLE_THREADED
#cmakedefine WOLFPKCS11_SINGLE_THREADED
#undef NO_RSA
#cmakedefine NO_RSA
#undef WC_NO_RSA_OAEP
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xno" ],[
])
])

AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xyes" ],[ AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" ])
AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xyes" ],[ AM_CFLAGS="-DWOLFPKCS11_SINGLE_THREADED $AM_CFLAGS" ])

HAVE_PTHREAD=0
AS_IF([test "x$ax_pthread_ok" = "xyes"],[HAVE_PTHREAD=1])
Expand Down
Loading
Loading