-
public interface PolicyNodeAn immutable valid policy tree node as defined by the PKIX certification path validation algorithm.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.getPolicyTreereturns the root node of the valid policy tree. The tree can be traversed using thegetChildrenandgetParentmethods. Data about a particular node can be retrieved using other methods ofPolicyNode.Concurrent Access
All
PolicyNodeobjects must be immutable and thread-safe. Multiple threads may concurrently invoke the methods defined in this class on a singlePolicyNodeobject (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.- Since:
- 1.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterator<? extends PolicyNode>getChildren()Returns an iterator over the children of this node.intgetDepth()Returns the depth of this node in the valid policy tree.Set<String>getExpectedPolicies()Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed.PolicyNodegetParent()Returns the parent of this node, ornullif this is the root node.Set<? extends PolicyQualifierInfo>getPolicyQualifiers()Returns the set of policy qualifiers associated with the valid policy represented by this node.StringgetValidPolicy()Returns the valid policy represented by this node.booleanisCritical()Returns the criticality indicator of the certificate policy extension in the most recently processed certificate.
-
-
-
Method Detail
-
getParent
PolicyNode getParent()
Returns the parent of this node, ornullif this is the root node.- Returns:
- the parent of this node, or
nullif this is the root node
-
getChildren
Iterator<? extends PolicyNode> getChildren()
Returns an iterator over the children of this node. Any attempts to modify the children of this node through theIterator's remove method must throw anUnsupportedOperationException.- Returns:
- an iterator over the children of this node
-
getDepth
int getDepth()
Returns the depth of this node in the valid policy tree.- Returns:
- the depth of this node (0 for the root node, 1 for its children, and so on)
-
getValidPolicy
String getValidPolicy()
Returns the valid policy represented by this node.- Returns:
- the
StringOID 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".
-
getPolicyQualifiers
Set<? extends PolicyQualifierInfo> getPolicyQualifiers()
Returns the set of policy qualifiers associated with the valid policy represented by this node.- Returns:
- an immutable
SetofPolicyQualifierInfos. For the root node, this is always an emptySet.
-
getExpectedPolicies
Set<String> getExpectedPolicies()
Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed.- Returns:
- an immutable
Setof expected policyStringOIDs. For the root node, this method always returns aSetwith one element, the special anyPolicy OID: "2.5.29.32.0".
-
isCritical
boolean isCritical()
Returns the criticality indicator of the certificate policy extension in the most recently processed certificate.- Returns:
trueif extension marked critical,falseotherwise. For the root node,falseis always returned.
-
-