MD5 校验值:719081c19dfabad7b000ef11fc4f3317
TLSSocketFactory.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.samruston.flip.utils; import androidx.recyclerview.widget.LinearLayoutManager; import i0.Nu.JTAjdOWPvbsUh; import java.net.InetAddress; import java.net.Socket; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import kotlin.Metadata; import z2.KU.uMNj; import z3.k; @Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0011\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\n\u0010\u0004\u001a\u0004\u0018\u00010\u0005H\u0016J\u001a\u0010\u0004\u001a\u0004\u0018\u00010\u00052\u0006\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\tH\u0016J*\u0010\u0004\u001a\u0004\u0018\u00010\u00052\u0006\u0010\n\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u000b\u001a\u00020\u00072\u0006\u0010\f\u001a\u00020\tH\u0016J*\u0010\u0004\u001a\u0004\u0018\u00010\u00052\u0006\u0010\r\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u000e2\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u000f\u001a\u00020\u0010H\u0016J\u001a\u0010\u0004\u001a\u0004\u0018\u00010\u00052\u0006\u0010\u0006\u001a\u00020\u000e2\u0006\u0010\b\u001a\u00020\tH\u0016J*\u0010\u0004\u001a\u0004\u0018\u00010\u00052\u0006\u0010\u0006\u001a\u00020\u000e2\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u0011\u001a\u00020\u00072\u0006\u0010\f\u001a\u00020\tH\u0016J\u0014\u0010\u0012\u001a\u0004\u0018\u00010\u00052\b\u0010\u0013\u001a\u0004\u0018\u00010\u0005H\u0002J\u0013\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u000e0\u0015H\u0016¢\u0006\u0002\u0010\u0016J\u0013\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u000e0\u0015H\u0016¢\u0006\u0002\u0010\u0016R\u000e\u0010\u0003\u001a\u00020\u0001X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0018"}, d2 = {"Lcom/samruston/flip/utils/TLSSocketFactory;", "Ljavax/net/ssl/SSLSocketFactory;", "()V", "internalSSLSocketFactory", "createSocket", "Ljava/net/Socket;", "host", "Ljava/net/InetAddress;", "port", "", "address", "localAddress", "localPort", "s", "", "autoClose", "", "localHost", "enableTLSOnSocket", "socket", "getDefaultCipherSuites", "", "()[Ljava/lang/String;", "getSupportedCipherSuites", "app_release"}, k = 1, mv = {1, 8, LinearLayoutManager.HORIZONTAL}, xi = 48) public final class TLSSocketFactory extends SSLSocketFactory { private final SSLSocketFactory internalSSLSocketFactory; @Override public Socket createSocket() { return enableTLSOnSocket(this.internalSSLSocketFactory.createSocket()); } @Override public String[] getDefaultCipherSuites() { String[] defaultCipherSuites = this.internalSSLSocketFactory.getDefaultCipherSuites(); k.e(defaultCipherSuites, "internalSSLSocketFactory.defaultCipherSuites"); return defaultCipherSuites; } @Override public String[] getSupportedCipherSuites() { String[] supportedCipherSuites = this.internalSSLSocketFactory.getSupportedCipherSuites(); k.e(supportedCipherSuites, "internalSSLSocketFactory.supportedCipherSuites"); return supportedCipherSuites; } private final Socket enableTLSOnSocket(Socket socket) { if (socket != null && (socket instanceof SSLSocket)) { ((SSLSocket) socket).setEnabledProtocols(new String[]{"TLSv1.1", "TLSv1.2"}); } return socket; } @Override public Socket createSocket(Socket s7, String host, int port, boolean autoClose) { k.f(s7, "s"); k.f(host, "host"); return enableTLSOnSocket(this.internalSSLSocketFactory.createSocket(s7, host, port, autoClose)); } public TLSSocketFactory() { SSLContext sSLContext = SSLContext.getInstance("TLS"); sSLContext.init(null, null, null); SSLSocketFactory socketFactory = sSLContext.getSocketFactory(); k.e(socketFactory, uMNj.Dskzk); this.internalSSLSocketFactory = socketFactory; } @Override public Socket createSocket(String host, int port) { k.f(host, "host"); return enableTLSOnSocket(this.internalSSLSocketFactory.createSocket(host, port)); } @Override public Socket createSocket(String host, int port, InetAddress localHost, int localPort) { k.f(host, JTAjdOWPvbsUh.fmclfsBMJtAPPu); k.f(localHost, "localHost"); return enableTLSOnSocket(this.internalSSLSocketFactory.createSocket(host, port, localHost, localPort)); } @Override public Socket createSocket(InetAddress host, int port) { k.f(host, "host"); return enableTLSOnSocket(this.internalSSLSocketFactory.createSocket(host, port)); } @Override public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) { k.f(address, "address"); k.f(localAddress, "localAddress"); return enableTLSOnSocket(this.internalSSLSocketFactory.createSocket(address, port, localAddress, localPort)); } }