RSA Security logo

RSA BSAFE Cert-C
API Reference

cmp.h File Reference

This file contains CMP message functions.

#include "certc.h"
#include "transprt.h"
#include "crmf.h"

Go to the source code of this file.

Data Structures

struct  PKI_CMP_INIT_STRUCT
 This structure is used by the Cert-C CMP PKI Database service provider. More...

struct  PKI_CMP_SP_INIT_PARAMS
 This structure is holds initialization parameters for the Cert-C CMP PKI Database service provider. More...

struct  PKI_CMP_STATUS_INFO

Functions

int S_InitializeCMP (POINTER ctx, POINTER params, SERVICE_FUNCS *funcs, POINTER *handle)
 Never call the S_InitializeCMP() function directly. More...

int S_CMPCertConfirm (CERTC_CTX ctx, POINTER handle, PKI_MSG_OBJ request, PKI_MSG_OBJ response, PKI_PROTECT_INFO *protectInfo, PKI_CMP_STATUS_INFO *responseInfo, PKI_STATUS_INFO *statusInfo)
int S_CMPSetMessageType (CERTC_CTX ctx, POINTER handle, int msgType, PKI_MSG_OBJ msgObj)
int S_CMPGetMessageType (CERTC_CTX ctx, POINTER handle, PKI_MSG_OBJ msgObj, int *pMsgType)


Function Documentation

int S_CMPCertConfirm CERTC_CTX    ctx,
POINTER    handle,
PKI_MSG_OBJ    request,
PKI_MSG_OBJ    response,
PKI_PROTECT_INFO   protectInfo,
PKI_CMP_STATUS_INFO   responseInfo,
PKI_STATUS_INFO   statusInfo
;
 

Deprecated:
This API is deprecated in Cert-C 2.5. It is replaced by C_RequestPKIMsg(). This API confirms the acceptance or rejection of a certificate after a successful certificate request. Generally, this function is used after a call to C_RequestPKICert(), or after a sequence of calls to C_WritePKICertRequestMsg(), C_SendPKiMsg(), and C_ReadPKICertResponseMsg().
Parameters:
ctx This input parameter points to an initialized Cert-C context handle.
handle This input parameter pints to the service provider's handle.
request This input parameter contains the ir or cr message object.
response This input parameter contains the code>ip or cp message object.
protectInfo This input parameter points to a PKI_PROTECT_INFO structure that contains the keys and certificates used to protect the requested certificate.
responseInfo This input parameter indicates whether the certificate is accepted or rejected.
statusInfo This output parameter points to a PKI_PROTECT_INFO structure that contains the confirmed status information for the certificate.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int S_CMPGetMessageType CERTC_CTX    ctx,
POINTER    handle,
PKI_MSG_OBJ    msgObj,
int *    pMsgType
;
 

Deprecated:
This API deprecated in Cert-C 2.5. It is replaced by C_GetPKIMsgType(). This API gets the CMP message type.
Parameters:
ctx This input parameter points to an initialized Cert-C context handle.
handle This input parameter pints to the service provider's handle.
msgObj This input parameter contains the object whose type is being retrieved.
pMsgType This output parameter contains the message type of the message object. It will be one of the following values:
     PKI_CMP_IR
     PKI_CMP_IP
     PKI_CMP_CR
     PKI_CMP_CP
     PKI_CMP_ERROR
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int S_CMPSetMessageType CERTC_CTX    ctx,
POINTER    handle,
int    msgType,
PKI_MSG_OBJ    msgObj
;
 

Deprecated:
This API is deprecated in Cert-C 2.5. It is replaced by C_SetPKIMsgType(). This API sets the CMP message type.
Parameters:
ctx This input parameter points to an initialized Cert-C context handle.
handle This input parameter pints to the service provider's handle.
msgType This input parameter contains the CMP message type that can be PKI_CMP_IR for an initialization request, or PKI_CMP_CR for a certificate request.
msgObj This input/output parameter is the object whose message type is being set.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int S_InitializeCMP POINTER    ctx,
POINTER    params,
SERVICE_FUNCS   funcs,
POINTER *    handle
;
 

Never call the S_InitializeCMP() function directly. To initialize or register the Cert-C CMP PKI Database service provider, call the C_InitializeCertC() or C_RegisterService() function. Both functions take SERVICE_HANDLER and a POINTER to a parameters structure as parameters. SERVICE_HANDLER's Initialize parameter points to the S_InitializeCMP() function, and the corresponding POINTER must point to an PKI_CMP_INIT_PARAMS structure.

Cert-C uses S_InitializeCMP() to initialize the Cert-C CMP PKI Service Provider's functions and initialization parameters. S_InitializeCMP() stores pointers to the Cert-C CMP PKI service provider's functions in funcs's pki member, which is a pki_funcs structure. S_InitializeCMP() uses the Cert-C CMP PKI service provider's initialization parameters in params, which points to an PKI_CMP_INIT_PARAMS structure.

Parameters:
ctx This input parameter points to an initialized Cert-C context handle.
params This input parameter points to a type PKI_CMP_INIT_PARAMS structure that contains the Cert-C CMP PKI service provider's initialization parameters.
funcs This is both an input and output parameter. As an input parameter, it points to an allocated but uninitialized SERVICE_FUNCS union. As an output parameter, this parameter contains the pki_funcs function pointers for the Cert-C CMP PKI service provider.
handle This output parameter points to this instance of the Cert-C Cert-C CMP PKI Service Provider's handle.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.



RSA BSAFE® Cert-C 2.7 API Reference