what-the-bank/sources/org/bouncycastle/asn1/x509/AttCertIssuer.java

60 lines
2.0 KiB
Java

package org.bouncycastle.asn1.x509;
import org.bouncycastle.asn1.ASN1Choice;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DERTaggedObject;
/* loaded from: classes6.dex */
public class AttCertIssuer extends ASN1Object implements ASN1Choice {
ASN1Primitive choiceObj;
ASN1Encodable obj;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
return this.choiceObj;
}
public ASN1Encodable getIssuer() {
return this.obj;
}
public static AttCertIssuer getInstance(ASN1TaggedObject aSN1TaggedObject, boolean z) {
return getInstance(aSN1TaggedObject.getObject());
}
public static AttCertIssuer getInstance(Object obj) {
if (obj == null || (obj instanceof AttCertIssuer)) {
return (AttCertIssuer) obj;
}
if (obj instanceof V2Form) {
return new AttCertIssuer(V2Form.getInstance(obj));
}
if (obj instanceof GeneralNames) {
return new AttCertIssuer((GeneralNames) obj);
}
if (obj instanceof ASN1TaggedObject) {
return new AttCertIssuer(V2Form.getInstance((ASN1TaggedObject) obj, false));
}
if (obj instanceof ASN1Sequence) {
return new AttCertIssuer(GeneralNames.getInstance(obj));
}
StringBuilder sb = new StringBuilder("unknown object in factory: ");
sb.append(obj.getClass().getName());
throw new IllegalArgumentException(sb.toString());
}
public AttCertIssuer(V2Form v2Form) {
this.obj = v2Form;
this.choiceObj = new DERTaggedObject(false, 0, this.obj);
}
public AttCertIssuer(GeneralNames generalNames) {
this.obj = generalNames;
this.choiceObj = generalNames.toASN1Primitive();
}
}