Feature notes: PKIX / CMS implementation notes
major: CK_BYTE;
minor: CK_BYTE;
cryptokiVersion : CK_VERSION;
manufacturerID : array [0..31] of CK_UTF8CHAR;
flags : CK_FLAGS;
libraryDescription: array [0..31] of CK_UTF8CHAR;
libraryVersion : CK_VERSION;
slotDescription: array [0..63] of CK_UTF8CHAR;
manufacturerID : array [0..31] of CK_UTF8CHAR;
flags : CK_FLAGS;
hardwareVersion: CK_VERSION;
firmwareVersion: CK_VERSION;
'label' is a reserved word in Delphi, hence tokenLabel for the C "label".
tokenLabel : array [0..31] of CK_UTF8CHAR;
manufacturerID : array [0..31] of CK_UTF8CHAR;
model : array [0..15] of CK_UTF8CHAR;
serialNumber : array [0..15] of CK_CHAR;
flags : CK_FLAGS;
ulMaxSessionCount : CK_ULONG;
ulSessionCount : CK_ULONG;
ulMaxRwSessionCount : CK_ULONG;
ulRwSessionCount : CK_ULONG;
ulMaxPinLen : CK_ULONG;
ulMinPinLen : CK_ULONG;
ulTotalPublicMemory : CK_ULONG;
ulFreePublicMemory : CK_ULONG;
ulTotalPrivateMemory: CK_ULONG;
ulFreePrivateMemory : CK_ULONG;
hardwareVersion : CK_VERSION;
firmwareVersion : CK_VERSION;
utcTime : array [0..15] of CK_CHAR;
ulMinKeySize: CK_ULONG;
ulMaxKeySize: CK_ULONG;
flags : CK_FLAGS;
_type : CK_ATTRIBUTE_TYPE;
pValue : Pointer;
ulValueLen: CK_ULONG;
mechanism : CK_MECHANISM_TYPE;
pParameter : Pointer;
ulParameterLen: CK_ULONG;
slotID : CK_SLOT_ID;
state : CK_STATE;
flags : CK_FLAGS;
ulDeviceError: CK_ULONG;
CreateMutex : Pointer;
DestroyMutex: Pointer;
LockMutex : Pointer;
UnlockMutex : Pointer;
flags : CK_FLAGS;
pReserved : Pointer;
hashAlg: CK_MECHANISM_TYPE;
mgf : CK_ULONG;
sLen : CK_ULONG;
hashAlg : CK_MECHANISM_TYPE;
mgf : CK_ULONG;
source : CK_ULONG;
pSourceData : Pointer;
ulSourceDataLen: CK_ULONG;
The full v2.40 function list, in wire order. Entries the library does not need yet are declared as Pointer so the offsets of the ones it does need stay correct; the C name is kept in a comment against each so promoting one to a typed field later is a local edit.
version : CK_VERSION;
C_Initialize : CK_C_Initialize;
C_Finalize : CK_C_Finalize;
C_GetInfo : CK_C_GetInfo;
C_GetFunctionList : CK_C_GetFunctionList;
C_GetSlotList : CK_C_GetSlotList;
C_GetSlotInfo : CK_C_GetSlotInfo;
C_GetTokenInfo : CK_C_GetTokenInfo;
C_GetMechanismList : CK_C_GetMechanismList;
C_GetMechanismInfo : CK_C_GetMechanismInfo;
C_InitToken : Pointer;
C_InitPIN : Pointer;
C_SetPIN : Pointer;
C_OpenSession : CK_C_OpenSession;
C_CloseSession : CK_C_CloseSession;
C_CloseAllSessions : Pointer;
C_GetSessionInfo : Pointer;
C_GetOperationState : Pointer;
C_SetOperationState : Pointer;
C_Login : CK_C_Login;
C_Logout : CK_C_Logout;
C_CreateObject : CK_C_CreateObject;
C_CopyObject : Pointer;
C_DestroyObject : CK_C_DestroyObject;
C_GetObjectSize : Pointer;
C_GetAttributeValue : CK_C_GetAttributeValue;
C_SetAttributeValue : Pointer;
C_FindObjectsInit : CK_C_FindObjectsInit;
C_FindObjects : CK_C_FindObjects;
C_FindObjectsFinal : CK_C_FindObjectsFinal;
C_EncryptInit : Pointer;
C_Encrypt : Pointer;
C_EncryptUpdate : Pointer;
C_EncryptFinal : Pointer;
C_DecryptInit : CK_C_DecryptInit;
C_Decrypt : CK_C_Decrypt;
C_DecryptUpdate : Pointer;
C_DecryptFinal : Pointer;
C_DigestInit : Pointer;
C_Digest : Pointer;
C_DigestUpdate : Pointer;
C_DigestKey : Pointer;
C_DigestFinal : Pointer;
C_SignInit : CK_C_SignInit;
C_Sign : CK_C_Sign;
C_SignUpdate : Pointer;
C_SignFinal : Pointer;
C_SignRecoverInit : Pointer;
C_SignRecover : Pointer;
C_VerifyInit : Pointer;
C_Verify : Pointer;
C_VerifyUpdate : Pointer;
C_VerifyFinal : Pointer;
C_VerifyRecoverInit : Pointer;
C_VerifyRecover : Pointer;
C_DigestEncryptUpdate : Pointer;
C_DecryptDigestUpdate : Pointer;
C_SignEncryptUpdate : Pointer;
C_DecryptVerifyUpdate : Pointer;
C_GenerateKey : Pointer;
C_GenerateKeyPair : CK_C_GenerateKeyPair;
C_WrapKey : Pointer;
C_UnwrapKey : Pointer;
C_DeriveKey : Pointer;
C_SeedRandom : Pointer;
C_GenerateRandom : CK_C_GenerateRandom;
C_GetFunctionStatus : Pointer;
C_CancelFunction : Pointer;
C_WaitForSlotEvent : Pointer;
inherits from Exception
(no public members)
Loads a Cryptoki module and resolves its function list. Owns neither the session nor the login state: this class is the transport, and everything above it (key adapter, key storage) is built on FuncList.
Deliberately NOT a TComponent -- a design-time surface belongs on the key storage that consumes this, not on the raw module handle.
constructor Create;
destructor Destroy; override;
procedure Load(const aModulePath: string);
function Initialize: CK_RV;
procedure Unload;
property FuncList: pCK_FUNCTION_LIST read fFuncList;
property ModulePath: string read fModulePath;
property OSLocking: Boolean read fOSLocking;