RSA Security logo

RSA BSAFE Cert-C
API Reference

crlapi.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_CRLAPI
00010 #define HEADER_BSAFE_CERTC_CRLAPI 1
00011 
00018 #include "basetype.h"
00019 #include "certext.h"
00020 
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00156 typedef struct CRL_ENTRY_INFO {
00157   ITEM           serialNumber;                 /* certificate serial number */
00158   UINT4          actionTime;     /* time the certificate is revoked or held */
00159   EXTENSIONS_OBJ crlEntryExtensions;                    /* extension object */
00160   POINTER        reserved;                       /* reserved for future use */
00161 } CRL_ENTRY_INFO;
00162 
00163 /* CRL Request Versions */
00164 #define CRL_VERSION_1 0                /* 1988 CRL format */
00165 #define CRL_VERSION_2 1                /* 1995 CRL format */
00166 #define DEFAULT_CRL_VERSION CRL_VERSION_1
00167 
00257 typedef struct CRL_FIELDS {
00258   UINT2           version;            /* must be CRL_V1 (default) or CRL_V21 */
00259   int             signatureAlgorithm;
00260   NAME_OBJ        issuerName;
00261   UINT4           lastUpdate;
00262   UINT4           nextUpdate;
00263   CRL_ENTRIES_OBJ crlEntries;
00264   EXTENSIONS_OBJ  crlExtensions;
00265   POINTER         reserved;                 /* reserved for future expansion */
00266 } CRL_FIELDS;
00267 
00283 int C_GetCRLEntriesCount (
00284   CRL_ENTRIES_OBJ  crlEntriesObject,
00285   unsigned int    *count);
00286 
00329 int C_GetCRLEntry (
00330   CRL_ENTRIES_OBJ  crlEntriesObject,
00331   CRL_ENTRY_INFO  *crlEntryInfo,
00332   unsigned int     crlEntryIndex);
00333 
00362 int C_AddCRLEntry (
00363   CRL_ENTRIES_OBJ  crlEntriesObject,
00364   CRL_ENTRY_INFO  *crlEntryInfo,
00365   unsigned int    *index);
00366 
00385 int C_DeleteCRLEntry (
00386   CRL_ENTRIES_OBJ  crlEntriesObject,
00387   unsigned int     crlEntryIndex);
00388 
00413 int C_FindCRLEntryBySerialNumber (
00414   CRL_ENTRIES_OBJ  crlEntriesObject,
00415   unsigned char   *serialNumber,
00416   unsigned int     serialNumberLen,
00417   unsigned int    *crlEntryIndex);
00418 
00436 void C_ResetCRLEntries (
00437   CRL_ENTRIES_OBJ crlEntriesObject);
00438 
00456 int C_CreateCRLObject (
00457   CRL_OBJ   *crlObj,
00458   CERTC_CTX  ctx);
00459 
00482 int C_CreateCRLObjectReference( 
00483   CERTC_CTX  ctx, 
00484   CRL_OBJ    crlObj,
00485   CRL_OBJ   *crlObjRef );
00486 
00504 void C_DestroyCRLObject (
00505   CRL_OBJ *crlObject);
00506 
00528 int C_PrepareUnsignedCRLForIssuer (
00529   CRL_OBJ  crlObject,
00530   NAME_OBJ issuerName);
00531 
00591 int C_SetCRLFields (
00592   CRL_OBJ     crlObject,
00593   CRL_FIELDS *crlFields);
00594 
00679 int C_GetCRLFields (
00680   CRL_OBJ     crlObject,
00681   CRL_FIELDS *crlFields);
00682 
00708 int C_GetCRLDER (
00709   CRL_OBJ         crlObject,
00710   unsigned char **der,
00711   unsigned int   *derLen);
00712 
00746 int C_SetCRLBER (
00747   CRL_OBJ        crlObject,
00748   unsigned char *ber,
00749   unsigned int   berLen);
00750 
00779 int C_GetCRLInnerDER (
00780   CRL_OBJ         crlObject,
00781   unsigned char **innerDER,
00782   unsigned int   *innerDERLen);
00783 
00816 int C_SetCRLInnerBER (
00817   CRL_OBJ        crlObject,
00818   unsigned char *innerBER,
00819   unsigned int   innerBERLen);
00820 
00837 int C_SignCRL (
00838   CRL_OBJ   crlObj,              /* CRL object */
00839   B_KEY_OBJ privateKey,            /* sign key */
00840   ...);
00841 
00862 int C_VerifyCRLSignature (
00863   CRL_OBJ   crlObj,              /* CRL object */
00864   B_KEY_OBJ publicKey,           /* verify key */
00865   ...);
00866 
00867 #ifdef __cplusplus
00868 }
00869 #endif
00870 
00871 #endif /* HEADER_BSAFE_CERTC_CRLAPI */



RSA BSAFE® Cert-C 2.7 API Reference