Cprov function patching helper function

This section contains information about Cprov function patching operations.

The function patching is performed using a structure named CprovFnTable_t (defined in header file cprovtbl.h). The structure contains the number of functions in the table – which can be used as a structure version, the addresses of the standard Cprov functions, and SafeNet extended functions.

The functions in the table are named the same as the actual functions; C_Initialize function pointer is named C_Initialize in the structure. The order and place of the function pointers in the structure are guaranteed to be preserved indefinitely, even if PKCS #11 functions are extended, or more proprietary functions are added to the firmware. This contract allows for binary compatibility of FMs in future releases of the HSM firmware.

OS_GetCprovFuncTable

This function is used to obtain the address of Cprov function table structure, used by the Cprov Filter component in the firmware. Changing the addresses of functions in the structure allows custom functions to be called when a Cprov function is requested from the host side. The Cprov functions called from the FM bypass the Cprov filter, calling the functions in the firmware directly.

Synopsis

#include <cprovpch.h>
CprovFnTable_t *OS_GetCprovFuncTable(void);  

Return Code

The address of the Cprov function table structure. It will never be NULL.