CSP_EventNotify
CSSM_RETURN CSSMSPI CSP_EventNotify
(CSSM_CSP_HANDLE CSPHandle,
const CSSM_EVENT_TYPE Event,
const uint32 Param)
Called by the CSSM when an event that could impact the internal state of a CSP takes place.
- CSPHandle (input)
The handle that describes the add-in cryptographic service provider module used to perform up calls to CSSM for the memory functions managed by CSSM.
- Event (input)
One of the event types listed below.
- Param (input)
This value will vary depending on the type of event. In the case where no parameter is required, this value will be zero.
The return value from this function has varying effects based on the event type. In most cases the value CSSM_OK should be returned so indicate that the CSSM can continue. The value CSSM_FAIL should be returned in cases of fatal errors within the CSP.Event Types:
- CSSM_EVENT_ATTACH
An attach to the token is taking place. The CSP handle passed to the function is the new handle that will be returned to the application. This event will take place after the initial call to CSP_Initialize. Returning CSSM_FAIL results in a failure of the CSSM_CSP_Attach call.
- CSSM_EVENT_DETACH
A detach from the token is taking place. The CSP handle passed to the function is a handle that will have been the subject of a previous CSSM_EVENT_ATTACH event. This event will take place immediately before the call to CSP_Uninitialize when the handle being detached is the only handle associated with that CSP. Returning CSSM_FAIL has no effect.
- CSSM_EVENT_INFOATTACH
An attach to the token is taking place in order to get the capabilities list for the CSP. The CSP handle passed to the function is a temporary handle created for the specific purpose of calling CSP_GetCapabilities. This event will take place without a call to CSP_Initialize. When this event is received, only the minimal amount of initialization required to successfully perform a CSP_GetCapabilities call should be performed. Returning CSSM_FAIL results in a failure of the attach.
- CSSM_EVENT_INFODETACH
A detach from the token is taking place. The CSP handle passed to the function is a handle that will have been the subject of a previous CSSM_EVENT_INFOATTACH event. This event will never be followed by a call to CSP_Uninitialize when the handle being detached is the only handle associated with that CSP. Returning CSSM_FAIL has no effect.
CSP_GetCapabilities, CSSM_CSP_Attach, CSSM_CSP_Detach
Contents | Next section | Index |