OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 /* | 4 /* |
5 * pkix_tools.h | 5 * pkix_tools.h |
6 * | 6 * |
7 * Header for Utility Functions and Macros | 7 * Header for Utility Functions and Macros |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "pkix_targetcertchecker.h" | 44 #include "pkix_targetcertchecker.h" |
45 #include "pkix_validate.h" | 45 #include "pkix_validate.h" |
46 #include "pkix_valresult.h" | 46 #include "pkix_valresult.h" |
47 #include "pkix_verifynode.h" | 47 #include "pkix_verifynode.h" |
48 | 48 |
49 #ifdef __cplusplus | 49 #ifdef __cplusplus |
50 extern "C" { | 50 extern "C" { |
51 #endif | 51 #endif |
52 | 52 |
53 typedef struct pkixStdVarsStr { | 53 typedef struct pkixStdVarsStr { |
54 const char *aMyFuncName; | 54 const char *aMyFuncName; |
55 PKIX_Error *aPkixErrorResult; | 55 PKIX_Error *aPkixErrorResult; |
56 PKIX_Error *aPkixTempResult; | 56 PKIX_Error *aPkixTempResult; |
57 PKIX_Error *aPkixReturnResult; | 57 PKIX_Error *aPkixReturnResult; |
58 PKIX_ERRORCODE aPkixErrorCode; | 58 PKIX_ERRORCODE aPkixErrorCode; |
59 PKIX_Boolean aPkixErrorReceived; | 59 PKIX_Boolean aPkixErrorReceived; |
60 PKIX_Boolean aPkixTempErrorReceived; | 60 PKIX_Boolean aPkixTempErrorReceived; |
61 PKIX_ERRORCLASS aPkixErrorClass; | 61 PKIX_ERRORCLASS aPkixErrorClass; |
62 PKIX_UInt32 aPkixType; | 62 PKIX_UInt32 aPkixType; |
63 PKIX_PL_Object *aLockedObject; | 63 PKIX_PL_Object *aLockedObject; |
64 PKIX_List *aPkixErrorList; | 64 PKIX_List *aPkixErrorList; |
65 } PKIX_StdVars; | 65 } PKIX_StdVars; |
66 | 66 |
67 #ifdef PKIX_STDVARS_POINTER | 67 #ifdef PKIX_STDVARS_POINTER |
68 #define myFuncName stdVars->aMyFuncName | 68 #define myFuncName stdVars->aMyFuncName |
69 #define pkixErrorResult stdVars->aPkixErrorResult | 69 #define pkixErrorResult stdVars->aPkixErrorResult |
70 #define pkixTempResult stdVars->aPkixTempResult | 70 #define pkixTempResult stdVars->aPkixTempResult |
71 #define pkixReturnResult stdVars->aPkixReturnResult | 71 #define pkixReturnResult stdVars->aPkixReturnResult |
72 #define pkixErrorCode stdVars->aPkixErrorCode | 72 #define pkixErrorCode stdVars->aPkixErrorCode |
73 #define pkixErrorReceived stdVars->aPkixErrorReceived | 73 #define pkixErrorReceived stdVars->aPkixErrorReceived |
74 #define pkixTempErrorReceived stdVars->aPkixTempErrorReceived· | 74 #define pkixTempErrorReceived stdVars->aPkixTempErrorReceived |
75 #define pkixErrorClass stdVars->aPkixErrorClass | 75 #define pkixErrorClass stdVars->aPkixErrorClass |
76 #define pkixType stdVars->aPkixType | 76 #define pkixType stdVars->aPkixType |
77 #define lockedObject stdVars->aLockedObject | 77 #define lockedObject stdVars->aLockedObject |
78 #define pkixErrorList stdVars->aPkixErrorList | 78 #define pkixErrorList stdVars->aPkixErrorList |
79 #define stdVarsPtr stdVars | 79 #define stdVarsPtr stdVars |
80 #else | 80 #else |
81 #define myFuncName stdVars.aMyFuncName | 81 #define myFuncName stdVars.aMyFuncName |
82 #define pkixErrorResult stdVars.aPkixErrorResult | 82 #define pkixErrorResult stdVars.aPkixErrorResult |
83 #define pkixTempResult stdVars.aPkixTempResult | 83 #define pkixTempResult stdVars.aPkixTempResult |
84 #define pkixReturnResult stdVars.aPkixReturnResult | 84 #define pkixReturnResult stdVars.aPkixReturnResult |
85 #define pkixErrorCode stdVars.aPkixErrorCode | 85 #define pkixErrorCode stdVars.aPkixErrorCode |
86 #define pkixErrorReceived stdVars.aPkixErrorReceived | 86 #define pkixErrorReceived stdVars.aPkixErrorReceived |
87 #define pkixTempErrorReceived stdVars.aPkixTempErrorReceived· | 87 #define pkixTempErrorReceived stdVars.aPkixTempErrorReceived |
88 #define pkixErrorClass stdVars.aPkixErrorClass | 88 #define pkixErrorClass stdVars.aPkixErrorClass |
89 #define pkixType stdVars.aPkixType | 89 #define pkixType stdVars.aPkixType |
90 #define lockedObject stdVars.aLockedObject | 90 #define lockedObject stdVars.aLockedObject |
91 #define pkixErrorList stdVars.aPkixErrorList | 91 #define pkixErrorList stdVars.aPkixErrorList |
92 #define stdVarsPtr &stdVars | 92 #define stdVarsPtr &stdVars |
93 #endif | 93 #endif |
94 | 94 |
95 extern PKIX_Error * PKIX_DoReturn(PKIX_StdVars * stdVars, | 95 extern PKIX_Error *PKIX_DoReturn(PKIX_StdVars *stdVars, |
96 PKIX_ERRORCLASS errClass, | 96 PKIX_ERRORCLASS errClass, |
97 PKIX_Boolean doLogger, | 97 PKIX_Boolean doLogger, void *plContext); |
98 void * plContext); | |
99 | 98 |
100 extern PKIX_Error * PKIX_DoThrow(PKIX_StdVars * stdVars,· | 99 extern PKIX_Error *PKIX_DoThrow(PKIX_StdVars *stdVars, PKIX_ERRORCLASS errClass, |
101 PKIX_ERRORCLASS errClass, | 100 PKIX_ERRORCODE errCode, |
102 PKIX_ERRORCODE errCode, | 101 PKIX_ERRORCLASS overrideClass, void *plContext); |
103 PKIX_ERRORCLASS overrideClass, | |
104 void * plContext); | |
105 | 102 |
106 extern void PKIX_DoAddError(PKIX_StdVars * stdVars,· | 103 extern void PKIX_DoAddError(PKIX_StdVars *stdVars, PKIX_Error *error, |
107 PKIX_Error * error, | 104 void *plContext); |
108 void * plContext); | |
109 | 105 |
110 #ifdef PKIX_OBJECT_LEAK_TEST | 106 #ifdef PKIX_OBJECT_LEAK_TEST |
111 extern PKIX_Error * pkix_CheckForGeneratedError(PKIX_StdVars * stdVars,· | 107 extern PKIX_Error *pkix_CheckForGeneratedError(PKIX_StdVars *stdVars, |
112 PKIX_ERRORCLASS errClass,· | 108 PKIX_ERRORCLASS errClass, |
113 char * fnName, | 109 char *fnName, |
114 PKIX_Boolean *errorStateSet, | 110 PKIX_Boolean *errorStateSet, |
115 void * plContext); | 111 void *plContext); |
116 #endif /* PKIX_OBJECT_LEAK_TEST */ | 112 #endif /* PKIX_OBJECT_LEAK_TEST */ |
117 | 113 |
118 extern const PKIX_StdVars zeroStdVars; | 114 extern const PKIX_StdVars zeroStdVars; |
119 | 115 |
120 extern PRLogModuleInfo *pkixLog; | 116 extern PRLogModuleInfo *pkixLog; |
121 | 117 |
122 /* | 118 /* |
123 * UTILITY MACROS | 119 * UTILITY MACROS |
124 * Documentation for these common utility macros can be found in the | 120 * Documentation for these common utility macros can be found in the |
125 * Implementation Guidelines document (Section 4.3) | 121 * Implementation Guidelines document (Section 4.3) |
126 * | 122 * |
127 * In general, macros with multiple statements (or a single "if" statement) | 123 * In general, macros with multiple statements (or a single "if" statement) |
128 * use the "do {<body>} while (0)" technique in order to convert the multiple | 124 * use the "do {<body>} while (0)" technique in order to convert the multiple |
129 * statements into one statement, thus avoiding the dangling else problem. | 125 * statements into one statement, thus avoiding the dangling else problem. |
130 * For macros which ALWAYS exit with a "return" or "goto", there is no | 126 * For macros which ALWAYS exit with a "return" or "goto", there is no |
131 * need to use this technique (and it yields compiler warnings of "statement | 127 * need to use this technique (and it yields compiler warnings of "statement |
132 * not reached"), so we just use "{<body>}" to group the statements together. | 128 * not reached"), so we just use "{<body>}" to group the statements together. |
133 */ | 129 */ |
134 | 130 |
135 #if !defined (PKIX_OBJECT_LEAK_TEST) | 131 #if !defined(PKIX_OBJECT_LEAK_TEST) |
136 | 132 |
137 #define PKIX_STD_VARS(funcName) \ | 133 #define PKIX_STD_VARS(funcName) \ |
138 static const char cMyFuncName[] = {funcName}; \ | 134 static const char cMyFuncName[] = {funcName}; \ |
139 PKIX_StdVars stdVars = zeroStdVars; \ | 135 PKIX_StdVars stdVars = zeroStdVars; \ |
140 myFuncName = cMyFuncName | 136 myFuncName = cMyFuncName |
141 | |
142 | 137 |
143 #else /* PKIX_OBJECT_LEAK_TEST */ | 138 #else /* PKIX_OBJECT_LEAK_TEST */ |
144 | 139 |
145 extern char **fnStackNameArr; | 140 extern char **fnStackNameArr; |
146 extern PKIX_UInt32 *fnStackInvCountArr; | 141 extern PKIX_UInt32 *fnStackInvCountArr; |
147 extern PKIX_UInt32 stackPosition; | 142 extern PKIX_UInt32 stackPosition; |
148 extern PKIX_Boolean noErrorState; | 143 extern PKIX_Boolean noErrorState; |
149 extern PKIX_Boolean errorGenerated; | 144 extern PKIX_Boolean errorGenerated; |
150 extern PKIX_Boolean runningLeakTest; | 145 extern PKIX_Boolean runningLeakTest; |
151 extern PLHashTable *fnInvTable; | 146 extern PLHashTable *fnInvTable; |
152 extern PKIX_UInt32 testStartFnStackPosition; | 147 extern PKIX_UInt32 testStartFnStackPosition; |
153 extern char *errorFnStackString; | 148 extern char *errorFnStackString; |
154 | 149 |
155 extern PLHashNumber PR_CALLBACK pkix_ErrorGen_Hash (const void *key); | 150 extern PLHashNumber PR_CALLBACK pkix_ErrorGen_Hash(const void *key); |
156 | 151 |
157 #define PKIX_STD_VARS(funcName) \ | 152 #define PKIX_STD_VARS(funcName) \ |
158 static const char cMyFuncName[] = {funcName}; \ | 153 static const char cMyFuncName[] = {funcName}; \ |
159 PKIX_StdVars stdVars = zeroStdVars; \ | 154 PKIX_StdVars stdVars = zeroStdVars; \ |
160 PKIX_Boolean errorSetFlag = PKIX_FALSE; \ | 155 PKIX_Boolean errorSetFlag = PKIX_FALSE; \ |
161 myFuncName = cMyFuncName; \ | 156 myFuncName = cMyFuncName; \ |
162 if (runningLeakTest) { \ | 157 if (runningLeakTest) { \ |
163 if (fnStackNameArr) { \ | 158 if (fnStackNameArr) { \ |
164 fnStackInvCountArr[stackPosition] += 1; \ | 159 fnStackInvCountArr[stackPosition] += 1; \ |
165 stackPosition += 1; \ | 160 stackPosition += 1; \ |
166 fnStackInvCountArr[stackPosition] = 0; \ | 161 fnStackInvCountArr[stackPosition] = 0; \ |
167 fnStackNameArr[stackPosition] = (char*)myFuncName; \ | 162 fnStackNameArr[stackPosition] = (char *)myFuncName; \ |
168 fnStackNameArr[stackPosition + 1] = NULL; \ | 163 fnStackNameArr[stackPosition + 1] = NULL; \ |
169 PR_LOG(pkixLog, 5, \ | 164 PR_LOG(pkixLog, 5, \ |
170 ("%s%*s+> %s(%d) - %s\n", (errorGenerated ? "*" : " "), \ | 165 ("%s%*s+> %s(%d) - %s\n", (errorGenerated ? "*" : " "), \ |
171 stackPosition, " ", fnStackNameArr[stackPosition],
\ | 166 stackPosition, " ", fnStackNameArr[stackPosition], \ |
172 stackPosition, myFuncName)); \ | 167 stackPosition, myFuncName)); \ |
173 } \ | 168 } \ |
174 do { \ | 169 do { \ |
175 pkixErrorResult = pkix_CheckForGeneratedError(&stdVars, PKIX_MEM_ERR
OR, \ | 170 pkixErrorResult = pkix_CheckForGeneratedError( \ |
176 funcName, &errorSetFla
g, \ | 171 &stdVars, PKIX_MEM_ERROR, funcName, &errorSetFlag, plContext); \ |
177 plContext); \ | 172 if (pkixErrorResult) { \ |
178 if (pkixErrorResult) { \ | 173 PR_LOG(pkixLog, 5, \ |
179 PR_LOG(pkixLog, 5, \ | 174 ("%s%*s<- %s(%d) - %s\n", (errorGenerated ? "*" : " "), \ |
180 ("%s%*s<- %s(%d) - %s\n", (errorGenerated ? "*" : " "), \ | 175 stackPosition, " ", fnStackNameArr[stackPosition], \ |
181 stackPosition, " ", fnStackNameArr[stackPosition],
\ | 176 stackPosition, myFuncName)); \ |
182 stackPosition, myFuncName)); \ | 177 fnStackNameArr[stackPosition--] = NULL; \ |
183 fnStackNameArr[stackPosition--] = NULL; \ | 178 if (errorSetFlag) { \ |
184 if (errorSetFlag) { \ | 179 noErrorState = (noErrorState) ? PKIX_FALSE : PKIX_TRUE; \ |
185 noErrorState = (noErrorState) ? PKIX_FALSE : PKIX_TRUE; \ | 180 } \ |
186 } \ | 181 return pkixErrorResult; \ |
187 return pkixErrorResult; \ | 182 } \ |
188 } \ | 183 } while (0); \ |
189 } while (0); \ | 184 } |
190 } | |
191 #endif /* PKIX_OBJECT_LEAK_TEST */ | 185 #endif /* PKIX_OBJECT_LEAK_TEST */ |
192 | 186 |
193 #ifdef DEBUG | 187 #ifdef DEBUG |
194 #define _PKIX_DEBUG_TRACE(cond, prefix, level) \ | 188 #define _PKIX_DEBUG_TRACE(cond, prefix, level) \ |
195 do { \ | 189 do { \ |
196 » if (cond) { \ | 190 if (cond) { \ |
197 » pkix_Logger_Check(pkixLoggersDebugTrace, myFuncName, \ | 191 pkix_Logger_Check(pkixLoggersDebugTrace, myFuncName, prefix, pkixType, \ |
198 » prefix, pkixType, level, plContext); \ | 192 level, plContext); \ |
199 » } \ | 193 } \ |
200 } while (0) | 194 } while (0) |
201 #else | 195 #else |
202 #define _PKIX_DEBUG_TRACE(cond, prefix, level) | 196 #define _PKIX_DEBUG_TRACE(cond, prefix, level) |
203 #endif | 197 #endif |
204 | 198 |
205 #define _PKIX_LOG_ERROR(code, level) \ | 199 #define _PKIX_LOG_ERROR(code, level) \ |
206 { \ | 200 { \ |
207 » if (pkixLoggersErrors) { \ | 201 if (pkixLoggersErrors) { \ |
208 » pkix_Logger_CheckWithCode(pkixLoggersErrors, code, \ | 202 pkix_Logger_CheckWithCode(pkixLoggersErrors, code, NULL, pkixType, \ |
209 » NULL, pkixType, level, plContext); \ | 203 level, plContext); \ |
210 » } \ | 204 } \ |
211 } | 205 } |
212 | 206 |
213 #define PKIX_ENTER(type, funcName) \ | 207 #define PKIX_ENTER(type, funcName) \ |
214 PKIX_STD_VARS(funcName); \ | 208 PKIX_STD_VARS(funcName); \ |
215 pkixType = PKIX_ ## type ## _ERROR; \ | 209 pkixType = PKIX_##type##_ERROR; \ |
216 PKIX_DEBUG_ENTER(type); \ | 210 PKIX_DEBUG_ENTER(type); \ |
217 _PKIX_DEBUG_TRACE(pkixLoggersDebugTrace, ">>>", PKIX_LOGGER_LEVEL_TRACE); | 211 _PKIX_DEBUG_TRACE(pkixLoggersDebugTrace, ">>>", PKIX_LOGGER_LEVEL_TRACE); |
218 | 212 |
219 #define PKIX_ENTER_NO_LOGGER(type, funcName) \ | 213 #define PKIX_ENTER_NO_LOGGER(type, funcName) \ |
220 PKIX_STD_VARS(funcName); \ | 214 PKIX_STD_VARS(funcName); \ |
221 pkixType = PKIX_ ## type ## _ERROR; \ | 215 pkixType = PKIX_##type##_ERROR; \ |
222 PKIX_DEBUG_ENTER(type); | 216 PKIX_DEBUG_ENTER(type); |
223 | 217 |
224 #define PKIX_DEBUG_ENTER(type) \ | 218 #define PKIX_DEBUG_ENTER(type) \ |
225 PKIX_ ## type ## _DEBUG_ARG("( Entering %s).\n", myFuncName) | 219 PKIX_##type##_DEBUG_ARG("( Entering %s).\n", myFuncName) |
226 | 220 |
227 #define PKIX_DEBUG_EXIT(type) \ | 221 #define PKIX_DEBUG_EXIT(type) \ |
228 PKIX_ ## type ## _DEBUG_ARG("( Exiting %s).\n", myFuncName) | 222 PKIX_##type##_DEBUG_ARG("( Exiting %s).\n", myFuncName) |
229 | 223 |
230 #define PKIX_OBJECT_UNLOCK(obj) \ | 224 #define PKIX_OBJECT_UNLOCK(obj) \ |
231 do { \ | 225 do { \ |
232 » if (obj && lockedObject == (PKIX_PL_Object *)(obj)){ \ | 226 if (obj && lockedObject == (PKIX_PL_Object *)(obj)) { \ |
233 » pkixTempResult = \ | 227 pkixTempResult = \ |
234 » » PKIX_PL_Object_Unlock \ | 228 PKIX_PL_Object_Unlock((PKIX_PL_Object *)(obj), plContext); \ |
235 » » ((PKIX_PL_Object *)(obj), plContext); \ | 229 if (pkixTempResult) { \ |
236 » if (pkixTempResult) { \ | 230 PKIX_DoAddError(stdVarsPtr, pkixTempResult, plContext); \ |
237 » » PKIX_DoAddError(stdVarsPtr, pkixTempResult, plContext); \ | 231 pkixTempResult = NULL; \ |
238 » » pkixTempResult = NULL; \ | 232 } \ |
239 » } \ | 233 lockedObject = NULL; \ |
240 » lockedObject = NULL; \ | 234 } else { \ |
241 » } else { \ | 235 PORT_Assert(lockedObject == NULL); \ |
242 » PORT_Assert(lockedObject == NULL); \ | 236 } \ |
243 » } \ | 237 } while (0) |
244 } while (0) | 238 |
245 | 239 #define PKIX_DECREF(obj) \ |
246 #define PKIX_DECREF(obj) \ | 240 do { \ |
247 do { \ | 241 if (obj) { \ |
248 » if (obj){ \ | 242 pkixTempResult = \ |
249 » pkixTempResult = PKIX_PL_Object_DecRef \ | 243 PKIX_PL_Object_DecRef((PKIX_PL_Object *)(obj), plContext); \ |
250 » » » ((PKIX_PL_Object *)(obj), plContext); \ | 244 if (pkixTempResult) { \ |
251 » if (pkixTempResult) { \ | 245 PKIX_DoAddError(stdVarsPtr, pkixTempResult, plContext); \ |
252 » » PKIX_DoAddError(stdVarsPtr, pkixTempResult, plContext); \ | 246 pkixTempResult = NULL; \ |
253 » » pkixTempResult = NULL; \ | 247 } \ |
254 » } \ | 248 obj = NULL; \ |
255 » obj = NULL; \ | 249 } \ |
256 » } \ | 250 } while (0) |
257 } while (0) | 251 |
258 | 252 #define PKIX_THROW(type, descNum) \ |
259 #define PKIX_THROW(type, descNum) \ | 253 return PKIX_DoThrow(&stdVars, (PKIX_##type##_ERROR), descNum, \ |
260 return PKIX_DoThrow(&stdVars, (PKIX_ ## type ## _ERROR), descNum, \ | 254 pkixErrorClass, plContext); |
261 pkixErrorClass, plContext); | |
262 | 255 |
263 #ifdef PKIX_OBJECT_LEAK_TEST | 256 #ifdef PKIX_OBJECT_LEAK_TEST |
264 #define PKIX_RETURN(type) \ | 257 #define PKIX_RETURN(type) \ |
265 if (runningLeakTest && fnStackNameArr) { \ | 258 if (runningLeakTest && fnStackNameArr) { \ |
266 PR_LOG(pkixLog, 5, \ | 259 PR_LOG(pkixLog, 5, ("%s%*s<- %s(%d) - %s\n", (errorGenerated ? "*" : " "), \ |
267 ("%s%*s<- %s(%d) - %s\n", (errorGenerated ? "*" : " "), \ | 260 stackPosition, " ", fnStackNameArr[stackPosition], \ |
268 stackPosition, " ", fnStackNameArr[stackPosition], \ | 261 stackPosition, myFuncName)); \ |
269 stackPosition, myFuncName)); \ | 262 fnStackNameArr[stackPosition--] = NULL; \ |
270 fnStackNameArr[stackPosition--] = NULL; \ | 263 if (errorSetFlag) noErrorState = (noErrorState) ? PKIX_FALSE : PKIX_TRUE; \ |
271 if (errorSetFlag) noErrorState = (noErrorState) ? PKIX_FALSE : PKIX_TRUE
; \ | 264 } \ |
272 } \ | 265 return PKIX_DoReturn(&stdVars, (PKIX_##type##_ERROR), PKIX_TRUE, plContext); |
273 return PKIX_DoReturn(&stdVars, (PKIX_ ## type ## _ERROR), PKIX_TRUE, plConte
xt); | |
274 #else | 266 #else |
275 #define PKIX_RETURN(type) \ | 267 #define PKIX_RETURN(type) \ |
276 return PKIX_DoReturn(&stdVars, (PKIX_ ## type ## _ERROR), PKIX_TRUE, plConte
xt); | 268 return PKIX_DoReturn(&stdVars, (PKIX_##type##_ERROR), PKIX_TRUE, plContext); |
277 #endif /* PKIX_OBJECT_LEAK_TEST */ | 269 #endif /* PKIX_OBJECT_LEAK_TEST */ |
278 | 270 |
279 | |
280 #if defined(DEBUG) && !defined(DEBUG_nb95248) | 271 #if defined(DEBUG) && !defined(DEBUG_nb95248) |
281 #define PKIX_RETURN_NO_LOGGER(type) \ | 272 #define PKIX_RETURN_NO_LOGGER(type) \ |
282 { \ | 273 { \ |
283 » PKIX_OBJECT_UNLOCK(lockedObject); \ | 274 PKIX_OBJECT_UNLOCK(lockedObject); \ |
284 » if ((pkixErrorReceived) || (pkixErrorResult) || pkixErrorList) \ | 275 if ((pkixErrorReceived) || (pkixErrorResult) || pkixErrorList) \ |
285 » PKIX_THROW(type, pkixErrorCode); \ | 276 PKIX_THROW(type, pkixErrorCode); \ |
286 » PKIX_DEBUG_EXIT(type); \ | 277 PKIX_DEBUG_EXIT(type); \ |
287 » return NULL; \ | 278 return NULL; \ |
288 } | 279 } |
289 #else | 280 #else |
290 #define PKIX_RETURN_NO_LOGGER(type) \ | 281 #define PKIX_RETURN_NO_LOGGER(type) \ |
291 return PKIX_DoReturn(&stdVars, (PKIX_ ## type ## _ERROR), PKIX_FALSE, plCont
ext); | 282 return PKIX_DoReturn(&stdVars, (PKIX_##type##_ERROR), PKIX_FALSE, plContext); |
292 #endif | 283 #endif |
293 | 284 |
294 /* disable to disable ;-) */ | 285 /* disable to disable ;-) */ |
295 /* #define WANT_TRACE_CHECK_FAILURES */ | 286 /* #define WANT_TRACE_CHECK_FAILURES */ |
296 | 287 |
297 #ifdef WANT_TRACE_CHECK_FAILURES | 288 #ifdef WANT_TRACE_CHECK_FAILURES |
298 #define TRACE_CHECK_FAILURE(what, errorstring) \ | 289 #define TRACE_CHECK_FAILURE(what, errorstring) \ |
299 if (pkixLog) { \ | 290 if (pkixLog) { \ |
300 PR_LOG(pkixLog, PR_LOG_DEBUG, \ | 291 PR_LOG(pkixLog, PR_LOG_DEBUG, \ |
301 ("====> [%s] failed: %s\n", #what, errorstring)); \ | 292 ("====> [%s] failed: %s\n", #what, errorstring)); \ |
302 } | 293 } |
303 #else | 294 #else |
304 #define TRACE_CHECK_FAILURE(what, errorstring) | 295 #define TRACE_CHECK_FAILURE(what, errorstring) |
305 #endif | 296 #endif |
306 | 297 |
307 #define PKIX_CHECK(func, descNum) \ | 298 #define PKIX_CHECK(func, descNum) \ |
308 do { \ | 299 do { \ |
309 » pkixErrorResult = (func); \ | 300 pkixErrorResult = (func); \ |
310 » if (pkixErrorResult) { \ | 301 if (pkixErrorResult) { \ |
311 TRACE_CHECK_FAILURE((func), PKIX_ErrorText[descNum]) \ | 302 TRACE_CHECK_FAILURE((func), PKIX_ErrorText[descNum]) pkixErrorClass = \ |
312 » pkixErrorClass = pkixErrorResult->errClass; \ | 303 pkixErrorResult->errClass; \ |
313 » pkixErrorCode = descNum; \ | 304 pkixErrorCode = descNum; \ |
314 » goto cleanup; \ | 305 goto cleanup; \ |
315 » } \ | 306 } \ |
316 } while (0) | 307 } while (0) |
317 | 308 |
318 /* like PKIX_CHECK but without goto cleanup */ | 309 /* like PKIX_CHECK but without goto cleanup */ |
319 #define PKIX_CHECK_NO_GOTO(func, descNum) \ | 310 #define PKIX_CHECK_NO_GOTO(func, descNum) \ |
320 do { \ | 311 do { \ |
321 » pkixErrorResult = (func); \ | 312 pkixErrorResult = (func); \ |
322 » if (pkixErrorResult) { \ | 313 if (pkixErrorResult) { \ |
323 TRACE_CHECK_FAILURE((func), PKIX_ErrorText[descNum]) \ | 314 TRACE_CHECK_FAILURE((func), PKIX_ErrorText[descNum]) pkixErrorClass = \ |
324 » pkixErrorClass = pkixErrorResult->errClass; \ | 315 pkixErrorResult->errClass; \ |
325 » pkixErrorCode = descNum; \ | 316 pkixErrorCode = descNum; \ |
326 » } \ | 317 } \ |
327 } while (0) | 318 } while (0) |
328 | 319 |
329 #define PKIX_CHECK_ONLY_FATAL(func, descNum) \ | 320 #define PKIX_CHECK_ONLY_FATAL(func, descNum) \ |
330 do { \ | 321 do { \ |
331 » pkixTempErrorReceived = PKIX_FALSE; \ | 322 pkixTempErrorReceived = PKIX_FALSE; \ |
332 » pkixErrorResult = (func); \ | 323 pkixErrorResult = (func); \ |
333 » if (pkixErrorResult) { \ | 324 if (pkixErrorResult) { \ |
334 TRACE_CHECK_FAILURE((func), PKIX_ErrorText[descNum]) \ | 325 TRACE_CHECK_FAILURE( \ |
335 » pkixTempErrorReceived = PKIX_TRUE; \ | 326 (func), PKIX_ErrorText[descNum]) pkixTempErrorReceived = PKIX_TRUE; \ |
336 » pkixErrorClass = pkixErrorResult->errClass; \ | 327 pkixErrorClass = pkixErrorResult->errClass; \ |
337 if (pkixErrorClass == PKIX_FATAL_ERROR) { \ | 328 if (pkixErrorClass == PKIX_FATAL_ERROR) { \ |
338 » goto cleanup; \ | 329 goto cleanup; \ |
339 » } \ | 330 } \ |
340 » PKIX_DECREF(pkixErrorResult); \ | 331 PKIX_DECREF(pkixErrorResult); \ |
341 » } \ | 332 } \ |
342 } while (0) | 333 } while (0) |
343 | 334 |
344 #define PKIX_LOG_ERROR(descNum) \ | 335 #define PKIX_LOG_ERROR(descNum) \ |
345 _PKIX_LOG_ERROR(descNum, PKIX_LOGGER_LEVEL_ERROR) | 336 _PKIX_LOG_ERROR(descNum, PKIX_LOGGER_LEVEL_ERROR) |
346 | 337 |
347 #define PKIX_ERROR(descNum) \ | 338 #define PKIX_ERROR(descNum) \ |
348 { \ | 339 { \ |
349 PKIX_LOG_ERROR(descNum) \ | 340 PKIX_LOG_ERROR(descNum) pkixErrorReceived = PKIX_TRUE; \ |
350 pkixErrorReceived = PKIX_TRUE; \ | 341 pkixErrorCode = descNum; \ |
351 pkixErrorCode = descNum; \ | 342 goto cleanup; \ |
352 goto cleanup; \ | 343 } |
353 } | 344 |
354 | 345 #define PKIX_ERROR_ALLOC_ERROR() \ |
355 #define PKIX_ERROR_ALLOC_ERROR() \ | 346 { \ |
356 { \ | 347 PKIX_LOG_ERROR(PKIX_ALLOCERROR) pkixErrorReceived = PKIX_TRUE; \ |
357 PKIX_LOG_ERROR(PKIX_ALLOCERROR) \ | 348 pkixErrorResult = PKIX_ALLOC_ERROR(); \ |
358 pkixErrorReceived = PKIX_TRUE; \ | 349 goto cleanup; \ |
359 pkixErrorResult = PKIX_ALLOC_ERROR(); \ | 350 } |
360 goto cleanup; \ | 351 |
361 } | 352 #define PKIX_ERROR_FATAL(descNum) \ |
362 | 353 { \ |
363 #define PKIX_ERROR_FATAL(descNum) \ | 354 pkixErrorReceived = PKIX_TRUE; \ |
364 { \ | 355 pkixErrorCode = descNum; \ |
365 pkixErrorReceived = PKIX_TRUE; \ | 356 pkixErrorClass = PKIX_FATAL_ERROR; \ |
366 pkixErrorCode = descNum; \ | 357 _PKIX_LOG_ERROR(pkixErrorCode, PKIX_LOGGER_LEVEL_FATALERROR); \ |
367 pkixErrorClass = PKIX_FATAL_ERROR; \ | 358 goto cleanup; \ |
368 _PKIX_LOG_ERROR(pkixErrorCode, PKIX_LOGGER_LEVEL_FATALERROR); \ | 359 } |
369 goto cleanup; \ | 360 |
370 } | 361 #define PKIX_CHECK_FATAL(func, descNum) \ |
371 | 362 do { \ |
372 #define PKIX_CHECK_FATAL(func, descNum) \ | 363 pkixErrorResult = (func); \ |
373 do { \ | 364 if (pkixErrorResult) { \ |
374 pkixErrorResult = (func); \ | 365 TRACE_CHECK_FAILURE((func), PKIX_ErrorText[descNum]) pkixErrorReceived = \ |
375 if (pkixErrorResult) { \ | 366 PKIX_TRUE; \ |
376 TRACE_CHECK_FAILURE((func), PKIX_ErrorText[descNum]) \ | 367 pkixErrorCode = descNum; \ |
377 pkixErrorReceived = PKIX_TRUE; \ | 368 pkixErrorClass = PKIX_FATAL_ERROR; \ |
378 pkixErrorCode = descNum; \ | 369 _PKIX_LOG_ERROR(pkixErrorCode, PKIX_LOGGER_LEVEL_FATALERROR); \ |
379 pkixErrorClass = PKIX_FATAL_ERROR; \ | 370 goto fatal; \ |
380 _PKIX_LOG_ERROR(pkixErrorCode, PKIX_LOGGER_LEVEL_FATALERROR); \ | 371 } \ |
381 goto fatal; \ | 372 } while (0) |
382 } \ | 373 |
383 } while (0) | 374 #define PKIX_NULLCHECK_ONE(a) \ |
384 | 375 do { \ |
385 #define PKIX_NULLCHECK_ONE(a) \ | 376 if ((a) == NULL) { \ |
386 do { \ | 377 pkixErrorReceived = PKIX_TRUE; \ |
387 if ((a) == NULL){ \ | 378 pkixErrorCode = PKIX_NULLARGUMENT; \ |
388 pkixErrorReceived = PKIX_TRUE; \ | 379 PKIX_RETURN(FATAL); \ |
389 pkixErrorCode = PKIX_NULLARGUMENT; \ | 380 } \ |
390 PKIX_RETURN(FATAL); \ | 381 } while (0) |
391 } \ | 382 |
392 } while (0) | 383 #define PKIX_NULLCHECK_TWO(a, b) \ |
393 | 384 do { \ |
394 #define PKIX_NULLCHECK_TWO(a, b) \ | 385 if (((a) == NULL) || ((b) == NULL)) { \ |
395 do { \ | 386 pkixErrorReceived = PKIX_TRUE; \ |
396 if (((a) == NULL) || ((b) == NULL)){ \ | 387 pkixErrorCode = PKIX_NULLARGUMENT; \ |
397 pkixErrorReceived = PKIX_TRUE; \ | 388 PKIX_RETURN(FATAL); \ |
398 pkixErrorCode = PKIX_NULLARGUMENT; \ | 389 } \ |
399 PKIX_RETURN(FATAL); \ | 390 } while (0) |
400 } \ | 391 |
401 } while (0) | 392 #define PKIX_NULLCHECK_THREE(a, b, c) \ |
402 | 393 do { \ |
403 #define PKIX_NULLCHECK_THREE(a, b, c) \ | 394 if (((a) == NULL) || ((b) == NULL) || ((c) == NULL)) { \ |
404 do { \ | 395 pkixErrorReceived = PKIX_TRUE; \ |
405 if (((a) == NULL) || ((b) == NULL) || ((c) == NULL)){ \ | 396 pkixErrorCode = PKIX_NULLARGUMENT; \ |
406 pkixErrorReceived = PKIX_TRUE; \ | 397 PKIX_RETURN(FATAL); \ |
407 pkixErrorCode = PKIX_NULLARGUMENT; \ | 398 } \ |
408 PKIX_RETURN(FATAL); \ | 399 } while (0) |
409 } \ | 400 |
410 } while (0) | 401 #define PKIX_NULLCHECK_FOUR(a, b, c, d) \ |
411 | 402 do { \ |
412 #define PKIX_NULLCHECK_FOUR(a, b, c, d) \ | 403 if (((a) == NULL) || ((b) == NULL) || ((c) == NULL) || ((d) == NULL)) { \ |
413 do { \ | 404 pkixErrorReceived = PKIX_TRUE; \ |
414 if (((a) == NULL) || ((b) == NULL) || \ | 405 pkixErrorCode = PKIX_NULLARGUMENT; \ |
415 ((c) == NULL) || ((d) == NULL)){ \ | 406 PKIX_RETURN(FATAL); \ |
416 pkixErrorReceived = PKIX_TRUE; \ | 407 } \ |
417 pkixErrorCode = PKIX_NULLARGUMENT; \ | 408 } while (0) |
418 PKIX_RETURN(FATAL); \ | 409 |
419 } \ | 410 #define PKIX_OBJECT_LOCK(obj) \ |
420 } while (0) | 411 do { \ |
421 | 412 if (obj) { \ |
422 #define PKIX_OBJECT_LOCK(obj) \ | 413 pkixTempResult = \ |
423 do { \ | 414 PKIX_PL_Object_Lock((PKIX_PL_Object *)(obj), plContext); \ |
424 if (obj) { \ | 415 if (pkixTempResult) { \ |
425 pkixTempResult = \ | 416 PKIX_DoAddError(stdVarsPtr, pkixTempResult, plContext); \ |
426 PKIX_PL_Object_Lock((PKIX_PL_Object*)(obj), plContext); \ | 417 pkixTempResult = NULL; \ |
427 if (pkixTempResult) { \ | 418 pkixErrorCode = PKIX_OBJECTLOCKFAILED; \ |
428 PKIX_DoAddError(stdVarsPtr, pkixTempResult, plContext); \ | 419 goto cleanup; \ |
429 pkixTempResult = NULL; \ | 420 } \ |
430 pkixErrorCode = PKIX_OBJECTLOCKFAILED; \ | 421 lockedObject = (PKIX_PL_Object *)(obj); \ |
431 goto cleanup; \ | 422 } \ |
432 } \ | 423 } while (0) |
433 lockedObject = (PKIX_PL_Object *)(obj); \ | 424 |
434 } \ | 425 #define PKIX_ERROR_CREATE(type, descNum, error) \ |
435 } while (0) | 426 { \ |
436 | 427 pkixTempResult = (PKIX_Error *)pkix_Throw( \ |
437 #define PKIX_ERROR_CREATE(type, descNum, error) \ | 428 PKIX_##type##_ERROR, myFuncName, descNum, PKIX_##type##_ERROR, \ |
438 { \ | 429 pkixErrorResult, &error, plContext); \ |
439 pkixTempResult = (PKIX_Error*)pkix_Throw \ | 430 if (pkixTempResult) { \ |
440 (PKIX_ ## type ## _ERROR, myFuncName, \ | 431 error = pkixTempResult; \ |
441 descNum, PKIX_ ## type ## _ERROR, pkixErrorResult, \ | 432 pkixTempResult = NULL; \ |
442 &error, plContext); \ | 433 } \ |
443 if (pkixTempResult) { \ | 434 } |
444 error = pkixTempResult; \ | 435 |
445 pkixTempResult = NULL; \ | 436 #define PKIX_ERROR_RECEIVED \ |
446 } \ | 437 (pkixErrorReceived || pkixErrorResult || pkixTempErrorReceived || \ |
447 } | 438 pkixErrorList) |
448 ················ | 439 |
449 | 440 #define PKIX_INCREF(obj) \ |
450 #define PKIX_ERROR_RECEIVED \ | 441 do { \ |
451 (pkixErrorReceived || pkixErrorResult || pkixTempErrorReceived || \ | 442 if (obj) { \ |
452 pkixErrorList) | 443 pkixTempResult = \ |
453 | 444 PKIX_PL_Object_IncRef((PKIX_PL_Object *)(obj), plContext); \ |
454 #define PKIX_INCREF(obj) \ | 445 if (pkixTempResult) { \ |
455 do { \ | 446 PKIX_DoAddError(&stdVars, pkixTempResult, plContext); \ |
456 if (obj){ \ | 447 pkixTempResult = NULL; \ |
457 pkixTempResult = PKIX_PL_Object_IncRef \ | 448 goto cleanup; \ |
458 ((PKIX_PL_Object *)(obj), plContext); \ | 449 } \ |
459 if (pkixTempResult) { \ | 450 } \ |
460 PKIX_DoAddError(&stdVars, pkixTempResult, plContext); \ | 451 } while (0) |
461 pkixTempResult = NULL; \ | 452 |
462 goto cleanup; \ | 453 #define PKIX_FREE(obj) \ |
463 } \ | 454 do { \ |
464 } \ | 455 if (obj) { \ |
465 } while (0) | 456 pkixTempResult = PKIX_PL_Free((obj), plContext); \ |
466 | 457 if (pkixTempResult) { \ |
467 #define PKIX_FREE(obj) \ | 458 PKIX_DoAddError(&stdVars, pkixTempResult, plContext); \ |
468 do { \ | 459 pkixTempResult = NULL; \ |
469 if (obj) { \ | 460 } \ |
470 pkixTempResult = PKIX_PL_Free((obj), plContext); \ | 461 obj = NULL; \ |
471 if (pkixTempResult) { \ | 462 } \ |
472 PKIX_DoAddError(&stdVars, pkixTempResult, plContext); \ | 463 } while (0) |
473 pkixTempResult = NULL; \ | |
474 } \ | |
475 obj = NULL; \ | |
476 } \ | |
477 } while (0) | |
478 | 464 |
479 #define PKIX_EXACTLY_ONE_NULL(a, b) (((a) && !(b)) || ((b) && !(a))) | 465 #define PKIX_EXACTLY_ONE_NULL(a, b) (((a) && !(b)) || ((b) && !(a))) |
480 | 466 |
481 /* DIGIT MACROS */ | 467 /* DIGIT MACROS */ |
482 | 468 |
483 #define PKIX_ISDIGIT(c) (((c) >= '0') && ((c) <= '9')) | 469 #define PKIX_ISDIGIT(c) (((c) >= '0') && ((c) <= '9')) |
484 | 470 |
485 #define PKIX_ISXDIGIT(c) \ | 471 #define PKIX_ISXDIGIT(c) \ |
486 (PKIX_ISDIGIT(c) || ( (((c)|0x20) >= 'a') && (((c)|0x20) <= 'f') )) | 472 (PKIX_ISDIGIT(c) || ((((c) | 0x20) >= 'a') && (((c) | 0x20) <= 'f'))) |
487 | 473 |
488 #define PKIX_TOSTRING(a, b, c, d) \ | 474 #define PKIX_TOSTRING(a, b, c, d) \ |
489 do { \ | 475 do { \ |
490 » int descNum; \ | 476 int descNum; \ |
491 » if ((a) != NULL) { \ | 477 if ((a) != NULL) { \ |
492 » pkixErrorResult = \ | 478 pkixErrorResult = \ |
493 » » PKIX_PL_Object_ToString((PKIX_PL_Object *)(a), (b), (c)); \ | 479 PKIX_PL_Object_ToString((PKIX_PL_Object *)(a), (b), (c)); \ |
494 » descNum = (d); \ | 480 descNum = (d); \ |
495 » } else { \ | 481 } else { \ |
496 » pkixErrorResult = \ | 482 pkixErrorResult = \ |
497 » » PKIX_PL_String_Create(PKIX_ESCASCII, "(null)", 0, (b), (c)); \ | 483 PKIX_PL_String_Create(PKIX_ESCASCII, "(null)", 0, (b), (c)); \ |
498 » descNum = PKIX_STRINGCREATEFAILED; \ | 484 descNum = PKIX_STRINGCREATEFAILED; \ |
499 » } \ | 485 } \ |
500 » PKIX_CHECK(pkixErrorResult, descNum); \ | 486 PKIX_CHECK(pkixErrorResult, descNum); \ |
501 } while (0) | 487 } while (0) |
502 | 488 |
503 #define PKIX_EQUALS(a, b, c, d, e) \ | 489 #define PKIX_EQUALS(a, b, c, d, e) \ |
504 do { \ | 490 do { \ |
505 » if ((a) != NULL && (b) != NULL) { \ | 491 if ((a) != NULL && (b) != NULL) { \ |
506 » PKIX_CHECK(PKIX_PL_Object_Equals\ | 492 PKIX_CHECK(PKIX_PL_Object_Equals((PKIX_PL_Object *)(a), \ |
507 » » » ((PKIX_PL_Object *)(a), \ | 493 (PKIX_PL_Object *)(b), (c), (d)), \ |
508 » » » (PKIX_PL_Object*)(b), \ | 494 (e)); \ |
509 » » » (c), \ | 495 } else if ((a) == NULL && (b) == NULL) { \ |
510 » » » (d)), \ | 496 *(c) = PKIX_TRUE; \ |
511 » » » (e)); \ | 497 } else { \ |
512 » } else if ((a) == NULL && (b) == NULL) { \ | 498 *(c) = PKIX_FALSE; \ |
513 » *(c) = PKIX_TRUE; \ | 499 } \ |
514 » } else { \ | 500 } while (0) |
515 » *(c) = PKIX_FALSE; \ | 501 |
516 » } \ | 502 #define PKIX_HASHCODE(a, b, c, d) \ |
517 } while (0) | 503 do { \ |
518 | 504 if ((a) != NULL) { \ |
519 #define PKIX_HASHCODE(a, b, c, d) \ | 505 PKIX_CHECK(PKIX_PL_Object_Hashcode((PKIX_PL_Object *)(a), (b), (c)), \ |
520 do { \ | 506 (d)); \ |
521 » if ((a) != NULL) { \ | 507 } else { \ |
522 » PKIX_CHECK(PKIX_PL_Object_Hashcode\ | 508 *(b) = 0; \ |
523 » » ((PKIX_PL_Object *)(a), (b), (c)), (d)); \ | 509 } \ |
524 » } else { \ | 510 } while (0) |
525 » *(b) = 0; \ | 511 |
526 » } \ | 512 #define PKIX_DUPLICATE(a, b, c, d) \ |
527 } while (0) | 513 do { \ |
528 | 514 if ((a) != NULL) { \ |
529 #define PKIX_DUPLICATE(a, b, c, d) \ | 515 PKIX_CHECK(PKIX_PL_Object_Duplicate((PKIX_PL_Object *)(a), \ |
530 do { \ | 516 (PKIX_PL_Object **)(b), (c)), \ |
531 » if ((a) != NULL) { \ | 517 (d)); \ |
532 » PKIX_CHECK(PKIX_PL_Object_Duplicate\ | 518 } else { \ |
533 » » » ((PKIX_PL_Object *)(a), \ | 519 *(b) = (a); \ |
534 » » » (PKIX_PL_Object **)(b), \ | 520 } \ |
535 » » » (c)), \ | 521 } while (0) |
536 » » » (d)); \ | |
537 » } else { \ | |
538 » *(b) = (a); \ | |
539 » } \ | |
540 } while (0) | |
541 | 522 |
542 /* | 523 /* |
543 * DEBUG MACROS | 524 * DEBUG MACROS |
544 * | 525 * |
545 * Each type has an associated debug flag, which can | 526 * Each type has an associated debug flag, which can |
546 * be set on the compiler line using "-D<debugflag>". For convenience, | 527 * be set on the compiler line using "-D<debugflag>". For convenience, |
547 * "-DPKIX_DEBUGALL" turns on debug for all the components. | 528 * "-DPKIX_DEBUGALL" turns on debug for all the components. |
548 * | 529 * |
549 * If a type's debug flag is defined, then its two associated macros | 530 * If a type's debug flag is defined, then its two associated macros |
550 * are defined: PKIX_type_DEBUG(expr) and PKIX_type_DEBUG_ARG(expr, arg), | 531 * are defined: PKIX_type_DEBUG(expr) and PKIX_type_DEBUG_ARG(expr, arg), |
551 * which call PKIX_DEBUG(expr) and PKIX_DEBUG_ARG(expr, arg) respectively, | 532 * which call PKIX_DEBUG(expr) and PKIX_DEBUG_ARG(expr, arg) respectively, |
552 * which, in turn, enable standard and consistently formatted output. | 533 * which, in turn, enable standard and consistently formatted output. |
553 * | 534 * |
554 * If a type's debug flag is not defined, the two associated macros | 535 * If a type's debug flag is not defined, the two associated macros |
555 * are defined as a NO-OP. As such, any PKIX_type_DEBUG or PKIX_type_DEBUG_ARG | 536 * are defined as a NO-OP. As such, any PKIX_type_DEBUG or PKIX_type_DEBUG_ARG |
556 * macros for an undefined type will be stripped from the code during | 537 * macros for an undefined type will be stripped from the code during |
557 * pre-processing, thereby reducing code size. | 538 * pre-processing, thereby reducing code size. |
558 */ | 539 */ |
559 | 540 |
560 #ifdef PKIX_DEBUGALL | 541 #ifdef PKIX_DEBUGALL |
561 #define PKIX_REFCOUNTDEBUG 1 | 542 #define PKIX_REFCOUNTDEBUG 1 |
562 #define PKIX_MEMDEBUG 1 | 543 #define PKIX_MEMDEBUG 1 |
563 #define PKIX_MUTEXDEBUG 1 | 544 #define PKIX_MUTEXDEBUG 1 |
564 #define PKIX_OBJECTDEBUG 1 | 545 #define PKIX_OBJECTDEBUG 1 |
565 #define PKIX_STRINGDEBUG 1 | 546 #define PKIX_STRINGDEBUG 1 |
566 #define PKIX_OIDDEBUG 1 | 547 #define PKIX_OIDDEBUG 1 |
567 #define PKIX_LISTDEBUG 1 | 548 #define PKIX_LISTDEBUG 1 |
568 #define PKIX_ERRORDEBUG 1 | 549 #define PKIX_ERRORDEBUG 1 |
569 #define PKIX_BYTEARRAYDEBUG 1 | 550 #define PKIX_BYTEARRAYDEBUG 1 |
570 #define PKIX_RWLOCKDEBUG 1 | 551 #define PKIX_RWLOCKDEBUG 1 |
571 #define PKIX_BIGINTDEBUG 1 | 552 #define PKIX_BIGINTDEBUG 1 |
572 #define PKIX_HASHTABLEDEBUG 1 | 553 #define PKIX_HASHTABLEDEBUG 1 |
573 #define PKIX_X500NAMEDEBUG 1 | 554 #define PKIX_X500NAMEDEBUG 1 |
574 #define PKIX_GENERALNAMEDEBUG 1 | 555 #define PKIX_GENERALNAMEDEBUG 1 |
575 #define PKIX_PUBLICKEYDEBUG 1 | 556 #define PKIX_PUBLICKEYDEBUG 1 |
576 #define PKIX_CERTDEBUG 1 | 557 #define PKIX_CERTDEBUG 1 |
577 #define PKIX_HTTPCLIENTDEBUG 1 | 558 #define PKIX_HTTPCLIENTDEBUG 1 |
578 #define PKIX_DATEDEBUG 1 | 559 #define PKIX_DATEDEBUG 1 |
579 #define PKIX_TRUSTANCHORDEBUG 1 | 560 #define PKIX_TRUSTANCHORDEBUG 1 |
580 #define PKIX_PROCESSINGPARAMSDEBUG 1 | 561 #define PKIX_PROCESSINGPARAMSDEBUG 1 |
581 #define PKIX_VALIDATEPARAMSDEBUG 1 | 562 #define PKIX_VALIDATEPARAMSDEBUG 1 |
582 #define PKIX_VALIDATERESULTDEBUG 1 | 563 #define PKIX_VALIDATERESULTDEBUG 1 |
583 #define PKIX_VALIDATEDEBUG 1 | 564 #define PKIX_VALIDATEDEBUG 1 |
584 #define PKIX_CERTCHAINCHECKERDEBUG 1 | 565 #define PKIX_CERTCHAINCHECKERDEBUG 1 |
585 #define PKIX_REVOCATIONCHECKERDEBUG 1 | 566 #define PKIX_REVOCATIONCHECKERDEBUG 1 |
586 #define PKIX_CERTSELECTORDEBUG 1 | 567 #define PKIX_CERTSELECTORDEBUG 1 |
587 #define PKIX_COMCERTSELPARAMSDEBUG 1 | 568 #define PKIX_COMCERTSELPARAMSDEBUG 1 |
588 #define PKIX_TARGETCERTCHECKERSTATEDEBUG 1 | 569 #define PKIX_TARGETCERTCHECKERSTATEDEBUG 1 |
589 #define PKIX_INITIALIZEPARAMSDEBUG 1 | 570 #define PKIX_INITIALIZEPARAMSDEBUG 1 |
590 #define PKIX_CERTBASICCONSTRAINTSDEBUG 1 | 571 #define PKIX_CERTBASICCONSTRAINTSDEBUG 1 |
591 #define PKIX_CERTNAMECONSTRAINTSDEBUG 1 | 572 #define PKIX_CERTNAMECONSTRAINTSDEBUG 1 |
592 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATEDEBUG 1 | 573 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATEDEBUG 1 |
593 #define PKIX_SUBJALTNAMECHECKERSTATEDEBUG 1 | 574 #define PKIX_SUBJALTNAMECHECKERSTATEDEBUG 1 |
594 | 575 |
595 #define PKIX_CERTPOLICYQUALIFIERDEBUG 1 | 576 #define PKIX_CERTPOLICYQUALIFIERDEBUG 1 |
596 #define PKIX_CERTPOLICYINFODEBUG 1 | 577 #define PKIX_CERTPOLICYINFODEBUG 1 |
597 #define PKIX_CERTPOLICYNODEDEBUG 1 | 578 #define PKIX_CERTPOLICYNODEDEBUG 1 |
598 #define PKIX_CERTPOLICYCHECKERSTATEDEBUG 1 | 579 #define PKIX_CERTPOLICYCHECKERSTATEDEBUG 1 |
599 #define PKIX_LIFECYCLEDEBUG 1 | 580 #define PKIX_LIFECYCLEDEBUG 1 |
600 #define PKIX_BASICCONSTRAINTSCHECKERSTATEDEBUG 1 | 581 #define PKIX_BASICCONSTRAINTSCHECKERSTATEDEBUG 1 |
601 #define PKIX_CRLDEBUG 1 | 582 #define PKIX_CRLDEBUG 1 |
602 #define PKIX_CRLENTRYDEBUG 1 | 583 #define PKIX_CRLENTRYDEBUG 1 |
603 #define PKIX_CRLSELECTORDEBUG 1 | 584 #define PKIX_CRLSELECTORDEBUG 1 |
604 #define PKIX_COMCRLSELPARAMSDEBUG 1 | 585 #define PKIX_COMCRLSELPARAMSDEBUG 1 |
605 #define PKIX_CERTSTOREDEBUG 1 | 586 #define PKIX_CERTSTOREDEBUG 1 |
606 #define PKIX_COLLECTIONCERTSTORECONTEXTDEBUG 1 | 587 #define PKIX_COLLECTIONCERTSTORECONTEXTDEBUG 1 |
607 #define PKIX_DEFAULTCRLCHECKERSTATEDEBUG 1 | 588 #define PKIX_DEFAULTCRLCHECKERSTATEDEBUG 1 |
608 #define PKIX_CERTPOLICYMAPDEBUG 1 | 589 #define PKIX_CERTPOLICYMAPDEBUG 1 |
609 #define PKIX_BUILDDEBUG 1 | 590 #define PKIX_BUILDDEBUG 1 |
610 #define PKIX_BUILDRESULTDEBUG 1 | 591 #define PKIX_BUILDRESULTDEBUG 1 |
611 #define PKIX_FORWARDBUILDERSTATEDEBUG 1 | 592 #define PKIX_FORWARDBUILDERSTATEDEBUG 1 |
612 #define PKIX_SIGNATURECHECKERSTATEDEBUG 1 | 593 #define PKIX_SIGNATURECHECKERSTATEDEBUG 1 |
613 #define PKIX_USERDEFINEDMODULESDEBUG 1 | 594 #define PKIX_USERDEFINEDMODULESDEBUG 1 |
614 #define PKIX_CONTEXTDEBUG 1 | 595 #define PKIX_CONTEXTDEBUG 1 |
615 #define PKIX_DEFAULTREVOCATIONCHECKERDEBUG 1 | 596 #define PKIX_DEFAULTREVOCATIONCHECKERDEBUG 1 |
616 #define PKIX_LDAPREQUESTDEBUG 1 | 597 #define PKIX_LDAPREQUESTDEBUG 1 |
617 #define PKIX_LDAPRESPONSEDEBUG 1 | 598 #define PKIX_LDAPRESPONSEDEBUG 1 |
618 #define PKIX_LDAPCLIENTDEBUG 1 | 599 #define PKIX_LDAPCLIENTDEBUG 1 |
619 #define PKIX_LDAPDEFAULTCLIENTDEBUG 1 | 600 #define PKIX_LDAPDEFAULTCLIENTDEBUG 1 |
620 #define PKIX_SOCKETDEBUG 1 | 601 #define PKIX_SOCKETDEBUG 1 |
621 #define PKIX_RESOURCELIMITSDEBUG 1 | 602 #define PKIX_RESOURCELIMITSDEBUG 1 |
622 #define PKIX_LOGGERDEBUG 1 | 603 #define PKIX_LOGGERDEBUG 1 |
623 #define PKIX_MONITORLOCKDEBUG 1 | 604 #define PKIX_MONITORLOCKDEBUG 1 |
624 #define PKIX_INFOACCESSDEBUG 1 | 605 #define PKIX_INFOACCESSDEBUG 1 |
625 #define PKIX_AIAMGRDEBUG 1 | 606 #define PKIX_AIAMGRDEBUG 1 |
626 #define PKIX_OCSPCHECKERDEBUG 1 | 607 #define PKIX_OCSPCHECKERDEBUG 1 |
627 #define PKIX_OCSPREQUESTDEBUG 1 | 608 #define PKIX_OCSPREQUESTDEBUG 1 |
628 #define PKIX_OCSPRESPONSEDEBUG 1 | 609 #define PKIX_OCSPRESPONSEDEBUG 1 |
629 #define PKIX_HTTPDEFAULTCLIENTDEBUG 1 | 610 #define PKIX_HTTPDEFAULTCLIENTDEBUG 1 |
630 #define PKIX_HTTPCERTSTORECONTEXTDEBUG 1 | 611 #define PKIX_HTTPCERTSTORECONTEXTDEBUG 1 |
631 #define PKIX_VERIFYNODEDEBUG 1 | 612 #define PKIX_VERIFYNODEDEBUG 1 |
632 #endif | 613 #endif |
633 | 614 |
634 /* | 615 /* |
635 * XXX Both PKIX_DEBUG and PKIX_DEBUG_ARG currently use printf. | 616 * XXX Both PKIX_DEBUG and PKIX_DEBUG_ARG currently use printf. |
636 * This needs to be replaced with Loggers. | 617 * This needs to be replaced with Loggers. |
637 */ | 618 */ |
638 | 619 |
639 #ifdef DEBUG | 620 #ifdef DEBUG |
640 #define PKIX_DEBUG(expr) \ | 621 #define PKIX_DEBUG(expr) \ |
641 do { \ | 622 do { \ |
642 » _PKIX_DEBUG_TRACE(pkixLoggersErrors, expr, PKIX_LOGGER_LEVEL_DEBUG); \ | 623 _PKIX_DEBUG_TRACE(pkixLoggersErrors, expr, PKIX_LOGGER_LEVEL_DEBUG); \ |
643 » (void) fprintf(stderr, "(%s: ", myFuncName); \ | 624 (void) fprintf(stderr, "(%s: ", myFuncName); \ |
644 (void) fprintf(stderr, expr); \ | 625 (void) fprintf(stderr, expr); \ |
645 } while (0) | 626 } while (0) |
646 #else | 627 #else |
647 #define PKIX_DEBUG(expr) | 628 #define PKIX_DEBUG(expr) |
648 #endif | 629 #endif |
649 | 630 |
650 /* Logging doesn't support DEBUG with ARG: cannot convert control and arg */ | 631 /* Logging doesn't support DEBUG with ARG: cannot convert control and arg */ |
651 #define PKIX_DEBUG_ARG(expr, arg) \ | 632 #define PKIX_DEBUG_ARG(expr, arg) \ |
652 do { \ | 633 do { \ |
653 » (void) printf("(%s: ", myFuncName); \ | 634 (void) printf("(%s: ", myFuncName); \ |
654 » (void) printf(expr, arg); \ | 635 (void) printf(expr, arg); \ |
655 } while (0) | 636 } while (0) |
656 | 637 |
657 #if PKIX_FATALDEBUG | 638 #if PKIX_FATALDEBUG |
658 #define PKIX_FATAL_DEBUG(expr) \ | 639 #define PKIX_FATAL_DEBUG(expr) PKIX_DEBUG(expr) |
659 PKIX_DEBUG(expr) | 640 #define PKIX_FATAL_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
660 #define PKIX_FATAL_DEBUG_ARG(expr, arg) \ | |
661 PKIX_DEBUG_ARG(expr, arg) | |
662 #else | 641 #else |
663 #define PKIX_FATAL_DEBUG(expr) | 642 #define PKIX_FATAL_DEBUG(expr) |
664 #define PKIX_FATAL_DEBUG_ARG(expr, arg) | 643 #define PKIX_FATAL_DEBUG_ARG(expr, arg) |
665 #endif | 644 #endif |
666 | 645 |
667 #if PKIX_REFCOUNTDEBUG | 646 #if PKIX_REFCOUNTDEBUG |
668 #define PKIX_REF_COUNT_DEBUG(expr) \ | 647 #define PKIX_REF_COUNT_DEBUG(expr) PKIX_DEBUG(expr) |
669 PKIX_DEBUG(expr) | 648 #define PKIX_REF_COUNT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
670 #define PKIX_REF_COUNT_DEBUG_ARG(expr, arg) \ | |
671 PKIX_DEBUG_ARG(expr, arg) | |
672 #else | 649 #else |
673 #define PKIX_REF_COUNT_DEBUG(expr) | 650 #define PKIX_REF_COUNT_DEBUG(expr) |
674 #define PKIX_REF_COUNT_DEBUG_ARG(expr, arg) | 651 #define PKIX_REF_COUNT_DEBUG_ARG(expr, arg) |
675 #endif | 652 #endif |
676 | 653 |
677 #if PKIX_MEMDEBUG | 654 #if PKIX_MEMDEBUG |
678 #define PKIX_MEM_DEBUG(expr) \ | 655 #define PKIX_MEM_DEBUG(expr) PKIX_DEBUG(expr) |
679 PKIX_DEBUG(expr) | 656 #define PKIX_MEM_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
680 #define PKIX_MEM_DEBUG_ARG(expr, arg) \ | |
681 PKIX_DEBUG_ARG(expr, arg) | |
682 #else | 657 #else |
683 #define PKIX_MEM_DEBUG(expr) | 658 #define PKIX_MEM_DEBUG(expr) |
684 #define PKIX_MEM_DEBUG_ARG(expr, arg) | 659 #define PKIX_MEM_DEBUG_ARG(expr, arg) |
685 #endif | 660 #endif |
686 | 661 |
687 #if PKIX_MUTEXDEBUG | 662 #if PKIX_MUTEXDEBUG |
688 #define PKIX_MUTEX_DEBUG(expr) \ | 663 #define PKIX_MUTEX_DEBUG(expr) PKIX_DEBUG(expr) |
689 PKIX_DEBUG(expr) | 664 #define PKIX_MUTEX_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
690 #define PKIX_MUTEX_DEBUG_ARG(expr, arg) \ | |
691 PKIX_DEBUG_ARG(expr, arg) | |
692 #else | 665 #else |
693 #define PKIX_MUTEX_DEBUG(expr) | 666 #define PKIX_MUTEX_DEBUG(expr) |
694 #define PKIX_MUTEX_DEBUG_ARG(expr, arg) | 667 #define PKIX_MUTEX_DEBUG_ARG(expr, arg) |
695 #endif | 668 #endif |
696 | 669 |
697 #if PKIX_OBJECTDEBUG | 670 #if PKIX_OBJECTDEBUG |
698 #define PKIX_OBJECT_DEBUG(expr) \ | 671 #define PKIX_OBJECT_DEBUG(expr) PKIX_DEBUG(expr) |
699 PKIX_DEBUG(expr) | 672 #define PKIX_OBJECT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
700 #define PKIX_OBJECT_DEBUG_ARG(expr, arg) \ | |
701 PKIX_DEBUG_ARG(expr, arg) | |
702 #else | 673 #else |
703 #define PKIX_OBJECT_DEBUG(expr) | 674 #define PKIX_OBJECT_DEBUG(expr) |
704 #define PKIX_OBJECT_DEBUG_ARG(expr, arg) | 675 #define PKIX_OBJECT_DEBUG_ARG(expr, arg) |
705 #endif | 676 #endif |
706 | 677 |
707 #if PKIX_ERRORDEBUG | 678 #if PKIX_ERRORDEBUG |
708 #define PKIX_ERROR_DEBUG(expr) \ | 679 #define PKIX_ERROR_DEBUG(expr) PKIX_DEBUG(expr) |
709 PKIX_DEBUG(expr) | 680 #define PKIX_ERROR_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
710 #define PKIX_ERROR_DEBUG_ARG(expr, arg) \ | |
711 PKIX_DEBUG_ARG(expr, arg) | |
712 #else | 681 #else |
713 #define PKIX_ERROR_DEBUG(expr) | 682 #define PKIX_ERROR_DEBUG(expr) |
714 #define PKIX_ERROR_DEBUG_ARG(expr, arg) | 683 #define PKIX_ERROR_DEBUG_ARG(expr, arg) |
715 #endif | 684 #endif |
716 | 685 |
717 #if PKIX_STRINGDEBUG | 686 #if PKIX_STRINGDEBUG |
718 #define PKIX_STRING_DEBUG(expr) \ | 687 #define PKIX_STRING_DEBUG(expr) PKIX_DEBUG(expr) |
719 PKIX_DEBUG(expr) | 688 #define PKIX_STRING_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
720 #define PKIX_STRING_DEBUG_ARG(expr, arg) \ | |
721 PKIX_DEBUG_ARG(expr, arg) | |
722 #else | 689 #else |
723 #define PKIX_STRING_DEBUG(expr) | 690 #define PKIX_STRING_DEBUG(expr) |
724 #define PKIX_STRING_DEBUG_ARG(expr, arg) | 691 #define PKIX_STRING_DEBUG_ARG(expr, arg) |
725 #endif | 692 #endif |
726 | 693 |
727 #if PKIX_OIDDEBUG | 694 #if PKIX_OIDDEBUG |
728 #define PKIX_OID_DEBUG(expr) \ | 695 #define PKIX_OID_DEBUG(expr) PKIX_DEBUG(expr) |
729 PKIX_DEBUG(expr) | 696 #define PKIX_OID_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
730 #define PKIX_OID_DEBUG_ARG(expr, arg) \ | |
731 PKIX_DEBUG_ARG(expr, arg) | |
732 #else | 697 #else |
733 #define PKIX_OID_DEBUG(expr) | 698 #define PKIX_OID_DEBUG(expr) |
734 #define PKIX_OID_DEBUG_ARG(expr, arg) | 699 #define PKIX_OID_DEBUG_ARG(expr, arg) |
735 #endif | 700 #endif |
736 | 701 |
737 #if PKIX_LISTDEBUG | 702 #if PKIX_LISTDEBUG |
738 #define PKIX_LIST_DEBUG(expr) \ | 703 #define PKIX_LIST_DEBUG(expr) PKIX_DEBUG(expr) |
739 PKIX_DEBUG(expr) | 704 #define PKIX_LIST_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
740 #define PKIX_LIST_DEBUG_ARG(expr, arg) \ | |
741 PKIX_DEBUG_ARG(expr, arg) | |
742 #else | 705 #else |
743 #define PKIX_LIST_DEBUG(expr) | 706 #define PKIX_LIST_DEBUG(expr) |
744 #define PKIX_LIST_DEBUG_ARG(expr, arg) | 707 #define PKIX_LIST_DEBUG_ARG(expr, arg) |
745 #endif | 708 #endif |
746 | 709 |
747 #if PKIX_RWLOCKDEBUG | 710 #if PKIX_RWLOCKDEBUG |
748 #define PKIX_RWLOCK_DEBUG(expr) \ | 711 #define PKIX_RWLOCK_DEBUG(expr) PKIX_DEBUG(expr) |
749 PKIX_DEBUG(expr) | 712 #define PKIX_RWLOCK_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
750 #define PKIX_RWLOCK_DEBUG_ARG(expr, arg) \ | |
751 PKIX_DEBUG_ARG(expr, arg) | |
752 #else | 713 #else |
753 #define PKIX_RWLOCK_DEBUG(expr) | 714 #define PKIX_RWLOCK_DEBUG(expr) |
754 #define PKIX_RWLOCK_DEBUG_ARG(expr, arg) | 715 #define PKIX_RWLOCK_DEBUG_ARG(expr, arg) |
755 #endif | 716 #endif |
756 | 717 |
757 #if PKIX_BYTEARRAYDEBUG | 718 #if PKIX_BYTEARRAYDEBUG |
758 #define PKIX_BYTEARRAY_DEBUG(expr) \ | 719 #define PKIX_BYTEARRAY_DEBUG(expr) PKIX_DEBUG(expr) |
759 PKIX_DEBUG(expr) | 720 #define PKIX_BYTEARRAY_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
760 #define PKIX_BYTEARRAY_DEBUG_ARG(expr, arg) \ | |
761 PKIX_DEBUG_ARG(expr, arg) | |
762 #else | 721 #else |
763 #define PKIX_BYTEARRAY_DEBUG(expr) | 722 #define PKIX_BYTEARRAY_DEBUG(expr) |
764 #define PKIX_BYTEARRAY_DEBUG_ARG(expr, arg) | 723 #define PKIX_BYTEARRAY_DEBUG_ARG(expr, arg) |
765 #endif | 724 #endif |
766 | 725 |
767 #if PKIX_HASHTABLEDEBUG | 726 #if PKIX_HASHTABLEDEBUG |
768 #define PKIX_HASHTABLE_DEBUG(expr) \ | 727 #define PKIX_HASHTABLE_DEBUG(expr) PKIX_DEBUG(expr) |
769 PKIX_DEBUG(expr) | 728 #define PKIX_HASHTABLE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
770 #define PKIX_HASHTABLE_DEBUG_ARG(expr, arg) \ | |
771 PKIX_DEBUG_ARG(expr, arg) | |
772 #else | 729 #else |
773 #define PKIX_HASHTABLE_DEBUG(expr) | 730 #define PKIX_HASHTABLE_DEBUG(expr) |
774 #define PKIX_HASHTABLE_DEBUG_ARG(expr, arg) | 731 #define PKIX_HASHTABLE_DEBUG_ARG(expr, arg) |
775 #endif | 732 #endif |
776 | 733 |
777 #if PKIX_X500NAMEDEBUG | 734 #if PKIX_X500NAMEDEBUG |
778 #define PKIX_X500NAME_DEBUG(expr) \ | 735 #define PKIX_X500NAME_DEBUG(expr) PKIX_DEBUG(expr) |
779 PKIX_DEBUG(expr) | 736 #define PKIX_X500NAME_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
780 #define PKIX_X500NAME_DEBUG_ARG(expr, arg) \ | |
781 PKIX_DEBUG_ARG(expr, arg) | |
782 #else | 737 #else |
783 #define PKIX_X500NAME_DEBUG(expr) | 738 #define PKIX_X500NAME_DEBUG(expr) |
784 #define PKIX_X500NAME_DEBUG_ARG(expr, arg) | 739 #define PKIX_X500NAME_DEBUG_ARG(expr, arg) |
785 #endif | 740 #endif |
786 | 741 |
787 #if PKIX_GENERALNAMEDEBUG | 742 #if PKIX_GENERALNAMEDEBUG |
788 #define PKIX_GENERALNAME_DEBUG(expr) \ | 743 #define PKIX_GENERALNAME_DEBUG(expr) PKIX_DEBUG(expr) |
789 PKIX_DEBUG(expr) | 744 #define PKIX_GENERALNAME_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
790 #define PKIX_GENERALNAME_DEBUG_ARG(expr, arg) \ | |
791 PKIX_DEBUG_ARG(expr, arg) | |
792 #else | 745 #else |
793 #define PKIX_GENERALNAME_DEBUG(expr) | 746 #define PKIX_GENERALNAME_DEBUG(expr) |
794 #define PKIX_GENERALNAME_DEBUG_ARG(expr, arg) | 747 #define PKIX_GENERALNAME_DEBUG_ARG(expr, arg) |
795 #endif | 748 #endif |
796 | 749 |
797 #if PKIX_PUBLICKEYDEBUG | 750 #if PKIX_PUBLICKEYDEBUG |
798 #define PKIX_PUBLICKEY_DEBUG(expr) \ | 751 #define PKIX_PUBLICKEY_DEBUG(expr) PKIX_DEBUG(expr) |
799 PKIX_DEBUG(expr) | 752 #define PKIX_PUBLICKEY_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
800 #define PKIX_PUBLICKEY_DEBUG_ARG(expr, arg) \ | |
801 PKIX_DEBUG_ARG(expr, arg) | |
802 #else | 753 #else |
803 #define PKIX_PUBLICKEY_DEBUG(expr) | 754 #define PKIX_PUBLICKEY_DEBUG(expr) |
804 #define PKIX_PUBLICKEY_DEBUG_ARG(expr, arg) | 755 #define PKIX_PUBLICKEY_DEBUG_ARG(expr, arg) |
805 #endif | 756 #endif |
806 | 757 |
807 #if PKIX_CERTDEBUG | 758 #if PKIX_CERTDEBUG |
808 #define PKIX_CERT_DEBUG(expr) \ | 759 #define PKIX_CERT_DEBUG(expr) PKIX_DEBUG(expr) |
809 PKIX_DEBUG(expr) | 760 #define PKIX_CERT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
810 #define PKIX_CERT_DEBUG_ARG(expr, arg) \ | |
811 PKIX_DEBUG_ARG(expr, arg) | |
812 #else | 761 #else |
813 #define PKIX_CERT_DEBUG(expr) | 762 #define PKIX_CERT_DEBUG(expr) |
814 #define PKIX_CERT_DEBUG_ARG(expr, arg) | 763 #define PKIX_CERT_DEBUG_ARG(expr, arg) |
815 #endif | 764 #endif |
816 | 765 |
817 #if PKIX_CRLDPDEBUG | 766 #if PKIX_CRLDPDEBUG |
818 #define PKIX_CRLDP_DEBUG(expr) \ | 767 #define PKIX_CRLDP_DEBUG(expr) PKIX_DEBUG(expr) |
819 PKIX_DEBUG(expr) | 768 #define PKIX_CRLDP_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
820 #define PKIX_CRLDP_DEBUG_ARG(expr, arg) \ | |
821 PKIX_DEBUG_ARG(expr, arg) | |
822 #else | 769 #else |
823 #define PKIX_CRLDP_DEBUG(expr) | 770 #define PKIX_CRLDP_DEBUG(expr) |
824 #define PKIX_CRLDP_DEBUG_ARG(expr, arg) | 771 #define PKIX_CRLDP_DEBUG_ARG(expr, arg) |
825 #endif | 772 #endif |
826 | 773 |
827 #if PKIX_HTTPCLIENTDEBUG | 774 #if PKIX_HTTPCLIENTDEBUG |
828 #define PKIX_HTTPCLIENT_DEBUG(expr) \ | 775 #define PKIX_HTTPCLIENT_DEBUG(expr) PKIX_DEBUG(expr) |
829 PKIX_DEBUG(expr) | 776 #define PKIX_HTTPCLIENT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
830 #define PKIX_HTTPCLIENT_DEBUG_ARG(expr, arg) \ | |
831 PKIX_DEBUG_ARG(expr, arg) | |
832 #else | 777 #else |
833 #define PKIX_HTTPCLIENT_DEBUG(expr) | 778 #define PKIX_HTTPCLIENT_DEBUG(expr) |
834 #define PKIX_HTTPCLIENT_DEBUG_ARG(expr, arg) | 779 #define PKIX_HTTPCLIENT_DEBUG_ARG(expr, arg) |
835 #endif | 780 #endif |
836 | 781 |
837 #if PKIX_BIGINTDEBUG | 782 #if PKIX_BIGINTDEBUG |
838 #define PKIX_BIGINT_DEBUG(expr) \ | 783 #define PKIX_BIGINT_DEBUG(expr) PKIX_DEBUG(expr) |
839 PKIX_DEBUG(expr) | 784 #define PKIX_BIGINT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
840 #define PKIX_BIGINT_DEBUG_ARG(expr, arg) \ | |
841 PKIX_DEBUG_ARG(expr, arg) | |
842 #else | 785 #else |
843 #define PKIX_BIGINT_DEBUG(expr) | 786 #define PKIX_BIGINT_DEBUG(expr) |
844 #define PKIX_BIGINT_DEBUG_ARG(expr, arg) | 787 #define PKIX_BIGINT_DEBUG_ARG(expr, arg) |
845 #endif | 788 #endif |
846 | 789 |
847 #if PKIX_DATEDEBUG | 790 #if PKIX_DATEDEBUG |
848 #define PKIX_DATE_DEBUG(expr) \ | 791 #define PKIX_DATE_DEBUG(expr) PKIX_DEBUG(expr) |
849 PKIX_DEBUG(expr) | 792 #define PKIX_DATE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
850 #define PKIX_DATE_DEBUG_ARG(expr, arg) \ | |
851 PKIX_DEBUG_ARG(expr, arg) | |
852 #else | 793 #else |
853 #define PKIX_DATE_DEBUG(expr) | 794 #define PKIX_DATE_DEBUG(expr) |
854 #define PKIX_DATE_DEBUG_ARG(expr, arg) | 795 #define PKIX_DATE_DEBUG_ARG(expr, arg) |
855 #endif | 796 #endif |
856 | 797 |
857 #if PKIX_TRUSTANCHORDEBUG | 798 #if PKIX_TRUSTANCHORDEBUG |
858 #define PKIX_TRUSTANCHOR_DEBUG(expr) \ | 799 #define PKIX_TRUSTANCHOR_DEBUG(expr) PKIX_DEBUG(expr) |
859 PKIX_DEBUG(expr) | 800 #define PKIX_TRUSTANCHOR_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
860 #define PKIX_TRUSTANCHOR_DEBUG_ARG(expr, arg) \ | |
861 PKIX_DEBUG_ARG(expr, arg) | |
862 #else | 801 #else |
863 #define PKIX_TRUSTANCHOR_DEBUG(expr) | 802 #define PKIX_TRUSTANCHOR_DEBUG(expr) |
864 #define PKIX_TRUSTANCHOR_DEBUG_ARG(expr, arg) | 803 #define PKIX_TRUSTANCHOR_DEBUG_ARG(expr, arg) |
865 #endif | 804 #endif |
866 | 805 |
867 #if PKIX_PROCESSINGPARAMSDEBUG | 806 #if PKIX_PROCESSINGPARAMSDEBUG |
868 #define PKIX_PROCESSINGPARAMS_DEBUG(expr) \ | 807 #define PKIX_PROCESSINGPARAMS_DEBUG(expr) PKIX_DEBUG(expr) |
869 PKIX_DEBUG(expr) | 808 #define PKIX_PROCESSINGPARAMS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
870 #define PKIX_PROCESSINGPARAMS_DEBUG_ARG(expr, arg) \ | |
871 PKIX_DEBUG_ARG(expr, arg) | |
872 #else | 809 #else |
873 #define PKIX_PROCESSINGPARAMS_DEBUG(expr) | 810 #define PKIX_PROCESSINGPARAMS_DEBUG(expr) |
874 #define PKIX_PROCESSINGPARAMS_DEBUG_ARG(expr, arg) | 811 #define PKIX_PROCESSINGPARAMS_DEBUG_ARG(expr, arg) |
875 #endif | 812 #endif |
876 | 813 |
877 #if PKIX_VALIDATEPARAMSDEBUG | 814 #if PKIX_VALIDATEPARAMSDEBUG |
878 #define PKIX_VALIDATEPARAMS_DEBUG(expr) \ | 815 #define PKIX_VALIDATEPARAMS_DEBUG(expr) PKIX_DEBUG(expr) |
879 PKIX_DEBUG(expr) | 816 #define PKIX_VALIDATEPARAMS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
880 #define PKIX_VALIDATEPARAMS_DEBUG_ARG(expr, arg) \ | |
881 PKIX_DEBUG_ARG(expr, arg) | |
882 #else | 817 #else |
883 #define PKIX_VALIDATEPARAMS_DEBUG(expr) | 818 #define PKIX_VALIDATEPARAMS_DEBUG(expr) |
884 #define PKIX_VALIDATEPARAMS_DEBUG_ARG(expr, arg) | 819 #define PKIX_VALIDATEPARAMS_DEBUG_ARG(expr, arg) |
885 #endif | 820 #endif |
886 | 821 |
887 #if PKIX_VALIDATERESULTDEBUG | 822 #if PKIX_VALIDATERESULTDEBUG |
888 #define PKIX_VALIDATERESULT_DEBUG(expr) \ | 823 #define PKIX_VALIDATERESULT_DEBUG(expr) PKIX_DEBUG(expr) |
889 PKIX_DEBUG(expr) | 824 #define PKIX_VALIDATERESULT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
890 #define PKIX_VALIDATERESULT_DEBUG_ARG(expr, arg) \ | |
891 PKIX_DEBUG_ARG(expr, arg) | |
892 #else | 825 #else |
893 #define PKIX_VALIDATERESULT_DEBUG(expr) | 826 #define PKIX_VALIDATERESULT_DEBUG(expr) |
894 #define PKIX_VALIDATERESULT_DEBUG_ARG(expr, arg) | 827 #define PKIX_VALIDATERESULT_DEBUG_ARG(expr, arg) |
895 #endif | 828 #endif |
896 | 829 |
897 #if PKIX_VALIDATEDEBUG | 830 #if PKIX_VALIDATEDEBUG |
898 #define PKIX_VALIDATE_DEBUG(expr) \ | 831 #define PKIX_VALIDATE_DEBUG(expr) PKIX_DEBUG(expr) |
899 PKIX_DEBUG(expr) | 832 #define PKIX_VALIDATE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
900 #define PKIX_VALIDATE_DEBUG_ARG(expr, arg) \ | |
901 PKIX_DEBUG_ARG(expr, arg) | |
902 #else | 833 #else |
903 #define PKIX_VALIDATE_DEBUG(expr) | 834 #define PKIX_VALIDATE_DEBUG(expr) |
904 #define PKIX_VALIDATE_DEBUG_ARG(expr, arg) | 835 #define PKIX_VALIDATE_DEBUG_ARG(expr, arg) |
905 #endif | 836 #endif |
906 | 837 |
907 #if PKIX_BUILDDEBUG | 838 #if PKIX_BUILDDEBUG |
908 #define PKIX_BUILD_DEBUG(expr) \ | 839 #define PKIX_BUILD_DEBUG(expr) PKIX_DEBUG(expr) |
909 PKIX_DEBUG(expr) | 840 #define PKIX_BUILD_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
910 #define PKIX_BUILD_DEBUG_ARG(expr, arg) \ | |
911 PKIX_DEBUG_ARG(expr, arg) | |
912 #else | 841 #else |
913 #define PKIX_BUILD_DEBUG(expr) | 842 #define PKIX_BUILD_DEBUG(expr) |
914 #define PKIX_BUILD_DEBUG_ARG(expr, arg) | 843 #define PKIX_BUILD_DEBUG_ARG(expr, arg) |
915 #endif | 844 #endif |
916 | 845 |
917 #if PKIX_CERTCHAINCHECKERDEBUG | 846 #if PKIX_CERTCHAINCHECKERDEBUG |
918 #define PKIX_CERTCHAINCHECKER_DEBUG(expr) \ | 847 #define PKIX_CERTCHAINCHECKER_DEBUG(expr) PKIX_DEBUG(expr) |
919 PKIX_DEBUG(expr) | 848 #define PKIX_CERTCHAINCHECKER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
920 #define PKIX_CERTCHAINCHECKER_DEBUG_ARG(expr, arg) \ | |
921 PKIX_DEBUG_ARG(expr, arg) | |
922 #else | 849 #else |
923 #define PKIX_CERTCHAINCHECKER_DEBUG(expr) | 850 #define PKIX_CERTCHAINCHECKER_DEBUG(expr) |
924 #define PKIX_CERTCHAINCHECKER_DEBUG_ARG(expr, arg) | 851 #define PKIX_CERTCHAINCHECKER_DEBUG_ARG(expr, arg) |
925 #endif | 852 #endif |
926 | 853 |
927 #if PKIX_REVOCATIONCHECKERDEBUG | 854 #if PKIX_REVOCATIONCHECKERDEBUG |
928 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) \ | 855 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) PKIX_DEBUG(expr) |
929 PKIX_DEBUG(expr) | 856 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
930 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) \ | |
931 PKIX_DEBUG_ARG(expr, arg) | |
932 #else | 857 #else |
933 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) | 858 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) |
934 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) | 859 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) |
935 #endif | 860 #endif |
936 | 861 |
937 #if PKIX_REVOCATIONMETHODDEBUG | 862 #if PKIX_REVOCATIONMETHODDEBUG |
938 #define PKIX_REVOCATIONMETHOD_DEBUG(expr) \ | 863 #define PKIX_REVOCATIONMETHOD_DEBUG(expr) PKIX_DEBUG(expr) |
939 PKIX_DEBUG(expr) | 864 #define PKIX_REVOCATIONMETHOD_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
940 #define PKIX_REVOCATIONMETHOD_DEBUG_ARG(expr, arg) \ | |
941 PKIX_DEBUG_ARG(expr, arg) | |
942 #else | 865 #else |
943 #define PKIX_REVOCATIONMETHOD_DEBUG(expr) | 866 #define PKIX_REVOCATIONMETHOD_DEBUG(expr) |
944 #define PKIX_REVOCATIONMETHOD_DEBUG_ARG(expr, arg) | 867 #define PKIX_REVOCATIONMETHOD_DEBUG_ARG(expr, arg) |
945 #endif | 868 #endif |
946 | 869 |
947 #if PKIX_CERTSELECTORDEBUG | 870 #if PKIX_CERTSELECTORDEBUG |
948 #define PKIX_CERTSELECTOR_DEBUG(expr) \ | 871 #define PKIX_CERTSELECTOR_DEBUG(expr) PKIX_DEBUG(expr) |
949 PKIX_DEBUG(expr) | 872 #define PKIX_CERTSELECTOR_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
950 #define PKIX_CERTSELECTOR_DEBUG_ARG(expr, arg) \ | |
951 PKIX_DEBUG_ARG(expr, arg) | |
952 #else | 873 #else |
953 #define PKIX_CERTSELECTOR_DEBUG(expr) | 874 #define PKIX_CERTSELECTOR_DEBUG(expr) |
954 #define PKIX_CERTSELECTOR_DEBUG_ARG(expr, arg) | 875 #define PKIX_CERTSELECTOR_DEBUG_ARG(expr, arg) |
955 #endif | 876 #endif |
956 | 877 |
957 #if PKIX_COMCERTSELPARAMSDEBUG | 878 #if PKIX_COMCERTSELPARAMSDEBUG |
958 #define PKIX_COMCERTSELPARAMS_DEBUG(expr) \ | 879 #define PKIX_COMCERTSELPARAMS_DEBUG(expr) PKIX_DEBUG(expr) |
959 PKIX_DEBUG(expr) | 880 #define PKIX_COMCERTSELPARAMS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
960 #define PKIX_COMCERTSELPARAMS_DEBUG_ARG(expr, arg) \ | |
961 PKIX_DEBUG_ARG(expr, arg) | |
962 #else | 881 #else |
963 #define PKIX_COMCERTSELPARAMS_DEBUG(expr) | 882 #define PKIX_COMCERTSELPARAMS_DEBUG(expr) |
964 #define PKIX_COMCERTSELPARAMS_DEBUG_ARG(expr, arg) | 883 #define PKIX_COMCERTSELPARAMS_DEBUG_ARG(expr, arg) |
965 #endif | 884 #endif |
966 | 885 |
967 #if PKIX_TARGETCERTCHECKERSTATEDEBUG | 886 #if PKIX_TARGETCERTCHECKERSTATEDEBUG |
968 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG(expr) \ | 887 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
969 PKIX_DEBUG(expr) | |
970 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG_ARG(expr, arg) \ | 888 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG_ARG(expr, arg) \ |
971 PKIX_DEBUG_ARG(expr, arg) | 889 PKIX_DEBUG_ARG(expr, arg) |
972 #else | 890 #else |
973 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG(expr) | 891 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG(expr) |
974 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG_ARG(expr, arg) | 892 #define PKIX_TARGETCERTCHECKERSTATE_DEBUG_ARG(expr, arg) |
975 #endif | 893 #endif |
976 | 894 |
977 #if PKIX_BASICCONSTRAINTSCHECKERSTATEDEBUG | 895 #if PKIX_BASICCONSTRAINTSCHECKERSTATEDEBUG |
978 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) \ | 896 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
979 PKIX_DEBUG(expr) | |
980 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) \ | 897 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) \ |
981 PKIX_DEBUG_ARG(expr, arg) | 898 PKIX_DEBUG_ARG(expr, arg) |
982 #else | 899 #else |
983 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) | 900 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) |
984 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) | 901 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) |
985 #endif | 902 #endif |
986 | 903 |
987 #if PKIX_INITIALIZEPARAMSDEBUG | 904 #if PKIX_INITIALIZEPARAMSDEBUG |
988 #define PKIX_INITIALIZEPARAMS_DEBUG(expr) \ | 905 #define PKIX_INITIALIZEPARAMS_DEBUG(expr) PKIX_DEBUG(expr) |
989 PKIX_DEBUG(expr) | 906 #define PKIX_INITIALIZEPARAMS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
990 #define PKIX_INITIALIZEPARAMS_DEBUG_ARG(expr, arg) \ | |
991 PKIX_DEBUG_ARG(expr, arg) | |
992 #else | 907 #else |
993 #define PKIX_INITIALIZEPARAMS_DEBUG(expr) | 908 #define PKIX_INITIALIZEPARAMS_DEBUG(expr) |
994 #define PKIX_INITIALIZEPARAMS_DEBUG_ARG(expr, arg) | 909 #define PKIX_INITIALIZEPARAMS_DEBUG_ARG(expr, arg) |
995 #endif | 910 #endif |
996 | 911 |
997 #if PKIX_CERTBASICCONSTRAINTSDEBUG | 912 #if PKIX_CERTBASICCONSTRAINTSDEBUG |
998 #define PKIX_CERTBASICCONSTRAINTS_DEBUG(expr) \ | 913 #define PKIX_CERTBASICCONSTRAINTS_DEBUG(expr) PKIX_DEBUG(expr) |
999 PKIX_DEBUG(expr) | 914 #define PKIX_CERTBASICCONSTRAINTS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1000 #define PKIX_CERTBASICCONSTRAINTS_DEBUG_ARG(expr, arg) \ | |
1001 PKIX_DEBUG_ARG(expr, arg) | |
1002 #else | 915 #else |
1003 #define PKIX_CERTBASICCONSTRAINTS_DEBUG(expr) | 916 #define PKIX_CERTBASICCONSTRAINTS_DEBUG(expr) |
1004 #define PKIX_CERTBASICCONSTRAINTS_DEBUG_ARG(expr, arg) | 917 #define PKIX_CERTBASICCONSTRAINTS_DEBUG_ARG(expr, arg) |
1005 #endif | 918 #endif |
1006 | 919 |
1007 #if PKIX_CERTNAMECONSTRAINTSDEBUG | 920 #if PKIX_CERTNAMECONSTRAINTSDEBUG |
1008 #define PKIX_CERTNAMECONSTRAINTS_DEBUG(expr) \ | 921 #define PKIX_CERTNAMECONSTRAINTS_DEBUG(expr) PKIX_DEBUG(expr) |
1009 PKIX_DEBUG(expr) | 922 #define PKIX_CERTNAMECONSTRAINTS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1010 #define PKIX_CERTNAMECONSTRAINTS_DEBUG_ARG(expr, arg) \ | |
1011 PKIX_DEBUG_ARG(expr, arg) | |
1012 #else | 923 #else |
1013 #define PKIX_CERTNAMECONSTRAINTS_DEBUG(expr) | 924 #define PKIX_CERTNAMECONSTRAINTS_DEBUG(expr) |
1014 #define PKIX_CERTNAMECONSTRAINTS_DEBUG_ARG(expr, arg) | 925 #define PKIX_CERTNAMECONSTRAINTS_DEBUG_ARG(expr, arg) |
1015 #endif | 926 #endif |
1016 | 927 |
1017 #if PKIX_CERTNAMECONSTRAINTSCHECKERSTATEDEBUG | 928 #if PKIX_CERTNAMECONSTRAINTSCHECKERSTATEDEBUG |
1018 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG(expr) \ | 929 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
1019 PKIX_DEBUG(expr) | |
1020 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) \ | 930 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) \ |
1021 PKIX_DEBUG_ARG(expr, arg) | 931 PKIX_DEBUG_ARG(expr, arg) |
1022 #else | 932 #else |
1023 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG(expr) | 933 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG(expr) |
1024 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) | 934 #define PKIX_CERTNAMECONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) |
1025 #endif | 935 #endif |
1026 | 936 |
1027 #if PKIX_SUBJALTNAMECHECKERSTATEDEBUG | 937 #if PKIX_SUBJALTNAMECHECKERSTATEDEBUG |
1028 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG(expr) \ | 938 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
1029 PKIX_DEBUG(expr) | |
1030 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG_ARG(expr, arg) \ | 939 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG_ARG(expr, arg) \ |
1031 PKIX_DEBUG_ARG(expr, arg) | 940 PKIX_DEBUG_ARG(expr, arg) |
1032 #else | 941 #else |
1033 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG(expr) | 942 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG(expr) |
1034 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG_ARG(expr, arg) | 943 #define PKIX_SUBJALTNAMECHECKERSTATE_DEBUG_ARG(expr, arg) |
1035 #endif | 944 #endif |
1036 | 945 |
1037 #if PKIX_CERTPOLICYQUALIFIERDEBUG | 946 #if PKIX_CERTPOLICYQUALIFIERDEBUG |
1038 #define PKIX_CERTPOLICYQUALIFIER_DEBUG(expr) \ | 947 #define PKIX_CERTPOLICYQUALIFIER_DEBUG(expr) PKIX_DEBUG(expr) |
1039 PKIX_DEBUG(expr) | 948 #define PKIX_CERTPOLICYQUALIFIER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1040 #define PKIX_CERTPOLICYQUALIFIER_DEBUG_ARG(expr, arg) \ | |
1041 PKIX_DEBUG_ARG(expr, arg) | |
1042 #else | 949 #else |
1043 #define PKIX_CERTPOLICYQUALIFIER_DEBUG(expr) | 950 #define PKIX_CERTPOLICYQUALIFIER_DEBUG(expr) |
1044 #define PKIX_CERTPOLICYQUALIFIER_DEBUG_ARG(expr, arg) | 951 #define PKIX_CERTPOLICYQUALIFIER_DEBUG_ARG(expr, arg) |
1045 #endif | 952 #endif |
1046 | 953 |
1047 #if PKIX_CERTPOLICYINFODEBUG | 954 #if PKIX_CERTPOLICYINFODEBUG |
1048 #define PKIX_CERTPOLICYINFO_DEBUG(expr) \ | 955 #define PKIX_CERTPOLICYINFO_DEBUG(expr) PKIX_DEBUG(expr) |
1049 PKIX_DEBUG(expr) | 956 #define PKIX_CERTPOLICYINFO_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1050 #define PKIX_CERTPOLICYINFO_DEBUG_ARG(expr, arg) \ | |
1051 PKIX_DEBUG_ARG(expr, arg) | |
1052 #else | 957 #else |
1053 #define PKIX_CERTPOLICYINFO_DEBUG(expr) | 958 #define PKIX_CERTPOLICYINFO_DEBUG(expr) |
1054 #define PKIX_CERTPOLICYINFO_DEBUG_ARG(expr, arg) | 959 #define PKIX_CERTPOLICYINFO_DEBUG_ARG(expr, arg) |
1055 #endif | 960 #endif |
1056 | 961 |
1057 #if PKIX_CERTPOLICYNODEDEBUG | 962 #if PKIX_CERTPOLICYNODEDEBUG |
1058 #define PKIX_CERTPOLICYNODE_DEBUG(expr) \ | 963 #define PKIX_CERTPOLICYNODE_DEBUG(expr) PKIX_DEBUG(expr) |
1059 PKIX_DEBUG(expr) | 964 #define PKIX_CERTPOLICYNODE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1060 #define PKIX_CERTPOLICYNODE_DEBUG_ARG(expr, arg) \ | |
1061 PKIX_DEBUG_ARG(expr, arg) | |
1062 #else | 965 #else |
1063 #define PKIX_CERTPOLICYNODE_DEBUG(expr) | 966 #define PKIX_CERTPOLICYNODE_DEBUG(expr) |
1064 #define PKIX_CERTPOLICYNODE_DEBUG_ARG(expr, arg) | 967 #define PKIX_CERTPOLICYNODE_DEBUG_ARG(expr, arg) |
1065 #endif | 968 #endif |
1066 | 969 |
1067 #if PKIX_CERTPOLICYCHECKERSTATEDEBUG | 970 #if PKIX_CERTPOLICYCHECKERSTATEDEBUG |
1068 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG(expr) \ | 971 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
1069 PKIX_DEBUG(expr) | |
1070 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG_ARG(expr, arg) \ | 972 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG_ARG(expr, arg) \ |
1071 PKIX_DEBUG_ARG(expr, arg) | 973 PKIX_DEBUG_ARG(expr, arg) |
1072 #else | 974 #else |
1073 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG(expr) | 975 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG(expr) |
1074 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG_ARG(expr, arg) | 976 #define PKIX_CERTPOLICYCHECKERSTATE_DEBUG_ARG(expr, arg) |
1075 #endif | 977 #endif |
1076 | 978 |
1077 #if PKIX_LIFECYCLEDEBUG | 979 #if PKIX_LIFECYCLEDEBUG |
1078 #define PKIX_LIFECYCLE_DEBUG(expr) \ | 980 #define PKIX_LIFECYCLE_DEBUG(expr) PKIX_DEBUG(expr) |
1079 PKIX_DEBUG(expr) | 981 #define PKIX_LIFECYCLE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1080 #define PKIX_LIFECYCLE_DEBUG_ARG(expr, arg) \ | |
1081 PKIX_DEBUG_ARG(expr, arg) | |
1082 #else | 982 #else |
1083 #define PKIX_LIFECYCLE_DEBUG(expr) | 983 #define PKIX_LIFECYCLE_DEBUG(expr) |
1084 #define PKIX_LIFECYCLE_DEBUG_ARG(expr, arg) | 984 #define PKIX_LIFECYCLE_DEBUG_ARG(expr, arg) |
1085 #endif | 985 #endif |
1086 | 986 |
1087 #if PKIX_BASICCONSTRAINTSCHECKERSTATEDEBUG | 987 #if PKIX_BASICCONSTRAINTSCHECKERSTATEDEBUG |
1088 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) \ | 988 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
1089 PKIX_DEBUG(expr) | |
1090 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) \ | 989 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) \ |
1091 PKIX_DEBUG_ARG(expr, arg) | 990 PKIX_DEBUG_ARG(expr, arg) |
1092 #else | 991 #else |
1093 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) | 992 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG(expr) |
1094 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) | 993 #define PKIX_BASICCONSTRAINTSCHECKERSTATE_DEBUG_ARG(expr, arg) |
1095 #endif | 994 #endif |
1096 | 995 |
1097 #if PKIX_CRLDEBUG | 996 #if PKIX_CRLDEBUG |
1098 #define PKIX_CRL_DEBUG(expr) \ | 997 #define PKIX_CRL_DEBUG(expr) PKIX_DEBUG(expr) |
1099 PKIX_DEBUG(expr) | 998 #define PKIX_CRL_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1100 #define PKIX_CRL_DEBUG_ARG(expr, arg) \ | |
1101 PKIX_DEBUG_ARG(expr, arg) | |
1102 #else | 999 #else |
1103 #define PKIX_CRL_DEBUG(expr) | 1000 #define PKIX_CRL_DEBUG(expr) |
1104 #define PKIX_CRL_DEBUG_ARG(expr, arg) | 1001 #define PKIX_CRL_DEBUG_ARG(expr, arg) |
1105 #endif | 1002 #endif |
1106 | 1003 |
1107 #if PKIX_CRLENTRYDEBUG | 1004 #if PKIX_CRLENTRYDEBUG |
1108 #define PKIX_CRLENTRY_DEBUG(expr) \ | 1005 #define PKIX_CRLENTRY_DEBUG(expr) PKIX_DEBUG(expr) |
1109 PKIX_DEBUG(expr) | 1006 #define PKIX_CRLENTRY_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1110 #define PKIX_CRLENTRY_DEBUG_ARG(expr, arg) \ | |
1111 PKIX_DEBUG_ARG(expr, arg) | |
1112 #else | 1007 #else |
1113 #define PKIX_CRLENTRY_DEBUG(expr) | 1008 #define PKIX_CRLENTRY_DEBUG(expr) |
1114 #define PKIX_CRLENTRY_DEBUG_ARG(expr, arg) | 1009 #define PKIX_CRLENTRY_DEBUG_ARG(expr, arg) |
1115 #endif | 1010 #endif |
1116 | 1011 |
1117 #if PKIX_CRLSELECTORDEBUG | 1012 #if PKIX_CRLSELECTORDEBUG |
1118 #define PKIX_CRLSELECTOR_DEBUG(expr) \ | 1013 #define PKIX_CRLSELECTOR_DEBUG(expr) PKIX_DEBUG(expr) |
1119 PKIX_DEBUG(expr) | 1014 #define PKIX_CRLSELECTOR_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1120 #define PKIX_CRLSELECTOR_DEBUG_ARG(expr, arg) \ | |
1121 PKIX_DEBUG_ARG(expr, arg) | |
1122 #else | 1015 #else |
1123 #define PKIX_CRLSELECTOR_DEBUG(expr) | 1016 #define PKIX_CRLSELECTOR_DEBUG(expr) |
1124 #define PKIX_CRLSELECTOR_DEBUG_ARG(expr, arg) | 1017 #define PKIX_CRLSELECTOR_DEBUG_ARG(expr, arg) |
1125 #endif | 1018 #endif |
1126 | 1019 |
1127 #if PKIX_COMCRLSELPARAMSDEBUG | 1020 #if PKIX_COMCRLSELPARAMSDEBUG |
1128 #define PKIX_COMCRLSELPARAMS_DEBUG(expr) \ | 1021 #define PKIX_COMCRLSELPARAMS_DEBUG(expr) PKIX_DEBUG(expr) |
1129 PKIX_DEBUG(expr) | 1022 #define PKIX_COMCRLSELPARAMS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1130 #define PKIX_COMCRLSELPARAMS_DEBUG_ARG(expr, arg) \ | |
1131 PKIX_DEBUG_ARG(expr, arg) | |
1132 #else | 1023 #else |
1133 #define PKIX_COMCRLSELPARAMS_DEBUG(expr) | 1024 #define PKIX_COMCRLSELPARAMS_DEBUG(expr) |
1134 #define PKIX_COMCRLSELPARAMS_DEBUG_ARG(expr, arg) | 1025 #define PKIX_COMCRLSELPARAMS_DEBUG_ARG(expr, arg) |
1135 #endif | 1026 #endif |
1136 | 1027 |
1137 #if PKIX_CERTSTOREDEBUG | 1028 #if PKIX_CERTSTOREDEBUG |
1138 #define PKIX_CERTSTORE_DEBUG(expr) \ | 1029 #define PKIX_CERTSTORE_DEBUG(expr) PKIX_DEBUG(expr) |
1139 PKIX_DEBUG(expr) | 1030 #define PKIX_CERTSTORE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1140 #define PKIX_CERTSTORE_DEBUG_ARG(expr, arg) \ | |
1141 PKIX_DEBUG_ARG(expr, arg) | |
1142 #else | 1031 #else |
1143 #define PKIX_CERTSTORE_DEBUG(expr) | 1032 #define PKIX_CERTSTORE_DEBUG(expr) |
1144 #define PKIX_CERTSTORE_DEBUG_ARG(expr, arg) | 1033 #define PKIX_CERTSTORE_DEBUG_ARG(expr, arg) |
1145 #endif | 1034 #endif |
1146 | 1035 |
1147 #if PKIX_COLLECTIONCERTSTORECONTEXTDEBUG | 1036 #if PKIX_COLLECTIONCERTSTORECONTEXTDEBUG |
1148 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG(expr) \ | 1037 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG(expr) PKIX_DEBUG(expr) |
1149 PKIX_DEBUG(expr) | |
1150 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG_ARG(expr, arg) \ | 1038 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG_ARG(expr, arg) \ |
1151 PKIX_DEBUG_ARG(expr, arg) | 1039 PKIX_DEBUG_ARG(expr, arg) |
1152 #else | 1040 #else |
1153 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG(expr) | 1041 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG(expr) |
1154 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG_ARG(expr, arg) | 1042 #define PKIX_COLLECTIONCERTSTORECONTEXT_DEBUG_ARG(expr, arg) |
1155 #endif | 1043 #endif |
1156 | 1044 |
1157 #if PKIX_CRLCHECKERDEBUG | 1045 #if PKIX_CRLCHECKERDEBUG |
1158 #define PKIX_CRLCHECKER_DEBUG(expr) \ | 1046 #define PKIX_CRLCHECKER_DEBUG(expr) PKIX_DEBUG(expr) |
1159 PKIX_DEBUG(expr) | 1047 #define PKIX_CRLCHECKER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1160 #define PKIX_CRLCHECKER_DEBUG_ARG(expr, arg) \ | |
1161 PKIX_DEBUG_ARG(expr, arg) | |
1162 #else | 1048 #else |
1163 #define PKIX_CRLCHECKER_DEBUG(expr) | 1049 #define PKIX_CRLCHECKER_DEBUG(expr) |
1164 #define PKIX_CRLCHECKER_DEBUG_ARG(expr, arg) | 1050 #define PKIX_CRLCHECKER_DEBUG_ARG(expr, arg) |
1165 #endif | 1051 #endif |
1166 | 1052 |
1167 #if PKIX_CERTPOLICYMAPDEBUG | 1053 #if PKIX_CERTPOLICYMAPDEBUG |
1168 #define PKIX_CERTPOLICYMAP_DEBUG(expr) \ | 1054 #define PKIX_CERTPOLICYMAP_DEBUG(expr) PKIX_DEBUG(expr) |
1169 PKIX_DEBUG(expr) | 1055 #define PKIX_CERTPOLICYMAP_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1170 #define PKIX_CERTPOLICYMAP_DEBUG_ARG(expr, arg) \ | |
1171 PKIX_DEBUG_ARG(expr, arg) | |
1172 #else | 1056 #else |
1173 #define PKIX_CERTPOLICYMAP_DEBUG(expr) | 1057 #define PKIX_CERTPOLICYMAP_DEBUG(expr) |
1174 #define PKIX_CERTPOLICYMAP_DEBUG_ARG(expr, arg) | 1058 #define PKIX_CERTPOLICYMAP_DEBUG_ARG(expr, arg) |
1175 #endif | 1059 #endif |
1176 | 1060 |
1177 #if PKIX_BUILDRESULTDEBUG | 1061 #if PKIX_BUILDRESULTDEBUG |
1178 #define PKIX_BUILDRESULT_DEBUG(expr) \ | 1062 #define PKIX_BUILDRESULT_DEBUG(expr) PKIX_DEBUG(expr) |
1179 PKIX_DEBUG(expr) | 1063 #define PKIX_BUILDRESULT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1180 #define PKIX_BUILDRESULT_DEBUG_ARG(expr, arg) \ | |
1181 PKIX_DEBUG_ARG(expr, arg) | |
1182 #else | 1064 #else |
1183 #define PKIX_BUILDRESULT_DEBUG(expr) | 1065 #define PKIX_BUILDRESULT_DEBUG(expr) |
1184 #define PKIX_BUILDRESULT_DEBUG_ARG(expr, arg) | 1066 #define PKIX_BUILDRESULT_DEBUG_ARG(expr, arg) |
1185 #endif | 1067 #endif |
1186 | 1068 |
1187 #if PKIX_FORWARDBUILDERSTATEDEBUG | 1069 #if PKIX_FORWARDBUILDERSTATEDEBUG |
1188 #define PKIX_FORWARDBUILDERSTATE_DEBUG(expr) \ | 1070 #define PKIX_FORWARDBUILDERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
1189 PKIX_DEBUG(expr) | 1071 #define PKIX_FORWARDBUILDERSTATE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1190 #define PKIX_FORWARDBUILDERSTATE_DEBUG_ARG(expr, arg) \ | |
1191 PKIX_DEBUG_ARG(expr, arg) | |
1192 #else | 1072 #else |
1193 #define PKIX_FORWARDBUILDERSTATE_DEBUG(expr) | 1073 #define PKIX_FORWARDBUILDERSTATE_DEBUG(expr) |
1194 #define PKIX_FORWARDBUILDERSTATE_DEBUG_ARG(expr, arg) | 1074 #define PKIX_FORWARDBUILDERSTATE_DEBUG_ARG(expr, arg) |
1195 #endif | 1075 #endif |
1196 | 1076 |
1197 #if PKIX_SIGNATURECHECKERSTATEDEBUG | 1077 #if PKIX_SIGNATURECHECKERSTATEDEBUG |
1198 #define PKIX_SIGNATURECHECKERSTATE_DEBUG(expr) \ | 1078 #define PKIX_SIGNATURECHECKERSTATE_DEBUG(expr) PKIX_DEBUG(expr) |
1199 PKIX_DEBUG(expr) | |
1200 #define PKIX_SIGNATURECHECKERSTATE_DEBUG_ARG(expr, arg) \ | 1079 #define PKIX_SIGNATURECHECKERSTATE_DEBUG_ARG(expr, arg) \ |
1201 PKIX_DEBUG_ARG(expr, arg) | 1080 PKIX_DEBUG_ARG(expr, arg) |
1202 #else | 1081 #else |
1203 #define PKIX_SIGNATURECHECKERSTATE_DEBUG(expr) | 1082 #define PKIX_SIGNATURECHECKERSTATE_DEBUG(expr) |
1204 #define PKIX_SIGNATURECHECKERSTATE_DEBUG_ARG(expr, arg) | 1083 #define PKIX_SIGNATURECHECKERSTATE_DEBUG_ARG(expr, arg) |
1205 #endif | 1084 #endif |
1206 | 1085 |
1207 #if PKIX_USERDEFINEDMODULESDEBUG | 1086 #if PKIX_USERDEFINEDMODULESDEBUG |
1208 #define PKIX_USERDEFINEDMODULES_DEBUG(expr) \ | 1087 #define PKIX_USERDEFINEDMODULES_DEBUG(expr) PKIX_DEBUG(expr) |
1209 PKIX_DEBUG(expr) | 1088 #define PKIX_USERDEFINEDMODULES_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1210 #define PKIX_USERDEFINEDMODULES_DEBUG_ARG(expr, arg) \ | |
1211 PKIX_DEBUG_ARG(expr, arg) | |
1212 #else | 1089 #else |
1213 #define PKIX_USERDEFINEDMODULES_DEBUG(expr) | 1090 #define PKIX_USERDEFINEDMODULES_DEBUG(expr) |
1214 #define PKIX_USERDEFINEDMODULES_DEBUG_ARG(expr, arg) | 1091 #define PKIX_USERDEFINEDMODULES_DEBUG_ARG(expr, arg) |
1215 #endif | 1092 #endif |
1216 | 1093 |
1217 #if PKIX_CONTEXTDEBUG | 1094 #if PKIX_CONTEXTDEBUG |
1218 #define PKIX_CONTEXT_DEBUG(expr) \ | 1095 #define PKIX_CONTEXT_DEBUG(expr) PKIX_DEBUG(expr) |
1219 PKIX_DEBUG(expr) | 1096 #define PKIX_CONTEXT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1220 #define PKIX_CONTEXT_DEBUG_ARG(expr, arg) \ | |
1221 PKIX_DEBUG_ARG(expr, arg) | |
1222 #else | 1097 #else |
1223 #define PKIX_CONTEXT_DEBUG(expr) | 1098 #define PKIX_CONTEXT_DEBUG(expr) |
1224 #define PKIX_CONTEXT_DEBUG_ARG(expr, arg) | 1099 #define PKIX_CONTEXT_DEBUG_ARG(expr, arg) |
1225 #endif | 1100 #endif |
1226 | 1101 |
1227 #if PKIX_REVOCATIONCHECKERDEBUG | 1102 #if PKIX_REVOCATIONCHECKERDEBUG |
1228 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) \ | 1103 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) PKIX_DEBUG(expr) |
1229 PKIX_DEBUG(expr) | 1104 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1230 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) \ | |
1231 PKIX_DEBUG_ARG(expr, arg) | |
1232 #else | 1105 #else |
1233 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) | 1106 #define PKIX_REVOCATIONCHECKER_DEBUG(expr) |
1234 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) | 1107 #define PKIX_REVOCATIONCHECKER_DEBUG_ARG(expr, arg) |
1235 #endif | 1108 #endif |
1236 | 1109 |
1237 #if PKIX_LDAPREQUESTDEBUG | 1110 #if PKIX_LDAPREQUESTDEBUG |
1238 #define PKIX_LDAPREQUEST_DEBUG(expr) \ | 1111 #define PKIX_LDAPREQUEST_DEBUG(expr) PKIX_DEBUG(expr) |
1239 PKIX_DEBUG(expr) | 1112 #define PKIX_LDAPREQUEST_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1240 #define PKIX_LDAPREQUEST_DEBUG_ARG(expr, arg) \ | |
1241 PKIX_DEBUG_ARG(expr, arg) | |
1242 #else | 1113 #else |
1243 #define PKIX_LDAPREQUEST_DEBUG(expr) | 1114 #define PKIX_LDAPREQUEST_DEBUG(expr) |
1244 #define PKIX_LDAPREQUEST_DEBUG_ARG(expr, arg) | 1115 #define PKIX_LDAPREQUEST_DEBUG_ARG(expr, arg) |
1245 #endif | 1116 #endif |
1246 | 1117 |
1247 #if PKIX_LDAPRESPONSEDEBUG | 1118 #if PKIX_LDAPRESPONSEDEBUG |
1248 #define PKIX_LDAPRESPONSE_DEBUG(expr) \ | 1119 #define PKIX_LDAPRESPONSE_DEBUG(expr) PKIX_DEBUG(expr) |
1249 PKIX_DEBUG(expr) | 1120 #define PKIX_LDAPRESPONSE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1250 #define PKIX_LDAPRESPONSE_DEBUG_ARG(expr, arg) \ | |
1251 PKIX_DEBUG_ARG(expr, arg) | |
1252 #else | 1121 #else |
1253 #define PKIX_LDAPRESPONSE_DEBUG(expr) | 1122 #define PKIX_LDAPRESPONSE_DEBUG(expr) |
1254 #define PKIX_LDAPRESPONSE_DEBUG_ARG(expr, arg) | 1123 #define PKIX_LDAPRESPONSE_DEBUG_ARG(expr, arg) |
1255 #endif | 1124 #endif |
1256 | 1125 |
1257 #if PKIX_LDAPCLIENTDEBUG | 1126 #if PKIX_LDAPCLIENTDEBUG |
1258 #define PKIX_LDAPCLIENT_DEBUG(expr) \ | 1127 #define PKIX_LDAPCLIENT_DEBUG(expr) PKIX_DEBUG(expr) |
1259 PKIX_DEBUG(expr) | 1128 #define PKIX_LDAPCLIENT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1260 #define PKIX_LDAPCLIENT_DEBUG_ARG(expr, arg) \ | |
1261 PKIX_DEBUG_ARG(expr, arg) | |
1262 #else | 1129 #else |
1263 #define PKIX_LDAPCLIENT_DEBUG(expr) | 1130 #define PKIX_LDAPCLIENT_DEBUG(expr) |
1264 #define PKIX_LDAPCLIENT_DEBUG_ARG(expr, arg) | 1131 #define PKIX_LDAPCLIENT_DEBUG_ARG(expr, arg) |
1265 #endif | 1132 #endif |
1266 | 1133 |
1267 #if PKIX_LDAPDEFAULTCLIENTDEBUG | 1134 #if PKIX_LDAPDEFAULTCLIENTDEBUG |
1268 #define PKIX_LDAPDEFAULTCLIENT_DEBUG(expr) \ | 1135 #define PKIX_LDAPDEFAULTCLIENT_DEBUG(expr) PKIX_DEBUG(expr) |
1269 PKIX_DEBUG(expr) | 1136 #define PKIX_LDAPDEFAULTCLIENT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1270 #define PKIX_LDAPDEFAULTCLIENT_DEBUG_ARG(expr, arg) \ | |
1271 PKIX_DEBUG_ARG(expr, arg) | |
1272 #else | 1137 #else |
1273 #define PKIX_LDAPDEFAULTCLIENT_DEBUG(expr) | 1138 #define PKIX_LDAPDEFAULTCLIENT_DEBUG(expr) |
1274 #define PKIX_LDAPDEFAULTCLIENT_DEBUG_ARG(expr, arg) | 1139 #define PKIX_LDAPDEFAULTCLIENT_DEBUG_ARG(expr, arg) |
1275 #endif | 1140 #endif |
1276 | 1141 |
1277 #if PKIX_SOCKETDEBUG | 1142 #if PKIX_SOCKETDEBUG |
1278 #define PKIX_SOCKET_DEBUG(expr) \ | 1143 #define PKIX_SOCKET_DEBUG(expr) PKIX_DEBUG(expr) |
1279 PKIX_DEBUG(expr) | 1144 #define PKIX_SOCKET_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1280 #define PKIX_SOCKET_DEBUG_ARG(expr, arg) \ | |
1281 PKIX_DEBUG_ARG(expr, arg) | |
1282 #else | 1145 #else |
1283 #define PKIX_SOCKET_DEBUG(expr) | 1146 #define PKIX_SOCKET_DEBUG(expr) |
1284 #define PKIX_SOCKET_DEBUG_ARG(expr, arg) | 1147 #define PKIX_SOCKET_DEBUG_ARG(expr, arg) |
1285 #endif | 1148 #endif |
1286 | 1149 |
1287 #if PKIX_RESOURCELIMITSDEBUG | 1150 #if PKIX_RESOURCELIMITSDEBUG |
1288 #define PKIX_RESOURCELIMITS_DEBUG(expr) \ | 1151 #define PKIX_RESOURCELIMITS_DEBUG(expr) PKIX_DEBUG(expr) |
1289 PKIX_DEBUG(expr) | 1152 #define PKIX_RESOURCELIMITS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1290 #define PKIX_RESOURCELIMITS_DEBUG_ARG(expr, arg) \ | |
1291 PKIX_DEBUG_ARG(expr, arg) | |
1292 #else | 1153 #else |
1293 #define PKIX_RESOURCELIMITS_DEBUG(expr) | 1154 #define PKIX_RESOURCELIMITS_DEBUG(expr) |
1294 #define PKIX_RESOURCELIMITS_DEBUG_ARG(expr, arg) | 1155 #define PKIX_RESOURCELIMITS_DEBUG_ARG(expr, arg) |
1295 #endif | 1156 #endif |
1296 | 1157 |
1297 #if PKIX_LOGGERDEBUG | 1158 #if PKIX_LOGGERDEBUG |
1298 #define PKIX_LOGGER_DEBUG(expr) \ | 1159 #define PKIX_LOGGER_DEBUG(expr) PKIX_DEBUG(expr) |
1299 PKIX_DEBUG(expr) | 1160 #define PKIX_LOGGER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1300 #define PKIX_LOGGER_DEBUG_ARG(expr, arg) \ | |
1301 PKIX_DEBUG_ARG(expr, arg) | |
1302 #else | 1161 #else |
1303 #define PKIX_LOGGER_DEBUG(expr) | 1162 #define PKIX_LOGGER_DEBUG(expr) |
1304 #define PKIX_LOGGER_DEBUG_ARG(expr, arg) | 1163 #define PKIX_LOGGER_DEBUG_ARG(expr, arg) |
1305 #endif | 1164 #endif |
1306 | 1165 |
1307 #if PKIX_MONITORLOCKDEBUG | 1166 #if PKIX_MONITORLOCKDEBUG |
1308 #define PKIX_MONITORLOCK_DEBUG(expr) \ | 1167 #define PKIX_MONITORLOCK_DEBUG(expr) PKIX_DEBUG(expr) |
1309 PKIX_DEBUG(expr) | 1168 #define PKIX_MONITORLOCK_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1310 #define PKIX_MONITORLOCK_DEBUG_ARG(expr, arg) \ | |
1311 PKIX_DEBUG_ARG(expr, arg) | |
1312 #else | 1169 #else |
1313 #define PKIX_MONITORLOCK_DEBUG(expr) | 1170 #define PKIX_MONITORLOCK_DEBUG(expr) |
1314 #define PKIX_MONITORLOCK_DEBUG_ARG(expr, arg) | 1171 #define PKIX_MONITORLOCK_DEBUG_ARG(expr, arg) |
1315 #endif | 1172 #endif |
1316 | 1173 |
1317 #if PKIX_INFOACCESSDEBUG | 1174 #if PKIX_INFOACCESSDEBUG |
1318 #define PKIX_INFOACCESS_DEBUG(expr) \ | 1175 #define PKIX_INFOACCESS_DEBUG(expr) PKIX_DEBUG(expr) |
1319 PKIX_DEBUG(expr) | 1176 #define PKIX_INFOACCESS_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1320 #define PKIX_INFOACCESS_DEBUG_ARG(expr, arg) \ | |
1321 PKIX_DEBUG_ARG(expr, arg) | |
1322 #else | 1177 #else |
1323 #define PKIX_INFOACCESS_DEBUG(expr) | 1178 #define PKIX_INFOACCESS_DEBUG(expr) |
1324 #define PKIX_INFOACCESS_DEBUG_ARG(expr, arg) | 1179 #define PKIX_INFOACCESS_DEBUG_ARG(expr, arg) |
1325 #endif | 1180 #endif |
1326 | 1181 |
1327 #if PKIX_AIAMGRDEBUG | 1182 #if PKIX_AIAMGRDEBUG |
1328 #define PKIX_AIAMGR_DEBUG(expr) \ | 1183 #define PKIX_AIAMGR_DEBUG(expr) PKIX_DEBUG(expr) |
1329 PKIX_DEBUG(expr) | 1184 #define PKIX_AIAMGR_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1330 #define PKIX_AIAMGR_DEBUG_ARG(expr, arg) \ | |
1331 PKIX_DEBUG_ARG(expr, arg) | |
1332 #else | 1185 #else |
1333 #define PKIX_AIAMGR_DEBUG(expr) | 1186 #define PKIX_AIAMGR_DEBUG(expr) |
1334 #define PKIX_AIAMGR_DEBUG_ARG(expr, arg) | 1187 #define PKIX_AIAMGR_DEBUG_ARG(expr, arg) |
1335 #endif | 1188 #endif |
1336 | 1189 |
1337 #if PKIX_OCSPCHECKERDEBUG | 1190 #if PKIX_OCSPCHECKERDEBUG |
1338 #define PKIX_OCSPCHECKER_DEBUG(expr) \ | 1191 #define PKIX_OCSPCHECKER_DEBUG(expr) PKIX_DEBUG(expr) |
1339 PKIX_DEBUG(expr) | 1192 #define PKIX_OCSPCHECKER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1340 #define PKIX_OCSPCHECKER_DEBUG_ARG(expr, arg) \ | |
1341 PKIX_DEBUG_ARG(expr, arg) | |
1342 #else | 1193 #else |
1343 #define PKIX_OCSPCHECKER_DEBUG(expr) | 1194 #define PKIX_OCSPCHECKER_DEBUG(expr) |
1344 #define PKIX_OCSPCHECKER_DEBUG_ARG(expr, arg) | 1195 #define PKIX_OCSPCHECKER_DEBUG_ARG(expr, arg) |
1345 #endif | 1196 #endif |
1346 | 1197 |
1347 #if PKIX_OCSPCERTIDDEBUG | 1198 #if PKIX_OCSPCERTIDDEBUG |
1348 #define PKIX_OCSPCERTID_DEBUG(expr) \ | 1199 #define PKIX_OCSPCERTID_DEBUG(expr) PKIX_DEBUG(expr) |
1349 PKIX_DEBUG(expr) | 1200 #define PKIX_OCSPCERTID_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1350 #define PKIX_OCSPCERTID_DEBUG_ARG(expr, arg) \ | |
1351 PKIX_DEBUG_ARG(expr, arg) | |
1352 #else | 1201 #else |
1353 #define PKIX_OCSPCERTID_DEBUG(expr) | 1202 #define PKIX_OCSPCERTID_DEBUG(expr) |
1354 #define PKIX_OCSPCERTID_DEBUG_ARG(expr, arg) | 1203 #define PKIX_OCSPCERTID_DEBUG_ARG(expr, arg) |
1355 #endif | 1204 #endif |
1356 | 1205 |
1357 #if PKIX_OCSPREQUESTDEBUG | 1206 #if PKIX_OCSPREQUESTDEBUG |
1358 #define PKIX_OCSPREQUEST_DEBUG(expr) \ | 1207 #define PKIX_OCSPREQUEST_DEBUG(expr) PKIX_DEBUG(expr) |
1359 PKIX_DEBUG(expr) | 1208 #define PKIX_OCSPREQUEST_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1360 #define PKIX_OCSPREQUEST_DEBUG_ARG(expr, arg) \ | |
1361 PKIX_DEBUG_ARG(expr, arg) | |
1362 #else | 1209 #else |
1363 #define PKIX_OCSPREQUEST_DEBUG(expr) | 1210 #define PKIX_OCSPREQUEST_DEBUG(expr) |
1364 #define PKIX_OCSPREQUEST_DEBUG_ARG(expr, arg) | 1211 #define PKIX_OCSPREQUEST_DEBUG_ARG(expr, arg) |
1365 #endif | 1212 #endif |
1366 | 1213 |
1367 #if PKIX_OCSPRESPONSEDEBUG | 1214 #if PKIX_OCSPRESPONSEDEBUG |
1368 #define PKIX_OCSPRESPONSE_DEBUG(expr) \ | 1215 #define PKIX_OCSPRESPONSE_DEBUG(expr) PKIX_DEBUG(expr) |
1369 PKIX_DEBUG(expr) | 1216 #define PKIX_OCSPRESPONSE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1370 #define PKIX_OCSPRESPONSE_DEBUG_ARG(expr, arg) \ | |
1371 PKIX_DEBUG_ARG(expr, arg) | |
1372 #else | 1217 #else |
1373 #define PKIX_OCSPRESPONSE_DEBUG(expr) | 1218 #define PKIX_OCSPRESPONSE_DEBUG(expr) |
1374 #define PKIX_OCSPRESPONSE_DEBUG_ARG(expr, arg) | 1219 #define PKIX_OCSPRESPONSE_DEBUG_ARG(expr, arg) |
1375 #endif | 1220 #endif |
1376 | 1221 |
1377 #if PKIX_HTTPDEFAULTCLIENTDEBUG | 1222 #if PKIX_HTTPDEFAULTCLIENTDEBUG |
1378 #define PKIX_HTTPDEFAULTCLIENT_DEBUG(expr) \ | 1223 #define PKIX_HTTPDEFAULTCLIENT_DEBUG(expr) PKIX_DEBUG(expr) |
1379 PKIX_DEBUG(expr) | 1224 #define PKIX_HTTPDEFAULTCLIENT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1380 #define PKIX_HTTPDEFAULTCLIENT_DEBUG_ARG(expr, arg) \ | |
1381 PKIX_DEBUG_ARG(expr, arg) | |
1382 #else | 1225 #else |
1383 #define PKIX_HTTPDEFAULTCLIENT_DEBUG(expr) | 1226 #define PKIX_HTTPDEFAULTCLIENT_DEBUG(expr) |
1384 #define PKIX_HTTPDEFAULTCLIENT_DEBUG_ARG(expr, arg) | 1227 #define PKIX_HTTPDEFAULTCLIENT_DEBUG_ARG(expr, arg) |
1385 #endif | 1228 #endif |
1386 | 1229 |
1387 #if PKIX_HTTPCERTSTORECONTEXTDEBUG | 1230 #if PKIX_HTTPCERTSTORECONTEXTDEBUG |
1388 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG(expr) \ | 1231 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG(expr) PKIX_DEBUG(expr) |
1389 PKIX_DEBUG(expr) | 1232 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1390 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG_ARG(expr, arg) \ | |
1391 PKIX_DEBUG_ARG(expr, arg) | |
1392 #else | 1233 #else |
1393 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG(expr) | 1234 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG(expr) |
1394 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG_ARG(expr, arg) | 1235 #define PKIX_HTTPCERTSTORECONTEXT_DEBUG_ARG(expr, arg) |
1395 #endif | 1236 #endif |
1396 | 1237 |
1397 #if PKIX_VERIFYNODEDEBUG | 1238 #if PKIX_VERIFYNODEDEBUG |
1398 #define PKIX_VERIFYNODE_DEBUG(expr) \ | 1239 #define PKIX_VERIFYNODE_DEBUG(expr) PKIX_DEBUG(expr) |
1399 PKIX_DEBUG(expr) | 1240 #define PKIX_VERIFYNODE_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1400 #define PKIX_VERIFYNODE_DEBUG_ARG(expr, arg) \ | |
1401 PKIX_DEBUG_ARG(expr, arg) | |
1402 #else | 1241 #else |
1403 #define PKIX_VERIFYNODE_DEBUG(expr) | 1242 #define PKIX_VERIFYNODE_DEBUG(expr) |
1404 #define PKIX_VERIFYNODE_DEBUG_ARG(expr, arg) | 1243 #define PKIX_VERIFYNODE_DEBUG_ARG(expr, arg) |
1405 #endif | 1244 #endif |
1406 | 1245 |
1407 #if PKIX_EKUCHECKER | 1246 #if PKIX_EKUCHECKER |
1408 #define PKIX_EKUCHECKER_DEBUG(expr) \ | 1247 #define PKIX_EKUCHECKER_DEBUG(expr) PKIX_DEBUG(expr) |
1409 PKIX_DEBUG(expr) | 1248 #define PKIX_EKUCHECKER_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1410 #define PKIX_EKUCHECKER_DEBUG_ARG(expr, arg) \ | |
1411 PKIX_DEBUG_ARG(expr, arg) | |
1412 #else | 1249 #else |
1413 #define PKIX_EKUCHECKER_DEBUG(expr) | 1250 #define PKIX_EKUCHECKER_DEBUG(expr) |
1414 #define PKIX_EKUCHECKER_DEBUG_ARG(expr, arg) | 1251 #define PKIX_EKUCHECKER_DEBUG_ARG(expr, arg) |
1415 #endif | 1252 #endif |
1416 | 1253 |
1417 #if PKIX_CERTVFYPKIXDEBUG | 1254 #if PKIX_CERTVFYPKIXDEBUG |
1418 #define PKIX_CERTVFYPKIX_DEBUG(expr) \ | 1255 #define PKIX_CERTVFYPKIX_DEBUG(expr) PKIX_DEBUG(expr) |
1419 PKIX_DEBUG(expr) | 1256 #define PKIX_CERTVFYPKIX_DEBUG_ARG(expr, arg) PKIX_DEBUG_ARG(expr, arg) |
1420 #define PKIX_CERTVFYPKIX_DEBUG_ARG(expr, arg) \ | |
1421 PKIX_DEBUG_ARG(expr, arg) | |
1422 #else | 1257 #else |
1423 #define PKIX_CERTVFYPKIX_DEBUG(expr) | 1258 #define PKIX_CERTVFYPKIX_DEBUG(expr) |
1424 #define PKIX_CERTVFYPKIX_DEBUG_ARG(expr, arg) | 1259 #define PKIX_CERTVFYPKIX_DEBUG_ARG(expr, arg) |
1425 #endif | 1260 #endif |
1426 | 1261 |
1427 /* | 1262 /* |
1428 * All object types register themselves with the system using a | 1263 * All object types register themselves with the system using a |
1429 * pkix_ClassTable_Entry, which consists of a set of functions for that | 1264 * pkix_ClassTable_Entry, which consists of a set of functions for that |
1430 * type and an ASCII string (char *) which is used by the default | 1265 * type and an ASCII string (char *) which is used by the default |
1431 * ToStringCallback (if necessary). System types register themselves directly | 1266 * ToStringCallback (if necessary). System types register themselves directly |
1432 * when their respective PKIX_"type"_RegisterSelf functions are called. | 1267 * when their respective PKIX_"type"_RegisterSelf functions are called. |
1433 * User-defined types can be registered using PKIX_PL_Object_RegisterType. | 1268 * User-defined types can be registered using PKIX_PL_Object_RegisterType. |
1434 * (see comments in pkix_pl_system.h) | 1269 * (see comments in pkix_pl_system.h) |
1435 */ | 1270 */ |
1436 | 1271 |
1437 typedef struct pkix_ClassTable_EntryStruct pkix_ClassTable_Entry; | 1272 typedef struct pkix_ClassTable_EntryStruct pkix_ClassTable_Entry; |
1438 struct pkix_ClassTable_EntryStruct { | 1273 struct pkix_ClassTable_EntryStruct { |
1439 char *description; | 1274 char *description; |
1440 PKIX_Int32 objCounter; | 1275 PKIX_Int32 objCounter; |
1441 PKIX_Int32 typeObjectSize; | 1276 PKIX_Int32 typeObjectSize; |
1442 PKIX_PL_DestructorCallback destructor; | 1277 PKIX_PL_DestructorCallback destructor; |
1443 PKIX_PL_EqualsCallback equalsFunction; | 1278 PKIX_PL_EqualsCallback equalsFunction; |
1444 PKIX_PL_HashcodeCallback hashcodeFunction; | 1279 PKIX_PL_HashcodeCallback hashcodeFunction; |
1445 PKIX_PL_ToStringCallback toStringFunction; | 1280 PKIX_PL_ToStringCallback toStringFunction; |
1446 PKIX_PL_ComparatorCallback comparator; | 1281 PKIX_PL_ComparatorCallback comparator; |
1447 PKIX_PL_DuplicateCallback duplicateFunction; | 1282 PKIX_PL_DuplicateCallback duplicateFunction; |
1448 }; | 1283 }; |
1449 | 1284 |
1450 /* | 1285 /* |
1451 * PKIX_ERRORCLASSNAMES is an array of strings, with each string holding a | 1286 * PKIX_ERRORCLASSNAMES is an array of strings, with each string holding a |
1452 * descriptive name for an error code. This is used by the default | 1287 * descriptive name for an error code. This is used by the default |
1453 * PKIX_PL_Error_ToString function. | 1288 * PKIX_PL_Error_ToString function. |
1454 */ | 1289 */ |
1455 extern const char *PKIX_ERRORCLASSNAMES[PKIX_NUMERRORCLASSES]; | 1290 extern const char *PKIX_ERRORCLASSNAMES[PKIX_NUMERRORCLASSES]; |
1456 | 1291 |
1457 #define MAX_STACK_DEPTH 1000 | 1292 #define MAX_STACK_DEPTH 1000 |
1458 | 1293 |
1459 extern PRLogModuleInfo *pkixLog; | 1294 extern PRLogModuleInfo *pkixLog; |
1460 | 1295 |
1461 #define PKIX_MAGIC_HEADER LL_INIT(0xFEEDC0FF, 0xEEFACADE) | 1296 #define PKIX_MAGIC_HEADER LL_INIT(0xFEEDC0FF, 0xEEFACADE) |
1462 #define PKIX_MAGIC_HEADER_DESTROYED LL_INIT(0xBAADF00D, 0xDEADBEEF) | 1297 #define PKIX_MAGIC_HEADER_DESTROYED LL_INIT(0xBAADF00D, 0xDEADBEEF) |
1463 | 1298 |
1464 /* see source file for function documentation */ | 1299 /* see source file for function documentation */ |
1465 | 1300 |
1466 PKIX_Error * | 1301 PKIX_Error *pkix_IsCertSelfIssued(PKIX_PL_Cert *cert, PKIX_Boolean *pSelfIssued, |
1467 pkix_IsCertSelfIssued( | 1302 void *plContext); |
1468 PKIX_PL_Cert *cert, | |
1469 PKIX_Boolean *pSelfIssued, | |
1470 void *plContext); | |
1471 | 1303 |
1472 PKIX_Error * | 1304 PKIX_Error *pkix_Throw(PKIX_ERRORCLASS errClass, const char *funcName, |
1473 pkix_Throw( | 1305 PKIX_ERRORCODE errorTextCode, |
1474 PKIX_ERRORCLASS errClass, | 1306 PKIX_ERRORCLASS overrideClass, PKIX_Error *cause, |
1475 const char *funcName, | 1307 PKIX_Error **pError, void *plContext); |
1476 PKIX_ERRORCODE errorTextCode, | |
1477 PKIX_ERRORCLASS overrideClass, | |
1478 PKIX_Error *cause, | |
1479 PKIX_Error **pError, | |
1480 void *plContext); | |
1481 | 1308 |
1482 PKIX_Error * | 1309 PKIX_Error *pkix_CheckTypes(PKIX_PL_Object *first, PKIX_PL_Object *second, |
1483 pkix_CheckTypes( | 1310 PKIX_UInt32 type, void *plContext); |
1484 PKIX_PL_Object *first, | |
1485 PKIX_PL_Object *second, | |
1486 PKIX_UInt32 type, | |
1487 void *plContext); | |
1488 | 1311 |
1489 PKIX_Error * | 1312 PKIX_Error *pkix_CheckType(PKIX_PL_Object *object, PKIX_UInt32 type, |
1490 pkix_CheckType( | 1313 void *plContext); |
1491 PKIX_PL_Object *object, | |
1492 PKIX_UInt32 type, | |
1493 void *plContext); | |
1494 | 1314 |
1495 PKIX_Error * | 1315 PKIX_Error *pkix_hash(const unsigned char *bytes, PKIX_UInt32 length, |
1496 pkix_hash( | 1316 PKIX_UInt32 *hash, void *plContext); |
1497 const unsigned char *bytes, | |
1498 PKIX_UInt32 length, | |
1499 PKIX_UInt32 *hash, | |
1500 void *plContext); | |
1501 | 1317 |
1502 PKIX_Error * | 1318 PKIX_Error *pkix_duplicateImmutable(PKIX_PL_Object *object, |
1503 pkix_duplicateImmutable( | 1319 PKIX_PL_Object **pNewObject, |
1504 PKIX_PL_Object *object, | 1320 void *plContext); |
1505 PKIX_PL_Object **pNewObject, | |
1506 void *plContext); | |
1507 | 1321 |
1508 PKIX_UInt32 | 1322 PKIX_UInt32 pkix_countArray(void **array); |
1509 pkix_countArray(void **array); | |
1510 | 1323 |
1511 PKIX_UInt32 | 1324 PKIX_UInt32 pkix_hex2i(char c); |
1512 pkix_hex2i(char c); | |
1513 | 1325 |
1514 char | 1326 char pkix_i2hex(char c); |
1515 pkix_i2hex(char c); | |
1516 | 1327 |
1517 PKIX_Boolean | 1328 PKIX_Boolean pkix_isPlaintext(unsigned char c, PKIX_Boolean debug); |
1518 pkix_isPlaintext(unsigned char c, PKIX_Boolean debug); | |
1519 | 1329 |
1520 PKIX_Error * | 1330 PKIX_Error *pkix_CacheCertChain_Lookup( |
1521 pkix_CacheCertChain_Lookup( | 1331 PKIX_PL_Cert *targetCert, PKIX_List *anchors, PKIX_PL_Date *testDate, |
1522 PKIX_PL_Cert* targetCert, | 1332 PKIX_Boolean *pFound, PKIX_BuildResult **pBuildResult, void *plContext); |
1523 PKIX_List* anchors, | |
1524 PKIX_PL_Date *testDate, | |
1525 PKIX_Boolean *pFound, | |
1526 PKIX_BuildResult **pBuildResult, | |
1527 void *plContext); | |
1528 | 1333 |
1529 PKIX_Error * | 1334 PKIX_Error *pkix_CacheCertChain_Remove(PKIX_PL_Cert *targetCert, |
1530 pkix_CacheCertChain_Remove( | 1335 PKIX_List *anchors, void *plContext); |
1531 PKIX_PL_Cert* targetCert, | |
1532 PKIX_List* anchors, | |
1533 void *plContext); | |
1534 | 1336 |
1535 PKIX_Error * | 1337 PKIX_Error *pkix_CacheCertChain_Add(PKIX_PL_Cert *targetCert, |
1536 pkix_CacheCertChain_Add( | 1338 PKIX_List *anchors, |
1537 PKIX_PL_Cert* targetCert, | 1339 PKIX_PL_Date *validityDate, |
1538 PKIX_List* anchors, | 1340 PKIX_BuildResult *buildResult, |
1539 PKIX_PL_Date *validityDate, | 1341 void *plContext); |
1540 PKIX_BuildResult *buildResult, | |
1541 void *plContext); | |
1542 | 1342 |
1543 PKIX_Error * | 1343 PKIX_Error *pkix_CacheCert_Lookup(PKIX_CertStore *store, |
1544 pkix_CacheCert_Lookup( | 1344 PKIX_ComCertSelParams *certSelParams, |
1545 PKIX_CertStore *store, | 1345 PKIX_PL_Date *testDate, PKIX_Boolean *pFound, |
1546 PKIX_ComCertSelParams *certSelParams, | 1346 PKIX_List **pCerts, void *plContext); |
1547 PKIX_PL_Date *testDate, | |
1548 PKIX_Boolean *pFound, | |
1549 PKIX_List** pCerts, | |
1550 void *plContext); | |
1551 | 1347 |
1552 PKIX_Error * | 1348 PKIX_Error *pkix_CacheCert_Add(PKIX_CertStore *store, |
1553 pkix_CacheCert_Add( | 1349 PKIX_ComCertSelParams *certSelParams, |
1554 PKIX_CertStore *store, | 1350 PKIX_List *certs, void *plContext); |
1555 PKIX_ComCertSelParams *certSelParams, | |
1556 PKIX_List* certs, | |
1557 void *plContext); | |
1558 | 1351 |
1559 PKIX_Error * | 1352 PKIX_Error *pkix_CacheCrlEntry_Lookup(PKIX_CertStore *store, |
1560 pkix_CacheCrlEntry_Lookup( | 1353 PKIX_PL_X500Name *certIssuer, |
1561 PKIX_CertStore *store, | 1354 PKIX_PL_BigInt *certSerialNumber, |
1562 PKIX_PL_X500Name *certIssuer, | 1355 PKIX_Boolean *pFound, |
1563 PKIX_PL_BigInt *certSerialNumber, | 1356 PKIX_List **pCrlEntryList, |
1564 PKIX_Boolean *pFound, | 1357 void *plContext); |
1565 PKIX_List** pCrlEntryList, | |
1566 void *plContext); | |
1567 | 1358 |
1568 PKIX_Error * | 1359 PKIX_Error *pkix_CacheCrlEntry_Add(PKIX_CertStore *store, |
1569 pkix_CacheCrlEntry_Add( | 1360 PKIX_PL_X500Name *certIssuer, |
1570 PKIX_CertStore *store, | 1361 PKIX_PL_BigInt *certSerialNumber, |
1571 PKIX_PL_X500Name *certIssuer, | 1362 PKIX_List *crlEntryList, void *plContext); |
1572 PKIX_PL_BigInt *certSerialNumber, | |
1573 PKIX_List* crlEntryList, | |
1574 void *plContext); | |
1575 | 1363 |
1576 #ifdef PR_LOGGING | 1364 #ifdef PR_LOGGING |
1577 void | 1365 void pkix_trace_dump_cert(const char *info, PKIX_PL_Cert *cert, |
1578 pkix_trace_dump_cert( | 1366 void *plContext); |
1579 const char *info,· | |
1580 PKIX_PL_Cert *cert,· | |
1581 void *plContext); | |
1582 #endif | 1367 #endif |
1583 | 1368 |
1584 #ifdef __cplusplus | 1369 #ifdef __cplusplus |
1585 } | 1370 } |
1586 #endif | 1371 #endif |
1587 | 1372 |
1588 #endif /* _PKIX_TOOLS_H */ | 1373 #endif /* _PKIX_TOOLS_H */ |
OLD | NEW |