FindKeyFromName

Synopsis

CK_RV FindKeyFromName(
const char * keyName,
CK_OBJECT_CLASS cl,
CK_SLOT_ID * phSlot,
CK_SESSION_HANDLE * phSession,
CK_OBJECT_HANDLE * phKey);

Description

Find the key with a given class and label within the specified token, and open a session to this token.

Parameter

keyName

String identifying the key to locate format   "token(pin)/key" or "token/key" token name of the Token containing the key pin  optional user pin key label of the key in the Token

cl

Class of the object

phSlot

Reference to slot id to hold located slot id

phSession

Reference to session handle to hold opened session

phKey

Reference to object handle to hold located key handle

On Successful Return

*phSlot — slot holding the key

*phSession — open session handle

*phKey — handle to the key object