package org.bouncycastle.asn1.x509;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class Validity extends org.bouncycastle.asn1.ASN1Object {
    private final org.bouncycastle.asn1.x509.Time a;
    private final org.bouncycastle.asn1.x509.Time b;

    private Validity(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        int size = aSN1Sequence.size();
        if (size == 2) {
            this.a = org.bouncycastle.asn1.x509.Time.o(aSN1Sequence.B(0));
            this.b = org.bouncycastle.asn1.x509.Time.o(aSN1Sequence.B(1));
        } else {
            throw new java.lang.IllegalArgumentException("Bad sequence size: " + size);
        }
    }

    public static org.bouncycastle.asn1.x509.Validity n(java.lang.Object obj) {
        if (obj instanceof org.bouncycastle.asn1.x509.Validity) {
            return (org.bouncycastle.asn1.x509.Validity) obj;
        }
        if (obj != null) {
            return new org.bouncycastle.asn1.x509.Validity(org.bouncycastle.asn1.ASN1Sequence.z(obj));
        }
        return null;
    }

    @Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
    public org.bouncycastle.asn1.ASN1Primitive j() {
        return new org.bouncycastle.asn1.DERSequence(this.a, this.b);
    }

    public org.bouncycastle.asn1.x509.Time o() {
        return this.b;
    }

    public org.bouncycastle.asn1.x509.Time p() {
        return this.a;
    }
}
