You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2026. It is now read-only.
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.
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:
With CKA_CLASS + CKA_ID, same problem.