| RSA BSAFE Cert-C |
Certificate Components for C |
| Crypto-C 6.2.1 Developer's Guide | ||
| Search |
00001 /* $Id: certlist.h,v 1.11 2005/01/25 05:50:29 jmckee Exp $ */ 00002 /* 00003 * Copyright (c) RSA Security Inc., 1999-2003. All rights reserved. 00004 * This work contains proprietary, confidential, and trade secret 00005 * information of RSA Security Inc. Use, disclosure or reproduction 00006 * without the express written authorization of RSA Security Inc. is 00007 * prohibited. 00008 */ 00009 00010 #ifndef HEADER_BSAFE_CERTC_CERTLIST 00011 #define HEADER_BSAFE_CERTC_CERTLIST 1 00012 00018 #include "basetype.h" 00019 #include "bsafe.h" 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00032 typedef void (*VALUE_DESTRUCTOR) ( 00033 POINTER value); /* value to be deleted */ 00034 00047 typedef struct LIST_OBJ_ENTRY_HANDLER { 00048 00066 int (*AllocAndCopy) ( 00067 POINTER *newValue, 00068 POINTER value); 00069 00078 VALUE_DESTRUCTOR Destructor; 00079 } LIST_OBJ_ENTRY_HANDLER; 00080 00081 extern LIST_OBJ_ENTRY_HANDLER C_CertEntryHandler; 00082 extern LIST_OBJ_ENTRY_HANDLER C_CertEntryHandlerNoCopy; 00083 extern LIST_OBJ_ENTRY_HANDLER C_CRLEntryHandler; 00084 extern LIST_OBJ_ENTRY_HANDLER C_CRLEntryHandlerNoCopy; 00085 extern LIST_OBJ_ENTRY_HANDLER C_KeyEntryHandler; 00086 extern LIST_OBJ_ENTRY_HANDLER C_SignerInfoEntryHandler; 00087 extern LIST_OBJ_ENTRY_HANDLER C_ItemEntryHandler; 00088 extern LIST_OBJ_ENTRY_HANDLER C_RecipientInfoEntryHandler; 00089 00090 int C_CreateListObject ( 00091 LIST_OBJ *listObject); /* (out) list object */ 00092 00093 int C_DeleteListObjectEntry ( 00094 LIST_OBJ listObject, /* list object */ 00095 unsigned int entryIndex); /* index of list entry */ 00096 00097 void C_DestroyListObject ( 00098 LIST_OBJ *listObject); /* list object */ 00099 00100 int C_GetListObjectEntry ( 00101 LIST_OBJ listObject, /* list object */ 00102 unsigned int entryIndex, /* index of list entry */ 00103 POINTER *entry); /* (out) list entry */ 00104 00105 int C_GetListObjectCount ( 00106 LIST_OBJ listObject, /* list object */ 00107 unsigned int *count); /* count of list entries */ 00108 00109 void C_ResetListObject ( 00110 LIST_OBJ listObject); /* list object */ 00111 00112 int C_AddListObjectEntry ( 00113 LIST_OBJ listObject, /* list object */ 00114 POINTER entry, /* list entry */ 00115 unsigned int *entryIndex, /* (out) list entry index */ 00116 LIST_OBJ_ENTRY_HANDLER *handler); /* list entry handler */ 00117 00118 int C_InsertListObjectEntry ( 00119 LIST_OBJ listObject, /* list object */ 00120 POINTER entry, /* list entry */ 00121 unsigned int entryIndex, /* list entry index */ 00122 LIST_OBJ_ENTRY_HANDLER *handler); /* list entry handler */ 00123 00124 int C_AddCertToList ( 00125 LIST_OBJ listObject, /* list object */ 00126 CERT_OBJ cert, /* certificate to be added */ 00127 unsigned int *entryIndex); /* (out) list entry index */ 00128 00129 int C_AddCertToListNoCopy ( 00130 LIST_OBJ listObject, /* list object */ 00131 CERT_OBJ cert, /* certificate to be added */ 00132 unsigned int *entryIndex); /* (out) list entry index */ 00133 00134 int C_AddUniqueCertToList ( 00135 LIST_OBJ listObject, /* list object */ 00136 CERT_OBJ cert, /* certificate to be added */ 00137 unsigned int *entryIndex); /* (out) list entry index */ 00138 00139 int C_AddUniqueCertToListNoCopy ( 00140 LIST_OBJ listObject, /* list object */ 00141 CERT_OBJ cert, /* certificate reference to be added */ 00142 unsigned int *entryIndex); /* (out) list entry index */ 00143 00144 int C_InsertCertInList ( 00145 LIST_OBJ listObject, /* list object */ 00146 CERT_OBJ cert, /* certificate to be inserted */ 00147 unsigned int entryIndex); /* list entry index */ 00148 00149 int C_InsertCertInListNoCopy ( 00150 LIST_OBJ listObject, /* list object */ 00151 CERT_OBJ cert, /* certificate reference to be inserted */ 00152 unsigned int entryIndex); /* list entry index */ 00153 00154 int C_AddCRLToList ( 00155 LIST_OBJ listObject, /* list object */ 00156 CRL_OBJ crl, /* CRL to be added */ 00157 unsigned int *entryIndex); /* (out) list entry index */ 00158 00159 int C_AddCRLToListNoCopy ( 00160 LIST_OBJ listObject, /* list object */ 00161 CRL_OBJ crl, /* CRL reference to be added */ 00162 unsigned int *entryIndex); /* (out) list entry index */ 00163 00164 int C_AddUniqueCRLToList ( 00165 LIST_OBJ listObject, /* list object */ 00166 CRL_OBJ crl, /* CRL to be added */ 00167 unsigned int *entryIndex); /* (out) list entry index */ 00168 00169 int C_AddUniqueCRLToListNoCopy ( 00170 LIST_OBJ listObject, /* list object */ 00171 CRL_OBJ crl, /* CRL reference to be added */ 00172 unsigned int *entryIndex); /* (out) list entry index */ 00173 00174 int C_InsertCRLInList ( 00175 LIST_OBJ listObject, /* list object */ 00176 CRL_OBJ crl, /* CRL to be inserted */ 00177 unsigned int entryIndex); /* list entry index */ 00178 00179 int C_InsertCRLInListNoCopy ( 00180 LIST_OBJ listObject, /* list object */ 00181 CRL_OBJ crl, /* CRL reference to be inserted */ 00182 unsigned int entryIndex); /* list entry index */ 00183 00184 int C_AddPrivateKeyToList ( 00185 LIST_OBJ listObject, /* list object */ 00186 B_KEY_OBJ privateKey, /* key to be added */ 00187 unsigned int *entryIndex); /* (out) list entry index */ 00188 00189 int C_InsertPrivateKeyInList ( 00190 LIST_OBJ listObject, /* list object */ 00191 B_KEY_OBJ privateKey, /* key to be inserted */ 00192 unsigned int entryIndex); /* list entry index */ 00193 00194 int C_AddItemToList ( 00195 LIST_OBJ listObject, /* list object */ 00196 ITEM *item, /* item to be added */ 00197 unsigned int *entryIndex); /* (out) list entry index */ 00198 00199 int C_InsertItemInList ( 00200 LIST_OBJ listObject, /* list object */ 00201 ITEM *item, /* item to be inserted */ 00202 unsigned int entryIndex); /* list entry index */ 00203 00204 int C_AddUniqueItemToList ( 00205 LIST_OBJ listObject, /* list object */ 00206 ITEM *item, /* item to be added */ 00207 unsigned int *entryIndex); /* (out) list entry index */ 00208 00209 #ifdef __cplusplus 00210 } 00211 #endif 00212 00213 #endif /* HEADER_BSAFE_CERTC_CERTLIST */