本文整理汇总了Java中java.security.cert.PolicyNode类的典型用法代码示例。如果您正苦于以下问题:Java PolicyNode类的具体用法?Java PolicyNode怎么用?Java PolicyNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PolicyNode类属于java.security.cert包,在下文中一共展示了PolicyNode类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PKIXPolicyNode
import java.security.cert.PolicyNode; //导入依赖的package包/类
public PKIXPolicyNode(
List _children,
int _depth,
Set _expectedPolicies,
PolicyNode _parent,
Set _policyQualifiers,
String _validPolicy,
boolean _critical)
{
children = _children;
depth = _depth;
expectedPolicies = _expectedPolicies;
parent = _parent;
policyQualifiers = _policyQualifiers;
validPolicy = _validPolicy;
critical = _critical;
}
示例2: PKIXPolicyNode
import java.security.cert.PolicyNode; //导入依赖的package包/类
public PKIXPolicyNode(
List _children,
int _depth,
Set _expectedPolicies,
PolicyNode _parent,
Set _policyQualifiers,
String _validPolicy,
boolean _critical)
{
children = _children;
depth = _depth;
expectedPolicies = _expectedPolicies;
parent = _parent;
policyQualifiers = _policyQualifiers;
validPolicy = _validPolicy;
critical = _critical;
}
示例3: testPKIXCertPathValidatorResult01
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Test #1 for <code>PKIXCertPathValidatorResult(TrustAnchor,
* PolicyNode, PublicKey)</code> constructor<br>
* Assertion: creates an instance of
* <code>PKIXCertPathValidatorResult</code>
*
* @throws NoSuchAlgorithmException
* @throws InvalidKeySpecException
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "Doesn't verify NullPointerException.",
method = "PKIXCertPathValidatorResult",
args = {java.security.cert.TrustAnchor.class, java.security.cert.PolicyNode.class, java.security.PublicKey.class}
)
public final void testPKIXCertPathValidatorResult01()
throws InvalidKeySpecException,
NoSuchAlgorithmException {
TrustAnchor ta = TestUtils.getTrustAnchor();
if (ta == null) {
fail(getName() + ": not performed (could not create test TrustAnchor)");
}
new PKIXCertPathValidatorResult(
ta,
TestUtils.getPolicyTree(),
testPublicKey);
}
示例4: testPKIXCertPathValidatorResult02
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Test #2 for <code>PKIXCertPathValidatorResult(TrustAnchor,
* PolicyNode, PublicKey)</code> constructor<br>
* Assertion: <code>NullPointerException</code> if
* <code>TrustAnchor</code> parameter is <code>null</code>
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "Verifies NullPointerException.",
method = "PKIXCertPathValidatorResult",
args = {java.security.cert.TrustAnchor.class, java.security.cert.PolicyNode.class, java.security.PublicKey.class}
)
public final void testPKIXCertPathValidatorResult02() {
try {
// pass null
new PKIXCertPathValidatorResult(
null,
TestUtils.getPolicyTree(),
testPublicKey);
fail("NPE expected");
} catch (NullPointerException e) {
}
}
示例5: testPKIXCertPathValidatorResult03
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Test #3 for <code>PKIXCertPathValidatorResult(TrustAnchor,
* PolicyNode, PublicKey)</code> constructor<br>
* Assertion: <code>NullPointerException</code> if
* <code>PublicKey</code> parameter is <code>null</code>
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "Verifies NullPointerException.",
method = "PKIXCertPathValidatorResult",
args = {java.security.cert.TrustAnchor.class, java.security.cert.PolicyNode.class, java.security.PublicKey.class}
)
public final void testPKIXCertPathValidatorResult03() {
TrustAnchor ta = TestUtils.getTrustAnchor();
if (ta == null) {
fail(getName() + ": not performed (could not create test TrustAnchor)");
}
try {
// pass null
new PKIXCertPathValidatorResult(
ta,
TestUtils.getPolicyTree(),
null);
fail("NPE expected");
} catch (NullPointerException e) {
}
}
示例6: testPKIXCertPathValidatorResult04
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Test #4 for <code>PKIXCertPathValidatorResult(TrustAnchor,
* PolicyNode, PublicKey)</code> constructor<br>
* Assertion: <code>PolicyNode</code>can be <code>null</code>
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "Verifies null as a parameter.",
method = "PKIXCertPathValidatorResult",
args = {java.security.cert.TrustAnchor.class, java.security.cert.PolicyNode.class, java.security.PublicKey.class}
)
public final void testPKIXCertPathValidatorResult04() throws Exception {
TrustAnchor ta = TestUtils.getTrustAnchor();
if (ta == null) {
fail(getName() + ": not performed (could not create test TrustAnchor)");
}
new PKIXCertPathValidatorResult(
ta,
null,
testPublicKey);
}
示例7: testGetPolicyTree01
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Test for <code>getPolicyTree()</code> method<br>
* Assertion: returns the root node of the valid
* policy tree or <code>null</code> if there are
* no valid policies
* @throws NoSuchAlgorithmException
* @throws InvalidKeySpecException
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "Verifies that getPolicyTree method returns the root node of the valid policy tree.",
method = "getPolicyTree",
args = {}
)
public final void testGetPolicyTree01() throws Exception {
TrustAnchor ta = TestUtils.getTrustAnchor();
if (ta == null) {
fail(getName() + ": not performed (could not create test TrustAnchor)");
}
// valid policy tree case;
PolicyNode pn = TestUtils.getPolicyTree();
PKIXCertPathValidatorResult vr =
new PKIXCertPathValidatorResult(
ta,
pn,
testPublicKey);
// must return the same reference passed
// as a parameter to the constructor
assertSame(pn, vr.getPolicyTree());
}
示例8: testGetPolicyTree01
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Test for <code>getPolicyTree()</code> method<br>
* Assertion: returns the root node of the valid
* policy tree or <code>null</code> if there are
* no valid policies
* @throws NoSuchAlgorithmException
* @throws InvalidKeySpecException
*/
public final void testGetPolicyTree01() throws Exception {
TrustAnchor ta = TestUtils.getTrustAnchor();
if (ta == null) {
fail(getName() + ": not performed (could not create test TrustAnchor)");
}
// valid policy tree case;
PolicyNode pn = TestUtils.getPolicyTree();
PKIXCertPathValidatorResult vr =
new PKIXCertPathValidatorResult(
ta,
pn,
testPublicKey);
// must return the same reference passed
// as a parameter to the constructor
assertSame(pn, vr.getPolicyTree());
}
示例9: getPolicyTree
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Gets the root node of the valid policy tree, or null if the
* valid policy tree is null. Marks each node of the returned tree
* immutable and thread-safe.
*
* @returns the root node of the valid policy tree, or null if
* the valid policy tree is null
*/
PolicyNode getPolicyTree() {
if (rootNode == null)
return null;
else {
PolicyNodeImpl policyTree = rootNode.copyTree();
policyTree.setImmutable();
return policyTree;
}
}
示例10: getPolicyTree
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
* Gets the root node of the valid policy tree, or null if the
* valid policy tree is null. Marks each node of the returned tree
* immutable and thread-safe.
*
* @return the root node of the valid policy tree, or null if
* the valid policy tree is null
*/
PolicyNode getPolicyTree() {
if (rootNode == null)
return null;
else {
PolicyNodeImpl policyTree = rootNode.copyTree();
policyTree.setImmutable();
return policyTree;
}
}
示例11: getPolicyTree
import java.security.cert.PolicyNode; //导入依赖的package包/类
/**
*
* @return the valid policy tree, <b>null</b> if no valid policy exists.
* @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized
*/
public PolicyNode getPolicyTree()
{
doChecks();
return policyTree;
}
示例12: getParent
import java.security.cert.PolicyNode; //导入依赖的package包/类
public PolicyNode getParent()
{
return parent;
}
示例13: getParent
import java.security.cert.PolicyNode; //导入依赖的package包/类
@Override
public PolicyNode getParent()
{
return parent;
}
示例14: getParent
import java.security.cert.PolicyNode; //导入依赖的package包/类
public PolicyNode getParent()
{
return parent;
}