当前位置: 首页>>代码示例>>Java>>正文


Java PolicyNode类代码示例

本文整理汇总了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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:18,代码来源:PKIXPolicyNode.java

示例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;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:18,代码来源:PKIXPolicyNode.java

示例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);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:28,代码来源:PKIXCertPathValidatorResultTest.java

示例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) {
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:24,代码来源:PKIXCertPathValidatorResultTest.java

示例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) {
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:28,代码来源:PKIXCertPathValidatorResultTest.java

示例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);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:23,代码来源:PKIXCertPathValidatorResultTest.java

示例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());
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:33,代码来源:PKIXCertPathValidatorResultTest.java

示例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());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:27,代码来源:PKIXCertPathValidatorResultTest.java

示例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;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:PolicyChecker.java

示例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;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:PolicyChecker.java

示例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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:11,代码来源:PKIXCertPathReviewer.java

示例12: getParent

import java.security.cert.PolicyNode; //导入依赖的package包/类
public PolicyNode getParent()
{
    return parent;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:PKIXPolicyNode.java

示例13: getParent

import java.security.cert.PolicyNode; //导入依赖的package包/类
@Override
public PolicyNode getParent()
   {
	return parent;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:6,代码来源:PKIXPolicyNode.java

示例14: getParent

import java.security.cert.PolicyNode; //导入依赖的package包/类
public PolicyNode getParent()
   {
	return parent;
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:5,代码来源:PKIXPolicyNode.java


注:本文中的java.security.cert.PolicyNode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。