| OLD | NEW |
| (Empty) |
| 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 | |
| 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 4 /* | |
| 5 * pkix_build.h | |
| 6 * | |
| 7 * Header file for buildChain function | |
| 8 * | |
| 9 */ | |
| 10 | |
| 11 #ifndef _PKIX_BUILD_H | |
| 12 #define _PKIX_BUILD_H | |
| 13 #include "pkix_tools.h" | |
| 14 #include "pkix_pl_ldapt.h" | |
| 15 #include "pkix_ekuchecker.h" | |
| 16 | |
| 17 #ifdef __cplusplus | |
| 18 extern "C" { | |
| 19 #endif | |
| 20 | |
| 21 typedef enum { | |
| 22 BUILD_SHORTCUTPENDING, | |
| 23 BUILD_INITIAL, | |
| 24 BUILD_TRYAIA, | |
| 25 BUILD_AIAPENDING, | |
| 26 BUILD_COLLECTINGCERTS, | |
| 27 BUILD_GATHERPENDING, | |
| 28 BUILD_CERTVALIDATING, | |
| 29 BUILD_ABANDONNODE, | |
| 30 BUILD_CRLPREP, | |
| 31 BUILD_CRL1, | |
| 32 BUILD_DATEPREP, | |
| 33 BUILD_CHECKTRUSTED, | |
| 34 BUILD_CHECKTRUSTED2, | |
| 35 BUILD_ADDTOCHAIN, | |
| 36 BUILD_CRL2PREP, | |
| 37 BUILD_CRL2, | |
| 38 BUILD_VALCHAIN, | |
| 39 BUILD_VALCHAIN2, | |
| 40 BUILD_EXTENDCHAIN, | |
| 41 BUILD_GETNEXTCERT | |
| 42 } BuildStatus; | |
| 43 | |
| 44 typedef struct BuildConstantsStruct BuildConstants; | |
| 45 | |
| 46 /* | |
| 47 * These fields (the ones that are objects) are not reference-counted | |
| 48 * in *each* state, but only in the root, the state that has no parent. | |
| 49 * That saves time in creation and destruction of child states, but is | |
| 50 * safe enough since they are constants. | |
| 51 */ | |
| 52 struct BuildConstantsStruct { | |
| 53 PKIX_UInt32 numAnchors; | |
| 54 PKIX_UInt32 numCertStores; | |
| 55 PKIX_UInt32 numHintCerts; | |
| 56 PKIX_UInt32 maxDepth; | |
| 57 PKIX_UInt32 maxFanout; | |
| 58 PKIX_UInt32 maxTime; | |
| 59 PKIX_ProcessingParams *procParams; | |
| 60 PKIX_PL_Date *testDate; | |
| 61 PKIX_PL_Date *timeLimit; | |
| 62 PKIX_PL_Cert *targetCert; | |
| 63 PKIX_PL_PublicKey *targetPubKey; | |
| 64 PKIX_List *certStores; | |
| 65 PKIX_List *anchors; | |
| 66 PKIX_List *userCheckers; | |
| 67 PKIX_List *hintCerts; | |
| 68 PKIX_RevocationChecker *revChecker; | |
| 69 PKIX_PL_AIAMgr *aiaMgr; | |
| 70 PKIX_Boolean useAIAForCertFetching; | |
| 71 PKIX_Boolean trustOnlyUserAnchors; | |
| 72 }; | |
| 73 | |
| 74 struct PKIX_ForwardBuilderStateStruct{ | |
| 75 BuildStatus status; | |
| 76 PKIX_Int32 traversedCACerts; | |
| 77 PKIX_UInt32 certStoreIndex; | |
| 78 PKIX_UInt32 numCerts; | |
| 79 PKIX_UInt32 numAias; | |
| 80 PKIX_UInt32 certIndex; | |
| 81 PKIX_UInt32 aiaIndex; | |
| 82 PKIX_UInt32 certCheckedIndex; | |
| 83 PKIX_UInt32 checkerIndex; | |
| 84 PKIX_UInt32 hintCertIndex; | |
| 85 PKIX_UInt32 numFanout; | |
| 86 PKIX_UInt32 numDepth; | |
| 87 PKIX_UInt32 reasonCode; | |
| 88 PKIX_Boolean revCheckDelayed; | |
| 89 PKIX_Boolean canBeCached; | |
| 90 PKIX_Boolean useOnlyLocal; | |
| 91 PKIX_Boolean revChecking; | |
| 92 PKIX_Boolean usingHintCerts; | |
| 93 PKIX_Boolean certLoopingDetected; | |
| 94 PKIX_PL_Date *validityDate; | |
| 95 PKIX_PL_Cert *prevCert; | |
| 96 PKIX_PL_Cert *candidateCert; | |
| 97 PKIX_List *traversedSubjNames; | |
| 98 PKIX_List *trustChain; | |
| 99 PKIX_List *aia; | |
| 100 PKIX_List *candidateCerts; | |
| 101 PKIX_List *reversedCertChain; | |
| 102 PKIX_List *checkedCritExtOIDs; | |
| 103 PKIX_List *checkerChain; | |
| 104 PKIX_CertSelector *certSel; | |
| 105 PKIX_VerifyNode *verifyNode; | |
| 106 void *client; /* messageHandler, such as LDAPClient */ | |
| 107 PKIX_ForwardBuilderState *parentState; | |
| 108 BuildConstants buildConstants; | |
| 109 }; | |
| 110 | |
| 111 /* --Private-Functions-------------------------------------------- */ | |
| 112 | |
| 113 PKIX_Error * | |
| 114 pkix_ForwardBuilderState_RegisterSelf(void *plContext); | |
| 115 | |
| 116 PKIX_Error * | |
| 117 PKIX_Build_GetNBIOContext(void *state, void **pNBIOContext, void *plContext); | |
| 118 | |
| 119 #ifdef __cplusplus | |
| 120 } | |
| 121 #endif | |
| 122 | |
| 123 #endif /* _PKIX_BUILD_H */ | |
| OLD | NEW |