Previous section.

Common Security: CDSA and CSSM
Copyright © 1997 The Open Group

Relevant CSSM API Functions

Overview

Several API functions are particularly relevant to module developers, because they are used either by the application to access a module or by a module to access CSSM services, such as the CSSM registry or the error-handling routines. They are included in this appendix for quick-reference by module developers. For additional information, a module developer is encouraged to reference the CSSM Application Programming Interface.

Data Structures

CSSM_BOOL

This data type is used to indicate a true or false condition.
typedef uint32 CSSM_BOOL;
#define CSSM_TRUE 1
#define CSSM_FALSE 0

Definition

CSSM_TRUE

Indicates a true result or a true value.

CSSM_FALSE

Indicates a false result or a false value.

CSSM_RETURN

This data type is used to indicate whether a function was successful.
typedef enum cssm_return {
    CSSM_OK = 0,
    CSSM_FAIL = -1
} CSSM_RETURN

Definition

CSSM_OK

Indicates operation was successful.

CSSM_FAIL

Indicates operation was unsuccessful.

CSSM_STRING

This is used by CSSM data structures to represent a character string inside of a fixed-length buffer. The character string is expected to be NULL-terminated. The string size was chosen to accommodate current security standards, such as PKCS #11.
#define CSSM_MODULE_STRING_SIZE  64
typedef char CSSM_STRING [CSSM_MODULE_STRING_SIZE + 4];

CSSM_DATA

The CSSM_DATA structure is used to associate a length, in bytes, with an arbitrary block of contiguous memory. This memory must be allocated and freed using the memory management routines provided by the calling application via CSSM. Trust policy modules and certificate libraries use this structure to hold certificates and CRLs. Other add-in service modules, such as CSPs use this same structure to hold general data buffers, and DLMs use this structure to hold persistent security-related objects.
typedef struct cssm_data{
    uint32 Length;  /* in bytes */
    uint8 *Data;
} CSSM_DATA, *CSSM_DATA_PTR

Definition

Length

Length of the data buffer in bytes.

Data

Points to the start of an arbitrary length data buffer.

CSSM_GUID

This structure designates a global unique identifier (GUID) that distinguishes one add-in module from another. All GUID values should be computer-generated to guarantee uniqueness (the GUID generator in Microsoft Developer Studio* and the RPC UUIDGEN/uuid_gen program on a number of UNIX* platforms can be used).
typedef struct cssm_guid{
    uint32 Data1;
    uint16 Data2;
    uint16 Data3;
    uint8  Data4[8];
} CSSM_GUID, *CSSM_GUID_PTR

Definition

Data1

Specifies the first eight hexadecimal digits of the GUID.

Data2

Specifies the first group of four hexadecimal digits of the GUID.

Data3

Specifies the second group of four hexadecimal digits of the GUID.

Data4

Specifies an array of eight elements that contains the third and final group of eight hexadecimal digits of the GUID in elements 0 and 1, and the final 12 hexadecimal digits of the GUID in elements 2 through 7.

CSSM_VERSION

This structure is used to represent the version of CDSA components.
typedef struct cssm_version {
    uint32 Major;
    uint32 Minor;
} CSSM_VERSION, *CSSM_VERSION_PTR;

Definition

Major

The major version number of the component.

Minor

The minor version number of the component.

CSSM_SUBSERVICE_UID

This structure uniquely identifies a set of behaviors within a subservice within a CSSM add-in module.
typedef struct cssm_subservice_uid {
    CSSM_GUID Guid;
    CSSM_VERSION Version;
    uint32 SubserviceId;
    uint32 SubserviceFlags;
} CSSM_SUBSERVICE_UID, *CSSM_SUBSERVICE_UID_PTR;

Definition

Guid

A unique identifier for a CSSM add-in module.

Version

The version of the add-in module.

SubserviceId

An identifier for the subservice within the add-in module.

SubserviceFlags

An identifier for a set of behaviors provided by this subservice.

CSSM_HANDLE

A unique identifier for an object managed by CSSM or by an add-in module.
typedef uint32 CSSM_HANDLE, *CSSM_HANDLE_PTR

CSSM_MODULE_HANDLE

A unique identifier for an attached service provider module.
typedef uint32 CSSM_MODULE_HANDLE

CSSM_EVENT_TYPE

Events occur when an application calls a CSSM core service function. CSSM informs the attached module of this event using the EventNotify call to the Service provider module. Six types of events are defined:
typedef uint32 CSSM_EVENT_TYPE, *CSSM_EVENT_TYPE_PTR;

#define CSSM_EVENT_ATTACH          (0)
     /* application has requested an attach operation */
#define CSSM_EVENT_DETACH          (1)
     /* application has requested an detach operation */
#define CSSM_EVENT_INFOATTACH      (2)
     /* application has requested module info for dynamic module
                                                capabilities */
#define CSSM_EVENT_INFODETACH      (3)
     /* CSSM has completed obtaining dynamic module
                                                 capabilities */
#define CSSM_EVENT_CREATE_CONTEXT  (4)
     /* application has performed a create context operation */
#define CSSM_EVENT_DELETE_CONTEXT  (5)
     /* application has performed a delete context operation */

CSSM_SERVICE_MASK

This defines a bit mask of all the types of CSSM services a single module can implement.
typedef uint32 CSSM_SERVICE_MASK;

#define CSSM_SERVICE_CSSM  0x1
#define CSSM_SERVICE_CSP   0x2
#define CSSM_SERVICE_DL    0x4
#define CSSM_SERVICE_CL    0x8
#define CSSM_SERVICE_TP    0x10
#define CSSM_SERVICE_LAST  CSSM_SERVICE_TP

CSSM_SERVICE_TYPE

This data type is used to identify a single service from the CSSM_SERVICE_MASK options defined above.
typedef CSSM_SERVICE_MASK CSSM_SERVICE_TYPE

CSSM_SERVICE_FLAGS

This bitmask is used to identify characteristics of the service, such as whether it contains any embedded products.
typedef uint32 CSSM_SERVICE_FLAGS

#define CSSM_SERVICE_ISWRAPPEDPRODUCT 0x1
         /* On  = Contains one or more embedded products
                    Off = Contains no embedded products */

CSSM_SERVICE_INFO

This structure holds a description of a module service. The service described is of the CSSM service type specified by the module type.
typedef struct cssm_serviceinfo {
    CSSM_STRING Description;    /* Service description */
    CSSM_SERVICE_TYPE Type;     /* Service type */
    CSSM_SERVICE_FLAGS Flags;   /* Service flags */
    uint32 NumberOfSubServices; /* Number of sub services in SubService List */
    union cssm_subservice_list {    /* list of sub services */
        void *SubServiceList;
        CSSM_CSPSUBSERVICE_PTR CspSubServiceList;
        CSSM_DLSUBSERVICE_PTR  DlSubServiceList;
        CSSM_CLSUBSERVICE_PTR  ClSubServiceList;
        CSSM_TPSUBSERVICE_PTR  TpSubServiceList;
    } SubserviceList ;
    void *Reserved;
} CSSM_SERVICE_INFO, *CSSM_SERVICE_INFO_PTR;

Definition

Description

A text description of the service.

Type

Specifies exactly one type of service structure, such as CSSM_SERVICE_CSP, CSSM_SERVICE_CL, and so on.

Flags

Characteristics of this service, such as whether it contains any embedded products.

NumberOfSubServices

The number of elements in the module SubServiceList.

SubServiceList

A list of descriptions of the encapsulated SubServices which are not of the basic service types.

CspSubServiceList

A list of descriptions of the encapsulated CSP SubServices.

DlSubServiceList

A list of descriptions of the encapsulated DL SubServices.

ClSubServiceList

A list of descriptions of the encapsulated CL SubServices.

TpSubServiceList

A list of descriptions of the encapsulated TP SubServices.

Reserved

This field is reserved for future use. It should always be set to NULL.

CSSM_MODULE_FLAGS

This bitmask is used to identify characteristics of the module, such as whether or not it is threadsafe, exportable, and so on. The flags also describe the module vendor's policy for how CSSM process all module attach requests for this service module. The service module can select of the following authentication checks before allowing an instance of the service module to be attached by a requesting application:
typedef uint32 CSSM_MODULE_FLAGS;

#define CSSM_MODULE_THREADSAFE  0x1
                    /* Module is threadsafe */
#define CSSM_MODULE_EXPORTABLE  0x2
                    /* Module can be exported outside the USA */
#define CSSM_MODULE_CALLER_AUTHENTOCSSM  0x04
                       /* CSSM authenticates the caller based */
                       /* on CSSM-known points of trust */
#define CSSM_MODULE_CALLER_AUTHENTOMODULE  0x08
                       /* CSSM authenticates the caller based */
                       /* on module-supplied points of trust */

CSSM_MODULE_INFO

This structure aggregates all service descriptions about all service types of a module implementation.
typedef struct cssm_moduleinfo {
    CSSM_VERSION Version;               /* Module version */
    CSSM_VERSION CompatibleCSSMVersion; /* CSSM version the
                                        module is written for*/
    CSSM_STRING Description;            /* Module description */
    CSSM_STRING Vendor;                 /* Vendor name */
    CSSM_STRING ModuleFileName,         /* File name for module
                                        object code */
    CSSM_STRING ModulePathName,         /* Path name to module
                                        object code */
    CSSM_MODULE_FLAGS Flags;            /* Flags to describe and
                                        control module use */
    CSSM_KEY_PTR AppAuthenRootKeys,     /* Module-specific keys to
                                        authen apps */
    uint32 NumberOfAppAuthenRootKeys,   /* Number of module-
                                        specific root keys */
    CSSM_SERVICE_MASK ServiceMask;      /* Bit mask of supported
                                        services */
    uint32 NumberOfServices;            /* Number of services
                                        in ServiceList */
    CSSM_SERVICE_INFO_PTR ServiceList;  /* A list of service
                                        info structures */
    void *Reserved;
} CSSM_MODULE_INFO, *CSSM_MODULE_INFO_PTR;

Definition

Version

The major and minor version numbers of this add-in module.

CompatibleCSSMVersion

The version of CSSM that this module was written to.

Description

A text description of this module and its functionality.

Vendor

The name and description of the module vendor.

ModuleFileName

The name of the file that implements the add-in module. This file name is used to locate the add-in module's credentials for purposes module authentication.

ModulePathName

The name of the path to the file that implements the add-in module. This file name is used to locate the add-in module's credentials for purposes of module authentication.

Flags

Characteristics of this module, such as whether or not it is threadsafe.

AppAuthenRootKeys

Public root keys used by CSSM to verify an application's credentials when the service module has requested authentication based on module-specified root keys by setting the CSSM_MODULE_CALLER_AUTHENTOMODULE bit to true in its CSSM_MODULE_FLAGS mask. These keys should successfully authenticate only those applications that the service module wishes to recognize to receive the services the module has registered with CSSM during module installation.

NumberOfAppAuthenRootKeys

The number of public root keys in the AppAuthenRoot Keys list.

ServiceMask

A bit mask identifying the types of services available in this module.

NumberOfServices

The number of services for which information is provided. Multiple descriptions (as sub-services) can be provided for a single service category.

ServiceList

An array of pointers to the service information structures. This array contains NumberOfServices entries.

Reserved

This field is reserved for future use. It should always be set to NULL.

CSSM_ALL_SUBSERVICES

This data type is used to identify that information on all of the sub-services is being requested or returned.
#define CSSM_ALL_SUBSERVICES  (0xFFFFFFFF)

CSSM_INFO_LEVEL

This enumerated list defines the levels of information detail that can be retrieved about the services and capabilities implemented by a particular module. Modules can implement multiple CSSM service types. Each service may provide one or more sub-services. Modules can also have dynamically available services and features.
typedef enum cssm_info_level {
    CSSM_INFO_LEVEL_MODULE  = 0,
      /* values from CSSM_SERVICE_INFO struct */
    CSSM_INFO_LEVEL_SUBSERVICE  = 1,
      /* values from CSSM_SERVICE_INFO and XXsubservice struct */
    CSSM_INFO_LEVEL_STATIC_ATTR  = 2,
      /* values from CSSM_SERVICE_INFO and XXsubservice and
         all static-valued attributes of a subservice */
    CSSM_INFO_LEVEL_ALL_ATTR  = 3,
      /* values from CSSM_SERVICE_INFO and XXsubservice and
         all attributes, static and dynamic, of a subservice */
} CSSM_INFO_LEVEL;

CSSM_NET_ADDRESS_TYPE

This enumerated type defines representations for specifying the location of a service.
typedef enum cssm_net_address_type {
    CSSM_ADDR_NONE = 0,
    CSSM_ADDR_CUSTOM = 1,
    CSSM_ADDR_URL = 2, /* char* */
    CSSM_ADDR_SOCKADDR = 3,
    CSSM_ADDR_NAME = 4 /* char* - qualified by access method */
} CSSM_NET_ADDRESS_TYPE;

CSSM_NET_ADDRESS

This structure holds the address of a service. Typically the service is remote, but the value of the address field may resolve to the local system. The AddressType field defines how the Address field should be interpreted.
typedef struct cssm_net_address {
    CSSM_NET_ADDRESS_TYPE AddressType;
    CSSM_DATA Address;
} CSSM_NET_ADDRESS, *CSSM_NET_ADDRESS_PTR;

CSSM_NET_PROTOCOL

This enumerated list defines the application-level protocols that could be supported by a Certificate Library Module that communicates with Certification Authorities, Registration Authorities and other services, or by a Data Storage Library Module that communicates with service-based storage and directory services.
typedef enum cssm_net_protocol {
    CSSM_NET_PROTO_NONE = 0, /* local */
    CSSM_NET_PROTO_CUSTOM = 1, /* proprietary implementation */
    CSSM_NET_PROTO_UNSPECIFIED = 2, /* implementation default */
    CSSM_NET_PROTO_LDAP = 3, /* light weight directory access
                                        protocol */
    CSSM_NET_PROTO_LDAPS = 4, /* ldap/ssl where SSL initiates
                                        the connection */
    CSSM_NET_PROTO_LDAPNS = 5, /* ldap where ldap negotiates an
                                        SSL session */
    CSSM_NET_PROTO_X500DAP = 6, /* x.500 Directory access
                                        protocol */
    CSSM_NET_PROTO_FTPDAP = 7, /* file transfer protocol for
                                        cert/crl fetch */
    CSSM_NET_PROTO_FTPDAPS = 8, /* ftp/ssl where SSL initiates
                                        the connection */
    CSSM_NET_PROTO_NDS = 9, /* Novell directory services */
    CSSM_NET_PROTO_OCSP = 10, /* online certificate status
                                        protocol */
    CSSM_NET_PROTO_PKIX3 = 11, /* the cert request protocol
                                        in PKIX3 */
    CSSM_NET_PROTO_PKIX3S = 12, /* The ssl/tls derivative of
                                        PKIX3 */
    CSSM_NET_PROTO_PKCS_HTTP = 13, /* PKCS client <=> CA protocol
                                        over HTTP */
    CSSM_NET_PROTO_PKCS_HTTPS = 14, /* PKCS client <=> CA protocol
                                        over HTTPS */
} CSSM_NET_PROTOCOL;

CSSM_USER_AUTHENTICATION_MECHANISM

This enumerated list defines different methods an add-in module can require when authenticating a caller. The module specifies which mechanism the caller must use for each sub-service type provided by the module. CSSM-defined authentication methods include password-based authentication, a login sequence, or a certificate and passphrase. It is anticipated that new mechanisms will be add to this list as required.
typedef enum cssm_user_authentication_mechanism {
    CSSM_AUTHENTICATION_NONE = 0,
    CSSM_AUTHENTICATION_CUSTOM = 1,
    CSSM_AUTHENTICATION_PASSWORD = 2,
    CSSM_AUTHENTICATION_USERID_AND_PASSWORD = 3,
    CSSM_AUTHENTICATION_CERTIFICATE_AND_PASSPHRASE = 4,
    CSSM_AUTHENTICATION_LOGIN_AND_WRAP = 5,
} CSSM_USER_AUTHENTICATION_MECHANISM;

CSSM_CALLBACK

An application uses this data type to request that an add-in module call back into the application for certain cryptographic information.
typedef CSSM_DATA_PTR (CSSMAPI *CSSM_CALLBACK) (void *allocRef, uint32 ID);

Definition

allocRef

Memory heap reference specifying which heap to use for memory allocation.

ID

Input data to identify the callback.

CSSM_CRYPTO_DATA

This data structure is used to encapsulate cryptographic information, such as the passphrase to use when accessing a private key.
typedef struct cssm_crypto_data {
    CSSM_DATA_PTR Param;
    CSSM_CALLBACK Callback;
    uint32  ID;
}CSSM_CRYPTO_DATA, *CSSM_CRYPTO_DATA_PTR

Definition

Param

A pointer to the parameter data and its size in bytes.

Callback

An optional callback routine for the add-in modules to obtain the parameter.

ID

A tag that identifies the callback.

CSSM_USER_AUTHENTICATION

This structure holds the user's credentials for authenticating to a
module. The type of credentials required is defined by the module and
specified as a CSSM_USER_AUTHENTICATION_MECHANISM.
typedef struct cssm_user_authentication {
    CSSM_DATA_PTR Credential; /* a cert, a shared secret, other */
    CSSM_CRYPTO_DATA_PTR MoreAuthenticationData;
} CSSM_USER_AUTHENTICATION, *CSSM_USER_AUTHENTICATION_PTR;

Definition

Credential

A certificate, a shared secret, a magic token or what every is required by an add-in service modules for user authentication. The required credential type is specified as a CSSM_USER_AUTHENTICATION_MECHANISM .

MoreAuthenticationData

A passphrase or other data that can be provided as immediate data within this structure or via a callback function to the user/caller.

CSSM_NOTIFY_CALLBACK

An application uses this data type to request that an add-in module call back into the application to notify it of certain events.
typedef CSSM_RETURN (CSSMAPI *CSSM_NOTIFY_CALLBACK)
    (CSSM_CSP_HANDLE ModuleHandle,
         uint32 Application,
         uint32 Reason,
         uint32 Param);

Definition

ModuleHandle

The handle of the attached add-in module.

Application

Input data to identify the callback.

Reason

The reason for the notification.

Reason Description
CSSM_NOTIFY_SURRENDER The add-in module is temporarily surrendering control of the process
CSSM_NOTIFY_COMPLETE An asynchronous operation has completed
CSSM_NOTIFY_DEVICE_REMOVED A device, such as a token, has been removed
CSSM_NOTIFY_DEVICE_INSERTED A device, such as a token, has been inserted

Table: Notification Reasons

Param

Any additional information about the event.

CSSM_MEMORY_FUNCS/CSSM_API_MEMORY_FUNCS

This structure is used by applications to supply memory functions for the CSSM and the add-in modules. The functions are used when memory needs to be allocated by the CSSM or add-ins for returning data structures to the applications.
typedef struct cssm_memory_funcs {
  void *(*malloc_func) (uint32 Size, void *AllocRef);
  void  (*free_func)   (void *MemPtr, void *AllocRef);
  void *(*realloc_func)(void *MemPtr, uint32 Size, void *AllocRef);
  void *(*calloc_func) (uint32 Num, uint32 Size, void *AllocRef);
  void *AllocRef;
} CSSM_MEMORY_FUNCS, *CSSM_MEMORY_FUNCS_PTR;

typedef CSSM_MEMORY_FUNCS CSSM_API_MEMORY_FUNCS;
typedef CSSM_API_MEMORY_FUNCS *CSSM_API_MEMORY_FUNCS_PTR;

Definition

malloc_func

Pointer to a function that returns a void pointer to the allocated memory block of at least Size bytes from heap AllocRef.

free_func

Pointer to a function that deallocates a previously-allocated memory block (MemPtr) from heap AllocRef.

realloc_func

Pointer to a function that returns a void pointer to the reallocated memory block (MemPtr) of at least Size bytes from heap AllocRef.

calloc_func

Pointer to a function that returns a void pointer to an array of Num elements of length Size initialized to zero from heap AllocRef.

AllocRef

Indicates which memory heap the function operates on.

CSSM_SPI_MEMORY_FUNCS

This structure is used by add-in modules to reference an application's memory management functions. The functions are used when an add-in module needs to allocate memory for returning data structures to the application or needs to de-allocate memory for a data structure passed to it from an application.
typedef struct cssm_spi_memory_funcs {
   void *(*malloc_func) (CSSM_HANDLE AddInHandle, uint32 Size);
   void  (*free_func)   (CSSM_HANDLE AddInHandle, void *MemPtr);
   void *(*realloc_func)(CSSM_HANDLE AddInHandle, void *MemPtr,
                                                    uint32 Size);
   void *(*calloc_func) (CSSM_HANDLE AddInHandle, uint32 Num,
                                                    uint32 Size);
} CSSM_SPI_MEMORY_FUNCS, *CSSM_SPI_MEMORY_FUNCS_PTR;

Definition

malloc_func

Pointer to a function that returns a void pointer to the allocated memory block of at least Size bytes from the heap of the application associated with AddInHandle.

free_func

Pointer to a function that de-allocates a previously-allocated memory block (MemPtr) from the heap of the application associated with AddInHandle.

realloc_func

Pointer to a function that returns a void pointer to the reallocated memory block (MemPtr) of at least Size bytes from the heap of the application associated with AddInHandle.

calloc_func

Pointer to function that returns a void pointer to an array of Num elements of length Size initialized to zero from the heap of the application associated with AddInHandle.

CSSM_MODULE_FUNCS

This structure is used by add-in modules to pass a table of function pointers for a single service to CSSM.
typedef struct cssm_module_funcs {
    CSSM_SERVICE_TYPE ServiceType;
    union cssm_function_table {
        void *ServiceFuncs;
        CSSM_SPI_CSP_FUNCS_PTR CspFuncs;
        CSSM_SPI_DL_FUNCS_PTR  DlFuncs;
        CSSM_SPI_CL_FUNCS_PTR  ClFuncs;
        CSSM_SPI_TP_FUNCS_PTR  TpFuncs;
        } FunctionTable;
    } CSSM_MODULE_FUNCS, *CSSM_MODULE_FUNCS_PTR;

Definition

ServiceType

The type of add-in module services accessible via the XXFuncs function table.

FunctionTable

A pointer to a function table of the type described by ServiceType. These function pointers are used by CSSM to direct function calls from an application to the appropriate service in the add-in module. These function pointer tables are described in the CSSM header files <cssmcspi.h>, <cssmdli.h>, <cssmcli.h>, and <cssmtpi.h>.

Value Description
CSSM_SPI_CSP_FUNCS_PTR CspFuncs Functions pointers to CSP services.
CSSM_SPI_DL_FUNCS_PTR DlFuncs Functions pointers to DL services.
CSSM_SPI_CL_FUNCS_PTR ClFuncs Functions pointers to CL services.
CSSM_SPI_TP_FUNCS_PTR TpFuncs Functions pointers to TP services.

Table: Service Access Tables

CSSM_HANDLEINFO

This structure is used by add-in modules to obtain information about a CSSM_HANDLE.
typedef struct cssm_handleinfo {
    uint32 SubServiceID;
    uint32 SessionFlags;
    CSSM_NOTIFY_CALLBACK Callback;
    uint32 ApplicationContext;
} CSSM_HANDLEINFO, *CSSM_HANDLEINFO_PTR;

Definition

SubServiceID

An identifier for this sub-service.

SessionFlags

Sessions flags set by CSSM during module attach processing.

Callback

A callback function registered by the application as part of the module attach operation. This function should be used to notify the application of certain events.

ApplicationContext

An identifier which should be passed back to the application as part of the Callback function.

CSSM_REGISTRATION_INFO

This structure is used by add-in modules to pass tables of function pointers and module information to CSSM. Note that the function table does not include a pointer to the AddInAuthenticate function. The AddInAuthenticate function is invoked by CSSM prior to the add-in service module presenting CSSM_REGISTRATION_INFO to CSSM by calling the CSSM_RegisterServices function.
typedef struct cssm_registration_info {
        /* Loading, Unloading and Event Notifications */
    CSSM_RETURN (CSSMAPI *Initialize) (CSSM_MODULE_HANDLE Handle,
                            uint32 VerMajor,
                            uint32 VerMinor);
    CSSM_RETURN (CSSMAPI *Terminate) (CSSM_MODULE_HANDLE Handle);
    CSSM_RETURN (CSSMAPI *EventNotify)(CSSM_MODULE_HANDLE Handle,
                             const CSSM_EVENT_TYPE Event,
                             const uint32 Param);
    CSSM_MODULE_INFO_PTR (CSSMAPI *GetModuleInfo)
                           (CSSM_MODULE_HANDLE ModuleHandle,
                            CSSM_SERVICE_MASK ServiceMask,
                            uint32 SubserviceID,
                            CSSM_INFO_LEVEL InfoLevel);
    CSSM_RETURN (CSSMAPI *FreeModuleInfo)
                                (CSSM_MODULE_HANDLE ModuleHandle,
                            CSSM_MODULE_INFO_PTR ModuleInfo);
    CSSM_BOOL ThreadSafe;
    uint32 ServiceSummary;
    uint32 NumberOfServiceTables;
    CSSM_MODULE_FUNCS_PTR Services;
} CSSM_REGISTRATION_INFO, *CSSM_REGISTRATION_INFO_PTR;

Definition

Initialize

Pointer to function that verifies compatibility of the requested module version with the actual module version and which performs module setup operations.

Terminate

Pointer to function that performs module cleanup operations.

EventNotify

Pointer to function that accepts event notification from CSSM.

GetModuleInfo

Pointer to function that obtains and returns dynamic information about the module.

FreeModuleInfo

Pointer to function that frees the module information structure.

ThreadSafe

A flag which indicates to CSSM whether or not the module is capable of handling multi-threaded access.

ServiceSummary

A bit mask indicating the types of services offered by this module. It is the bitwise-OR of the service types described in Certificate Chain for an Add-In Service Module above.

NumberOfServiceTables

The number of distinct services provided by this module. This is also the length of the Services array.

Services

An array of CSSM_MODULE_FUNCS structures which provide the mechanism for accessing the module's services.


Function Definitions

The manpages for Function Definitions can be found at the end of this chapter.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.
You should also read the legal notice explaining the terms and conditions relating to the CDSA documentation.

Contents Next section Index