CA_SendFMRequestSession

Dispatches a message over a Cryptoki session – will use HA to choose HSM/slot.

In HA mode any objects created by the command i.e. any new object handles returned, will be replicated and assigned a virtual object handle.

If the FM does not want this behavior (because it wants to create a temporary object) then it should not return the object handle in the response.

NOTE   On the next startup the object will be detected and replicated so you should only try to hide session objects.

In non HA mode it sends the request to the slot associated with the session.

The mechanism, attribute template and object handles in and out are all optional.

If they are not used then the function operates similar to the MD_SendReceive().

CK_RV CA_SendFMRequestSession( CK_SESSION_HANDLE hVirtualSession,
CK_ULONG  operation,
 
CK_MECHANISM_PTR mechanism,// may be NULL
CK_ATTRIBUTE_PTR pTemplate,
CK_ULONG  templateCount,// may be zero
CK_OBJECT_HANDLE_PTR pObjectIn,
CK_ULONG_PTR  objectCountIn,// may be zero
CK_VOID_PTR inData,
CK_ULONG inDataLen, // may be zero
 
CK_OBJECT_HANDLE_PTR pObjectOut,
CK_ULONG_PTR  objectCountOut,// IN/OUT: may be NULL
CK_VOID * out, 
CK_ULONG_PTR outLength// IN/OUT: may be NULL
); 

NOTE   If no FM is available to process the request then an error is returned.