andre@0: /* This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: /* andre@0: * pkix_policychecker.h andre@0: * andre@0: * Header file for policy checker. andre@0: * andre@0: */ andre@0: andre@0: #ifndef _PKIX_POLICYCHECKER_H andre@0: #define _PKIX_POLICYCHECKER_H andre@0: andre@0: #include "pkix_tools.h" andre@0: andre@0: #ifdef __cplusplus andre@0: extern "C" { andre@0: #endif andre@0: andre@0: typedef struct PKIX_PolicyCheckerStateStruct PKIX_PolicyCheckerState; andre@0: andre@0: struct PKIX_PolicyCheckerStateStruct{ andre@0: PKIX_PL_OID *certPoliciesExtension; /* const */ andre@0: PKIX_PL_OID *policyMappingsExtension; /* const */ andre@0: PKIX_PL_OID *policyConstraintsExtension; /* const */ andre@0: PKIX_PL_OID *inhibitAnyPolicyExtension; /* const */ andre@0: PKIX_PL_OID *anyPolicyOID; /* const */ andre@0: PKIX_Boolean initialIsAnyPolicy; /* const */ andre@0: PKIX_PolicyNode *validPolicyTree; andre@0: PKIX_List *userInitialPolicySet; /* immutable */ andre@0: PKIX_List *mappedUserInitialPolicySet; andre@0: PKIX_Boolean policyQualifiersRejected; andre@0: PKIX_Boolean initialPolicyMappingInhibit; andre@0: PKIX_Boolean initialExplicitPolicy; andre@0: PKIX_Boolean initialAnyPolicyInhibit; andre@0: PKIX_UInt32 explicitPolicy; andre@0: PKIX_UInt32 inhibitAnyPolicy; andre@0: PKIX_UInt32 policyMapping; andre@0: PKIX_UInt32 numCerts; andre@0: PKIX_UInt32 certsProcessed; andre@0: PKIX_PolicyNode *anyPolicyNodeAtBottom; andre@0: PKIX_PolicyNode *newAnyPolicyNode; andre@0: /* andre@0: * The following variables do not survive from one andre@0: * certificate to the next. They are needed at each andre@0: * level of recursive routines, any by placing them andre@0: * in the state object we can pass fewer arguments. andre@0: */ andre@0: PKIX_Boolean certPoliciesCritical; andre@0: PKIX_List *mappedPolicyOIDs; andre@0: }; andre@0: andre@0: PKIX_Error * andre@0: pkix_PolicyChecker_Initialize( andre@0: PKIX_List *initialPolicies, andre@0: PKIX_Boolean policyQualifiersRejected, andre@0: PKIX_Boolean initialPolicyMappingInhibit, andre@0: PKIX_Boolean initialExplicitPolicy, andre@0: PKIX_Boolean initialAnyPolicyInhibit, andre@0: PKIX_UInt32 numCerts, andre@0: PKIX_CertChainChecker **pChecker, andre@0: void *plContext); andre@0: andre@0: /* --Private-Functions-------------------------------------------- */ andre@0: andre@0: PKIX_Error * andre@0: pkix_PolicyCheckerState_RegisterSelf(void *plContext); andre@0: andre@0: #ifdef __cplusplus andre@0: } andre@0: #endif andre@0: andre@0: #endif /* _PKIX_POLICYCHECKER_H */