package org.bouncycastle.asn1.ocsp;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class ResponseData extends org.bouncycastle.asn1.ASN1Object {
    private static final org.bouncycastle.asn1.ASN1Integer g = new org.bouncycastle.asn1.ASN1Integer(0);
    private boolean a;
    private org.bouncycastle.asn1.ASN1Integer b;
    private org.bouncycastle.asn1.ocsp.ResponderID c;
    private org.bouncycastle.asn1.ASN1GeneralizedTime d;
    private org.bouncycastle.asn1.ASN1Sequence e;
    private org.bouncycastle.asn1.x509.Extensions f;

    private ResponseData(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        int i = 0;
        if ((aSN1Sequence.B(0) instanceof org.bouncycastle.asn1.ASN1TaggedObject) && ((org.bouncycastle.asn1.ASN1TaggedObject) aSN1Sequence.B(0)).c() == 0) {
            this.a = true;
            this.b = org.bouncycastle.asn1.ASN1Integer.z((org.bouncycastle.asn1.ASN1TaggedObject) aSN1Sequence.B(0), true);
            i = 1;
        } else {
            this.b = g;
        }
        this.c = org.bouncycastle.asn1.ocsp.ResponderID.n(aSN1Sequence.B(i));
        int i2 = i + 2;
        this.d = org.bouncycastle.asn1.ASN1GeneralizedTime.C(aSN1Sequence.B(i + 1));
        int i3 = i + 3;
        this.e = (org.bouncycastle.asn1.ASN1Sequence) aSN1Sequence.B(i2);
        if (aSN1Sequence.size() > i3) {
            this.f = org.bouncycastle.asn1.x509.Extensions.r((org.bouncycastle.asn1.ASN1TaggedObject) aSN1Sequence.B(i3), true);
        }
    }

    public static org.bouncycastle.asn1.ocsp.ResponseData n(java.lang.Object obj) {
        if (obj instanceof org.bouncycastle.asn1.ocsp.ResponseData) {
            return (org.bouncycastle.asn1.ocsp.ResponseData) obj;
        }
        if (obj != null) {
            return new org.bouncycastle.asn1.ocsp.ResponseData(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(5);
        if (this.a || !this.b.t(g)) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(true, 0, this.b));
        }
        aSN1EncodableVector.a(this.c);
        aSN1EncodableVector.a(this.d);
        aSN1EncodableVector.a(this.e);
        org.bouncycastle.asn1.x509.Extensions extensions = this.f;
        if (extensions != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(true, 1, extensions));
        }
        return new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector);
    }

    public org.bouncycastle.asn1.ocsp.ResponderID o() {
        return this.c;
    }

    public org.bouncycastle.asn1.x509.Extensions p() {
        return this.f;
    }

    public org.bouncycastle.asn1.ASN1Sequence q() {
        return this.e;
    }
}
