Skip to content

Commit b9bb385

Browse files
author
“sahmad154”
committed
Fix P12 patch: Add token label to PKCS#11 URI to prevent uninitialized slot scanning
- Updated PKCS#11 URI from 'pkcs11:id=%02x;type=private' to 'pkcs11:token=RDK_TOKEN;id=%02x;type=private' - This prevents libp11 from scanning uninitialized SoftHSM slots which caused 'passed a null parameter' errors - Fixes issue where curl failed with reference P12 files containing sentinel keys - Works for both SoftHSM test environment and production OP-TEE hardware HSM
1 parent 8ccaf14 commit b9bb385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

native-platform/patches/pkcs11_migration_support_p12.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Index: openssl-3.0.5/crypto/pkcs11_reference_key.c
145145
+
146146
+ /* Construct PKCS#11 URI with key ID */
147147
+ ret = snprintf(pkcs11_uri, PKCS11_URI_MAX_LEN,
148-
+ "pkcs11:id=%%%02x;type=private", key_id);
148+
+ "pkcs11:token=RDK_TOKEN;id=%%%02x;type=private", key_id);
149149
+ if (ret < 0 ) {
150150
+ ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
151151
+ return NULL;

0 commit comments

Comments
 (0)