RSA Security logo

RSA BSAFE Cert-C
API Reference

dbspi.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (c) RSA Security Inc., 1999-2003.  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 HEADER_BSAFE_CERTC_DBSPI
00010 #define HEADER_BSAFE_CERTC_DBSPI 1
00011 
00018 #include "basetype.h"
00019 #include "certapi.h"
00020 #include "crlapi.h"
00021 #include "certattr.h"
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00042 typedef struct db_funcs {
00043 
00066   void (*Finalize) (
00067     CERTC_CTX       ctx,                /* Cert-C context */
00068     POINTER         handle);            /* provider handle */
00069 
00084   int (*InsertCert) (
00085     CERTC_CTX       ctx,                /* Cert-C context */
00086     POINTER         handle,             /* database handle */
00087     CERT_OBJ        cert);              /* certificate object */
00088 
00103   int (*InsertCRL) (
00104     CERTC_CTX       ctx,                /* Cert-C context */
00105     POINTER         handle,             /* database handle */
00106     CRL_OBJ         crl);               /* CRL object */
00107 
00199   int (*InsertPrivateKey) (
00200     CERTC_CTX       ctx,                /* Cert-C context */
00201     POINTER         handle,             /* database handle */
00202     CERT_OBJ        cert,               /* cert that matches private key */
00203     B_KEY_OBJ       privateKey);        /* private key object */
00204 
00220   int (*InsertPrivateKeyBySPKI) (
00221     CERTC_CTX       ctx,                /* Cert-C context */
00222     POINTER         handle,             /* database handle */
00223     ITEM            *spki,              /* subject public key info */
00224     B_KEY_OBJ       privateKey);        /* private key object */
00225 
00243   int (*SelectCertByIssuerSerial) (
00244     CERTC_CTX       ctx,                /* Cert-C context */
00245     POINTER         handle,             /* database handle */
00246     NAME_OBJ        issuerName,         /* issuer name */
00247     ITEM            *serialNumber,      /* serial number */
00248     LIST_OBJ        certList);          /* list where cert is added */
00249 
00371   int (*SelectCertBySubject) (
00372     CERTC_CTX       ctx,                /* Cert-C context */
00373     POINTER         handle,             /* database handle */
00374     NAME_OBJ        subjectName,        /* subject name */
00375     LIST_OBJ        certList);          /* list where certs are added */
00376 
00464   int (*SelectCertByExtensions) (
00465     CERTC_CTX       ctx,                /* Cert-C context */
00466     POINTER         handle,             /* database handle */
00467     NAME_OBJ        baseName,           /* starting point for search */
00468     EXTENSIONS_OBJ  extensions,         /* extensions object */
00469     LIST_OBJ        certList);          /* list where certs are added */
00470 
00471 
00488   int (*SelectFirstCert) (
00489     CERTC_CTX       ctx,                /* Cert-C context */
00490     POINTER         handle,             /* database handle */
00491     POINTER         *iterator,          /* iteration handle */
00492     LIST_OBJ        certList);          /* list where certs are added */
00493 
00510   int (*SelectNextCert) (
00511     CERTC_CTX       ctx,                /* Cert-C context */
00512     POINTER         handle,             /* database handle */
00513     POINTER         *iterator,          /* iteration handle */
00514     LIST_OBJ        certList);          /* list where certs are added */
00515 
00530   void (*FreeCertIterator) (
00531     CERTC_CTX       ctx,                /* Cert-C context */
00532     POINTER         handle,             /* database handle */
00533     POINTER         *iterator);         /* iteration handle */
00534 
00549   int (*SelectCRLByIssuerTime) (
00550     CERTC_CTX       ctx,                /* Cert-C context */
00551     POINTER         handle,             /* database handle */
00552     NAME_OBJ        issuerName,         /* CRL issuer name */
00553     UINT4           time,               /* selection time */
00554     LIST_OBJ        crlList);           /* list where CRLs are added */
00555 
00569   int (*SelectFirstCRL) (
00570     CERTC_CTX       ctx,                /* Cert-C context */
00571     POINTER         handle,             /* database handle */
00572     POINTER         *iterator,          /* iteration handle */
00573     LIST_OBJ        crlList);           /* list where CRLs are added */
00574 
00588   int (*SelectNextCRL) (
00589     CERTC_CTX       ctx,                /* Cert-C context */
00590     POINTER         handle,             /* database handle */
00591     POINTER         *iterator,          /* iteration handle */
00592     LIST_OBJ        crlList);           /* list where CRLs are added */
00593 
00608   void (*FreeCRLIterator) (
00609     CERTC_CTX       ctx,                /* Cert-C context */
00610     POINTER         handle,             /* database handle */
00611     POINTER         *iterator);         /* iteration handle */
00612 
00693   int (*SelectPrivateKeyByCert) (
00694     CERTC_CTX       ctx,                /* Cert-C context */
00695     POINTER         handle,             /* database handle */
00696     CERT_OBJ        cert,               /* cert that matches private key */
00697     B_KEY_OBJ       privateKey);        /* (out) private key */
00698 
00714   int (*SelectPrivateKeyBySPKI) (
00715     CERTC_CTX       ctx,                /* Cert-C context */
00716     POINTER         handle,             /* database handle */
00717     ITEM            *spki,              /* subject public key info */
00718     B_KEY_OBJ       privateKey);        /* (out) private key */
00719 
00759   int (*SelectFirstPrivateKey) (
00760     CERTC_CTX       ctx,                /* Cert-C context */
00761     POINTER         handle,             /* database handle */
00762     POINTER         *iterator,          /* iteration handle */
00763     B_KEY_OBJ       privateKey);        /* (out) private key */
00764 
00807   int (*SelectNextPrivateKey) (
00808     CERTC_CTX       ctx,                /* Cert-C context */
00809     POINTER         handle,             /* database handle */
00810     POINTER         *iterator,          /* iteration handle */
00811     B_KEY_OBJ       privateKey);        /* (out) private key */
00812 
00827   void (*FreePrivateKeyIterator) (
00828     CERTC_CTX       ctx,                /* Cert-C context */
00829     POINTER         handle,             /* database handle */
00830     POINTER         *iterator);         /* iteration handle */
00831 
00847   int (*DeleteCert) (
00848     CERTC_CTX       ctx,                /* Cert-C context */
00849     POINTER         handle,             /* database handle */
00850     NAME_OBJ        issuerName,         /* issuer name */
00851     ITEM            *serialNumber);     /* serial number */
00852 
00866   int (*DeleteCRL) (
00867     CERTC_CTX       ctx,                /* Cert-C context */
00868     POINTER         handle,             /* database handle */
00869     NAME_OBJ        issuerName,         /* issuer name */
00870     UINT4           lastUpdate);        /* last update time */
00871 
00929   int (*DeletePrivateKey) (
00930     CERTC_CTX       ctx,                /* Cert-C context */
00931     POINTER         handle,             /* database handle */
00932     CERT_OBJ        cert);              /* cert that matches private key */
00933 
00949   int (*DeletePrivateKeyBySPKI) (
00950     CERTC_CTX       ctx,                /* Cert-C context */
00951     POINTER         handle,             /* database handle */
00952     ITEM            *spki);             /* subject public key info */
00953 
01017   int (*SelectCertByAttributes) (
01018     CERTC_CTX       ctx,                /* Cert-C context */
01019     POINTER         handle,             /* database handle */
01020     NAME_OBJ        baseName,           /* starting point for search */
01021     ATTRIBUTES_OBJ  attributes,         /* attributes object */
01022     LIST_OBJ        certList);          /* list where certs are added */
01023 
01024 } DB_FUNCS;
01025 
01026 #ifdef __cplusplus
01027 }
01028 #endif
01029 
01030 #endif /* HEADER_BSAFE_CERTC_DBSPI */
01031 



RSA BSAFE® Cert-C 2.7 API Reference