1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
14 * The Original Code is the Netscape security libraries.
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by the Initial Developer are Copyright (C) 1994-2000
19 * the Initial Developer. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
40 * Header file for buildChain function
46 #include "pkix_tools.h"
47 #include "pkix_pl_ldapt.h"
54 BUILD_SHORTCUTPENDING
,
58 BUILD_COLLECTINGCERTS
,
68 BUILD_CHECKWITHANCHORS
,
77 typedef struct BuildConstantsStruct BuildConstants
;
80 * These fields (the ones that are objects) are not reference-counted
81 * in *each* state, but only in the root, the state that has no parent.
82 * That saves time in creation and destruction of child states, but is
83 * safe enough since they are constants.
85 struct BuildConstantsStruct
{
86 PKIX_UInt32 numAnchors
;
87 PKIX_UInt32 numCertStores
;
88 PKIX_UInt32 numHintCerts
;
90 PKIX_UInt32 maxFanout
;
92 PKIX_ProcessingParams
*procParams
;
93 PKIX_PL_Date
*testDate
;
94 PKIX_PL_Date
*timeLimit
;
95 PKIX_PL_Cert
*targetCert
;
96 PKIX_PL_PublicKey
*targetPubKey
;
97 PKIX_List
*certStores
;
99 PKIX_List
*userCheckers
;
100 PKIX_List
*hintCerts
;
101 PKIX_CertChainChecker
*crlChecker
;
102 PKIX_PL_AIAMgr
*aiaMgr
;
105 struct PKIX_ForwardBuilderStateStruct
{
107 PKIX_Int32 traversedCACerts
;
108 PKIX_UInt32 certStoreIndex
;
109 PKIX_UInt32 numCerts
;
111 PKIX_UInt32 certIndex
;
112 PKIX_UInt32 aiaIndex
;
113 PKIX_UInt32 anchorIndex
;
114 PKIX_UInt32 certCheckedIndex
;
115 PKIX_UInt32 checkerIndex
;
116 PKIX_UInt32 hintCertIndex
;
117 PKIX_UInt32 numFanout
;
118 PKIX_UInt32 numDepth
;
119 PKIX_UInt32 reasonCode
;
120 PKIX_Boolean dsaParamsNeeded
;
121 PKIX_Boolean revCheckDelayed
;
122 PKIX_Boolean canBeCached
;
123 PKIX_Boolean useOnlyLocal
;
124 PKIX_Boolean alreadyTriedAIA
;
125 PKIX_Boolean revChecking
;
126 PKIX_Boolean usingHintCerts
;
127 PKIX_PL_Date
*validityDate
;
128 PKIX_PL_Cert
*prevCert
;
129 PKIX_PL_Cert
*candidateCert
;
130 PKIX_List
*traversedSubjNames
;
131 PKIX_List
*trustChain
;
133 PKIX_List
*candidateCerts
;
134 PKIX_List
*reversedCertChain
;
135 PKIX_List
*checkedCritExtOIDs
;
136 PKIX_List
*checkerChain
;
137 PKIX_List
*revCheckers
;
138 PKIX_CertSelector
*certSel
;
139 PKIX_VerifyNode
*verifyNode
;
140 void *client
; /* messageHandler, such as LDAPClient */
141 PKIX_ForwardBuilderState
*parentState
;
142 BuildConstants buildConstants
;
145 /* --Private-Functions-------------------------------------------- */
148 pkix_ForwardBuilderState_RegisterSelf(void *plContext
);
151 PKIX_Build_GetNBIOContext(void *state
, void **pNBIOContext
, void *plContext
);
157 #endif /* _PKIX_BUILD_H */