what-the-bank/sources/com/facetec/sdk/jt.java

176 lines
5.1 KiB
Java

package com.facetec.sdk;
import java.util.Arrays;
import javax.net.ssl.SSLSocket;
/* loaded from: classes.dex */
public final class jt {
public static final jt b;
public static final jt d;
private static final jn[] g;
private static final jn[] h;
final boolean a;
final boolean c;
final String[] e;
final String[] i;
static {
jn[] jnVarArr = {jn.n, jn.q, jn.s, jn.r, jn.p, jn.h, jn.l, jn.j, jn.m, jn.k, jn.f6445o};
g = jnVarArr;
jn[] jnVarArr2 = {jn.n, jn.q, jn.s, jn.r, jn.p, jn.h, jn.l, jn.j, jn.m, jn.k, jn.f6445o, jn.i, jn.g, jn.e, jn.f, jn.d, jn.b, jn.a};
h = jnVarArr2;
new a(true).e(jnVarArr).b(kk.TLS_1_3, kk.TLS_1_2).d().a();
d = new a(true).e(jnVarArr2).b(kk.TLS_1_3, kk.TLS_1_2, kk.TLS_1_1, kk.TLS_1_0).d().a();
new a(true).e(jnVarArr2).b(kk.TLS_1_0).d().a();
b = new a(false).a();
}
jt(a aVar) {
this.c = aVar.a;
this.e = aVar.b;
this.i = aVar.c;
this.a = aVar.e;
}
public final boolean b(SSLSocket sSLSocket) {
if (!this.c) {
return false;
}
if (this.i == null || km.d(km.g, this.i, sSLSocket.getEnabledProtocols())) {
return this.e == null || km.d(jn.c, this.e, sSLSocket.getEnabledCipherSuites());
}
return false;
}
public final boolean equals(Object obj) {
if (!(obj instanceof jt)) {
return false;
}
if (obj == this) {
return true;
}
jt jtVar = (jt) obj;
boolean z = this.c;
if (z != jtVar.c) {
return false;
}
return !z || (Arrays.equals(this.e, jtVar.e) && Arrays.equals(this.i, jtVar.i) && this.a == jtVar.a);
}
public final int hashCode() {
if (!this.c) {
return 17;
}
return ((((Arrays.hashCode(this.e) + 527) * 31) + Arrays.hashCode(this.i)) * 31) + (!this.a ? 1 : 0);
}
/* loaded from: classes.dex */
public static final class a {
boolean a;
String[] b;
String[] c;
boolean e;
a(boolean z) {
this.a = z;
}
public a(jt jtVar) {
this.a = jtVar.c;
this.b = jtVar.e;
this.c = jtVar.i;
this.e = jtVar.a;
}
public final a e(jn... jnVarArr) {
if (!this.a) {
throw new IllegalStateException("no cipher suites for cleartext connections");
}
String[] strArr = new String[jnVarArr.length];
for (int i = 0; i < jnVarArr.length; i++) {
strArr[i] = jnVarArr[i].t;
}
return a(strArr);
}
public final a a(String... strArr) {
if (!this.a) {
throw new IllegalStateException("no cipher suites for cleartext connections");
}
if (strArr.length == 0) {
throw new IllegalArgumentException("At least one cipher suite is required");
}
this.b = (String[]) strArr.clone();
return this;
}
public final a b(kk... kkVarArr) {
if (!this.a) {
throw new IllegalStateException("no TLS versions for cleartext connections");
}
String[] strArr = new String[kkVarArr.length];
for (int i = 0; i < kkVarArr.length; i++) {
strArr[i] = kkVarArr[i].a;
}
return e(strArr);
}
public final a e(String... strArr) {
if (!this.a) {
throw new IllegalStateException("no TLS versions for cleartext connections");
}
if (strArr.length == 0) {
throw new IllegalArgumentException("At least one TLS version is required");
}
this.c = (String[]) strArr.clone();
return this;
}
public final a d() {
if (!this.a) {
throw new IllegalStateException("no TLS extensions for cleartext connections");
}
this.e = true;
return this;
}
public final jt a() {
return new jt(this);
}
}
public final String toString() {
String str;
if (!this.c) {
return "ConnectionSpec()";
}
String[] strArr = this.e;
String str2 = "[all enabled]";
if (strArr != null) {
str = (strArr != null ? jn.e(strArr) : null).toString();
} else {
str = "[all enabled]";
}
String[] strArr2 = this.i;
if (strArr2 != null) {
str2 = (strArr2 != null ? kk.c(strArr2) : null).toString();
}
StringBuilder sb = new StringBuilder("ConnectionSpec(cipherSuites=");
sb.append(str);
sb.append(", tlsVersions=");
sb.append(str2);
sb.append(", supportsTlsExtensions=");
sb.append(this.a);
sb.append(")");
return sb.toString();
}
public final boolean c() {
return this.a;
}
public final boolean b() {
return this.c;
}
}