CT_ToHsmSession

CK_DEFINE_FUNCTION(CK_RV, CT_ToHsmSession)(
        CK_SESSION_HANDLE hSessionApp,
        CK_SESSION_HANDLE_PTR phHsmSession
);
 

This function can be used to convert the Cryptoki session handle seen by the application into the session handle used by the HSM.

Return Values:

CKR_OK Successful
CKR_ARGUMENTS_BAD The supplied hSessionApp is INVALID or phHsmSession is NULL.

This function is a SafeNet extension to PKCS #11.