One of the outputs of the PKIX certification path validation algorithm is a valid policy tree, which includes the policies that were determined to be valid, how this determination was reached, and any policy qualifiers encountered. This tree is of depth n, where n is the length of the certification path that has been validated.
Most applications will not need to examine the valid policy tree.
They can achieve their policy processing goals by setting the
policy-related parameters in PKIXParameters. However,
the valid policy tree is available for more sophisticated applications,
especially those that process policy qualifiers.
PKIXCertPathValidatorResult. returns the root node of the
valid policy tree. The tree can be traversed using the
getChildren and getParent methods.
Data about a particular node can be retrieved using other methods of
PolicyNode.
Concurrent Access
All PolicyNode objects must be immutable and
thread-safe. Multiple threads may concurrently invoke the methods defined
in this class on a single PolicyNode object (or more than one)
with no ill effects. This stipulation applies to all public fields and
methods of this class and any added or overridden by subclasses.
| Modifier and Type | Method and Description |
|---|---|
| public Iterator | Returns: an iterator over the children of this nodeReturns an iterator over the children of this node. |
| public int | Returns: the depth of this node (0 for the root node, 1 for its children, and so on)Returns the depth of this node in the valid policy tree. |
| public Set | Returns: an immutableSet of expected policy
String OIDs. For the root node, this method
always returns a Set with one element, the
special anyPolicy OID: "2.5.29.32.0".Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed. |
| public PolicyNode | Returns: the parent of this node, ornull if this is the
root nodeReturns the parent of this node, or |
| public Set | Returns: an immutableSet of
PolicyQualifierInfos. For the root node, this
is always an empty Set.Returns the set of policy qualifiers associated with the valid policy represented by this node. |
| public String | Returns: theString OID of the valid policy
represented by this node. For the root node, this method always returns
the special anyPolicy OID: "2.5.29.32.0".Returns the valid policy represented by this node. |
| public boolean | Returns: true if extension marked critical,
false otherwise. For the root node, false
is always returned.Returns the criticality indicator of the certificate policy extension in the most recently processed certificate. |
| getChildren | back to summary |
|---|---|
| public Iterator Returns an iterator over the children of this node. Any attempts to
modify the children of this node through the
| |
| getDepth | back to summary |
|---|---|
| public int getDepth() Returns the depth of this node in the valid policy tree.
| |
| getExpectedPolicies | back to summary |
|---|---|
| public Set Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed. | |
| getParent | back to summary |
|---|---|
| public PolicyNode getParent() Returns the parent of this node, or
| |
| getPolicyQualifiers | back to summary |
|---|---|
| public Set Returns the set of policy qualifiers associated with the valid policy represented by this node.
| |
| getValidPolicy | back to summary |
|---|---|
| public String getValidPolicy() Returns the valid policy represented by this node.
| |
| isCritical | back to summary |
|---|---|
| public boolean isCritical() Returns the criticality indicator of the certificate policy extension in the most recently processed certificate.
| |