RSA Security logo

RSA BSAFE Cert-C
API Reference

pkispi.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (c) RSA Security Inc., 1999-2002.  All rights reserved.
00003 * This work contains proprietary, confidential, and trade secret
00004 * information of RSA Security Inc.  Use, disclosure or reproduction
00005 * without the express written authorization of RSA Security Inc. is
00006 * prohibited.
00007 */
00008 
00009 #ifndef _PKISPI_H_
00010 #define _PKISPI_H_ 1
00011 
00018 #include "basetype.h"
00019 #include "pkimsg.h"
00020 #include "bsafe.h"
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00041 typedef struct pki_funcs {
00050   void (*Finalize) (
00051     CERTC_CTX         ctx,          /* (mod) Cert-C context                 */
00052     POINTER           handle        /* (mod) provider handle                */
00053   );
00054 
00078  int (*GeneratePKIMsgProofOfPossession) (
00079     CERTC_CTX         ctx,           /* (in)  Cert-C context                 */
00080     POINTER           handle,        /* (in)  SP-specific data handle        */
00081     PKI_MSG_OBJ       pkiMsgObj,     /* (mod) PKI message object             */
00082     unsigned int      index,         /* (in)  index of request in message
00083                                               object                         */
00084     B_KEY_OBJ         privateKey,    /* (in)  private key                    */
00085     PKI_POP_GEN_INFO *popGenInfo     /* (in)  determined by POP type         */
00086   );
00087 
00112   int (*ValidatePKIMsgProofOfPossession) (
00113     CERTC_CTX         ctx,           /* (in)  Cert-C context                 */
00114     POINTER           handle,        /* (in)  SP-specific data handle        */
00115     PKI_MSG_OBJ       msg,           /* (in)  PKI message object             */
00116     unsigned int      index,         /* (in)  index of request or response in
00117                                               message object                 */
00118     PKI_POP_VAL_INFO *popValInfo,    /* (in)  private info to open response  */
00119     B_KEY_OBJ         privateKey     /* (out) subject's private key          */
00120   );
00121 
00144   int (*SendPKIRequest) (
00145     CERTC_CTX            ctx,              /* (in)  Cert-C context           */
00146     POINTER              handle,           /* (in)  SP-specific data handle  */
00147     ITEM                *encodedRequest,   /* (in)  encoded request message  */
00148     ITEM                *encodedResponse,  /* (out) encoded response message */
00149     PKI_STATUS_INFO_OBJ  statusInfo        /* (out) out-of-band status info  */
00150   );
00151 
00178   int (*RequestPKIMsg) (
00179     CERTC_CTX            ctx,            /* (in)  Cert-C context                 */
00180     POINTER              handle,         /* (in)  SP-specific data handle        */
00181     PKI_MSG_OBJ          pkiRequest,     /* (in)  request object                 */
00182     PKI_PROTECT_INFO    *protectInfo,    /* (in)  protection/integrity info      */
00183     SERVICE              db,             /* (out) where to put keys, certs, crls */
00184     PKI_MSG_OBJ          response        /* (out) response message object        */
00185   );
00186 
00210   int (*GetPKIMsgDER) (
00211     CERTC_CTX         ctx,            /* (in)  Cert-C context               */
00212     POINTER           handle,         /* (in)  SP-specific data handle      */
00213     PKI_MSG_OBJ       request,        /* (in)  certification request object */
00214     PKI_PROTECT_INFO *protectInfo,    /* (in)  protection/integrity info    */
00215     ITEM             *encodedMsg      /* (out) serialized request           */
00216   );
00217 
00239   int (*SetPKIMsgBER) (
00240     CERTC_CTX         ctx,            /* (in)  Cert-C context            */
00241     POINTER           handle,         /* (in)  SP-specific data handle   */
00242     ITEM             *encodedMsg,     /* (in)  serialized response       */
00243     PKI_PROTECT_INFO *protectInfo,    /* (in)  protection/integrity info */
00244     PKI_MSG_OBJ       response        /* (out) response message object   */
00245   );
00246 
00247   /* --- DEPRECATED FUNCTIONS BEGIN --- */
00248 
00288   int (*ReadCertResponseMsg) (
00289     CERTC_CTX         ctx,            /* (in)  Cert-C context          */
00290     POINTER           handle,         /* (in)  SP-specific data handle */
00291     ITEM             *encodedMsg,     /* (in)  serialized response     */
00292     PKI_PROTECT_INFO *protectInfo,    /* (in)  protection keys & certs */
00293     PKI_MSG_OBJ       response        /* (out) response message object */
00294   );
00295 
00328   int (*WriteCertRequestMsg) (
00329     CERTC_CTX         ctx,            /* (in)  Cert-C context          */
00330     POINTER           handle,         /* (in)  SP-specific data handle */
00331     PKI_MSG_OBJ       request,        /* (in)  request message object  */
00332     PKI_PROTECT_INFO *protectInfo,    /* (in)  protection keys & certs */
00333     ITEM             *encodedMsg      /* (out) serialized request      */
00334   );
00335 
00413   int (*RequestCert) (
00414     CERTC_CTX         ctx,                /* (in)  Cert-C context          */
00415     POINTER           handle,             /* (in)  SP-specific data handle */
00416     PKI_MSG_OBJ       request,            /* (in)  request  message object */
00417     PKI_PROTECT_INFO  *protectInfo,       /* (in)  protection keys & certs */
00418     SERVICE           db,                 /* (in) response message object  */
00419     PKI_MSG_OBJ       response            /* (out) response message object */
00420   );
00421 
00454   int (*SendMsg) (
00455     CERTC_CTX        ctx,              /* (in)  Cert-C context           */
00456     POINTER          handle,           /* (in)  SP-specific data handle  */
00457     ITEM            *encodedRequest,   /* (in)  encoded request message  */
00458     ITEM            *encodedResponse,  /* (out) encoded response message */
00459     PKI_STATUS_INFO *statusInfo        /* (out) out-of-band status info  */
00460   );
00461 
00491   int (*GenerateProofOfPossession) (
00492     CERTC_CTX         ctx,            /* (in) Cert-C context               */
00493     POINTER           handle,         /* (in) SP-specific data handle      */
00494     PKI_MSG_OBJ       certRequest,    /* (in) certification request object */
00495     B_KEY_OBJ         privateKey,     /* (in) private key                  */
00496     PKI_POP_GEN_INFO *popGenInfo      /* (in) determined by POP type       */
00497   );
00498 
00499   /* Called by EE if encrypted certificate was returned. */
00505   int (*ValidateProofOfPossession) (
00506     CERTC_CTX         ctx,          /* Cert-C context                     */
00507     POINTER           handle,       /* (in) SP-specific data handle       */
00508     PKI_MSG_OBJ       message,      /* certification request or response  */
00509     PKI_POP_VAL_INFO *popValInfo,   /* (in) private info to open response */
00510     B_KEY_OBJ         privateKey    /* subject's private key              */
00511   );
00512   /* --- DEPRECATE FUNCTIONS END --- */
00513 
00514 } PKI_FUNCS;
00515 
00516 
00517 #ifdef __cplusplus
00518 }
00519 #endif
00520 
00521 #endif /* _PKISPI_H_ */



RSA BSAFE® Cert-C 2.7 API Reference