corePKCS11  v3.2.0
PKCS #11 Cryptoki Library
xFindObjectWithLabelAndClass

Searches for an object with a matching label and class provided.

CK_RV xFindObjectWithLabelAndClass( CK_SESSION_HANDLE xSession,
char * pcLabelName,
CK_ULONG ulLabelNameLen,
CK_OBJECT_CLASS xClass,
CK_OBJECT_HANDLE_PTR pxHandle );
Parameters
[in]xSessionAn open PKCS #11 session.
[in]pcLabelNameA pointer to the object's label (CKA_LABEL).
[in]ulLabelNameLenThe size (in bytes) of pcLabelName.
[in]xClassThe class (CKA_CLASS) of the object. ex: CKO_PUBLIC_KEY, CKO_PRIVATE_KEY, CKO_CERTIFICATE
[out]pxHandlePointer to the location where the handle of the found object should be placed.
Note
If no matching object is found, pxHandle will point to an object with handle 0 (Invalid Object Handle).
This function assumes that there is only one object that meets the CLASS/LABEL criteria.
xFindObjectWithLabelAndClass
CK_RV xFindObjectWithLabelAndClass(CK_SESSION_HANDLE xSession, char *pcLabelName, CK_ULONG ulLabelNameLen, CK_OBJECT_CLASS xClass, CK_OBJECT_HANDLE_PTR pxHandle)
Searches for an object with a matching label and class provided.
Definition: core_pkcs11.c:309