security/nss/lib/libpkix/pkix/top/pkix_build.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/libpkix/pkix/top/pkix_build.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,120 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +/*
     1.8 + * pkix_build.h
     1.9 + *
    1.10 + * Header file for buildChain function
    1.11 + *
    1.12 + */
    1.13 +
    1.14 +#ifndef _PKIX_BUILD_H
    1.15 +#define _PKIX_BUILD_H
    1.16 +#include "pkix_tools.h"
    1.17 +#ifndef NSS_PKIX_NO_LDAP
    1.18 +#include "pkix_pl_ldapt.h"
    1.19 +#endif
    1.20 +#include "pkix_ekuchecker.h"
    1.21 +
    1.22 +#ifdef __cplusplus
    1.23 +extern "C" {
    1.24 +#endif
    1.25 +
    1.26 +typedef enum {
    1.27 +        BUILD_SHORTCUTPENDING,
    1.28 +        BUILD_INITIAL,
    1.29 +        BUILD_TRYAIA,
    1.30 +        BUILD_AIAPENDING,
    1.31 +        BUILD_COLLECTINGCERTS,
    1.32 +        BUILD_GATHERPENDING,
    1.33 +        BUILD_CERTVALIDATING,
    1.34 +        BUILD_ABANDONNODE,
    1.35 +        BUILD_DATEPREP,
    1.36 +        BUILD_CHECKTRUSTED,
    1.37 +        BUILD_CHECKTRUSTED2,
    1.38 +        BUILD_ADDTOCHAIN,
    1.39 +        BUILD_VALCHAIN,
    1.40 +        BUILD_VALCHAIN2,
    1.41 +        BUILD_EXTENDCHAIN,
    1.42 +        BUILD_GETNEXTCERT
    1.43 +} BuildStatus;
    1.44 +
    1.45 +typedef struct BuildConstantsStruct BuildConstants;
    1.46 +
    1.47 +/*
    1.48 + * These fields (the ones that are objects) are not reference-counted
    1.49 + * in *each* state, but only in the root, the state that has no parent.
    1.50 + * That saves time in creation and destruction of child states, but is
    1.51 + * safe enough since they are constants.
    1.52 + */
    1.53 +struct BuildConstantsStruct {
    1.54 +        PKIX_UInt32 numAnchors;
    1.55 +        PKIX_UInt32 numCertStores;
    1.56 +        PKIX_UInt32 numHintCerts;
    1.57 +        PKIX_UInt32 maxDepth;
    1.58 +        PKIX_UInt32 maxFanout;
    1.59 +        PKIX_UInt32 maxTime;
    1.60 +        PKIX_ProcessingParams *procParams;
    1.61 +        PKIX_PL_Date *testDate;
    1.62 +        PKIX_PL_Date *timeLimit;
    1.63 +        PKIX_PL_Cert *targetCert;
    1.64 +        PKIX_PL_PublicKey *targetPubKey;
    1.65 +        PKIX_List *certStores;
    1.66 +        PKIX_List *anchors;
    1.67 +        PKIX_List *userCheckers;
    1.68 +        PKIX_List *hintCerts;
    1.69 +        PKIX_RevocationChecker *revChecker;
    1.70 +        PKIX_PL_AIAMgr *aiaMgr;
    1.71 +        PKIX_Boolean useAIAForCertFetching;
    1.72 +        PKIX_Boolean trustOnlyUserAnchors;
    1.73 +};
    1.74 +
    1.75 +struct PKIX_ForwardBuilderStateStruct{
    1.76 +        BuildStatus status;
    1.77 +        PKIX_Int32 traversedCACerts;
    1.78 +        PKIX_UInt32 certStoreIndex;
    1.79 +        PKIX_UInt32 numCerts;
    1.80 +        PKIX_UInt32 numAias;
    1.81 +        PKIX_UInt32 certIndex;
    1.82 +        PKIX_UInt32 aiaIndex;
    1.83 +        PKIX_UInt32 certCheckedIndex;
    1.84 +        PKIX_UInt32 checkerIndex;
    1.85 +        PKIX_UInt32 hintCertIndex;
    1.86 +        PKIX_UInt32 numFanout;
    1.87 +        PKIX_UInt32 numDepth;
    1.88 +        PKIX_UInt32 reasonCode;
    1.89 +        PKIX_Boolean canBeCached;
    1.90 +        PKIX_Boolean useOnlyLocal;
    1.91 +        PKIX_Boolean revChecking;
    1.92 +        PKIX_Boolean usingHintCerts;
    1.93 +        PKIX_Boolean certLoopingDetected;
    1.94 +        PKIX_PL_Date *validityDate;
    1.95 +        PKIX_PL_Cert *prevCert;
    1.96 +        PKIX_PL_Cert *candidateCert;
    1.97 +        PKIX_List *traversedSubjNames;
    1.98 +        PKIX_List *trustChain;
    1.99 +        PKIX_List *aia;
   1.100 +        PKIX_List *candidateCerts;
   1.101 +        PKIX_List *reversedCertChain;
   1.102 +        PKIX_List *checkedCritExtOIDs;
   1.103 +        PKIX_List *checkerChain;
   1.104 +        PKIX_CertSelector *certSel;
   1.105 +        PKIX_VerifyNode *verifyNode;
   1.106 +        void *client; /* messageHandler, such as LDAPClient */
   1.107 +        PKIX_ForwardBuilderState *parentState;
   1.108 +        BuildConstants buildConstants;
   1.109 +};
   1.110 +
   1.111 +/* --Private-Functions-------------------------------------------- */
   1.112 +
   1.113 +PKIX_Error *
   1.114 +pkix_ForwardBuilderState_RegisterSelf(void *plContext);
   1.115 +
   1.116 +PKIX_Error *
   1.117 +PKIX_Build_GetNBIOContext(void *state, void **pNBIOContext, void *plContext);
   1.118 +
   1.119 +#ifdef __cplusplus
   1.120 +}
   1.121 +#endif
   1.122 +
   1.123 +#endif /* _PKIX_BUILD_H */

mercurial