1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/lib/libpkix/pkix/checker/pkix_policychecker.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,73 @@ 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_policychecker.h 1.9 + * 1.10 + * Header file for policy checker. 1.11 + * 1.12 + */ 1.13 + 1.14 +#ifndef _PKIX_POLICYCHECKER_H 1.15 +#define _PKIX_POLICYCHECKER_H 1.16 + 1.17 +#include "pkix_tools.h" 1.18 + 1.19 +#ifdef __cplusplus 1.20 +extern "C" { 1.21 +#endif 1.22 + 1.23 +typedef struct PKIX_PolicyCheckerStateStruct PKIX_PolicyCheckerState; 1.24 + 1.25 +struct PKIX_PolicyCheckerStateStruct{ 1.26 + PKIX_PL_OID *certPoliciesExtension; /* const */ 1.27 + PKIX_PL_OID *policyMappingsExtension; /* const */ 1.28 + PKIX_PL_OID *policyConstraintsExtension; /* const */ 1.29 + PKIX_PL_OID *inhibitAnyPolicyExtension; /* const */ 1.30 + PKIX_PL_OID *anyPolicyOID; /* const */ 1.31 + PKIX_Boolean initialIsAnyPolicy; /* const */ 1.32 + PKIX_PolicyNode *validPolicyTree; 1.33 + PKIX_List *userInitialPolicySet; /* immutable */ 1.34 + PKIX_List *mappedUserInitialPolicySet; 1.35 + PKIX_Boolean policyQualifiersRejected; 1.36 + PKIX_Boolean initialPolicyMappingInhibit; 1.37 + PKIX_Boolean initialExplicitPolicy; 1.38 + PKIX_Boolean initialAnyPolicyInhibit; 1.39 + PKIX_UInt32 explicitPolicy; 1.40 + PKIX_UInt32 inhibitAnyPolicy; 1.41 + PKIX_UInt32 policyMapping; 1.42 + PKIX_UInt32 numCerts; 1.43 + PKIX_UInt32 certsProcessed; 1.44 + PKIX_PolicyNode *anyPolicyNodeAtBottom; 1.45 + PKIX_PolicyNode *newAnyPolicyNode; 1.46 + /* 1.47 + * The following variables do not survive from one 1.48 + * certificate to the next. They are needed at each 1.49 + * level of recursive routines, any by placing them 1.50 + * in the state object we can pass fewer arguments. 1.51 + */ 1.52 + PKIX_Boolean certPoliciesCritical; 1.53 + PKIX_List *mappedPolicyOIDs; 1.54 +}; 1.55 + 1.56 +PKIX_Error * 1.57 +pkix_PolicyChecker_Initialize( 1.58 + PKIX_List *initialPolicies, 1.59 + PKIX_Boolean policyQualifiersRejected, 1.60 + PKIX_Boolean initialPolicyMappingInhibit, 1.61 + PKIX_Boolean initialExplicitPolicy, 1.62 + PKIX_Boolean initialAnyPolicyInhibit, 1.63 + PKIX_UInt32 numCerts, 1.64 + PKIX_CertChainChecker **pChecker, 1.65 + void *plContext); 1.66 + 1.67 +/* --Private-Functions-------------------------------------------- */ 1.68 + 1.69 +PKIX_Error * 1.70 +pkix_PolicyCheckerState_RegisterSelf(void *plContext); 1.71 + 1.72 +#ifdef __cplusplus 1.73 +} 1.74 +#endif 1.75 + 1.76 +#endif /* _PKIX_POLICYCHECKER_H */