RSA Security logo

RSA BSAFE Cert-C
API Reference

SERVICE_HANDLER Struct Reference

Contains service provider information and the service provider initialization function.

A Cert-C service provider is defined by its type, an instance name, and an Initialize function. Distinct instances of a service provider may have the same type and Initialize function, but the name (and presumably the Initialize function parameters) must be unique.

Data Fields
type An int value that denotes the service provider type. It should contain one of the following SPT_* constants.

SPT_SURRENDER Text Surrender service provider
SPT_LOG Status Log service provider
SPT_CRYPTO Cryptographic service provider
SPT_IO Stream service provider
SPT_DATABASE2 Database service provider (Cert-C v2 and higher)
SPT_DATABASE Database service provider (Cert-C v1)
SPT_CERT_STATUS Certificate Revocation Status service provider
SPT_CERT_PATH Certificate Path Processing service provider
SPT_PKI PKI service provider

If you attempt to register more than one service provider of type SPT_CRYPTO or SPT_SURRENDER, C_Initialize() and C_RegisterService() return E_DUPLICATE_SERVICE. When using a database service provider that implements the C_SelectCertByAttributes() function, use the SPT_DATABASE2 type; this function and service type was new in Cert-C v2.0. When using a database service provider that does not implement this function, continue to use the SPT_DATABASE type.
name A pointer to a NUL- terminated char string, supplied by the application, that holds the service provider instance name. Each service provider instance of a given type must have a distinct name.
Initialize A pointer to the service provider's Initialize function. Cert-C calls the Initialize function at the time a service provider is registered (or when Cert-C is initialized, if the handler is one of those specified at that time). It returns function pointers to the remaining service provider entry points.

#include <service.h>

00194 typedef struct {
00195   int              type;       /* type of service provider */
00196   char            *name;       /* service provider name    */
00197 
00198   int (*Initialize) (
00199     CERTC_CTX      ctx,        /* Cert-C context               */
00200     POINTER        params,     /* provider-specific parameters */
00201     SERVICE_FUNCS *funcs,      /* (out) provider functions     */
00202     POINTER       *handle);    /* (out) provider handle        */
00203 } SERVICE_HANDLER;

The documentation for this struct was generated from the following file:


RSA BSAFE® Cert-C 2.7 API Reference