public static DirectoryString getInstance(ASN1TaggedObject o, boolean explicit) { if (!explicit) { throw new IllegalArgumentException("choice item must be explicitly tagged"); } return getInstance(o.getObject()); }
private PolicyConstraints(ASN1Sequence seq) { if (seq.size() > 2) { throw new IllegalArgumentException("sequence length > 2"); } for (int i = 0; i < seq.size(); i++) { ASN1TaggedObject taggedObj = ASN1TaggedObject.getInstance(seq.getObjectAt(i)); switch (taggedObj.getTagNo()) { case 0: requireExplicitPolicy = ASN1Integer.getInstance(taggedObj.getObject()).getValue().intValue(); break; case 1: inhibitPolicyMapping = ASN1Integer.getInstance(taggedObj.getObject()).getValue().intValue(); break; default: throw new IllegalArgumentException("wrong tag number"); } } }
public OOBCertHash(ASN1Sequence seq) { Enumeration e = seq.getObjects(); while (e.hasMoreElements()) { Object obj = e.nextElement(); if (obj instanceof ASN1TaggedObject) { ASN1TaggedObject tagObj = (ASN1TaggedObject) obj; switch (tagObj.getTagNo()) { case 0: hashAlg = AlgorithmIdentifier.getInstance(tagObj.getObject()); break; case 1: certId = CertId.getInstance(tagObj.getObject()); break; } } else { hashVal = DERBitString.getInstance(obj); break; } } }
public static CertStatus getInstance(ASN1TaggedObject obj, boolean explicit) { return getInstance(obj.getObject()); // must be explicitly tagged }
public static AttCertIssuer getInstance(ASN1TaggedObject obj, boolean explicit) { return getInstance(obj.getObject()); // must be explictly tagged }