MD5 校验值:d7f913ab91d7343430e85d5ce2e5aff0
b.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package od; import android.content.Context; import android.os.AsyncTask; import java.io.InputStream; import java.net.InetAddress; import java.net.Socket; import java.util.Objects; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.X509TrustManager; import org.apache.http.conn.ssl.BrowserCompatHostnameVerifier; import org.apache.http.conn.ssl.StrictHostnameVerifier; @Deprecated public class b extends SSLSocketFactory { public static final String f37422d; public static volatile b f37423e; public SSLContext f37424a; public Context f37425b; public String[] f37426c; static { new BrowserCompatHostnameVerifier(); new StrictHostnameVerifier(); f37422d = b.class.getSimpleName(); f37423e = null; } public b(Context context) { this.f37424a = null; if (context == null) { v.a.c(f37422d, "SecureSSLSocketFactory: context is null"); return; } this.f37425b = context.getApplicationContext(); this.f37424a = a.c(); System.currentTimeMillis(); p.b.a(context); if (c.f37427a == null) { synchronized (c.class) { if (c.f37427a == null) { InputStream j10 = qd.a.j(context); if (j10 == null) { v.a.d("SecureX509SingleInstance", "get assets bks"); j10 = context.getAssets().open("hmsrootcas.bks"); } else { v.a.d("SecureX509SingleInstance", "get files bks"); } c.f37427a = new d(j10, ""); new qd.b().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, context); } } } System.currentTimeMillis(); this.f37424a.init(null, new X509TrustManager[]{c.f37427a}, null); } public b(X509TrustManager x509TrustManager) { this.f37424a = null; SSLContext c10 = a.c(); this.f37424a = c10; c10.init(null, new X509TrustManager[]{x509TrustManager}, null); } public static b b(Context context) { System.currentTimeMillis(); p.b.a(context); if (f37423e == null) { synchronized (b.class) { if (f37423e == null) { f37423e = new b(context); } } } if (f37423e.f37425b == null && context != null) { b bVar = f37423e; Objects.requireNonNull(bVar); bVar.f37425b = context.getApplicationContext(); } System.currentTimeMillis(); return f37423e; } public final void a(Socket socket) { boolean z10; boolean z11 = true; if (n0.b.a(null)) { z10 = false; } else { v.a.d(f37422d, "set protocols"); z10 = true; } if (n0.b.a(null) && n0.b.a(null)) { z11 = false; } else { v.a.d(f37422d, "set white cipher or black cipher"); SSLSocket sSLSocket = (SSLSocket) socket; a.b(sSLSocket); if (n0.b.a(null)) { a.a(sSLSocket, null); } else { a.d(sSLSocket, null); } } if (!z10) { v.a.d(f37422d, "set default protocols"); a.b((SSLSocket) socket); } if (z11) { return; } v.a.d(f37422d, "set default cipher suites"); SSLSocket sSLSocket2 = (SSLSocket) socket; if (sSLSocket2 == null || a.d(sSLSocket2, a.f37420a)) { return; } a.a(sSLSocket2, a.f37421b); } @Override public Socket createSocket(String str, int i10) { v.a.d(f37422d, "createSocket: host , port"); Socket createSocket = this.f37424a.getSocketFactory().createSocket(str, i10); if (createSocket instanceof SSLSocket) { a(createSocket); this.f37426c = (String[]) ((SSLSocket) createSocket).getEnabledCipherSuites().clone(); } return createSocket; } @Override public Socket createSocket(String str, int i10, InetAddress inetAddress, int i11) { return createSocket(str, i10); } @Override public Socket createSocket(InetAddress inetAddress, int i10) { return createSocket(inetAddress.getHostAddress(), i10); } @Override public Socket createSocket(InetAddress inetAddress, int i10, InetAddress inetAddress2, int i11) { return createSocket(inetAddress.getHostAddress(), i10); } @Override public Socket createSocket(Socket socket, String str, int i10, boolean z10) { v.a.d(f37422d, "createSocket s host port autoClose"); Socket createSocket = this.f37424a.getSocketFactory().createSocket(socket, str, i10, z10); if (createSocket instanceof SSLSocket) { a(createSocket); this.f37426c = (String[]) ((SSLSocket) createSocket).getEnabledCipherSuites().clone(); } return createSocket; } @Override public String[] getDefaultCipherSuites() { return new String[0]; } @Override public String[] getSupportedCipherSuites() { String[] strArr = this.f37426c; return strArr != null ? strArr : new String[0]; } }