mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Merge pull request #5762 from SparkiDev/pkcs11_find_no_class_type
PKCS#11: compile time check in finding keys
This commit is contained in:
@ -1521,8 +1521,10 @@ static int Pkcs11FindKeyById(CK_OBJECT_HANDLE* key, CK_OBJECT_CLASS keyClass,
|
||||
int ret = 0;
|
||||
CK_ULONG count;
|
||||
CK_ATTRIBUTE keyTemplate[] = {
|
||||
#ifndef WC_PKCS11_FIND_WITH_ID_ONLY
|
||||
{ CKA_CLASS, &keyClass, sizeof(keyClass) },
|
||||
{ CKA_KEY_TYPE, &keyType, sizeof(keyType) },
|
||||
#endif
|
||||
{ CKA_ID, id, (CK_ULONG)idLen }
|
||||
};
|
||||
CK_ULONG keyTmplCnt = sizeof(keyTemplate) / sizeof(*keyTemplate);
|
||||
|
Reference in New Issue
Block a user