package org.bouncycastle.asn1.x509;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class DistributionPoint extends org.bouncycastle.asn1.ASN1Object {
    org.bouncycastle.asn1.x509.DistributionPointName a;
    org.bouncycastle.asn1.x509.ReasonFlags b;
    org.bouncycastle.asn1.x509.GeneralNames c;

    public DistributionPoint(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        for (int i = 0; i != aSN1Sequence.size(); i++) {
            org.bouncycastle.asn1.ASN1TaggedObject aSN1TaggedObjectI = org.bouncycastle.asn1.ASN1TaggedObject.I(aSN1Sequence.B(i));
            int iC = aSN1TaggedObjectI.c();
            if (iC == 0) {
                this.a = org.bouncycastle.asn1.x509.DistributionPointName.p(aSN1TaggedObjectI, true);
            } else if (iC == 1) {
                this.b = new org.bouncycastle.asn1.x509.ReasonFlags(org.bouncycastle.asn1.ASN1BitString.B(aSN1TaggedObjectI, false));
            } else {
                if (iC != 2) {
                    throw new java.lang.IllegalArgumentException("Unknown tag encountered in structure: " + aSN1TaggedObjectI.c());
                }
                this.c = org.bouncycastle.asn1.x509.GeneralNames.p(aSN1TaggedObjectI, false);
            }
        }
    }

    private void n(java.lang.StringBuffer stringBuffer, java.lang.String str, java.lang.String str2, java.lang.String str3) {
        stringBuffer.append("    ");
        stringBuffer.append(str2);
        stringBuffer.append(":");
        stringBuffer.append(str);
        stringBuffer.append("    ");
        stringBuffer.append("    ");
        stringBuffer.append(str3);
        stringBuffer.append(str);
    }

    public static org.bouncycastle.asn1.x509.DistributionPoint q(java.lang.Object obj) {
        if (obj == null || (obj instanceof org.bouncycastle.asn1.x509.DistributionPoint)) {
            return (org.bouncycastle.asn1.x509.DistributionPoint) obj;
        }
        if (obj instanceof org.bouncycastle.asn1.ASN1Sequence) {
            return new org.bouncycastle.asn1.x509.DistributionPoint((org.bouncycastle.asn1.ASN1Sequence) obj);
        }
        throw new java.lang.IllegalArgumentException("Invalid DistributionPoint: " + obj.getClass().getName());
    }

    @Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
    public org.bouncycastle.asn1.ASN1Primitive j() {
        org.bouncycastle.asn1.ASN1EncodableVector aSN1EncodableVector = new org.bouncycastle.asn1.ASN1EncodableVector(3);
        org.bouncycastle.asn1.x509.DistributionPointName distributionPointName = this.a;
        if (distributionPointName != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(0, distributionPointName));
        }
        org.bouncycastle.asn1.x509.ReasonFlags reasonFlags = this.b;
        if (reasonFlags != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(false, 1, reasonFlags));
        }
        org.bouncycastle.asn1.x509.GeneralNames generalNames = this.c;
        if (generalNames != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(false, 2, generalNames));
        }
        return new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector);
    }

    public org.bouncycastle.asn1.x509.GeneralNames o() {
        return this.c;
    }

    public org.bouncycastle.asn1.x509.DistributionPointName p() {
        return this.a;
    }

    public org.bouncycastle.asn1.x509.ReasonFlags r() {
        return this.b;
    }

    public java.lang.String toString() {
        java.lang.String strD = org.bouncycastle.util.Strings.d();
        java.lang.StringBuffer stringBuffer = new java.lang.StringBuffer();
        stringBuffer.append("DistributionPoint: [");
        stringBuffer.append(strD);
        org.bouncycastle.asn1.x509.DistributionPointName distributionPointName = this.a;
        if (distributionPointName != null) {
            n(stringBuffer, strD, "distributionPoint", distributionPointName.toString());
        }
        org.bouncycastle.asn1.x509.ReasonFlags reasonFlags = this.b;
        if (reasonFlags != null) {
            n(stringBuffer, strD, "reasons", reasonFlags.toString());
        }
        org.bouncycastle.asn1.x509.GeneralNames generalNames = this.c;
        if (generalNames != null) {
            n(stringBuffer, strD, "cRLIssuer", generalNames.toString());
        }
        stringBuffer.append("]");
        stringBuffer.append(strD);
        return stringBuffer.toString();
    }

    public DistributionPoint(org.bouncycastle.asn1.x509.DistributionPointName distributionPointName, org.bouncycastle.asn1.x509.ReasonFlags reasonFlags, org.bouncycastle.asn1.x509.GeneralNames generalNames) {
        this.a = distributionPointName;
        this.b = reasonFlags;
        this.c = generalNames;
    }
}
