package org.bouncycastle.asn1.ocsp;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class BasicOCSPResponse extends org.bouncycastle.asn1.ASN1Object {
    private org.bouncycastle.asn1.ocsp.ResponseData a;
    private org.bouncycastle.asn1.x509.AlgorithmIdentifier b;
    private org.bouncycastle.asn1.DERBitString c;
    private org.bouncycastle.asn1.ASN1Sequence d;

    private BasicOCSPResponse(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        this.a = org.bouncycastle.asn1.ocsp.ResponseData.n(aSN1Sequence.B(0));
        this.b = org.bouncycastle.asn1.x509.AlgorithmIdentifier.o(aSN1Sequence.B(1));
        this.c = (org.bouncycastle.asn1.DERBitString) aSN1Sequence.B(2);
        if (aSN1Sequence.size() > 3) {
            this.d = org.bouncycastle.asn1.ASN1Sequence.A((org.bouncycastle.asn1.ASN1TaggedObject) aSN1Sequence.B(3), true);
        }
    }

    public static org.bouncycastle.asn1.ocsp.BasicOCSPResponse o(java.lang.Object obj) {
        if (obj instanceof org.bouncycastle.asn1.ocsp.BasicOCSPResponse) {
            return (org.bouncycastle.asn1.ocsp.BasicOCSPResponse) obj;
        }
        if (obj != null) {
            return new org.bouncycastle.asn1.ocsp.BasicOCSPResponse(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(4);
        aSN1EncodableVector.a(this.a);
        aSN1EncodableVector.a(this.b);
        aSN1EncodableVector.a(this.c);
        org.bouncycastle.asn1.ASN1Sequence aSN1Sequence = this.d;
        if (aSN1Sequence != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(true, 0, aSN1Sequence));
        }
        return new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector);
    }

    public org.bouncycastle.asn1.ASN1Sequence n() {
        return this.d;
    }

    public org.bouncycastle.asn1.DERBitString p() {
        return this.c;
    }

    public org.bouncycastle.asn1.x509.AlgorithmIdentifier q() {
        return this.b;
    }

    public org.bouncycastle.asn1.ocsp.ResponseData r() {
        return this.a;
    }
}
