HP Open Source Security for OpenVMS Volume 1: Common Data Security Architecture > CDSA API Functions

CSP_EventNotify

 » Table of Contents

 » Glossary

 » Index

NAME

CSP_EventNotify — Notify service module of a context event

SYNOPSIS

# include <cssm.h>
CSSM_RETURN CSSMSPI CSP_EventNotify
(CSSM_MODULE_HANDLE CSPHandle,
CSSM_CONTEXT_EVENT Event,
CSSM_CC_HANDLE CCHandle,
const CSSM_CONTEXT *Context)

The CSP_EventNotify( ) function is used by the CSSM Core to interact with the CSP module. Because this function is exposed to CSSM only as a function pointer, the function name internal to the CSP can be assigned at the discretion of the CSP module developer. However, the parameter list and return value types must match those defined for this function.

PARAMETERS

CSPHandle (input)
  

The handle that describes the add-in Cryptographic Service Provider module used to perform calls to CSSM for the memory functions managed by CSSM.

Event (input) 

One of the following event types listed:

EventDescription
CSSM_CONTEXT_EVENT_CREATEA caller using this module attach handle has created a new cryptographic context using CSSM_Create***Context.
CSSM_CONTEXT_EVENT_DELETE A caller using this module attach handle has deleted a cryptographic context using CSSM_DeleteContext().
CSSM_CONTEXT_EVENT_UPDATEA caller using this module attach handle has updated an existing cryptographic context.
CCHandle (input) 

The cryptographic context handle for the context affected by the event.

Context 

A pointer to the cryptographic context affected by the event. The results of the event are visible in the context.

DESCRIPTION

This function is used to notify the service module of a context event related to a particular attach handle. Valid events include creation, deletion, or modification of a cryptographic context. The service module can examine the new or modified context referenced by pContext to determine whether the context is acceptable to the service module.

If the cryptographic context is acceptable (if the service module examines the contents of the context only upon use of the context), then the service module should return CSSM_OK. If the cryptographic context is not acceptable, then the service module should return CSSM_FAIL.

Upon receiving a return value of CSSM_OK, CSSM completes the operation signaled by this event and returns to the calling application. If the return value is CSSM_FAIL, CSSM deletes a newly created context or modifications to an existing context, and returns the failed result to the calling application. When deleting a cryptographic context, CSSM always returns success to the calling application.

RETURN VALUE

A CSSM_RETURN value indicating success or specifying a particular error condition. The value CSSM_OK indicates success. All other values represent an error condition.

SEE ALSO

Books

Intel CDSA Application Developer's Guide

Online Help

Functions:

CSSM_CSP_CreateSignatureContext, CSSM_CSP_CreateDigestContext, CSSM_CSP_CreateSymmetricContext, CSSM_CSP_CreateMacContext, CSSM_CSP_CreateRandomGenContext, CSSM_CSP_CreateAsymmetricContext, CSSM_CSP_CreateDeriveKeyContext, CSSM_CSP_CreateKeyGenContext, CSSM_CSP_CreatePassThroughContext, CSSM_DeleteContext, CSSM_UpdateContextAttributes