Example usage for org.bouncycastle.asn1.x509 GeneralSubtree getInstance

List of usage examples for org.bouncycastle.asn1.x509 GeneralSubtree getInstance

Introduction

In this page you can find the example usage for org.bouncycastle.asn1.x509 GeneralSubtree getInstance.

Prototype

public static GeneralSubtree getInstance(Object obj) 

Source Link

Usage

From source file:eu.emi.security.authn.x509.helpers.proxy.ProxyAddressRestrictionData.java

License:Open Source License

/**
 * This method copies the contents of a generalSubtrees sequence into
 * the given vector. Static to protect the internal data structures from
 * access.//  w ww.  j ava2  s  .  co m
 * 
 * @param subSeq
 *                the subsequence to copy.
 * @param vector
 *                The target to copy the parsed GeneralSubtree objects.
 */
private static void copyCondSequenceToVector(DERSequence subSeq, List<GeneralSubtree> vector) {
    Enumeration<?> subTreeEnum = subSeq.getObjects();
    while (subTreeEnum.hasMoreElements()) {
        ASN1Primitive object = (ASN1Primitive) subTreeEnum.nextElement();
        vector.add(GeneralSubtree.getInstance(object));
    }
}

From source file:net.sf.keystore_explorer.crypto.x509.GeneralSubtrees.java

License:Open Source License

private GeneralSubtrees(ASN1Sequence seq) {
    subtrees = new ArrayList<GeneralSubtree>();
    for (int i = 0; i < seq.size(); i++) {
        subtrees.add(GeneralSubtree.getInstance(seq.getObjectAt(i)));
    }/*from   w w  w .  j a  va  2s . co m*/
}