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

62 lines
2.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.facetec.sdk;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.X509TrustManager;
/* loaded from: classes.dex */
final class mc extends mi {
private Method c;
private Method e;
private mc(Method method, Method method2) {
this.e = method;
this.c = method2;
}
@Override // com.facetec.sdk.mi
public final void e(SSLSocket sSLSocket, String str, List<kd> list) {
try {
SSLParameters sSLParameters = sSLSocket.getSSLParameters();
List<String> b = b(list);
this.e.invoke(sSLParameters, b.toArray(new String[b.size()]));
sSLSocket.setSSLParameters(sSLParameters);
} catch (IllegalAccessException | InvocationTargetException e) {
throw km.e("unable to set ssl parameters", e);
}
}
@Override // com.facetec.sdk.mi
public final String c(SSLSocket sSLSocket) {
try {
String str = (String) this.c.invoke(sSLSocket, new Object[0]);
if (str == null) {
return null;
}
if (str.equals("")) {
return null;
}
return str;
} catch (IllegalAccessException | InvocationTargetException e) {
throw km.e("unable to get selected protocols", e);
}
}
@Override // com.facetec.sdk.mi
public final X509TrustManager c(SSLSocketFactory sSLSocketFactory) {
throw new UnsupportedOperationException("clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on JDK 9+");
}
public static mc a() {
try {
return new mc(SSLParameters.class.getMethod("setApplicationProtocols", String[].class), SSLSocket.class.getMethod("getApplicationProtocol", new Class[0]));
} catch (NoSuchMethodException unused) {
return null;
}
}
}