package 㿎.ሽ.ᨨ;

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;
import okhttp3.Protocol;
import 㿎.ሽ.C2540;

/* renamed from: 㿎.ሽ.ᨨ.ʬ  reason: contains not printable characters */
/* compiled from: Jdk9Platform */
public final class C2551 extends C2558 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public final Method f8624;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final Method f8625;

    public C2551(Method method, Method method2) {
        this.f8624 = method;
        this.f8625 = method2;
    }

    @Override // 㿎.ሽ.ᨨ.C2558
    /* renamed from: ῲ  reason: contains not printable characters */
    public String m6692(SSLSocket sSLSocket) {
        try {
            String str = (String) this.f8625.invoke(sSLSocket, new Object[0]);
            if (str == null || str.equals("")) {
                return null;
            }
            return str;
        } catch (IllegalAccessException | InvocationTargetException e) {
            throw C2540.m6640("unable to get selected protocols", (Exception) e);
        }
    }

    @Override // 㿎.ሽ.ᨨ.C2558
    /* renamed from: K  reason: contains not printable characters */
    public void m6694(SSLSocket sSLSocket, String str, List<Protocol> list) {
        try {
            SSLParameters sSLParameters = sSLSocket.getSSLParameters();
            List<String> r7 = C2558.m6723(list);
            this.f8624.invoke(sSLParameters, r7.toArray(new String[r7.size()]));
            sSLSocket.setSSLParameters(sSLParameters);
        } catch (IllegalAccessException | InvocationTargetException e) {
            throw C2540.m6640("unable to set ssl parameters", (Exception) e);
        }
    }

    @Override // 㿎.ሽ.ᨨ.C2558
    /* renamed from: ῲ  reason: contains not printable characters */
    public X509TrustManager m6693(SSLSocketFactory sSLSocketFactory) {
        throw new UnsupportedOperationException("clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on JDK 9+");
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static C2551 m6691() {
        try {
            return new C2551(SSLParameters.class.getMethod("setApplicationProtocols", String[].class), SSLSocket.class.getMethod("getApplicationProtocol", new Class[0]));
        } catch (NoSuchMethodException unused) {
            return null;
        }
    }
}
