package org.bouncycastle.asn1.x509;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class AttributeCertificateInfo extends org.bouncycastle.asn1.ASN1Object {
    private org.bouncycastle.asn1.ASN1Integer a;
    private org.bouncycastle.asn1.x509.Holder b;
    private org.bouncycastle.asn1.x509.AttCertIssuer c;
    private org.bouncycastle.asn1.x509.AlgorithmIdentifier d;
    private org.bouncycastle.asn1.ASN1Integer e;
    private org.bouncycastle.asn1.x509.AttCertValidityPeriod f;
    private org.bouncycastle.asn1.ASN1Sequence g;
    private org.bouncycastle.asn1.ASN1BitString h;
    private org.bouncycastle.asn1.x509.Extensions i;

    private AttributeCertificateInfo(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        if (aSN1Sequence.size() < 6 || aSN1Sequence.size() > 9) {
            throw new java.lang.IllegalArgumentException("Bad sequence size: " + aSN1Sequence.size());
        }
        int i = 0;
        if (aSN1Sequence.B(0) instanceof org.bouncycastle.asn1.ASN1Integer) {
            this.a = org.bouncycastle.asn1.ASN1Integer.y(aSN1Sequence.B(0));
            i = 1;
        } else {
            this.a = new org.bouncycastle.asn1.ASN1Integer(0L);
        }
        this.b = org.bouncycastle.asn1.x509.Holder.p(aSN1Sequence.B(i));
        this.c = org.bouncycastle.asn1.x509.AttCertIssuer.n(aSN1Sequence.B(i + 1));
        this.d = org.bouncycastle.asn1.x509.AlgorithmIdentifier.o(aSN1Sequence.B(i + 2));
        this.e = org.bouncycastle.asn1.ASN1Integer.y(aSN1Sequence.B(i + 3));
        this.f = org.bouncycastle.asn1.x509.AttCertValidityPeriod.n(aSN1Sequence.B(i + 4));
        this.g = org.bouncycastle.asn1.ASN1Sequence.z(aSN1Sequence.B(i + 5));
        for (int i2 = i + 6; i2 < aSN1Sequence.size(); i2++) {
            org.bouncycastle.asn1.ASN1Encodable aSN1EncodableB = aSN1Sequence.B(i2);
            if (aSN1EncodableB instanceof org.bouncycastle.asn1.ASN1BitString) {
                this.h = org.bouncycastle.asn1.ASN1BitString.A(aSN1Sequence.B(i2));
            } else if ((aSN1EncodableB instanceof org.bouncycastle.asn1.ASN1Sequence) || (aSN1EncodableB instanceof org.bouncycastle.asn1.x509.Extensions)) {
                this.i = org.bouncycastle.asn1.x509.Extensions.q(aSN1Sequence.B(i2));
            }
        }
    }

    public static org.bouncycastle.asn1.x509.AttributeCertificateInfo r(java.lang.Object obj) {
        if (obj instanceof org.bouncycastle.asn1.x509.AttributeCertificateInfo) {
            return (org.bouncycastle.asn1.x509.AttributeCertificateInfo) obj;
        }
        if (obj != null) {
            return new org.bouncycastle.asn1.x509.AttributeCertificateInfo(org.bouncycastle.asn1.ASN1Sequence.z(obj));
        }
        return null;
    }

    @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(9);
        if (!this.a.C(0)) {
            aSN1EncodableVector.a(this.a);
        }
        aSN1EncodableVector.a(this.b);
        aSN1EncodableVector.a(this.c);
        aSN1EncodableVector.a(this.d);
        aSN1EncodableVector.a(this.e);
        aSN1EncodableVector.a(this.f);
        aSN1EncodableVector.a(this.g);
        org.bouncycastle.asn1.ASN1BitString aSN1BitString = this.h;
        if (aSN1BitString != null) {
            aSN1EncodableVector.a(aSN1BitString);
        }
        org.bouncycastle.asn1.x509.Extensions extensions = this.i;
        if (extensions != null) {
            aSN1EncodableVector.a(extensions);
        }
        return new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector);
    }

    public org.bouncycastle.asn1.x509.AttCertValidityPeriod n() {
        return this.f;
    }

    public org.bouncycastle.asn1.ASN1Sequence o() {
        return this.g;
    }

    public org.bouncycastle.asn1.x509.Extensions p() {
        return this.i;
    }

    public org.bouncycastle.asn1.x509.Holder q() {
        return this.b;
    }

    public org.bouncycastle.asn1.x509.AttCertIssuer s() {
        return this.c;
    }

    public org.bouncycastle.asn1.ASN1Integer t() {
        return this.e;
    }
}
