summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/libpkix/pkix/results/pkix_policynode.h
blob: 799b7a60aa2018879aaaf34d39e8c0f4517ddac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
 * pkix_policynode.h
 *
 * PolicyNode Type Definitions
 *
 */

#ifndef _PKIX_POLICYNODE_H
#define _PKIX_POLICYNODE_H

#include "pkix_tools.h"

#ifdef __cplusplus
extern "C" {
#endif

/* This structure reflects the contents of a policy node...
 */
struct PKIX_PolicyNodeStruct {
    PKIX_PL_OID *validPolicy;
    PKIX_List *qualifierSet;    /* CertPolicyQualifiers */
    PKIX_Boolean criticality;
    PKIX_List *expectedPolicySet;       /* OIDs */
    PKIX_PolicyNode *parent;
    PKIX_List *children;                /* PolicyNodes */
    PKIX_UInt32 depth;
};

PKIX_Error *
pkix_SinglePolicyNode_ToString(
        PKIX_PolicyNode *node,
        PKIX_PL_String **pString,
        void *plContext);

PKIX_Error *
pkix_PolicyNode_GetChildrenMutable(
        PKIX_PolicyNode *node,
        PKIX_List **pChildren,  /* PolicyNodes */
        void *plContext);

PKIX_Error *
pkix_PolicyNode_Create(
        PKIX_PL_OID *validPolicy,
        PKIX_List *qualifierSet,        /* CertPolicyQualifiers */
        PKIX_Boolean criticality,
        PKIX_List *expectedPolicySet,   /* OIDs */
        PKIX_PolicyNode **pObject,
        void *plContext);

PKIX_Error *
pkix_PolicyNode_AddToParent(
        PKIX_PolicyNode *parentNode,
        PKIX_PolicyNode *child,
        void *plContext);

PKIX_Error *
pkix_PolicyNode_Prune(
        PKIX_PolicyNode *node,
        PKIX_UInt32 depth,
        PKIX_Boolean *pDelete,
        void *plContext);

PKIX_Error *
pkix_PolicyNode_RegisterSelf(
        void *plContext);

#ifdef __cplusplus
}
#endif

#endif /* _PKIX_POLICYNODE_H */