Search in sources :

Example 6 with PKIXPolicyNode

use of com.github.zhenwei.provider.jce.provider.PKIXPolicyNode in project LinLong-Java by zhenwei1108.

the class CertPathValidatorUtilities method processCertD1ii.

protected static void processCertD1ii(int index, List[] policyNodes, ASN1ObjectIdentifier _poid, Set _pq) {
    List policyNodeVec = policyNodes[index - 1];
    for (int j = 0; j < policyNodeVec.size(); j++) {
        PKIXPolicyNode _node = (PKIXPolicyNode) policyNodeVec.get(j);
        if (ANY_POLICY.equals(_node.getValidPolicy())) {
            Set _childExpectedPolicies = new HashSet();
            _childExpectedPolicies.add(_poid.getId());
            PKIXPolicyNode _child = new PKIXPolicyNode(new ArrayList(), index, _childExpectedPolicies, _node, _pq, _poid.getId(), false);
            _node.addChild(_child);
            policyNodes[index].add(_child);
            return;
        }
    }
}
Also used : Set(java.util.Set) HashSet(java.util.HashSet) ArrayList(java.util.ArrayList) List(java.util.List) ArrayList(java.util.ArrayList) PKIXPolicyNode(com.github.zhenwei.provider.jce.provider.PKIXPolicyNode) IssuingDistributionPoint(com.github.zhenwei.core.asn1.x509.IssuingDistributionPoint) HashSet(java.util.HashSet)

Example 7 with PKIXPolicyNode

use of com.github.zhenwei.provider.jce.provider.PKIXPolicyNode in project LinLong-Java by zhenwei1108.

the class CertPathValidatorUtilities method removePolicyNode.

protected static PKIXPolicyNode removePolicyNode(PKIXPolicyNode validPolicyTree, List[] policyNodes, PKIXPolicyNode _node) {
    PKIXPolicyNode _parent = (PKIXPolicyNode) _node.getParent();
    if (validPolicyTree == null) {
        return null;
    }
    if (_parent == null) {
        for (int j = 0; j < policyNodes.length; j++) {
            policyNodes[j] = new ArrayList();
        }
        return null;
    } else {
        _parent.removeChild(_node);
        removePolicyNodeRecurse(policyNodes, _node);
        return validPolicyTree;
    }
}
Also used : ArrayList(java.util.ArrayList) PKIXPolicyNode(com.github.zhenwei.provider.jce.provider.PKIXPolicyNode) IssuingDistributionPoint(com.github.zhenwei.core.asn1.x509.IssuingDistributionPoint)

Aggregations

PKIXPolicyNode (com.github.zhenwei.provider.jce.provider.PKIXPolicyNode)7 ArrayList (java.util.ArrayList)6 IssuingDistributionPoint (com.github.zhenwei.core.asn1.x509.IssuingDistributionPoint)5 HashSet (java.util.HashSet)4 Iterator (java.util.Iterator)4 List (java.util.List)4 Set (java.util.Set)4 ASN1Sequence (com.github.zhenwei.core.asn1.ASN1Sequence)2 PolicyInformation (com.github.zhenwei.core.asn1.x509.PolicyInformation)2 AnnotatedException (com.github.zhenwei.provider.jce.provider.AnnotatedException)2 CertPathValidatorException (java.security.cert.CertPathValidatorException)2 Enumeration (java.util.Enumeration)2 ASN1IA5String (com.github.zhenwei.core.asn1.ASN1IA5String)1 ASN1Integer (com.github.zhenwei.core.asn1.ASN1Integer)1 ASN1ObjectIdentifier (com.github.zhenwei.core.asn1.ASN1ObjectIdentifier)1 ASN1OctetString (com.github.zhenwei.core.asn1.ASN1OctetString)1 ASN1Primitive (com.github.zhenwei.core.asn1.ASN1Primitive)1 ASN1TaggedObject (com.github.zhenwei.core.asn1.ASN1TaggedObject)1 DEROctetString (com.github.zhenwei.core.asn1.DEROctetString)1 CRLDistPoint (com.github.zhenwei.core.asn1.x509.CRLDistPoint)1