#include "pk11_thread_funcs.h" #ifdef HAVE_RB_THREAD_CALL_WITHOUT_GVL void * tbf_C_Initialize( void *data ){ struct tbr_C_Initialize_params *p = (struct tbr_C_Initialize_params*)data; p->retval = p->func( p->params.pInitArgs ); return NULL; } void * tbf_C_Finalize( void *data ){ struct tbr_C_Finalize_params *p = (struct tbr_C_Finalize_params*)data; p->retval = p->func( p->params.pReserved ); return NULL; } void * tbf_C_GetInfo( void *data ){ struct tbr_C_GetInfo_params *p = (struct tbr_C_GetInfo_params*)data; p->retval = p->func( p->params.pInfo ); return NULL; } void * tbf_C_GetFunctionList( void *data ){ struct tbr_C_GetFunctionList_params *p = (struct tbr_C_GetFunctionList_params*)data; p->retval = p->func( p->params.ppFunctionList ); return NULL; } void * tbf_C_GetSlotList( void *data ){ struct tbr_C_GetSlotList_params *p = (struct tbr_C_GetSlotList_params*)data; p->retval = p->func( p->params.tokenPresent,p->params.pSlotList,p->params.pulCount ); return NULL; } void * tbf_C_GetSlotInfo( void *data ){ struct tbr_C_GetSlotInfo_params *p = (struct tbr_C_GetSlotInfo_params*)data; p->retval = p->func( p->params.slotID,p->params.pInfo ); return NULL; } void * tbf_C_GetTokenInfo( void *data ){ struct tbr_C_GetTokenInfo_params *p = (struct tbr_C_GetTokenInfo_params*)data; p->retval = p->func( p->params.slotID,p->params.pInfo ); return NULL; } void * tbf_C_GetMechanismList( void *data ){ struct tbr_C_GetMechanismList_params *p = (struct tbr_C_GetMechanismList_params*)data; p->retval = p->func( p->params.slotID,p->params.pMechanismList,p->params.pulCount ); return NULL; } void * tbf_C_GetMechanismInfo( void *data ){ struct tbr_C_GetMechanismInfo_params *p = (struct tbr_C_GetMechanismInfo_params*)data; p->retval = p->func( p->params.slotID,p->params.type,p->params.pInfo ); return NULL; } void * tbf_C_InitToken( void *data ){ struct tbr_C_InitToken_params *p = (struct tbr_C_InitToken_params*)data; p->retval = p->func( p->params.slotID,p->params.pPin,p->params.ulPinLen,p->params.pLabel ); return NULL; } void * tbf_C_InitPIN( void *data ){ struct tbr_C_InitPIN_params *p = (struct tbr_C_InitPIN_params*)data; p->retval = p->func( p->params.hSession,p->params.pPin,p->params.ulPinLen ); return NULL; } void * tbf_C_SetPIN( void *data ){ struct tbr_C_SetPIN_params *p = (struct tbr_C_SetPIN_params*)data; p->retval = p->func( p->params.hSession,p->params.pOldPin,p->params.ulOldLen,p->params.pNewPin,p->params.ulNewLen ); return NULL; } void * tbf_C_OpenSession( void *data ){ struct tbr_C_OpenSession_params *p = (struct tbr_C_OpenSession_params*)data; p->retval = p->func( p->params.slotID,p->params.flags,p->params.pApplication,p->params.Notify,p->params.phSession ); return NULL; } void * tbf_C_CloseSession( void *data ){ struct tbr_C_CloseSession_params *p = (struct tbr_C_CloseSession_params*)data; p->retval = p->func( p->params.hSession ); return NULL; } void * tbf_C_CloseAllSessions( void *data ){ struct tbr_C_CloseAllSessions_params *p = (struct tbr_C_CloseAllSessions_params*)data; p->retval = p->func( p->params.slotID ); return NULL; } void * tbf_C_GetSessionInfo( void *data ){ struct tbr_C_GetSessionInfo_params *p = (struct tbr_C_GetSessionInfo_params*)data; p->retval = p->func( p->params.hSession,p->params.pInfo ); return NULL; } void * tbf_C_GetOperationState( void *data ){ struct tbr_C_GetOperationState_params *p = (struct tbr_C_GetOperationState_params*)data; p->retval = p->func( p->params.hSession,p->params.pOperationState,p->params.pulOperationStateLen ); return NULL; } void * tbf_C_SetOperationState( void *data ){ struct tbr_C_SetOperationState_params *p = (struct tbr_C_SetOperationState_params*)data; p->retval = p->func( p->params.hSession,p->params.pOperationState,p->params.ulOperationStateLen,p->params.hEncryptionKey,p->params.hAuthenticationKey ); return NULL; } void * tbf_C_Login( void *data ){ struct tbr_C_Login_params *p = (struct tbr_C_Login_params*)data; p->retval = p->func( p->params.hSession,p->params.userType,p->params.pPin,p->params.ulPinLen ); return NULL; } void * tbf_C_Logout( void *data ){ struct tbr_C_Logout_params *p = (struct tbr_C_Logout_params*)data; p->retval = p->func( p->params.hSession ); return NULL; } void * tbf_C_CreateObject( void *data ){ struct tbr_C_CreateObject_params *p = (struct tbr_C_CreateObject_params*)data; p->retval = p->func( p->params.hSession,p->params.pTemplate,p->params.ulCount,p->params.phObject ); return NULL; } void * tbf_C_CopyObject( void *data ){ struct tbr_C_CopyObject_params *p = (struct tbr_C_CopyObject_params*)data; p->retval = p->func( p->params.hSession,p->params.hObject,p->params.pTemplate,p->params.ulCount,p->params.phNewObject ); return NULL; } void * tbf_C_DestroyObject( void *data ){ struct tbr_C_DestroyObject_params *p = (struct tbr_C_DestroyObject_params*)data; p->retval = p->func( p->params.hSession,p->params.hObject ); return NULL; } void * tbf_C_GetObjectSize( void *data ){ struct tbr_C_GetObjectSize_params *p = (struct tbr_C_GetObjectSize_params*)data; p->retval = p->func( p->params.hSession,p->params.hObject,p->params.pulSize ); return NULL; } void * tbf_C_GetAttributeValue( void *data ){ struct tbr_C_GetAttributeValue_params *p = (struct tbr_C_GetAttributeValue_params*)data; p->retval = p->func( p->params.hSession,p->params.hObject,p->params.pTemplate,p->params.ulCount ); return NULL; } void * tbf_C_SetAttributeValue( void *data ){ struct tbr_C_SetAttributeValue_params *p = (struct tbr_C_SetAttributeValue_params*)data; p->retval = p->func( p->params.hSession,p->params.hObject,p->params.pTemplate,p->params.ulCount ); return NULL; } void * tbf_C_FindObjectsInit( void *data ){ struct tbr_C_FindObjectsInit_params *p = (struct tbr_C_FindObjectsInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pTemplate,p->params.ulCount ); return NULL; } void * tbf_C_FindObjects( void *data ){ struct tbr_C_FindObjects_params *p = (struct tbr_C_FindObjects_params*)data; p->retval = p->func( p->params.hSession,p->params.phObject,p->params.ulMaxObjectCount,p->params.pulObjectCount ); return NULL; } void * tbf_C_FindObjectsFinal( void *data ){ struct tbr_C_FindObjectsFinal_params *p = (struct tbr_C_FindObjectsFinal_params*)data; p->retval = p->func( p->params.hSession ); return NULL; } void * tbf_C_EncryptInit( void *data ){ struct tbr_C_EncryptInit_params *p = (struct tbr_C_EncryptInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hKey ); return NULL; } void * tbf_C_Encrypt( void *data ){ struct tbr_C_Encrypt_params *p = (struct tbr_C_Encrypt_params*)data; p->retval = p->func( p->params.hSession,p->params.pData,p->params.ulDataLen,p->params.pEncryptedData,p->params.pulEncryptedDataLen ); return NULL; } void * tbf_C_EncryptUpdate( void *data ){ struct tbr_C_EncryptUpdate_params *p = (struct tbr_C_EncryptUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pPart,p->params.ulPartLen,p->params.pEncryptedPart,p->params.pulEncryptedPartLen ); return NULL; } void * tbf_C_EncryptFinal( void *data ){ struct tbr_C_EncryptFinal_params *p = (struct tbr_C_EncryptFinal_params*)data; p->retval = p->func( p->params.hSession,p->params.pLastEncryptedPart,p->params.pulLastEncryptedPartLen ); return NULL; } void * tbf_C_DecryptInit( void *data ){ struct tbr_C_DecryptInit_params *p = (struct tbr_C_DecryptInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hKey ); return NULL; } void * tbf_C_Decrypt( void *data ){ struct tbr_C_Decrypt_params *p = (struct tbr_C_Decrypt_params*)data; p->retval = p->func( p->params.hSession,p->params.pEncryptedData,p->params.ulEncryptedDataLen,p->params.pData,p->params.pulDataLen ); return NULL; } void * tbf_C_DecryptUpdate( void *data ){ struct tbr_C_DecryptUpdate_params *p = (struct tbr_C_DecryptUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pEncryptedPart,p->params.ulEncryptedPartLen,p->params.pPart,p->params.pulPartLen ); return NULL; } void * tbf_C_DecryptFinal( void *data ){ struct tbr_C_DecryptFinal_params *p = (struct tbr_C_DecryptFinal_params*)data; p->retval = p->func( p->params.hSession,p->params.pLastPart,p->params.pulLastPartLen ); return NULL; } void * tbf_C_DigestInit( void *data ){ struct tbr_C_DigestInit_params *p = (struct tbr_C_DigestInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism ); return NULL; } void * tbf_C_Digest( void *data ){ struct tbr_C_Digest_params *p = (struct tbr_C_Digest_params*)data; p->retval = p->func( p->params.hSession,p->params.pData,p->params.ulDataLen,p->params.pDigest,p->params.pulDigestLen ); return NULL; } void * tbf_C_DigestUpdate( void *data ){ struct tbr_C_DigestUpdate_params *p = (struct tbr_C_DigestUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pPart,p->params.ulPartLen ); return NULL; } void * tbf_C_DigestKey( void *data ){ struct tbr_C_DigestKey_params *p = (struct tbr_C_DigestKey_params*)data; p->retval = p->func( p->params.hSession,p->params.hKey ); return NULL; } void * tbf_C_DigestFinal( void *data ){ struct tbr_C_DigestFinal_params *p = (struct tbr_C_DigestFinal_params*)data; p->retval = p->func( p->params.hSession,p->params.pDigest,p->params.pulDigestLen ); return NULL; } void * tbf_C_SignInit( void *data ){ struct tbr_C_SignInit_params *p = (struct tbr_C_SignInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hKey ); return NULL; } void * tbf_C_Sign( void *data ){ struct tbr_C_Sign_params *p = (struct tbr_C_Sign_params*)data; p->retval = p->func( p->params.hSession,p->params.pData,p->params.ulDataLen,p->params.pSignature,p->params.pulSignatureLen ); return NULL; } void * tbf_C_SignUpdate( void *data ){ struct tbr_C_SignUpdate_params *p = (struct tbr_C_SignUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pPart,p->params.ulPartLen ); return NULL; } void * tbf_C_SignFinal( void *data ){ struct tbr_C_SignFinal_params *p = (struct tbr_C_SignFinal_params*)data; p->retval = p->func( p->params.hSession,p->params.pSignature,p->params.pulSignatureLen ); return NULL; } void * tbf_C_SignRecoverInit( void *data ){ struct tbr_C_SignRecoverInit_params *p = (struct tbr_C_SignRecoverInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hKey ); return NULL; } void * tbf_C_SignRecover( void *data ){ struct tbr_C_SignRecover_params *p = (struct tbr_C_SignRecover_params*)data; p->retval = p->func( p->params.hSession,p->params.pData,p->params.ulDataLen,p->params.pSignature,p->params.pulSignatureLen ); return NULL; } void * tbf_C_VerifyInit( void *data ){ struct tbr_C_VerifyInit_params *p = (struct tbr_C_VerifyInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hKey ); return NULL; } void * tbf_C_Verify( void *data ){ struct tbr_C_Verify_params *p = (struct tbr_C_Verify_params*)data; p->retval = p->func( p->params.hSession,p->params.pData,p->params.ulDataLen,p->params.pSignature,p->params.ulSignatureLen ); return NULL; } void * tbf_C_VerifyUpdate( void *data ){ struct tbr_C_VerifyUpdate_params *p = (struct tbr_C_VerifyUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pPart,p->params.ulPartLen ); return NULL; } void * tbf_C_VerifyFinal( void *data ){ struct tbr_C_VerifyFinal_params *p = (struct tbr_C_VerifyFinal_params*)data; p->retval = p->func( p->params.hSession,p->params.pSignature,p->params.ulSignatureLen ); return NULL; } void * tbf_C_VerifyRecoverInit( void *data ){ struct tbr_C_VerifyRecoverInit_params *p = (struct tbr_C_VerifyRecoverInit_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hKey ); return NULL; } void * tbf_C_VerifyRecover( void *data ){ struct tbr_C_VerifyRecover_params *p = (struct tbr_C_VerifyRecover_params*)data; p->retval = p->func( p->params.hSession,p->params.pSignature,p->params.ulSignatureLen,p->params.pData,p->params.pulDataLen ); return NULL; } void * tbf_C_DigestEncryptUpdate( void *data ){ struct tbr_C_DigestEncryptUpdate_params *p = (struct tbr_C_DigestEncryptUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pPart,p->params.ulPartLen,p->params.pEncryptedPart,p->params.pulEncryptedPartLen ); return NULL; } void * tbf_C_DecryptDigestUpdate( void *data ){ struct tbr_C_DecryptDigestUpdate_params *p = (struct tbr_C_DecryptDigestUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pEncryptedPart,p->params.ulEncryptedPartLen,p->params.pPart,p->params.pulPartLen ); return NULL; } void * tbf_C_SignEncryptUpdate( void *data ){ struct tbr_C_SignEncryptUpdate_params *p = (struct tbr_C_SignEncryptUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pPart,p->params.ulPartLen,p->params.pEncryptedPart,p->params.pulEncryptedPartLen ); return NULL; } void * tbf_C_DecryptVerifyUpdate( void *data ){ struct tbr_C_DecryptVerifyUpdate_params *p = (struct tbr_C_DecryptVerifyUpdate_params*)data; p->retval = p->func( p->params.hSession,p->params.pEncryptedPart,p->params.ulEncryptedPartLen,p->params.pPart,p->params.pulPartLen ); return NULL; } void * tbf_C_GenerateKey( void *data ){ struct tbr_C_GenerateKey_params *p = (struct tbr_C_GenerateKey_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.pTemplate,p->params.ulCount,p->params.phKey ); return NULL; } void * tbf_C_GenerateKeyPair( void *data ){ struct tbr_C_GenerateKeyPair_params *p = (struct tbr_C_GenerateKeyPair_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.pPublicKeyTemplate,p->params.ulPublicKeyAttributeCount,p->params.pPrivateKeyTemplate,p->params.ulPrivateKeyAttributeCount,p->params.phPublicKey,p->params.phPrivateKey ); return NULL; } void * tbf_C_WrapKey( void *data ){ struct tbr_C_WrapKey_params *p = (struct tbr_C_WrapKey_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hWrappingKey,p->params.hKey,p->params.pWrappedKey,p->params.pulWrappedKeyLen ); return NULL; } void * tbf_C_UnwrapKey( void *data ){ struct tbr_C_UnwrapKey_params *p = (struct tbr_C_UnwrapKey_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hUnwrappingKey,p->params.pWrappedKey,p->params.ulWrappedKeyLen,p->params.pTemplate,p->params.ulAttributeCount,p->params.phKey ); return NULL; } void * tbf_C_DeriveKey( void *data ){ struct tbr_C_DeriveKey_params *p = (struct tbr_C_DeriveKey_params*)data; p->retval = p->func( p->params.hSession,p->params.pMechanism,p->params.hBaseKey,p->params.pTemplate,p->params.ulAttributeCount,p->params.phKey ); return NULL; } void * tbf_C_SeedRandom( void *data ){ struct tbr_C_SeedRandom_params *p = (struct tbr_C_SeedRandom_params*)data; p->retval = p->func( p->params.hSession,p->params.pSeed,p->params.ulSeedLen ); return NULL; } void * tbf_C_GenerateRandom( void *data ){ struct tbr_C_GenerateRandom_params *p = (struct tbr_C_GenerateRandom_params*)data; p->retval = p->func( p->params.hSession,p->params.RandomData,p->params.ulRandomLen ); return NULL; } void * tbf_C_GetFunctionStatus( void *data ){ struct tbr_C_GetFunctionStatus_params *p = (struct tbr_C_GetFunctionStatus_params*)data; p->retval = p->func( p->params.hSession ); return NULL; } void * tbf_C_CancelFunction( void *data ){ struct tbr_C_CancelFunction_params *p = (struct tbr_C_CancelFunction_params*)data; p->retval = p->func( p->params.hSession ); return NULL; } void * tbf_C_WaitForSlotEvent( void *data ){ struct tbr_C_WaitForSlotEvent_params *p = (struct tbr_C_WaitForSlotEvent_params*)data; p->retval = p->func( p->params.flags,p->params.pSlot,p->params.pRserved ); return NULL; } #endif