-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
After creating multiple key pairs in CTK, then try to find specified one with API C_FindObjects using CKA_CLASS + CKA_LABEL in template, but always the first key handle will be returned (probably not match with the key label). Here is the pseudocode:
CK_ATTRIBUTE template[] = {
{CKA_CLASS, &key_class, sizeof(key_class)},
{CKA_LABEL, key_lable, strlen(key_lable)}
};
p11_->C_FindObjectsInit(sessionhandle_, template, cnt)
CK_ULONG object_count = 1;
CK_ULONG expected_obj_count = 1;
p11_->C_FindObjects(sessionhandle_, &object_handle, expected_obj_count, &object_count)
//the object_handle are actually not matched with key_lable. Even change to key_lable to another valid one, the
//return object_handle always the same one.
With CKA_CLASS + CKA_ID, same problem.
Metadata
Metadata
Assignees
Labels
No labels