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_policynode.h 6 * 7 * PolicyNode Type Definitions 8 * 9 */ 10 11 #ifndef _PKIX_POLICYNODE_H 12 #define _PKIX_POLICYNODE_H 13 14 #include "pkix_tools.h" 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 /* This structure reflects the contents of a policy node... 21 */ 22 struct PKIX_PolicyNodeStruct { 23 PKIX_PL_OID *validPolicy; 24 PKIX_List *qualifierSet; /* CertPolicyQualifiers */ 25 PKIX_Boolean criticality; 26 PKIX_List *expectedPolicySet; /* OIDs */ 27 PKIX_PolicyNode *parent; 28 PKIX_List *children; /* PolicyNodes */ 29 PKIX_UInt32 depth; 30 }; 31 32 PKIX_Error * 33 pkix_SinglePolicyNode_ToString( 34 PKIX_PolicyNode *node, 35 PKIX_PL_String **pString, 36 void *plContext); 37 38 PKIX_Error * 39 pkix_PolicyNode_GetChildrenMutable( 40 PKIX_PolicyNode *node, 41 PKIX_List **pChildren, /* PolicyNodes */ 42 void *plContext); 43 44 PKIX_Error * 45 pkix_PolicyNode_Create( 46 PKIX_PL_OID *validPolicy, 47 PKIX_List *qualifierSet, /* CertPolicyQualifiers */ 48 PKIX_Boolean criticality, 49 PKIX_List *expectedPolicySet, /* OIDs */ 50 PKIX_PolicyNode **pObject, 51 void *plContext); 52 53 PKIX_Error * 54 pkix_PolicyNode_AddToParent( 55 PKIX_PolicyNode *parentNode, 56 PKIX_PolicyNode *child, 57 void *plContext); 58 59 PKIX_Error * 60 pkix_PolicyNode_Prune( 61 PKIX_PolicyNode *node, 62 PKIX_UInt32 depth, 63 PKIX_Boolean *pDelete, 64 void *plContext); 65 66 PKIX_Error * 67 pkix_PolicyNode_RegisterSelf( 68 void *plContext); 69 70 #ifdef __cplusplus 71 } 72 #endif 73 74 #endif /* _PKIX_POLICYNODE_H */ 75