michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef CKFW_H michael@0: #define CKFW_H michael@0: michael@0: /* michael@0: * ckfw.h michael@0: * michael@0: * This file prototypes the private calls of the NSS Cryptoki Framework. michael@0: */ michael@0: michael@0: #ifndef NSSBASET_H michael@0: #include "nssbaset.h" michael@0: #endif /* NSSBASET_H */ michael@0: michael@0: #ifndef NSSCKT_H michael@0: #include "nssckt.h" michael@0: #endif /* NSSCKT_H */ michael@0: michael@0: #ifndef NSSCKFWT_H michael@0: #include "nssckfwt.h" michael@0: #endif /* NSSCKFWT_H */ michael@0: michael@0: #ifndef NSSCKMDT_H michael@0: #include "nssckmdt.h" michael@0: #endif /* NSSCKMDT_H */ michael@0: michael@0: /* michael@0: * NSSCKFWInstance michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWInstance_Create michael@0: * nssCKFWInstance_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWInstance_GetMDInstance michael@0: * nssCKFWInstance_GetArena michael@0: * nssCKFWInstance_MayCreatePthreads michael@0: * nssCKFWInstance_CreateMutex michael@0: * nssCKFWInstance_GetConfigurationData michael@0: * nssCKFWInstance_GetInitArgs michael@0: * michael@0: * -- private accessors -- michael@0: * nssCKFWInstance_CreateSessionHandle michael@0: * nssCKFWInstance_ResolveSessionHandle michael@0: * nssCKFWInstance_DestroySessionHandle michael@0: * nssCKFWInstance_FindSessionHandle michael@0: * nssCKFWInstance_CreateObjectHandle michael@0: * nssCKFWInstance_ResolveObjectHandle michael@0: * nssCKFWInstance_DestroyObjectHandle michael@0: * nssCKFWInstance_FindObjectHandle michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWInstance_GetNSlots michael@0: * nssCKFWInstance_GetCryptokiVersion michael@0: * nssCKFWInstance_GetManufacturerID michael@0: * nssCKFWInstance_GetFlags michael@0: * nssCKFWInstance_GetLibraryDescription michael@0: * nssCKFWInstance_GetLibraryVersion michael@0: * nssCKFWInstance_GetModuleHandlesSessionObjects michael@0: * nssCKFWInstance_GetSlots michael@0: * nssCKFWInstance_WaitForSlotEvent michael@0: * michael@0: * -- debugging versions only -- michael@0: * nssCKFWInstance_verifyPointer michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWInstance_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWInstance * michael@0: nssCKFWInstance_Create michael@0: ( michael@0: CK_C_INITIALIZE_ARGS_PTR pInitArgs, michael@0: CryptokiLockingState LockingState, michael@0: NSSCKMDInstance *mdInstance, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWInstance_Destroy michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetMDInstance michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDInstance * michael@0: nssCKFWInstance_GetMDInstance michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetArena michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSArena * michael@0: nssCKFWInstance_GetArena michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_MayCreatePthreads michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWInstance_MayCreatePthreads michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_CreateMutex michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWMutex * michael@0: nssCKFWInstance_CreateMutex michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSArena *arena, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetConfigurationData michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSUTF8 * michael@0: nssCKFWInstance_GetConfigurationData michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetInitArgs michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_C_INITIALIZE_ARGS_PTR michael@0: nssCKFWInstance_GetInitArgs michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_CreateSessionHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_SESSION_HANDLE michael@0: nssCKFWInstance_CreateSessionHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSCKFWSession *fwSession, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_ResolveSessionHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSession * michael@0: nssCKFWInstance_ResolveSessionHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_SESSION_HANDLE hSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_DestroySessionHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWInstance_DestroySessionHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_SESSION_HANDLE hSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_FindSessionHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_SESSION_HANDLE michael@0: nssCKFWInstance_FindSessionHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_CreateObjectHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_OBJECT_HANDLE michael@0: nssCKFWInstance_CreateObjectHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_ResolveObjectHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWInstance_ResolveObjectHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_OBJECT_HANDLE hObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_ReassignObjectHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWInstance_ReassignObjectHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_OBJECT_HANDLE hObject, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_DestroyObjectHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWInstance_DestroyObjectHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_OBJECT_HANDLE hObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_FindObjectHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_OBJECT_HANDLE michael@0: nssCKFWInstance_FindObjectHandle michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetNSlots michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWInstance_GetNSlots michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetCryptokiVersion michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_VERSION michael@0: nssCKFWInstance_GetCryptokiVersion michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetManufacturerID michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWInstance_GetManufacturerID michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_CHAR manufacturerID[32] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetFlags michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWInstance_GetFlags michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetLibraryDescription michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWInstance_GetLibraryDescription michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_CHAR libraryDescription[32] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetLibraryVersion michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_VERSION michael@0: nssCKFWInstance_GetLibraryVersion michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetModuleHandlesSessionObjects michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWInstance_GetModuleHandlesSessionObjects michael@0: ( michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_GetSlots michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSlot ** michael@0: nssCKFWInstance_GetSlots michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_WaitForSlotEvent michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSlot * michael@0: nssCKFWInstance_WaitForSlotEvent michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_BBOOL block, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWInstance_verifyPointer michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWInstance_verifyPointer michael@0: ( michael@0: const NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: michael@0: /* michael@0: * NSSCKFWSlot michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWSlot_Create michael@0: * nssCKFWSlot_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWSlot_GetMDSlot michael@0: * nssCKFWSlot_GetFWInstance michael@0: * nssCKFWSlot_GetMDInstance michael@0: * michael@0: * -- private accessors -- michael@0: * nssCKFWSlot_GetSlotID michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWSlot_GetSlotDescription michael@0: * nssCKFWSlot_GetManufacturerID michael@0: * nssCKFWSlot_GetTokenPresent michael@0: * nssCKFWSlot_GetRemovableDevice michael@0: * nssCKFWSlot_GetHardwareSlot michael@0: * nssCKFWSlot_GetHardwareVersion michael@0: * nssCKFWSlot_GetFirmwareVersion michael@0: * nssCKFWSlot_GetToken michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWSlot_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSlot * michael@0: nssCKFWSlot_Create michael@0: ( michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSCKMDSlot *mdSlot, michael@0: CK_SLOT_ID slotID, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSlot_Destroy michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetMDSlot michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDSlot * michael@0: nssCKFWSlot_GetMDSlot michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetFWInstance michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKFWInstance * michael@0: nssCKFWSlot_GetFWInstance michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetMDInstance michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDInstance * michael@0: nssCKFWSlot_GetMDInstance michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetSlotID michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_SLOT_ID michael@0: nssCKFWSlot_GetSlotID michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetSlotDescription michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSlot_GetSlotDescription michael@0: ( michael@0: NSSCKFWSlot *fwSlot, michael@0: CK_CHAR slotDescription[64] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetManufacturerID michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSlot_GetManufacturerID michael@0: ( michael@0: NSSCKFWSlot *fwSlot, michael@0: CK_CHAR manufacturerID[32] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetTokenPresent michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWSlot_GetTokenPresent michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetRemovableDevice michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWSlot_GetRemovableDevice michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetHardwareSlot michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWSlot_GetHardwareSlot michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetHardwareVersion michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_VERSION michael@0: nssCKFWSlot_GetHardwareVersion michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetFirmwareVersion michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_VERSION michael@0: nssCKFWSlot_GetFirmwareVersion michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_GetToken michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWToken * michael@0: nssCKFWSlot_GetToken michael@0: ( michael@0: NSSCKFWSlot *fwSlot, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSlot_ClearToken michael@0: * michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWSlot_ClearToken michael@0: ( michael@0: NSSCKFWSlot *fwSlot michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWToken michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWToken_Create michael@0: * nssCKFWToken_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWToken_GetMDToken michael@0: * nssCKFWToken_GetFWSlot michael@0: * nssCKFWToken_GetMDSlot michael@0: * nssCKFWToken_GetSessionState michael@0: * michael@0: * -- private accessors -- michael@0: * nssCKFWToken_SetSessionState michael@0: * nssCKFWToken_RemoveSession michael@0: * nssCKFWToken_CloseAllSessions michael@0: * nssCKFWToken_GetSessionCount michael@0: * nssCKFWToken_GetRwSessionCount michael@0: * nssCKFWToken_GetRoSessionCount michael@0: * nssCKFWToken_GetSessionObjectHash michael@0: * nssCKFWToken_GetMDObjectHash michael@0: * nssCKFWToken_GetObjectHandleHash michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWToken_InitToken michael@0: * nssCKFWToken_GetLabel michael@0: * nssCKFWToken_GetManufacturerID michael@0: * nssCKFWToken_GetModel michael@0: * nssCKFWToken_GetSerialNumber michael@0: * nssCKFWToken_GetHasRNG michael@0: * nssCKFWToken_GetIsWriteProtected michael@0: * nssCKFWToken_GetLoginRequired michael@0: * nssCKFWToken_GetUserPinInitialized michael@0: * nssCKFWToken_GetRestoreKeyNotNeeded michael@0: * nssCKFWToken_GetHasClockOnToken michael@0: * nssCKFWToken_GetHasProtectedAuthenticationPath michael@0: * nssCKFWToken_GetSupportsDualCryptoOperations michael@0: * nssCKFWToken_GetMaxSessionCount michael@0: * nssCKFWToken_GetMaxRwSessionCount michael@0: * nssCKFWToken_GetMaxPinLen michael@0: * nssCKFWToken_GetMinPinLen michael@0: * nssCKFWToken_GetTotalPublicMemory michael@0: * nssCKFWToken_GetFreePublicMemory michael@0: * nssCKFWToken_GetTotalPrivateMemory michael@0: * nssCKFWToken_GetFreePrivateMemory michael@0: * nssCKFWToken_GetHardwareVersion michael@0: * nssCKFWToken_GetFirmwareVersion michael@0: * nssCKFWToken_GetUTCTime michael@0: * nssCKFWToken_OpenSession michael@0: * nssCKFWToken_GetMechanismCount michael@0: * nssCKFWToken_GetMechanismTypes michael@0: * nssCKFWToken_GetMechanism michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWToken_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWToken * michael@0: nssCKFWToken_Create michael@0: ( michael@0: NSSCKFWSlot *fwSlot, michael@0: NSSCKMDToken *mdToken, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_Destroy michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMDToken michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDToken * michael@0: nssCKFWToken_GetMDToken michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetArena michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSArena * michael@0: nssCKFWToken_GetArena michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetFWSlot michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSlot * michael@0: nssCKFWToken_GetFWSlot michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMDSlot michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDSlot * michael@0: nssCKFWToken_GetMDSlot michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetSessionState michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_STATE michael@0: nssCKFWToken_GetSessionState michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_InitToken michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_InitToken michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: NSSItem *pin, michael@0: NSSUTF8 *label michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetLabel michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_GetLabel michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_CHAR label[32] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetManufacturerID michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_GetManufacturerID michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_CHAR manufacturerID[32] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetModel michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_GetModel michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_CHAR model[16] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetSerialNumber michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_GetSerialNumber michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_CHAR serialNumber[16] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetHasRNG michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetHasRNG michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetIsWriteProtected michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetIsWriteProtected michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetLoginRequired michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetLoginRequired michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetUserPinInitialized michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetUserPinInitialized michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetRestoreKeyNotNeeded michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetRestoreKeyNotNeeded michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetHasClockOnToken michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetHasClockOnToken michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetHasProtectedAuthenticationPath michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetHasProtectedAuthenticationPath michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetSupportsDualCryptoOperations michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWToken_GetSupportsDualCryptoOperations michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMaxSessionCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetMaxSessionCount michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMaxRwSessionCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetMaxRwSessionCount michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMaxPinLen michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetMaxPinLen michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMinPinLen michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetMinPinLen michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetTotalPublicMemory michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetTotalPublicMemory michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetFreePublicMemory michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetFreePublicMemory michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetTotalPrivateMemory michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetTotalPrivateMemory michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetFreePrivateMemory michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetFreePrivateMemory michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetHardwareVersion michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_VERSION michael@0: nssCKFWToken_GetHardwareVersion michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetFirmwareVersion michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_VERSION michael@0: nssCKFWToken_GetFirmwareVersion michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetUTCTime michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_GetUTCTime michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_CHAR utcTime[16] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_OpenSession michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSession * michael@0: nssCKFWToken_OpenSession michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_BBOOL rw, michael@0: CK_VOID_PTR pApplication, michael@0: CK_NOTIFY Notify, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMechanismCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetMechanismCount michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMechanismTypes michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_GetMechanismTypes michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_MECHANISM_TYPE types[] michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMechanism michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWMechanism * michael@0: nssCKFWToken_GetMechanism michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_MECHANISM_TYPE which, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_SetSessionState michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_SetSessionState michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_STATE newState michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_RemoveSession michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_RemoveSession michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_CloseAllSessions michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWToken_CloseAllSessions michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetSessionCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetSessionCount michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetRwSessionCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetRwSessionCount michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetRoSessionCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWToken_GetRoSessionCount michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetSessionObjectHash michael@0: * michael@0: */ michael@0: NSS_EXTERN nssCKFWHash * michael@0: nssCKFWToken_GetSessionObjectHash michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetMDObjectHash michael@0: * michael@0: */ michael@0: NSS_EXTERN nssCKFWHash * michael@0: nssCKFWToken_GetMDObjectHash michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWToken_GetObjectHandleHash michael@0: * michael@0: */ michael@0: NSS_EXTERN nssCKFWHash * michael@0: nssCKFWToken_GetObjectHandleHash michael@0: ( michael@0: NSSCKFWToken *fwToken michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWMechanism michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWMechanism_Create michael@0: * nssCKFWMechanism_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWMechanism_GetMDMechanism michael@0: * michael@0: * -- private accessors -- michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWMechanism_GetMinKeySize michael@0: * nssCKFWMechanism_GetMaxKeySize michael@0: * nssCKFWMechanism_GetInHardware michael@0: * nssCKFWMechanism_GetCanEncrypt michael@0: * nssCKFWMechanism_GetCanDecrypt michael@0: * nssCKFWMechanism_GetCanDigest michael@0: * nssCKFWMechanism_GetCanSignRecover michael@0: * nssCKFWMechanism_GetCanVerify michael@0: * nssCKFWMechanism_GetCanVerifyRecover michael@0: * nssCKFWMechanism_GetCanGenerate michael@0: * nssCKFWMechanism_GetCanGenerateKeyPair michael@0: * nssCKFWMechanism_GetCanWrap michael@0: * nssCKFWMechanism_GetCanUnwrap michael@0: * nssCKFWMechanism_GetCanDerive michael@0: * nssCKFWMechanism_EncryptInit michael@0: * nssCKFWMechanism_DecryptInit michael@0: * nssCKFWMechanism_DigestInit michael@0: * nssCKFWMechanism_SignInit michael@0: * nssCKFWMechanism_SignRecoverInit michael@0: * nssCKFWMechanism_VerifyInit michael@0: * nssCKFWMechanism_VerifyRecoverInit michael@0: * nssCKFWMechanism_GenerateKey michael@0: * nssCKFWMechanism_GenerateKeyPair michael@0: * nssCKFWMechanism_GetWrapKeyLength michael@0: * nssCKFWMechanism_WrapKey michael@0: * nssCKFWMechanism_UnwrapKey michael@0: * nssCKFWMechanism_DeriveKey michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWMechanism_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWMechanism * michael@0: nssCKFWMechanism_Create michael@0: ( michael@0: NSSCKMDMechanism *mdMechanism, michael@0: NSSCKMDToken *mdToken, michael@0: NSSCKFWToken *fwToken, michael@0: NSSCKMDInstance *mdInstance, michael@0: NSSCKFWInstance *fwInstance michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWMechanism_Destroy michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetMDMechanism michael@0: * michael@0: */ michael@0: michael@0: NSS_EXTERN NSSCKMDMechanism * michael@0: nssCKFWMechanism_GetMDMechanism michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetMinKeySize michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWMechanism_GetMinKeySize michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetMaxKeySize michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWMechanism_GetMaxKeySize michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetInHardware michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetInHardware michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * the following are determined automatically by which of the cryptographic michael@0: * functions are defined for this mechanism. michael@0: */ michael@0: /* michael@0: * nssCKFWMechanism_GetCanEncrypt michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanEncrypt michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanDecrypt michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanDecrypt michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanDigest michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanDigest michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanSign michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanSign michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanSignRecover michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanSignRecover michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanVerify michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanVerify michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanVerifyRecover michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanVerifyRecover michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanGenerate michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanGenerate michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanGenerateKeyPair michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanGenerateKeyPair michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanWrap michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanWrap michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanUnwrap michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanUnwrap michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetCanDerive michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWMechanism_GetCanDerive michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_EncryptInit michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_EncryptInit michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM *pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_DecryptInit michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_DecryptInit michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM *pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_DigestInit michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_DigestInit michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM *pMechanism, michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_SignInit michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_SignInit michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM *pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_SignRecoverInit michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_SignRecoverInit michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM *pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_VerifyInit michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_VerifyInit michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM *pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_VerifyRecoverInit michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_VerifyRecoverInit michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM *pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GenerateKey michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWMechanism_GenerateKey michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM_PTR pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: CK_ATTRIBUTE_PTR pTemplate, michael@0: CK_ULONG ulAttributeCount, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GenerateKeyPair michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_GenerateKeyPair michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM_PTR pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: CK_ATTRIBUTE_PTR pPublicKeyTemplate, michael@0: CK_ULONG ulPublicKeyAttributeCount, michael@0: CK_ATTRIBUTE_PTR pPrivateKeyTemplate, michael@0: CK_ULONG ulPrivateKeyAttributeCount, michael@0: NSSCKFWObject **fwPublicKeyObject, michael@0: NSSCKFWObject **fwPrivateKeyObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_GetWrapKeyLength michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWMechanism_GetWrapKeyLength michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM_PTR pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwWrappingKeyObject, michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_WrapKey michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMechanism_WrapKey michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM_PTR pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwWrappingKeyObject, michael@0: NSSCKFWObject *fwObject, michael@0: NSSItem *wrappedKey michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_UnwrapKey michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWMechanism_UnwrapKey michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM_PTR pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwWrappingKeyObject, michael@0: NSSItem *wrappedKey, michael@0: CK_ATTRIBUTE_PTR pTemplate, michael@0: CK_ULONG ulAttributeCount, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMechanism_DeriveKey michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWMechanism_DeriveKey michael@0: ( michael@0: NSSCKFWMechanism *fwMechanism, michael@0: CK_MECHANISM_PTR pMechanism, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwBaseKeyObject, michael@0: CK_ATTRIBUTE_PTR pTemplate, michael@0: CK_ULONG ulAttributeCount, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWCryptoOperation michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWCryptoOperation_Create michael@0: * nssCKFWCryptoOperation_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWCryptoOperation_GetMDCryptoOperation michael@0: * nssCKFWCryptoOperation_GetType michael@0: * michael@0: * -- private accessors -- michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWCryptoOperation_GetFinalLength michael@0: * nssCKFWCryptoOperation_GetOperationLength michael@0: * nssCKFWCryptoOperation_Final michael@0: * nssCKFWCryptoOperation_Update michael@0: * nssCKFWCryptoOperation_DigestUpdate michael@0: * nssCKFWCryptoOperation_DigestKey michael@0: * nssCKFWCryptoOperation_UpdateFinal michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWCrytoOperation_Create michael@0: */ michael@0: NSS_EXTERN NSSCKFWCryptoOperation * michael@0: nssCKFWCryptoOperation_Create michael@0: ( michael@0: NSSCKMDCryptoOperation *mdOperation, michael@0: NSSCKMDSession *mdSession, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKMDToken *mdToken, michael@0: NSSCKFWToken *fwToken, michael@0: NSSCKMDInstance *mdInstance, michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSCKFWCryptoOperationType type, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_Destroy michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWCryptoOperation_Destroy michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_GetMDCryptoOperation michael@0: */ michael@0: NSS_EXTERN NSSCKMDCryptoOperation * michael@0: nssCKFWCryptoOperation_GetMDCryptoOperation michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_GetType michael@0: */ michael@0: NSS_EXTERN NSSCKFWCryptoOperationType michael@0: nssCKFWCryptoOperation_GetType michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_GetFinalLength michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWCryptoOperation_GetFinalLength michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_GetOperationLength michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWCryptoOperation_GetOperationLength michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: NSSItem *inputBuffer, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_Final michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWCryptoOperation_Final michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: NSSItem *outputBuffer michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_Update michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWCryptoOperation_Update michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: NSSItem *inputBuffer, michael@0: NSSItem *outputBuffer michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_DigestUpdate michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWCryptoOperation_DigestUpdate michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: NSSItem *inputBuffer michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_DigestKey michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWCryptoOperation_DigestKey michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: NSSCKFWObject *fwKey michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_UpdateFinal michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWCryptoOperation_UpdateFinal michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: NSSItem *inputBuffer, michael@0: NSSItem *outputBuffer michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWCryptoOperation_UpdateCombo michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWCryptoOperation_UpdateCombo michael@0: ( michael@0: NSSCKFWCryptoOperation *fwOperation, michael@0: NSSCKFWCryptoOperation *fwPeerOperation, michael@0: NSSItem *inputBuffer, michael@0: NSSItem *outputBuffer michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWSession michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWSession_Create michael@0: * nssCKFWSession_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWSession_GetMDSession michael@0: * nssCKFWSession_GetArena michael@0: * nssCKFWSession_CallNotification michael@0: * nssCKFWSession_IsRWSession michael@0: * nssCKFWSession_IsSO michael@0: * nssCKFWSession_GetCurrentCryptoOperation michael@0: * michael@0: * -- private accessors -- michael@0: * nssCKFWSession_GetFWSlot michael@0: * nssCKFWSession_GetSessionState michael@0: * nssCKFWSession_SetFWFindObjects michael@0: * nssCKFWSession_GetFWFindObjects michael@0: * nssCKFWSession_SetMDSession michael@0: * nssCKFWSession_SetHandle michael@0: * nssCKFWSession_GetHandle michael@0: * nssCKFWSession_RegisterSessionObject michael@0: * nssCKFWSession_DeregisterSessionObject michael@0: * nssCKFWSession_SetCurrentCryptoOperation michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWSession_GetDeviceError michael@0: * nssCKFWSession_Login michael@0: * nssCKFWSession_Logout michael@0: * nssCKFWSession_InitPIN michael@0: * nssCKFWSession_SetPIN michael@0: * nssCKFWSession_GetOperationStateLen michael@0: * nssCKFWSession_GetOperationState michael@0: * nssCKFWSession_SetOperationState michael@0: * nssCKFWSession_CreateObject michael@0: * nssCKFWSession_CopyObject michael@0: * nssCKFWSession_FindObjectsInit michael@0: * nssCKFWSession_SeedRandom michael@0: * nssCKFWSession_GetRandom michael@0: * nssCKFWSession_Final michael@0: * nssCKFWSession_Update michael@0: * nssCKFWSession_DigestUpdate michael@0: * nssCKFWSession_DigestKey michael@0: * nssCKFWSession_UpdateFinal michael@0: * nssCKFWSession_UpdateCombo michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWSession_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSession * michael@0: nssCKFWSession_Create michael@0: ( michael@0: NSSCKFWToken *fwToken, michael@0: CK_BBOOL rw, michael@0: CK_VOID_PTR pApplication, michael@0: CK_NOTIFY Notify, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_Destroy michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_BBOOL removeFromTokenHash michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetMDSession michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDSession * michael@0: nssCKFWSession_GetMDSession michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetArena michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSArena * michael@0: nssCKFWSession_GetArena michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_CallNotification michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_CallNotification michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_NOTIFICATION event michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_IsRWSession michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWSession_IsRWSession michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_IsSO michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWSession_IsSO michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetFWSlot michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWSlot * michael@0: nssCKFWSession_GetFWSlot michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCFKWSession_GetSessionState michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_STATE michael@0: nssCKFWSession_GetSessionState michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_SetFWFindObjects michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_SetFWFindObjects michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWFindObjects *fwFindObjects michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetFWFindObjects michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWFindObjects * michael@0: nssCKFWSession_GetFWFindObjects michael@0: ( michael@0: NSSCKFWSession *fwSesssion, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_SetMDSession michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_SetMDSession michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKMDSession *mdSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_SetHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_SetHandle michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_SESSION_HANDLE hSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_SESSION_HANDLE michael@0: nssCKFWSession_GetHandle michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_RegisterSessionObject michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_RegisterSessionObject michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_DeregisterSessionObject michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_DeregisterSessionObject michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetDeviceError michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWSession_GetDeviceError michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_Login michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_Login michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_USER_TYPE userType, michael@0: NSSItem *pin michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_Logout michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_Logout michael@0: ( michael@0: NSSCKFWSession *fwSession michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_InitPIN michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_InitPIN michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSItem *pin michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_SetPIN michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_SetPIN michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSItem *newPin, michael@0: NSSItem *oldPin michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetOperationStateLen michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWSession_GetOperationStateLen michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetOperationState michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_GetOperationState michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSItem *buffer michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_SetOperationState michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_SetOperationState michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSItem *state, michael@0: NSSCKFWObject *encryptionKey, michael@0: NSSCKFWObject *authenticationKey michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_CreateObject michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWSession_CreateObject michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_ATTRIBUTE_PTR pTemplate, michael@0: CK_ULONG ulAttributeCount, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_CopyObject michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWSession_CopyObject michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *object, michael@0: CK_ATTRIBUTE_PTR pTemplate, michael@0: CK_ULONG ulAttributeCount, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_FindObjectsInit michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWFindObjects * michael@0: nssCKFWSession_FindObjectsInit michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: CK_ATTRIBUTE_PTR pTemplate, michael@0: CK_ULONG ulAttributeCount, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_SetCurrentCryptoOperation michael@0: */ michael@0: NSS_IMPLEMENT void michael@0: nssCKFWSession_SetCurrentCryptoOperation michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperation * fwOperation, michael@0: NSSCKFWCryptoOperationState state michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetCurrentCryptoOperation michael@0: */ michael@0: NSS_IMPLEMENT NSSCKFWCryptoOperation * michael@0: nssCKFWSession_GetCurrentCryptoOperation michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperationState state michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_Final michael@0: * (terminate a cryptographic operation and get the result) michael@0: */ michael@0: NSS_IMPLEMENT CK_RV michael@0: nssCKFWSession_Final michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperationType type, michael@0: NSSCKFWCryptoOperationState state, michael@0: CK_BYTE_PTR outBuf, michael@0: CK_ULONG_PTR outBufLen michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_Update michael@0: * (get the next step of an encrypt/decrypt operation) michael@0: */ michael@0: NSS_IMPLEMENT CK_RV michael@0: nssCKFWSession_Update michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperationType type, michael@0: NSSCKFWCryptoOperationState state, michael@0: CK_BYTE_PTR inBuf, michael@0: CK_ULONG inBufLen, michael@0: CK_BYTE_PTR outBuf, michael@0: CK_ULONG_PTR outBufLen michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_DigestUpdate michael@0: * (do the next step of an digest/sign/verify operation) michael@0: */ michael@0: NSS_IMPLEMENT CK_RV michael@0: nssCKFWSession_DigestUpdate michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperationType type, michael@0: NSSCKFWCryptoOperationState state, michael@0: CK_BYTE_PTR inBuf, michael@0: CK_ULONG inBufLen michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_DigestKey michael@0: * (do the next step of an digest/sign/verify operation) michael@0: */ michael@0: NSS_IMPLEMENT CK_RV michael@0: nssCKFWSession_DigestKey michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWObject *fwKey michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_UpdateFinal michael@0: * (do a single-step of a cryptographic operation and get the result) michael@0: */ michael@0: NSS_IMPLEMENT CK_RV michael@0: nssCKFWSession_UpdateFinal michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperationType type, michael@0: NSSCKFWCryptoOperationState state, michael@0: CK_BYTE_PTR inBuf, michael@0: CK_ULONG inBufLen, michael@0: CK_BYTE_PTR outBuf, michael@0: CK_ULONG_PTR outBufLen michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_UpdateCombo michael@0: * (do a combination encrypt/decrypt and sign/digest/verify operation) michael@0: */ michael@0: NSS_IMPLEMENT CK_RV michael@0: nssCKFWSession_UpdateCombo michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWCryptoOperationType encryptType, michael@0: NSSCKFWCryptoOperationType digestType, michael@0: NSSCKFWCryptoOperationState digestState, michael@0: CK_BYTE_PTR inBuf, michael@0: CK_ULONG inBufLen, michael@0: CK_BYTE_PTR outBuf, michael@0: CK_ULONG_PTR outBufLen michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_SeedRandom michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_SeedRandom michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSItem *seed michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWSession_GetRandom michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWSession_GetRandom michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSItem *buffer michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWObject michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWObject_Create michael@0: * nssCKFWObject_Finalize michael@0: * nssCKFWObject_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWObject_GetMDObject michael@0: * nssCKFWObject_GetArena michael@0: * michael@0: * -- private accessors -- michael@0: * nssCKFWObject_SetHandle michael@0: * nssCKFWObject_GetHandle michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWObject_IsTokenObject michael@0: * nssCKFWObject_GetAttributeCount michael@0: * nssCKFWObject_GetAttributeTypes michael@0: * nssCKFWObject_GetAttributeSize michael@0: * nssCKFWObject_GetAttribute michael@0: * nssCKFWObject_SetAttribute michael@0: * nssCKFWObject_GetObjectSize michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWObject_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWObject_Create michael@0: ( michael@0: NSSArena *arena, michael@0: NSSCKMDObject *mdObject, michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWToken *fwToken, michael@0: NSSCKFWInstance *fwInstance, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_Finalize michael@0: * michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWObject_Finalize michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: PRBool removeFromHash michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWObject_Destroy michael@0: ( michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetMDObject michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDObject * michael@0: nssCKFWObject_GetMDObject michael@0: ( michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetArena michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSArena * michael@0: nssCKFWObject_GetArena michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_SetHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWObject_SetHandle michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_OBJECT_HANDLE hObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetHandle michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_OBJECT_HANDLE michael@0: nssCKFWObject_GetHandle michael@0: ( michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_IsTokenObject michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_BBOOL michael@0: nssCKFWObject_IsTokenObject michael@0: ( michael@0: NSSCKFWObject *fwObject michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetAttributeCount michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWObject_GetAttributeCount michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetAttributeTypes michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWObject_GetAttributeTypes michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_ATTRIBUTE_TYPE_PTR typeArray, michael@0: CK_ULONG ulCount michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetAttributeSize michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWObject_GetAttributeSize michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_ATTRIBUTE_TYPE attribute, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetAttribute michael@0: * michael@0: * Usual NSS allocation rules: michael@0: * If itemOpt is not NULL, it will be returned; otherwise an NSSItem michael@0: * will be allocated. If itemOpt is not NULL but itemOpt->data is, michael@0: * the buffer will be allocated; otherwise, the buffer will be used. michael@0: * Any allocations will come from the optional arena, if one is michael@0: * specified. michael@0: */ michael@0: NSS_EXTERN NSSItem * michael@0: nssCKFWObject_GetAttribute michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_ATTRIBUTE_TYPE attribute, michael@0: NSSItem *itemOpt, michael@0: NSSArena *arenaOpt, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_SetAttribute michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWObject_SetAttribute michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: NSSCKFWSession *fwSession, michael@0: CK_ATTRIBUTE_TYPE attribute, michael@0: NSSItem *value michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWObject_GetObjectSize michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_ULONG michael@0: nssCKFWObject_GetObjectSize michael@0: ( michael@0: NSSCKFWObject *fwObject, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWFindObjects michael@0: * michael@0: * -- create/destroy -- michael@0: * nssCKFWFindObjects_Create michael@0: * nssCKFWFindObjects_Destroy michael@0: * michael@0: * -- implement public accessors -- michael@0: * nssCKFWFindObjects_GetMDFindObjects michael@0: * michael@0: * -- private accessors -- michael@0: * michael@0: * -- module fronts -- michael@0: * nssCKFWFindObjects_Next michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWFindObjects_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWFindObjects * michael@0: nssCKFWFindObjects_Create michael@0: ( michael@0: NSSCKFWSession *fwSession, michael@0: NSSCKFWToken *fwToken, michael@0: NSSCKFWInstance *fwInstance, michael@0: NSSCKMDFindObjects *mdFindObjects1, michael@0: NSSCKMDFindObjects *mdFindObjects2, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWFindObjects_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN void michael@0: nssCKFWFindObjects_Destroy michael@0: ( michael@0: NSSCKFWFindObjects *fwFindObjects michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWFindObjects_GetMDFindObjects michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKMDFindObjects * michael@0: nssCKFWFindObjects_GetMDFindObjects michael@0: ( michael@0: NSSCKFWFindObjects *fwFindObjects michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWFindObjects_Next michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWObject * michael@0: nssCKFWFindObjects_Next michael@0: ( michael@0: NSSCKFWFindObjects *fwFindObjects, michael@0: NSSArena *arenaOpt, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * NSSCKFWMutex michael@0: * michael@0: * nssCKFWMutex_Create michael@0: * nssCKFWMutex_Destroy michael@0: * nssCKFWMutex_Lock michael@0: * nssCKFWMutex_Unlock michael@0: * michael@0: */ michael@0: michael@0: /* michael@0: * nssCKFWMutex_Create michael@0: * michael@0: */ michael@0: NSS_EXTERN NSSCKFWMutex * michael@0: nssCKFWMutex_Create michael@0: ( michael@0: CK_C_INITIALIZE_ARGS_PTR pInitArgs, michael@0: CryptokiLockingState LockingState, michael@0: NSSArena *arena, michael@0: CK_RV *pError michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMutex_Destroy michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMutex_Destroy michael@0: ( michael@0: NSSCKFWMutex *mutex michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMutex_Lock michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMutex_Lock michael@0: ( michael@0: NSSCKFWMutex *mutex michael@0: ); michael@0: michael@0: /* michael@0: * nssCKFWMutex_Unlock michael@0: * michael@0: */ michael@0: NSS_EXTERN CK_RV michael@0: nssCKFWMutex_Unlock michael@0: ( michael@0: NSSCKFWMutex *mutex michael@0: ); michael@0: michael@0: #endif /* CKFW_H */