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

81 lines
2.6 KiB
Java

package com.facetec.sdk;
import java.io.IOException;
import java.security.cert.Certificate;
import java.util.Collections;
import java.util.List;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
/* loaded from: classes.dex */
public final class jw {
private final List<Certificate> a;
private final kk b;
private final List<Certificate> c;
public final jn d;
private jw(kk kkVar, jn jnVar, List<Certificate> list, List<Certificate> list2) {
this.b = kkVar;
this.d = jnVar;
this.a = list;
this.c = list2;
}
public static jw d(SSLSession sSLSession) throws IOException {
Certificate[] certificateArr;
List emptyList;
List emptyList2;
String cipherSuite = sSLSession.getCipherSuite();
if (cipherSuite == null) {
throw new IllegalStateException("cipherSuite == null");
}
if ("SSL_NULL_WITH_NULL_NULL".equals(cipherSuite)) {
throw new IOException("cipherSuite == SSL_NULL_WITH_NULL_NULL");
}
jn c = jn.c(cipherSuite);
String protocol = sSLSession.getProtocol();
if (protocol == null) {
throw new IllegalStateException("tlsVersion == null");
}
if ("NONE".equals(protocol)) {
throw new IOException("tlsVersion == NONE");
}
kk d = kk.d(protocol);
try {
certificateArr = sSLSession.getPeerCertificates();
} catch (SSLPeerUnverifiedException unused) {
certificateArr = null;
}
if (certificateArr != null) {
emptyList = km.d(certificateArr);
} else {
emptyList = Collections.emptyList();
}
Certificate[] localCertificates = sSLSession.getLocalCertificates();
if (localCertificates != null) {
emptyList2 = km.d(localCertificates);
} else {
emptyList2 = Collections.emptyList();
}
return new jw(d, c, emptyList, emptyList2);
}
public final boolean equals(Object obj) {
if (!(obj instanceof jw)) {
return false;
}
jw jwVar = (jw) obj;
return this.b.equals(jwVar.b) && this.d.equals(jwVar.d) && this.a.equals(jwVar.a) && this.c.equals(jwVar.c);
}
public final int hashCode() {
int hashCode = this.b.hashCode();
int hashCode2 = this.d.hashCode();
return ((((((hashCode + 527) * 31) + hashCode2) * 31) + this.a.hashCode()) * 31) + this.c.hashCode();
}
public final List<Certificate> d() {
return this.a;
}
}