package o;

import java.net.ProxySelector;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.util.Iterator;
import java.util.List;
import javax.net.SocketFactory;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.X509TrustManager;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.sT, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2429sT implements Cloneable, InterfaceC0602Xf {
    public static final List K = AbstractC2264qi0.k(EnumC2910xZ.p, EnumC2910xZ.n);
    public static final List L = AbstractC2264qi0.k(C1889ml.e, C1889ml.f);
    public final X509TrustManager A;
    public final List B;
    public final List C;
    public final C2240qT D;
    public final C0395Pg E;
    public final AbstractC1155f00 F;
    public final int G;
    public final int H;
    public final int I;
    public final WT J;
    public final C1713ks l;
    public final OD m;
    public final List n;

    /* renamed from: o, reason: collision with root package name */
    public final List f715o;
    public final C0387Oy p;
    public final boolean q;
    public final ME r;
    public final boolean s;
    public final boolean t;
    public final ME u;
    public final ME v;
    public final ProxySelector w;
    public final ME x;
    public final SocketFactory y;
    public final SSLSocketFactory z;

    public C2429sT(C2334rT c2334rT) throws NoSuchAlgorithmException, KeyStoreException {
        this.l = c2334rT.a;
        this.m = c2334rT.b;
        this.n = AbstractC2264qi0.w(c2334rT.c);
        this.f715o = AbstractC2264qi0.w(c2334rT.d);
        this.p = c2334rT.e;
        this.q = c2334rT.f;
        this.r = c2334rT.g;
        this.s = c2334rT.h;
        this.t = c2334rT.i;
        this.u = c2334rT.j;
        this.v = c2334rT.k;
        ProxySelector proxySelector = ProxySelector.getDefault();
        this.w = proxySelector == null ? US.a : proxySelector;
        this.x = c2334rT.l;
        this.y = c2334rT.m;
        List list = c2334rT.n;
        this.B = list;
        this.C = c2334rT.f700o;
        this.D = c2334rT.p;
        this.G = c2334rT.r;
        this.H = c2334rT.s;
        this.I = c2334rT.t;
        this.J = new WT(9);
        if (list == null || !list.isEmpty()) {
            Iterator it = list.iterator();
            while (it.hasNext()) {
                if (((C1889ml) it.next()).a) {
                    ZW zw = ZW.a;
                    X509TrustManager x509TrustManagerM = ZW.a.m();
                    this.A = x509TrustManagerM;
                    this.z = ZW.a.l(x509TrustManagerM);
                    AbstractC1155f00 abstractC1155f00B = ZW.a.b(x509TrustManagerM);
                    this.F = abstractC1155f00B;
                    C0395Pg c0395Pg = c2334rT.q;
                    this.E = F3.c(c0395Pg.b, abstractC1155f00B) ? c0395Pg : new C0395Pg(c0395Pg.a, abstractC1155f00B);
                }
            }
            this.z = null;
            this.F = null;
            this.A = null;
            this.E = C0395Pg.c;
        } else {
            this.z = null;
            this.F = null;
            this.A = null;
            this.E = C0395Pg.c;
        }
        X509TrustManager x509TrustManager = this.A;
        AbstractC1155f00 abstractC1155f00 = this.F;
        SSLSocketFactory sSLSocketFactory = this.z;
        List list2 = this.f715o;
        List list3 = this.n;
        if (list3.contains(null)) {
            throw new IllegalStateException(("Null interceptor: " + list3).toString());
        }
        if (list2.contains(null)) {
            throw new IllegalStateException(("Null network interceptor: " + list2).toString());
        }
        List list4 = this.B;
        if (list4 == null || !list4.isEmpty()) {
            Iterator it2 = list4.iterator();
            while (it2.hasNext()) {
                if (((C1889ml) it2.next()).a) {
                    if (sSLSocketFactory == null) {
                        throw new IllegalStateException("sslSocketFactory == null");
                    }
                    if (abstractC1155f00 == null) {
                        throw new IllegalStateException("certificateChainCleaner == null");
                    }
                    if (x509TrustManager == null) {
                        throw new IllegalStateException("x509TrustManager == null");
                    }
                    return;
                }
            }
        }
        if (sSLSocketFactory != null) {
            throw new IllegalStateException("Check failed.");
        }
        if (abstractC1155f00 != null) {
            throw new IllegalStateException("Check failed.");
        }
        if (x509TrustManager != null) {
            throw new IllegalStateException("Check failed.");
        }
        if (!F3.c(this.E, C0395Pg.c)) {
            throw new IllegalStateException("Check failed.");
        }
    }

    public final Object clone() {
        return super.clone();
    }
}
