andre@0: /* THIS IS A GENERATED FILE */ andre@0: /* This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: andre@0: /* andre@0: * nssck.api andre@0: * andre@0: * This automatically-generated file is used to generate a set of andre@0: * Cryptoki entry points within the object space of a Module using andre@0: * the NSS Cryptoki Framework. andre@0: * andre@0: * The Module should have a .c file with the following: andre@0: * andre@0: * #define MODULE_NAME name andre@0: * #define INSTANCE_NAME instance andre@0: * #include "nssck.api" andre@0: * andre@0: * where "name" is some module-specific name that can be used to andre@0: * disambiguate various modules. This included file will then andre@0: * define the actual Cryptoki routines which pass through to the andre@0: * Framework calls. All routines, except C_GetFunctionList, will andre@0: * be prefixed with the name; C_GetFunctionList will be generated andre@0: * to return an entry-point vector with these routines. The andre@0: * instance specified should be the basic instance of NSSCKMDInstance. andre@0: * andre@0: * If, prior to including nssck.api, the .c file also specifies andre@0: * andre@0: * #define DECLARE_STRICT_CRYTPOKI_NAMES andre@0: * andre@0: * Then a set of "stub" routines not prefixed with the name will andre@0: * be included. This would allow the combined module and framework andre@0: * to be used in applications which are hard-coded to use the andre@0: * PKCS#11 names (instead of going through the EPV). Please note andre@0: * that such applications should be careful resolving symbols when andre@0: * more than one PKCS#11 module is loaded. andre@0: */ andre@0: andre@0: #ifndef MODULE_NAME andre@0: #error "Error: MODULE_NAME must be defined." andre@0: #endif /* MODULE_NAME */ andre@0: andre@0: #ifndef INSTANCE_NAME andre@0: #error "Error: INSTANCE_NAME must be defined." andre@0: #endif /* INSTANCE_NAME */ andre@0: andre@0: #ifndef NSSCKT_H andre@0: #include "nssckt.h" andre@0: #endif /* NSSCKT_H */ andre@0: andre@0: #ifndef NSSCKFWT_H andre@0: #include "nssckfwt.h" andre@0: #endif /* NSSCKFWT_H */ andre@0: andre@0: #ifndef NSSCKFWC_H andre@0: #include "nssckfwc.h" andre@0: #endif /* NSSCKFWC_H */ andre@0: andre@0: #ifndef NSSCKEPV_H andre@0: #include "nssckepv.h" andre@0: #endif /* NSSCKEPV_H */ andre@0: andre@0: #define ADJOIN(x,y) x##y andre@0: andre@0: #define __ADJOIN(x,y) ADJOIN(x,y) andre@0: andre@0: /* andre@0: * The anchor. This object is used to store an "anchor" pointer in andre@0: * the Module's object space, so the wrapper functions can relate andre@0: * back to this instance. andre@0: */ andre@0: andre@0: static NSSCKFWInstance *fwInstance = (NSSCKFWInstance *)0; andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Initialize) andre@0: ( andre@0: CK_VOID_PTR pInitArgs andre@0: ) andre@0: { andre@0: return NSSCKFWC_Initialize(&fwInstance, INSTANCE_NAME, pInitArgs); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Initialize andre@0: ( andre@0: CK_VOID_PTR pInitArgs andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Initialize)(pInitArgs); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Finalize) andre@0: ( andre@0: CK_VOID_PTR pReserved andre@0: ) andre@0: { andre@0: return NSSCKFWC_Finalize(&fwInstance); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Finalize andre@0: ( andre@0: CK_VOID_PTR pReserved andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Finalize)(pReserved); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetInfo) andre@0: ( andre@0: CK_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetInfo(fwInstance, pInfo); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetInfo andre@0: ( andre@0: CK_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetInfo)(pInfo); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: /* andre@0: * C_GetFunctionList is defined at the end. andre@0: */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetSlotList) andre@0: ( andre@0: CK_BBOOL tokenPresent, andre@0: CK_SLOT_ID_PTR pSlotList, andre@0: CK_ULONG_PTR pulCount andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetSlotList(fwInstance, tokenPresent, pSlotList, pulCount); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetSlotList andre@0: ( andre@0: CK_BBOOL tokenPresent, andre@0: CK_SLOT_ID_PTR pSlotList, andre@0: CK_ULONG_PTR pulCount andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetSlotList)(tokenPresent, pSlotList, pulCount); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetSlotInfo) andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_SLOT_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetSlotInfo(fwInstance, slotID, pInfo); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetSlotInfo andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_SLOT_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetSlotInfo)(slotID, pInfo); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetTokenInfo) andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_TOKEN_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetTokenInfo(fwInstance, slotID, pInfo); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetTokenInfo andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_TOKEN_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetTokenInfo)(slotID, pInfo); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetMechanismList) andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_MECHANISM_TYPE_PTR pMechanismList, andre@0: CK_ULONG_PTR pulCount andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetMechanismList(fwInstance, slotID, pMechanismList, pulCount); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetMechanismList andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_MECHANISM_TYPE_PTR pMechanismList, andre@0: CK_ULONG_PTR pulCount andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetMechanismList)(slotID, pMechanismList, pulCount); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetMechanismInfo) andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_MECHANISM_TYPE type, andre@0: CK_MECHANISM_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetMechanismInfo(fwInstance, slotID, type, pInfo); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetMechanismInfo andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_MECHANISM_TYPE type, andre@0: CK_MECHANISM_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetMechanismInfo)(slotID, type, pInfo); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_InitToken) andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_CHAR_PTR pPin, andre@0: CK_ULONG ulPinLen, andre@0: CK_CHAR_PTR pLabel andre@0: ) andre@0: { andre@0: return NSSCKFWC_InitToken(fwInstance, slotID, pPin, ulPinLen, pLabel); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_InitToken andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_CHAR_PTR pPin, andre@0: CK_ULONG ulPinLen, andre@0: CK_CHAR_PTR pLabel andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_InitToken)(slotID, pPin, ulPinLen, pLabel); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_InitPIN) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_CHAR_PTR pPin, andre@0: CK_ULONG ulPinLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_InitPIN(fwInstance, hSession, pPin, ulPinLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_InitPIN andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_CHAR_PTR pPin, andre@0: CK_ULONG ulPinLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_InitPIN)(hSession, pPin, ulPinLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SetPIN) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_CHAR_PTR pOldPin, andre@0: CK_ULONG ulOldLen, andre@0: CK_CHAR_PTR pNewPin, andre@0: CK_ULONG ulNewLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_SetPIN(fwInstance, hSession, pOldPin, ulOldLen, pNewPin, ulNewLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SetPIN andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_CHAR_PTR pOldPin, andre@0: CK_ULONG ulOldLen, andre@0: CK_CHAR_PTR pNewPin, andre@0: CK_ULONG ulNewLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SetPIN)(hSession, pOldPin, ulOldLen, pNewPin, ulNewLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_OpenSession) andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_FLAGS flags, andre@0: CK_VOID_PTR pApplication, andre@0: CK_NOTIFY Notify, andre@0: CK_SESSION_HANDLE_PTR phSession andre@0: ) andre@0: { andre@0: return NSSCKFWC_OpenSession(fwInstance, slotID, flags, pApplication, Notify, phSession); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_OpenSession andre@0: ( andre@0: CK_SLOT_ID slotID, andre@0: CK_FLAGS flags, andre@0: CK_VOID_PTR pApplication, andre@0: CK_NOTIFY Notify, andre@0: CK_SESSION_HANDLE_PTR phSession andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_OpenSession)(slotID, flags, pApplication, Notify, phSession); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_CloseSession) andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return NSSCKFWC_CloseSession(fwInstance, hSession); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_CloseSession andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_CloseSession)(hSession); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_CloseAllSessions) andre@0: ( andre@0: CK_SLOT_ID slotID andre@0: ) andre@0: { andre@0: return NSSCKFWC_CloseAllSessions(fwInstance, slotID); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_CloseAllSessions andre@0: ( andre@0: CK_SLOT_ID slotID andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_CloseAllSessions)(slotID); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetSessionInfo) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_SESSION_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetSessionInfo(fwInstance, hSession, pInfo); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetSessionInfo andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_SESSION_INFO_PTR pInfo andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetSessionInfo)(hSession, pInfo); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetOperationState) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pOperationState, andre@0: CK_ULONG_PTR pulOperationStateLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetOperationState(fwInstance, hSession, pOperationState, pulOperationStateLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetOperationState andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pOperationState, andre@0: CK_ULONG_PTR pulOperationStateLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetOperationState)(hSession, pOperationState, pulOperationStateLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SetOperationState) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pOperationState, andre@0: CK_ULONG ulOperationStateLen, andre@0: CK_OBJECT_HANDLE hEncryptionKey, andre@0: CK_OBJECT_HANDLE hAuthenticationKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_SetOperationState(fwInstance, hSession, pOperationState, ulOperationStateLen, hEncryptionKey, hAuthenticationKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SetOperationState andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pOperationState, andre@0: CK_ULONG ulOperationStateLen, andre@0: CK_OBJECT_HANDLE hEncryptionKey, andre@0: CK_OBJECT_HANDLE hAuthenticationKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SetOperationState)(hSession, pOperationState, ulOperationStateLen, hEncryptionKey, hAuthenticationKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Login) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_USER_TYPE userType, andre@0: CK_CHAR_PTR pPin, andre@0: CK_ULONG ulPinLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_Login(fwInstance, hSession, userType, pPin, ulPinLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Login andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_USER_TYPE userType, andre@0: CK_CHAR_PTR pPin, andre@0: CK_ULONG ulPinLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Login)(hSession, userType, pPin, ulPinLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Logout) andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return NSSCKFWC_Logout(fwInstance, hSession); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Logout andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Logout)(hSession); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_CreateObject) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount, andre@0: CK_OBJECT_HANDLE_PTR phObject andre@0: ) andre@0: { andre@0: return NSSCKFWC_CreateObject(fwInstance, hSession, pTemplate, ulCount, phObject); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_CreateObject andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount, andre@0: CK_OBJECT_HANDLE_PTR phObject andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_CreateObject)(hSession, pTemplate, ulCount, phObject); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_CopyObject) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount, andre@0: CK_OBJECT_HANDLE_PTR phNewObject andre@0: ) andre@0: { andre@0: return NSSCKFWC_CopyObject(fwInstance, hSession, hObject, pTemplate, ulCount, phNewObject); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_CopyObject andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount, andre@0: CK_OBJECT_HANDLE_PTR phNewObject andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_CopyObject)(hSession, hObject, pTemplate, ulCount, phNewObject); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DestroyObject) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject andre@0: ) andre@0: { andre@0: return NSSCKFWC_DestroyObject(fwInstance, hSession, hObject); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DestroyObject andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DestroyObject)(hSession, hObject); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetObjectSize) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ULONG_PTR pulSize andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetObjectSize(fwInstance, hSession, hObject, pulSize); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetObjectSize andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ULONG_PTR pulSize andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetObjectSize)(hSession, hObject, pulSize); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetAttributeValue) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetAttributeValue(fwInstance, hSession, hObject, pTemplate, ulCount); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetAttributeValue andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetAttributeValue)(hSession, hObject, pTemplate, ulCount); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SetAttributeValue) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount andre@0: ) andre@0: { andre@0: return NSSCKFWC_SetAttributeValue(fwInstance, hSession, hObject, pTemplate, ulCount); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SetAttributeValue andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hObject, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SetAttributeValue)(hSession, hObject, pTemplate, ulCount); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_FindObjectsInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount andre@0: ) andre@0: { andre@0: return NSSCKFWC_FindObjectsInit(fwInstance, hSession, pTemplate, ulCount); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_FindObjectsInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_FindObjectsInit)(hSession, pTemplate, ulCount); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_FindObjects) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE_PTR phObject, andre@0: CK_ULONG ulMaxObjectCount, andre@0: CK_ULONG_PTR pulObjectCount andre@0: ) andre@0: { andre@0: return NSSCKFWC_FindObjects(fwInstance, hSession, phObject, ulMaxObjectCount, pulObjectCount); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_FindObjects andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE_PTR phObject, andre@0: CK_ULONG ulMaxObjectCount, andre@0: CK_ULONG_PTR pulObjectCount andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_FindObjects)(hSession, phObject, ulMaxObjectCount, pulObjectCount); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_FindObjectsFinal) andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return NSSCKFWC_FindObjectsFinal(fwInstance, hSession); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_FindObjectsFinal andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_FindObjectsFinal)(hSession); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_EncryptInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_EncryptInit(fwInstance, hSession, pMechanism, hKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_EncryptInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_EncryptInit)(hSession, pMechanism, hKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Encrypt) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pEncryptedData, andre@0: CK_ULONG_PTR pulEncryptedDataLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_Encrypt(fwInstance, hSession, pData, ulDataLen, pEncryptedData, pulEncryptedDataLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Encrypt andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pEncryptedData, andre@0: CK_ULONG_PTR pulEncryptedDataLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Encrypt)(hSession, pData, ulDataLen, pEncryptedData, pulEncryptedDataLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_EncryptUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG_PTR pulEncryptedPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_EncryptUpdate(fwInstance, hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_EncryptUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG_PTR pulEncryptedPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_EncryptUpdate)(hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_EncryptFinal) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pLastEncryptedPart, andre@0: CK_ULONG_PTR pulLastEncryptedPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_EncryptFinal(fwInstance, hSession, pLastEncryptedPart, pulLastEncryptedPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_EncryptFinal andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pLastEncryptedPart, andre@0: CK_ULONG_PTR pulLastEncryptedPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_EncryptFinal)(hSession, pLastEncryptedPart, pulLastEncryptedPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DecryptInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_DecryptInit(fwInstance, hSession, pMechanism, hKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DecryptInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DecryptInit)(hSession, pMechanism, hKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Decrypt) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedData, andre@0: CK_ULONG ulEncryptedDataLen, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG_PTR pulDataLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_Decrypt(fwInstance, hSession, pEncryptedData, ulEncryptedDataLen, pData, pulDataLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Decrypt andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedData, andre@0: CK_ULONG ulEncryptedDataLen, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG_PTR pulDataLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Decrypt)(hSession, pEncryptedData, ulEncryptedDataLen, pData, pulDataLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DecryptUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG ulEncryptedPartLen, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG_PTR pulPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_DecryptUpdate(fwInstance, hSession, pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DecryptUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG ulEncryptedPartLen, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG_PTR pulPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DecryptUpdate)(hSession, pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DecryptFinal) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pLastPart, andre@0: CK_ULONG_PTR pulLastPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_DecryptFinal(fwInstance, hSession, pLastPart, pulLastPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DecryptFinal andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pLastPart, andre@0: CK_ULONG_PTR pulLastPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DecryptFinal)(hSession, pLastPart, pulLastPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DigestInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism andre@0: ) andre@0: { andre@0: return NSSCKFWC_DigestInit(fwInstance, hSession, pMechanism); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DigestInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DigestInit)(hSession, pMechanism); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Digest) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pDigest, andre@0: CK_ULONG_PTR pulDigestLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_Digest(fwInstance, hSession, pData, ulDataLen, pDigest, pulDigestLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Digest andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pDigest, andre@0: CK_ULONG_PTR pulDigestLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Digest)(hSession, pData, ulDataLen, pDigest, pulDigestLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DigestUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_DigestUpdate(fwInstance, hSession, pPart, ulPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DigestUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DigestUpdate)(hSession, pPart, ulPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DigestKey) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_DigestKey(fwInstance, hSession, hKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DigestKey andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DigestKey)(hSession, hKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DigestFinal) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pDigest, andre@0: CK_ULONG_PTR pulDigestLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_DigestFinal(fwInstance, hSession, pDigest, pulDigestLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DigestFinal andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pDigest, andre@0: CK_ULONG_PTR pulDigestLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DigestFinal)(hSession, pDigest, pulDigestLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SignInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_SignInit(fwInstance, hSession, pMechanism, hKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SignInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SignInit)(hSession, pMechanism, hKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Sign) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG_PTR pulSignatureLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_Sign(fwInstance, hSession, pData, ulDataLen, pSignature, pulSignatureLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Sign andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG_PTR pulSignatureLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Sign)(hSession, pData, ulDataLen, pSignature, pulSignatureLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SignUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_SignUpdate(fwInstance, hSession, pPart, ulPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SignUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SignUpdate)(hSession, pPart, ulPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SignFinal) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG_PTR pulSignatureLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_SignFinal(fwInstance, hSession, pSignature, pulSignatureLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SignFinal andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG_PTR pulSignatureLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SignFinal)(hSession, pSignature, pulSignatureLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SignRecoverInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_SignRecoverInit(fwInstance, hSession, pMechanism, hKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SignRecoverInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SignRecoverInit)(hSession, pMechanism, hKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SignRecover) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG_PTR pulSignatureLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_SignRecover(fwInstance, hSession, pData, ulDataLen, pSignature, pulSignatureLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SignRecover andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG_PTR pulSignatureLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SignRecover)(hSession, pData, ulDataLen, pSignature, pulSignatureLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_VerifyInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_VerifyInit(fwInstance, hSession, pMechanism, hKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_VerifyInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_VerifyInit)(hSession, pMechanism, hKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_Verify) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG ulSignatureLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_Verify(fwInstance, hSession, pData, ulDataLen, pSignature, ulSignatureLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_Verify andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG ulDataLen, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG ulSignatureLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_Verify)(hSession, pData, ulDataLen, pSignature, ulSignatureLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_VerifyUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_VerifyUpdate(fwInstance, hSession, pPart, ulPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_VerifyUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_VerifyUpdate)(hSession, pPart, ulPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_VerifyFinal) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG ulSignatureLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_VerifyFinal(fwInstance, hSession, pSignature, ulSignatureLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_VerifyFinal andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG ulSignatureLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_VerifyFinal)(hSession, pSignature, ulSignatureLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_VerifyRecoverInit) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_VerifyRecoverInit(fwInstance, hSession, pMechanism, hKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_VerifyRecoverInit andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_VerifyRecoverInit)(hSession, pMechanism, hKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_VerifyRecover) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG ulSignatureLen, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG_PTR pulDataLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_VerifyRecover(fwInstance, hSession, pSignature, ulSignatureLen, pData, pulDataLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_VerifyRecover andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSignature, andre@0: CK_ULONG ulSignatureLen, andre@0: CK_BYTE_PTR pData, andre@0: CK_ULONG_PTR pulDataLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_VerifyRecover)(hSession, pSignature, ulSignatureLen, pData, pulDataLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DigestEncryptUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG_PTR pulEncryptedPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_DigestEncryptUpdate(fwInstance, hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DigestEncryptUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG_PTR pulEncryptedPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DigestEncryptUpdate)(hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DecryptDigestUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG ulEncryptedPartLen, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG_PTR pulPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_DecryptDigestUpdate(fwInstance, hSession, pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DecryptDigestUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG ulEncryptedPartLen, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG_PTR pulPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DecryptDigestUpdate)(hSession, pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SignEncryptUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG_PTR pulEncryptedPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_SignEncryptUpdate(fwInstance, hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SignEncryptUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG ulPartLen, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG_PTR pulEncryptedPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SignEncryptUpdate)(hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DecryptVerifyUpdate) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG ulEncryptedPartLen, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG_PTR pulPartLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_DecryptVerifyUpdate(fwInstance, hSession, pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DecryptVerifyUpdate andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pEncryptedPart, andre@0: CK_ULONG ulEncryptedPartLen, andre@0: CK_BYTE_PTR pPart, andre@0: CK_ULONG_PTR pulPartLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DecryptVerifyUpdate)(hSession, pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GenerateKey) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount, andre@0: CK_OBJECT_HANDLE_PTR phKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_GenerateKey(fwInstance, hSession, pMechanism, pTemplate, ulCount, phKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GenerateKey andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulCount, andre@0: CK_OBJECT_HANDLE_PTR phKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GenerateKey)(hSession, pMechanism, pTemplate, ulCount, phKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GenerateKeyPair) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_ATTRIBUTE_PTR pPublicKeyTemplate, andre@0: CK_ULONG ulPublicKeyAttributeCount, andre@0: CK_ATTRIBUTE_PTR pPrivateKeyTemplate, andre@0: CK_ULONG ulPrivateKeyAttributeCount, andre@0: CK_OBJECT_HANDLE_PTR phPublicKey, andre@0: CK_OBJECT_HANDLE_PTR phPrivateKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_GenerateKeyPair(fwInstance, hSession, pMechanism, pPublicKeyTemplate, ulPublicKeyAttributeCount, pPrivateKeyTemplate, ulPrivateKeyAttributeCount, phPublicKey, phPrivateKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GenerateKeyPair andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_ATTRIBUTE_PTR pPublicKeyTemplate, andre@0: CK_ULONG ulPublicKeyAttributeCount, andre@0: CK_ATTRIBUTE_PTR pPrivateKeyTemplate, andre@0: CK_ULONG ulPrivateKeyAttributeCount, andre@0: CK_OBJECT_HANDLE_PTR phPublicKey, andre@0: CK_OBJECT_HANDLE_PTR phPrivateKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GenerateKeyPair)(hSession, pMechanism, pPublicKeyTemplate, ulPublicKeyAttributeCount, pPrivateKeyTemplate, ulPrivateKeyAttributeCount, phPublicKey, phPrivateKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_WrapKey) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hWrappingKey, andre@0: CK_OBJECT_HANDLE hKey, andre@0: CK_BYTE_PTR pWrappedKey, andre@0: CK_ULONG_PTR pulWrappedKeyLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_WrapKey(fwInstance, hSession, pMechanism, hWrappingKey, hKey, pWrappedKey, pulWrappedKeyLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_WrapKey andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hWrappingKey, andre@0: CK_OBJECT_HANDLE hKey, andre@0: CK_BYTE_PTR pWrappedKey, andre@0: CK_ULONG_PTR pulWrappedKeyLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_WrapKey)(hSession, pMechanism, hWrappingKey, hKey, pWrappedKey, pulWrappedKeyLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_UnwrapKey) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hUnwrappingKey, andre@0: CK_BYTE_PTR pWrappedKey, andre@0: CK_ULONG ulWrappedKeyLen, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulAttributeCount, andre@0: CK_OBJECT_HANDLE_PTR phKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_UnwrapKey(fwInstance, hSession, pMechanism, hUnwrappingKey, pWrappedKey, ulWrappedKeyLen, pTemplate, ulAttributeCount, phKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_UnwrapKey andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hUnwrappingKey, andre@0: CK_BYTE_PTR pWrappedKey, andre@0: CK_ULONG ulWrappedKeyLen, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulAttributeCount, andre@0: CK_OBJECT_HANDLE_PTR phKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_UnwrapKey)(hSession, pMechanism, hUnwrappingKey, pWrappedKey, ulWrappedKeyLen, pTemplate, ulAttributeCount, phKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_DeriveKey) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hBaseKey, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulAttributeCount, andre@0: CK_OBJECT_HANDLE_PTR phKey andre@0: ) andre@0: { andre@0: return NSSCKFWC_DeriveKey(fwInstance, hSession, pMechanism, hBaseKey, pTemplate, ulAttributeCount, phKey); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_DeriveKey andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_MECHANISM_PTR pMechanism, andre@0: CK_OBJECT_HANDLE hBaseKey, andre@0: CK_ATTRIBUTE_PTR pTemplate, andre@0: CK_ULONG ulAttributeCount, andre@0: CK_OBJECT_HANDLE_PTR phKey andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_DeriveKey)(hSession, pMechanism, hBaseKey, pTemplate, ulAttributeCount, phKey); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_SeedRandom) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSeed, andre@0: CK_ULONG ulSeedLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_SeedRandom(fwInstance, hSession, pSeed, ulSeedLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_SeedRandom andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR pSeed, andre@0: CK_ULONG ulSeedLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_SeedRandom)(hSession, pSeed, ulSeedLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GenerateRandom) andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR RandomData, andre@0: CK_ULONG ulRandomLen andre@0: ) andre@0: { andre@0: return NSSCKFWC_GenerateRandom(fwInstance, hSession, RandomData, ulRandomLen); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GenerateRandom andre@0: ( andre@0: CK_SESSION_HANDLE hSession, andre@0: CK_BYTE_PTR RandomData, andre@0: CK_ULONG ulRandomLen andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GenerateRandom)(hSession, RandomData, ulRandomLen); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetFunctionStatus) andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return NSSCKFWC_GetFunctionStatus(fwInstance, hSession); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_GetFunctionStatus andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetFunctionStatus)(hSession); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_CancelFunction) andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return NSSCKFWC_CancelFunction(fwInstance, hSession); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_CancelFunction andre@0: ( andre@0: CK_SESSION_HANDLE hSession andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_CancelFunction)(hSession); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: static CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_WaitForSlotEvent) andre@0: ( andre@0: CK_FLAGS flags, andre@0: CK_SLOT_ID_PTR pSlot, andre@0: CK_VOID_PTR pRserved andre@0: ) andre@0: { andre@0: return NSSCKFWC_WaitForSlotEvent(fwInstance, flags, pSlot, pRserved); andre@0: } andre@0: andre@0: #ifdef DECLARE_STRICT_CRYPTOKI_NAMES andre@0: CK_RV CK_ENTRY andre@0: C_WaitForSlotEvent andre@0: ( andre@0: CK_FLAGS flags, andre@0: CK_SLOT_ID_PTR pSlot, andre@0: CK_VOID_PTR pRserved andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_WaitForSlotEvent)(flags, pSlot, pRserved); andre@0: } andre@0: #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */ andre@0: andre@0: CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetFunctionList) andre@0: ( andre@0: CK_FUNCTION_LIST_PTR_PTR ppFunctionList andre@0: ); andre@0: andre@0: static CK_FUNCTION_LIST FunctionList = { andre@0: { 2, 1 }, andre@0: __ADJOIN(MODULE_NAME,C_Initialize), andre@0: __ADJOIN(MODULE_NAME,C_Finalize), andre@0: __ADJOIN(MODULE_NAME,C_GetInfo), andre@0: __ADJOIN(MODULE_NAME,C_GetFunctionList), andre@0: __ADJOIN(MODULE_NAME,C_GetSlotList), andre@0: __ADJOIN(MODULE_NAME,C_GetSlotInfo), andre@0: __ADJOIN(MODULE_NAME,C_GetTokenInfo), andre@0: __ADJOIN(MODULE_NAME,C_GetMechanismList), andre@0: __ADJOIN(MODULE_NAME,C_GetMechanismInfo), andre@0: __ADJOIN(MODULE_NAME,C_InitToken), andre@0: __ADJOIN(MODULE_NAME,C_InitPIN), andre@0: __ADJOIN(MODULE_NAME,C_SetPIN), andre@0: __ADJOIN(MODULE_NAME,C_OpenSession), andre@0: __ADJOIN(MODULE_NAME,C_CloseSession), andre@0: __ADJOIN(MODULE_NAME,C_CloseAllSessions), andre@0: __ADJOIN(MODULE_NAME,C_GetSessionInfo), andre@0: __ADJOIN(MODULE_NAME,C_GetOperationState), andre@0: __ADJOIN(MODULE_NAME,C_SetOperationState), andre@0: __ADJOIN(MODULE_NAME,C_Login), andre@0: __ADJOIN(MODULE_NAME,C_Logout), andre@0: __ADJOIN(MODULE_NAME,C_CreateObject), andre@0: __ADJOIN(MODULE_NAME,C_CopyObject), andre@0: __ADJOIN(MODULE_NAME,C_DestroyObject), andre@0: __ADJOIN(MODULE_NAME,C_GetObjectSize), andre@0: __ADJOIN(MODULE_NAME,C_GetAttributeValue), andre@0: __ADJOIN(MODULE_NAME,C_SetAttributeValue), andre@0: __ADJOIN(MODULE_NAME,C_FindObjectsInit), andre@0: __ADJOIN(MODULE_NAME,C_FindObjects), andre@0: __ADJOIN(MODULE_NAME,C_FindObjectsFinal), andre@0: __ADJOIN(MODULE_NAME,C_EncryptInit), andre@0: __ADJOIN(MODULE_NAME,C_Encrypt), andre@0: __ADJOIN(MODULE_NAME,C_EncryptUpdate), andre@0: __ADJOIN(MODULE_NAME,C_EncryptFinal), andre@0: __ADJOIN(MODULE_NAME,C_DecryptInit), andre@0: __ADJOIN(MODULE_NAME,C_Decrypt), andre@0: __ADJOIN(MODULE_NAME,C_DecryptUpdate), andre@0: __ADJOIN(MODULE_NAME,C_DecryptFinal), andre@0: __ADJOIN(MODULE_NAME,C_DigestInit), andre@0: __ADJOIN(MODULE_NAME,C_Digest), andre@0: __ADJOIN(MODULE_NAME,C_DigestUpdate), andre@0: __ADJOIN(MODULE_NAME,C_DigestKey), andre@0: __ADJOIN(MODULE_NAME,C_DigestFinal), andre@0: __ADJOIN(MODULE_NAME,C_SignInit), andre@0: __ADJOIN(MODULE_NAME,C_Sign), andre@0: __ADJOIN(MODULE_NAME,C_SignUpdate), andre@0: __ADJOIN(MODULE_NAME,C_SignFinal), andre@0: __ADJOIN(MODULE_NAME,C_SignRecoverInit), andre@0: __ADJOIN(MODULE_NAME,C_SignRecover), andre@0: __ADJOIN(MODULE_NAME,C_VerifyInit), andre@0: __ADJOIN(MODULE_NAME,C_Verify), andre@0: __ADJOIN(MODULE_NAME,C_VerifyUpdate), andre@0: __ADJOIN(MODULE_NAME,C_VerifyFinal), andre@0: __ADJOIN(MODULE_NAME,C_VerifyRecoverInit), andre@0: __ADJOIN(MODULE_NAME,C_VerifyRecover), andre@0: __ADJOIN(MODULE_NAME,C_DigestEncryptUpdate), andre@0: __ADJOIN(MODULE_NAME,C_DecryptDigestUpdate), andre@0: __ADJOIN(MODULE_NAME,C_SignEncryptUpdate), andre@0: __ADJOIN(MODULE_NAME,C_DecryptVerifyUpdate), andre@0: __ADJOIN(MODULE_NAME,C_GenerateKey), andre@0: __ADJOIN(MODULE_NAME,C_GenerateKeyPair), andre@0: __ADJOIN(MODULE_NAME,C_WrapKey), andre@0: __ADJOIN(MODULE_NAME,C_UnwrapKey), andre@0: __ADJOIN(MODULE_NAME,C_DeriveKey), andre@0: __ADJOIN(MODULE_NAME,C_SeedRandom), andre@0: __ADJOIN(MODULE_NAME,C_GenerateRandom), andre@0: __ADJOIN(MODULE_NAME,C_GetFunctionStatus), andre@0: __ADJOIN(MODULE_NAME,C_CancelFunction), andre@0: __ADJOIN(MODULE_NAME,C_WaitForSlotEvent) andre@0: }; andre@0: andre@0: CK_RV CK_ENTRY andre@0: __ADJOIN(MODULE_NAME,C_GetFunctionList) andre@0: ( andre@0: CK_FUNCTION_LIST_PTR_PTR ppFunctionList andre@0: ) andre@0: { andre@0: *ppFunctionList = &FunctionList; andre@0: return CKR_OK; andre@0: } andre@0: andre@0: #ifndef NSS_STATIC andre@0: /* This one is always present */ andre@0: CK_RV CK_ENTRY andre@0: C_GetFunctionList andre@0: ( andre@0: CK_FUNCTION_LIST_PTR_PTR ppFunctionList andre@0: ) andre@0: { andre@0: return __ADJOIN(MODULE_NAME,C_GetFunctionList)(ppFunctionList); andre@0: } andre@0: #endif andre@0: andre@0: #undef __ADJOIN andre@0: