Port Specific File Access functions for PKCS #11. More...
Go to the source code of this file.
Functions | |
CK_RV | PKCS11_PAL_Initialize (void) |
Initializes the PKCS #11 PAL. | |
CK_OBJECT_HANDLE | PKCS11_PAL_SaveObject (CK_ATTRIBUTE_PTR pxLabel, CK_BYTE_PTR pucData, CK_ULONG ulDataSize) |
Saves an object in non-volatile storage. | |
CK_RV | PKCS11_PAL_DestroyObject (CK_OBJECT_HANDLE xHandle) |
Delete an object from NVM. | |
CK_OBJECT_HANDLE | PKCS11_PAL_FindObject (CK_BYTE_PTR pxLabel, CK_ULONG usLength) |
Translates a PKCS #11 label into an object handle. | |
CK_RV | PKCS11_PAL_GetObjectValue (CK_OBJECT_HANDLE xHandle, CK_BYTE_PTR *ppucData, CK_ULONG_PTR pulDataSize, CK_BBOOL *pIsPrivate) |
Gets the value of an object in storage, by handle. | |
void | PKCS11_PAL_GetObjectValueCleanup (CK_BYTE_PTR pucData, CK_ULONG ulDataSize) |
Cleanup after PKCS11_GetObjectValue(). | |
Port Specific File Access functions for PKCS #11.
CK_RV PKCS11_PAL_Initialize | ( | void | ) |
Initializes the PKCS #11 PAL.
This is always called first in C_Initialize if the module is not already initialized.
CK_OBJECT_HANDLE PKCS11_PAL_SaveObject | ( | CK_ATTRIBUTE_PTR | pxLabel, |
CK_BYTE_PTR | pucData, | ||
CK_ULONG | ulDataSize | ||
) |
Saves an object in non-volatile storage.
Port-specific file write for cryptographic information.
[in] | pxLabel | Attribute containing label of the object to be stored. |
[in] | pucData | The object data to be saved. |
[in] | ulDataSize | Size (in bytes) of object data. |
CK_RV PKCS11_PAL_DestroyObject | ( | CK_OBJECT_HANDLE | xHandle | ) |
Delete an object from NVM.
[in] | xHandle | Handle to a PKCS #11 object. |
CK_OBJECT_HANDLE PKCS11_PAL_FindObject | ( | CK_BYTE_PTR | pxLabel, |
CK_ULONG | usLength | ||
) |
Translates a PKCS #11 label into an object handle.
Port-specific object handle retrieval.
[in] | pxLabel | Pointer to the label of the object who's handle should be found. |
[in] | usLength | The length of the label, in bytes. |
CK_RV PKCS11_PAL_GetObjectValue | ( | CK_OBJECT_HANDLE | xHandle, |
CK_BYTE_PTR * | ppucData, | ||
CK_ULONG_PTR | pulDataSize, | ||
CK_BBOOL * | pIsPrivate | ||
) |
Gets the value of an object in storage, by handle.
Port-specific file access for cryptographic information.
This call dynamically allocates the buffer which object value data is copied into. PKCS11_PAL_GetObjectValueCleanup() should be called after each use to free the dynamically allocated buffer.
[in] | xHandle | The PKCS #11 object handle of the object to get the value of. |
[out] | ppucData | Pointer to buffer for file data. |
[out] | pulDataSize | Size (in bytes) of data located in file. |
[out] | pIsPrivate | Boolean indicating if value is private (CK_TRUE) or exportable (CK_FALSE) |
void PKCS11_PAL_GetObjectValueCleanup | ( | CK_BYTE_PTR | pucData, |
CK_ULONG | ulDataSize | ||
) |
Cleanup after PKCS11_GetObjectValue().
[in] | pucData | The buffer to free. (*ppucData from PKCS11_PAL_GetObjectValue()) |
[in] | ulDataSize | The length of the buffer to free. (*pulDataSize from PKCS11_PAL_GetObjectValue()) |