CA_GetActualSlotList

Provides the operator info about the underlying slots and HSMs. The returned values can be used with CA_SendFMRequestDirect and MD_SendReceive().

To explain: each HSM has its own slot list – these are the HSM slot numbers. The Cryptoki library collects these together and creates a new list we call the actual slot list (or ‘collected’ slot list). When the library operates in HA mode it combines some of the actual slots into a single ‘virtual slot’ number.

This function takes slot ID returned from C_GetSlotList and converts it to a list of one or more ‘actual’ slot IDs and corresponding HSM index.

If the Cryptoki is not running in HA mode then only one result is returned containing the same ‘actual’ slot ID as the value passed in (plus that slots corresponding HSM index).

typedef struct {
    CK_ULONG hsmIdx;// index value to use with MD_SendReceive
    CK_SLOT_ID actualSlotID;// ‘collected’ slot number
} CA_SlotInfo_t;
CA_GetActualSlotList( CK_SLOT_ID slotID,  // virtual or actual slot id
CA_SlotInfo_t * pInfo, a  // may be NULL for length prediction
CK_ULONG_PTR outcount  // IN/OUT: array size/outCount
);