FMSC_SendReceive

This is an extended function supporting custom Functionality Module (FM) calls through cryptoki. Previously, PKCS-patched FMs were invoked through the cryptoki interface while Custom FMs were invoked through the Message Dispatcher interface (ETHSM). With this new API, Custom FMs can be called directly through the cryptoki interface. Also, custom FM calls can now use features such as:

>Secure Messaging - requests are sent/received in encrypted form

>High Availability/Work Load Distribution - WLD can now be used with FMs

Summary

CK_RV FMSC_SendReceive(
        CK_SESSION_HANDLE hSession,
        CK_USHORT fmNumber,
        CK_BYTE_PTR pRequest,
        CK_ULONG requestLen,
        CK_BYTE_PTR pResponse,
        CK_ULONG responseLen,
        CK_ULONG_PTR pReceivedLen,
        uint32 *pfmStatus
);

Header File

ctfext.h

Parameter Description
hSession Session handle to be associated with the request.
fmNumber Identifies the FM number this message is intended for. Make sure it matches the FM number defined in the FM application.
pRequest Pointer to request buffer.
prequestLen Number of bytes in the request.
pResponse When the function returns, the response from the FM is contained in these buffers.
responseLen Length of the initialized response buffer in bytes
pReceivedLen Actual length of response received from the FM.
pfmStatus Status code returned by the FM.

In addition to the standard PKCS#11 and extended function codes, the function can return:

Return Code Description
CKR_FM_NOT_REGISTERED 'fmNumber' presented in this call is not registered/loaded.
CKR_FM_DISPATCH_BLOCKED Message dispatching on FM is blocked.

Please see About the FM SDK Programming Guide for a full description of FM development. A sample is provided along with the FM SDK to demonstrate the function of this API.