package o; import java.util.Arrays; import java.util.List; /* renamed from: o.fNc, reason: case insensitive filesystem */ /* loaded from: classes5.dex */ public final class C12990fNc { private final String[] a; public final boolean b; private final String[] c; public final boolean d; private /* synthetic */ C12990fNc(HBt hBt, byte b) { this(hBt); } static { EnumC12989fNb[] enumC12989fNbArr = {EnumC12989fNb.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, EnumC12989fNb.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, EnumC12989fNb.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, EnumC12989fNb.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, EnumC12989fNb.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, EnumC12989fNb.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, EnumC12989fNb.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, EnumC12989fNb.TLS_DHE_RSA_WITH_AES_128_CBC_SHA, EnumC12989fNb.TLS_DHE_RSA_WITH_AES_256_CBC_SHA, EnumC12989fNb.TLS_RSA_WITH_AES_128_GCM_SHA256, EnumC12989fNb.TLS_RSA_WITH_AES_128_CBC_SHA, EnumC12989fNb.TLS_RSA_WITH_AES_256_CBC_SHA, EnumC12989fNb.TLS_RSA_WITH_3DES_EDE_CBC_SHA}; HBt hBt = new HBt(true); if (!hBt.b) { throw new IllegalStateException("no cipher suites for cleartext connections"); } String[] strArr = new String[13]; byte b = 0; for (int i = 0; i < 13; i++) { strArr[i] = enumC12989fNbArr[i].javaName; } HBt c = hBt.d(strArr).c(EnumC12998fNk.TLS_1_2, EnumC12998fNk.TLS_1_1, EnumC12998fNk.TLS_1_0); if (c.b) { c.e = true; HBt c2 = new HBt(new C12990fNc(c, b)).c(EnumC12998fNk.TLS_1_0); if (!c2.b) { throw new IllegalStateException("no TLS extensions for cleartext connections"); } c2.e = true; new C12990fNc(c2, b); new C12990fNc(new HBt(false), b); return; } throw new IllegalStateException("no TLS extensions for cleartext connections"); } private C12990fNc(HBt hBt) { this.b = hBt.b; this.c = hBt.a; this.a = hBt.d; this.d = hBt.e; } public final List e() { String[] strArr = this.c; if (strArr == null) { return null; } EnumC12989fNb[] enumC12989fNbArr = new EnumC12989fNb[strArr.length]; int i = 0; while (true) { String[] strArr2 = this.c; if (i < strArr2.length) { enumC12989fNbArr[i] = EnumC12989fNb.e(strArr2[i]); i++; } else { return C13000fNm.e(enumC12989fNbArr); } } } public final List b() { String[] strArr = this.a; if (strArr == null) { return null; } EnumC12998fNk[] enumC12998fNkArr = new EnumC12998fNk[strArr.length]; int i = 0; while (true) { String[] strArr2 = this.a; if (i < strArr2.length) { enumC12998fNkArr[i] = EnumC12998fNk.d(strArr2[i]); i++; } else { return C13000fNm.e(enumC12998fNkArr); } } } public final boolean equals(Object obj) { if (!(obj instanceof C12990fNc)) { return false; } if (obj == this) { return true; } C12990fNc c12990fNc = (C12990fNc) obj; boolean z = this.b; if (z != c12990fNc.b) { return false; } return !z || (Arrays.equals(this.c, c12990fNc.c) && Arrays.equals(this.a, c12990fNc.a) && this.d == c12990fNc.d); } public final int hashCode() { if (!this.b) { return 17; } return ((((Arrays.hashCode(this.c) + 527) * 31) + Arrays.hashCode(this.a)) * 31) + (!this.d ? 1 : 0); } public final String toString() { if (!this.b) { return "ConnectionSpec()"; } String obj = this.c != null ? e().toString() : "[all enabled]"; String obj2 = this.a != null ? b().toString() : "[all enabled]"; StringBuilder sb = new StringBuilder("ConnectionSpec(cipherSuites="); sb.append(obj); sb.append(", tlsVersions="); sb.append(obj2); sb.append(", supportsTlsExtensions="); sb.append(this.d); sb.append(")"); return sb.toString(); } /* renamed from: o.fNc$HBt */ /* loaded from: classes5.dex */ public static final class HBt { String[] a; boolean b; String[] d; boolean e; HBt(boolean z) { this.b = z; } public HBt(C12990fNc c12990fNc) { this.b = c12990fNc.b; this.a = c12990fNc.c; this.d = c12990fNc.a; this.e = c12990fNc.d; } public final HBt d(String... strArr) { if (!this.b) { throw new IllegalStateException("no cipher suites for cleartext connections"); } int length = strArr.length; this.a = (String[]) strArr.clone(); return this; } public final HBt c(EnumC12998fNk... enumC12998fNkArr) { if (!this.b) { throw new IllegalStateException("no TLS versions for cleartext connections"); } String[] strArr = new String[enumC12998fNkArr.length]; for (int i = 0; i < enumC12998fNkArr.length; i++) { strArr[i] = enumC12998fNkArr[i].javaName; } return c(strArr); } private HBt c(String... strArr) { if (!this.b) { throw new IllegalStateException("no TLS versions for cleartext connections"); } if (strArr.length == 0) { throw new IllegalArgumentException("At least one TLS version is required"); } this.d = (String[]) strArr.clone(); return this; } } }