RSA Security logo

RSA BSAFE Cert-C
API Reference

pkicrmsg.h File Reference

This file defines PKI certificate request and response objects.

#include "basetype.h"
#include "bsafe.h"
#include "certext.h"
#include "certapi.h"
#include "certalg.h"
#include "pkistinf.h"
#include "pkimsg.h"
#include "pkictmsg.h"

Go to the source code of this file.

Typedefs

typedef POINTER PKI_CERT_REQ_OBJ
 Represents an initialization request or certificate request to a CA/RA to request a certificate. More...

typedef POINTER PKI_CERT_RESP_OBJ
 Represents the initialization response or certification response back to the client. More...


Functions

int C_CreatePKICertReqObject (CERTC_CTX ctx, PKI_CERT_REQ_OBJ *pPKICertReqObj)
 Creates and initializes a PKI certificate request object. More...

void C_DestroyPKICertReqObject (PKI_CERT_REQ_OBJ *pPKICertReqObj)
 Destroys a PKI certificate request object. More...

int C_SetPKICertReqID (PKI_CERT_REQ_OBJ PKICertReqObj, ITEM *pCertReqID)
 Sets the certificate request ID to match the request and response. More...

int C_GetPKICertReqID (PKI_CERT_REQ_OBJ PKICertReqObj, ITEM *pCertReqID)
 Gets the value of the certificate request ID to match the request and response. More...

int C_SetPKICertReqControls (PKI_CERT_REQ_OBJ PKICertReqObj, ATTRIBUTES_OBJ controls)
 Sets the controls (attributes that affect certificate issuance). More...

int C_GetPKICertReqControls (PKI_CERT_REQ_OBJ PKICertReqObj, ATTRIBUTES_OBJ *pControls)
 Gets the value of the controls (attributes that affect certificate issuance). More...

int C_SetPKICertReqPOPType (PKI_CERT_REQ_OBJ PKICertReqObj, unsigned int popType)
 Sets the proof-of-possession type. More...

int C_GetPKICertReqPOPType (PKI_CERT_REQ_OBJ PKICertReqObj, unsigned int *pPopType)
 Gets the proof-of-possession type. More...

int C_SetPKICertReqRegInfo (PKI_CERT_REQ_OBJ PKICertReqObj, ATTRIBUTES_OBJ regInfo)
 Sets the supplementary information regInfo. More...

int C_GetPKICertReqRegInfo (PKI_CERT_REQ_OBJ PKICertReqObj, ATTRIBUTES_OBJ *pRegInfo)
 Gets the supplementary information regInfo. More...

int C_SetPKICertReqCertTemplate (PKI_CERT_REQ_OBJ PKICertReqObj, PKI_CERT_TEMPLATE_OBJ certTmplObj)
 Sets the certificate template object. More...

int C_GetPKICertReqCertTemplate (PKI_CERT_REQ_OBJ PKICertReqObj, PKI_CERT_TEMPLATE_OBJ *pCertTmplObj)
 Gets the certificate template object. More...

int C_CreatePKICertRespObject (CERTC_CTX ctx, PKI_CERT_RESP_OBJ *pPKICertRespObj)
 Creates and initializes a PKI certificate response object. More...

void C_DestroyPKICertRespObject (PKI_CERT_RESP_OBJ *pPKICertRespObj)
 Destroys a PKI certificate response object. More...

int C_SetPKICertRespStatus (PKI_CERT_RESP_OBJ PKICertRespObj, PKI_STATUS_INFO_OBJ PKIStatusInfoObj)
 Sets the certification status for the response. More...

int C_GetPKICertRespStatus (PKI_CERT_RESP_OBJ PKICertRespObj, PKI_STATUS_INFO_OBJ *pPKIStatusInfoObj)
 Gets the certification status for the response. More...

int C_SetPKICertRespCertReqID (PKI_CERT_RESP_OBJ PKICertRespObj, ITEM *pCertReqID)
 Sets the ID to match the request and response. More...

int C_GetPKICertRespCertReqID (PKI_CERT_RESP_OBJ PKICertRespObj, ITEM *pCertReqID)
 Gets the ID to match the request and response. More...

int C_SetPKICertRespRequestedCert (PKI_CERT_RESP_OBJ PKICertRespObj, CERT_OBJ certObj)
 Sets the certificate object. More...

int C_GetPKICertRespRequestedCert (PKI_CERT_RESP_OBJ PKICertRespObj, CERT_OBJ *pCertObj)
 Gets the certificate object. More...

int C_SetPKICertRespRequestedPrivateKey (PKI_CERT_RESP_OBJ PKICertRespObj, B_KEY_OBJ privateKey)
 Sets the private-key object. More...

int C_GetPKICertRespRequestedPrivateKey (PKI_CERT_RESP_OBJ PKICertRespObj, B_KEY_OBJ *pPrivateKey)
 Gets the private-key object. More...

int C_SetPKICertRespRegInfo (PKI_CERT_RESP_OBJ PKICertRespObj, ATTRIBUTES_OBJ regInfo)
 Sets the supplementary information regInfo. More...

int C_GetPKICertRespRegInfo (PKI_CERT_RESP_OBJ PKICertRespObj, ATTRIBUTES_OBJ *pRegInfo)
 Gets the supplementary information regInfo. More...

int C_SetPKICertRespCACerts (PKI_CERT_RESP_OBJ PKICertRespObj, LIST_OBJ CACertList)
 Sets the list of CA CERT_OBJs. More...

int C_GetPKICertRespCACerts (PKI_CERT_RESP_OBJ PKICertRespObj, LIST_OBJ *pCACertList)
 Gets the list of CA CERT_OBJs. More...


Typedef Documentation

typedef POINTER PKI_CERT_REQ_OBJ
 

Represents an initialization request or certificate request to a CA/RA to request a certificate. Use a Cert-C function to view or modify information in this object. Do not assume that this object points to any specific information. Some examples of the functions that Cert-C provides to work with a PKI certificate-request object are listed in the following table.

Function Description
C_CreatePKICertReqObject() Creates and initializes a PKI certificate-request object.
C_DestroyPKICertReqObject() Destroys the PKI certificate-request object and frees any memory associated with it.
C_SetPKICertReqCertTemplate() Sets the certificate-template object.
C_SetPKICertReqControls() Sets the controls which are attributes affecting certificate issuance.
C_SetPKICertReqID() Sets the certificate-request ID to match request and response.
C_SetPKICertReqPOPType() Sets the POP type.
C_SetPKICertReqRegInfo() Sets regInfo, the supplementary information.
C_GetPKICertReqCertTemplate() Gets the certificate-template object
C_GetPKICertReqControls() Gets the value of controls that are attributes affecting certificate issuance.
C_GetPKICertReqID() Gets the value of certificate-request ID to match request and response.
C_GetPKICertReqPOPType() Gets the value of POP type.
C_GetPKICertReqRegInfo() Gets the supplementary information regInfo.

typedef POINTER PKI_CERT_RESP_OBJ
 

Represents the initialization response or certification response back to the client. Use a Cert-C function to view or modify information in this object. Do not assume that this object points to any specific information. Some examples of the functions that Cert-C provides to work with a PKI certificate request object are listed in the following table.

Function Description
C_CreatePKICertRespObject() Creates and initializes a PKI certificate-response object.
C_DestroyPKICertRespObject() Destroys the PKI certificate-response object and frees any memory associated with it.
C_SetPKICertRespCACerts() Sets the list of CA CERT_OBJs.
C_SetPKICertRespCertReqID() Sets the ID to match request and response.
C_SetPKICertRespRegInfo() Sets regInfo, the supplementary information.
C_SetPKICertRespRequestedCert() Sets the requested certificate.
C_SetPKICertRespRequestedPrivateKey() Sets the requested private key.
C_SetPKICertRespStatus() Sets the certification status for the response.
C_GetPKICertRespCACerts() Gets the list of CA CERT_OBJs.
C_GetPKICertRespCertReqID() Gets the ID to match request and response.
C_GetPKICertRespRegInfo() Gets regInfo, the supplementary information.
C_GetPKICertRespRequestedCert() Gets the requested certificate.
C_GetPKICertRespRequestedPrivateKey() Gets the requested private key.
C_GetPKICertRespStatus() Gets the certification status.


Function Documentation

int C_CreatePKICertReqObject CERTC_CTX    ctx,
PKI_CERT_REQ_OBJ   pPKICertReqObj
;
 

Creates and initializes a PKI certificate request object.

Parameters:
ctx This input parameter is the Cert-C context.
pPKICertReqObj This input/output parameter specifies the certificate request object.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_CreatePKICertRespObject CERTC_CTX    ctx,
PKI_CERT_RESP_OBJ   pPKICertRespObj
;
 

Creates and initializes a PKI certificate response object.

Parameters:
ctx This input parameter is the Cert-C context.
pPKICertRespObj This input/output parameter specifies the certificate response object.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

void C_DestroyPKICertReqObject PKI_CERT_REQ_OBJ   pPKICertReqObj ;
 

Destroys a PKI certificate request object.

Parameters:
pPKICertReqObj This input/output parameter specifies the certificate request object.
Returns:
None.

void C_DestroyPKICertRespObject PKI_CERT_RESP_OBJ   pPKICertRespObj ;
 

Destroys a PKI certificate response object.

Parameters:
pPKICertRespObj This input/output parameter specifies the certificate response object.
Returns:
None.

int C_GetPKICertReqCertTemplate PKI_CERT_REQ_OBJ    PKICertReqObj,
PKI_CERT_TEMPLATE_OBJ   pCertTmplObj
;
 

Gets the certificate template object.

Parameters:
PKICertReqObj This input parameter specifies the certificate request object.
pCertTmplObj This output parameter specifies the certificate template object.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertReqControls PKI_CERT_REQ_OBJ    PKICertReqObj,
ATTRIBUTES_OBJ   pControls
;
 

Gets the value of the controls (attributes that affect certificate issuance).

Parameters:
PKICertReqObj This input parameter specifies the certificate request object.
pControls This output parameter specifies the attributes that affect issuance.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertReqID PKI_CERT_REQ_OBJ    PKICertReqObj,
ITEM *    pCertReqID
;
 

Gets the value of the certificate request ID to match the request and response.

Parameters:
PKICertReqObj This input parameter specifies the certificate request object.
pCertReqID This output parameter specifies the certificate request ID.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertReqPOPType PKI_CERT_REQ_OBJ    PKICertReqObj,
unsigned int *    pPopType
;
 

Gets the proof-of-possession type.

Parameters:
PKICertReqObj This input parameter specifies the certificate request object.
pPopType This output parameter specifies the POP (one of PKI_POP_*).
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertReqRegInfo PKI_CERT_REQ_OBJ    PKICertReqObj,
ATTRIBUTES_OBJ   pRegInfo
;
 

Gets the supplementary information regInfo.

Parameters:
PKICertReqObj This input parameter specifies the certificate request object.
pRegInfo This output parameter specifies the supplementary information.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertRespCACerts PKI_CERT_RESP_OBJ    PKICertRespObj,
LIST_OBJ   pCACertList
;
 

Gets the list of CA CERT_OBJs.

Parameters:
PKICertRespObj This input parameter specifies the certificate response object.
pCACertList This output parameter specifies a list of CA certificates.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertRespCertReqID PKI_CERT_RESP_OBJ    PKICertRespObj,
ITEM *    pCertReqID
;
 

Gets the ID to match the request and response.

Parameters:
PKICertRespObj This input parameter specifies the certificate response object.
pCertReqID This output parameter specifies the certificate request ID.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertRespRegInfo PKI_CERT_RESP_OBJ    PKICertRespObj,
ATTRIBUTES_OBJ   pRegInfo
;
 

Gets the supplementary information regInfo.

Parameters:
PKICertRespObj This input parameter specifies the certificate response object.
pRegInfo This output parameter specifies the supplementary information.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertRespRequestedCert PKI_CERT_RESP_OBJ    PKICertRespObj,
CERT_OBJ   pCertObj
;
 

Gets the certificate object.

Parameters:
PKICertRespObj This input parameter specifies the certificate response object.
pCertObj This output parameter specifies the requested certificate.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertRespRequestedPrivateKey PKI_CERT_RESP_OBJ    PKICertRespObj,
B_KEY_OBJ *    pPrivateKey
;
 

Gets the private-key object.

Parameters:
PKICertRespObj This input parameter specifies the certificate response object.
pPrivateKey This output parameter specifies the requested private key.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_GetPKICertRespStatus PKI_CERT_RESP_OBJ    PKICertRespObj,
PKI_STATUS_INFO_OBJ   pPKIStatusInfoObj
;
 

Gets the certification status for the response.

Parameters:
PKICertRespObj This input parameter specifies the certificate response object.
pPKIStatusInfoObj This output parameter specifies the PKI status information object.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertReqCertTemplate PKI_CERT_REQ_OBJ    PKICertReqObj,
PKI_CERT_TEMPLATE_OBJ    certTmplObj
;
 

Sets the certificate template object.

Parameters:
PKICertReqObj This input/output parameter specifies the certificate request object.
certTmplObj This input parameter specifies the certificate template object.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertReqControls PKI_CERT_REQ_OBJ    PKICertReqObj,
ATTRIBUTES_OBJ    controls
;
 

Sets the controls (attributes that affect certificate issuance).

Parameters:
PKICertReqObj This input/output parameter specifies the certificate request object.
controls This input parameter specifies the attributes that affect issurance.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertReqID PKI_CERT_REQ_OBJ    PKICertReqObj,
ITEM *    pCertReqID
;
 

Sets the certificate request ID to match the request and response.

Parameters:
PKICertReqObj This input/output parameter specifies the certificate request object.
pCertReqID This input parameter specifies the certificate request ID.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertReqPOPType PKI_CERT_REQ_OBJ    PKICertReqObj,
unsigned int    popType
;
 

Sets the proof-of-possession type.

Parameters:
PKICertReqObj This input/output parameter specifies the certificate request object.
popType This input parameter specifies the POP (one of PKI_POP_*).
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertReqRegInfo PKI_CERT_REQ_OBJ    PKICertReqObj,
ATTRIBUTES_OBJ    regInfo
;
 

Sets the supplementary information regInfo.

Parameters:
PKICertReqObj This input/output parameter specifies the certificate request object.
regInfo This input parameter specifies the supplementary information.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertRespCACerts PKI_CERT_RESP_OBJ    PKICertRespObj,
LIST_OBJ    CACertList
;
 

Sets the list of CA CERT_OBJs.

Parameters:
PKICertRespObj This input/output parameter specifies the certificate response object.
CACertList This input parameter specifies a list of CA Certificates.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertRespCertReqID PKI_CERT_RESP_OBJ    PKICertRespObj,
ITEM *    pCertReqID
;
 

Sets the ID to match the request and response.

Parameters:
PKICertRespObj This input/output parameter specifies the certificate response object.
pCertReqID This input parameter specifies the certificate request ID.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertRespRegInfo PKI_CERT_RESP_OBJ    PKICertRespObj,
ATTRIBUTES_OBJ    regInfo
;
 

Sets the supplementary information regInfo.

Parameters:
PKICertRespObj This input/output parameter specifies the certificate response object.
regInfo This input parameter specifies the supplementary information.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertRespRequestedCert PKI_CERT_RESP_OBJ    PKICertRespObj,
CERT_OBJ    certObj
;
 

Sets the certificate object.

Parameters:
PKICertRespObj This input/output parameter specifies the certificate response object.
certObj This input parameter specifies the requested certificate.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertRespRequestedPrivateKey PKI_CERT_RESP_OBJ    PKICertRespObj,
B_KEY_OBJ    privateKey
;
 

Sets the private-key object.

Parameters:
PKICertRespObj This input/output parameter specifies the certificate response object.
privateKey This input parameter specifies the requested private key.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.

int C_SetPKICertRespStatus PKI_CERT_RESP_OBJ    PKICertRespObj,
PKI_STATUS_INFO_OBJ    PKIStatusInfoObj
;
 

Sets the certification status for the response.

Parameters:
PKICertRespObj This input/output parameter specifies the certificate response object.
PKIStatusInfoObj This input parameter specifies the PKI status information object.
Returns:
If successful, returns 0. If not, returns a Cert-C error code.



RSA BSAFE® Cert-C 2.7 API Reference