MD5 校验值:d47de9d0b292a5cbd7377502c33607ba
c.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package x8; import i5.z3; import java.io.IOException; import java.io.InterruptedIOException; import java.net.ConnectException; import java.net.InetSocketAddress; import java.net.ProtocolException; import java.net.Proxy; import java.net.Socket; import java.net.UnknownServiceException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.TimeUnit; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLException; import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.SSLPeerUnverifiedException; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import t8.a0; import t8.x; import t8.y; public final class c implements u, y8.d { public final t8.u f9158a; public final m f9159b; public final q f9160c; public final a0 f9161d; public final List f9162e; public final int f9163f; public final i.v f9164g; public final int f9165h; public final boolean f9166i; public final z3 f9167j; public volatile boolean f9168k; public Socket f9169l; public Socket f9170m; public t8.l f9171n; public t8.v f9172o; public h9.o f9173p; public h9.n f9174q; public n f9175r; public c(t8.u uVar, m mVar, q qVar, a0 a0Var, List list, int i10, i.v vVar, int i11, boolean z9) { com.bumptech.glide.e.m("client", uVar); com.bumptech.glide.e.m("call", mVar); com.bumptech.glide.e.m("routePlanner", qVar); com.bumptech.glide.e.m("route", a0Var); this.f9158a = uVar; this.f9159b = mVar; this.f9160c = qVar; this.f9161d = a0Var; this.f9162e = list; this.f9163f = i10; this.f9164g = vVar; this.f9165h = i11; this.f9166i = z9; this.f9167j = mVar.f9212q; } @Override public final boolean a() { return this.f9172o != null; } @Override public final u b() { return new c(this.f9158a, this.f9159b, this.f9160c, this.f9161d, this.f9162e, this.f9163f, this.f9164g, this.f9165h, this.f9166i); } @Override public final void c(m mVar, IOException iOException) { com.bumptech.glide.e.m("call", mVar); } @Override public final void cancel() { this.f9168k = true; Socket socket = this.f9169l; if (socket == null) { return; } u8.g.c(socket); } @Override public final a0 d() { return this.f9161d; } @Override public final t e() { boolean z9; IOException e10; Socket socket; Socket socket2; z3 z3Var = this.f9167j; a0 a0Var = this.f9161d; boolean z10 = false; boolean z11 = true; if (this.f9169l == null) { z9 = true; } else { z9 = false; } if (z9) { m mVar = this.f9159b; CopyOnWriteArrayList copyOnWriteArrayList = mVar.D; CopyOnWriteArrayList copyOnWriteArrayList2 = mVar.D; copyOnWriteArrayList.add(this); try { InetSocketAddress inetSocketAddress = a0Var.f8384c; Proxy proxy = a0Var.f8383b; z3Var.getClass(); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress); com.bumptech.glide.e.m("proxy", proxy); i(); try { t tVar = new t(this, (Throwable) null, 6); copyOnWriteArrayList2.remove(this); return tVar; } catch (IOException e11) { e10 = e11; try { InetSocketAddress inetSocketAddress2 = a0Var.f8384c; Proxy proxy2 = a0Var.f8383b; z3Var.getClass(); com.bumptech.glide.e.m("call", mVar); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress2); com.bumptech.glide.e.m("proxy", proxy2); t tVar2 = new t(this, e10, 2); copyOnWriteArrayList2.remove(this); if (!z11 && (socket2 = this.f9169l) != null) { u8.g.c(socket2); } return tVar2; } catch (Throwable th) { th = th; z10 = z11; copyOnWriteArrayList2.remove(this); if (!z10 && (socket = this.f9169l) != null) { u8.g.c(socket); } throw th; } } catch (Throwable th2) { th = th2; z10 = true; copyOnWriteArrayList2.remove(this); if (!z10) { u8.g.c(socket); } throw th; } } catch (IOException e12) { e10 = e12; z11 = false; } catch (Throwable th3) { th = th3; } } else { throw new IllegalStateException("TCP already connected".toString()); } } @Override public final t f() { boolean z9; CopyOnWriteArrayList copyOnWriteArrayList; m mVar; c cVar; c cVar2; boolean z10; boolean z11; c cVar3; boolean z12; c cVar4; String str = "proxy"; z3 z3Var = this.f9167j; t8.u uVar = this.f9158a; if (this.f9169l != null) { z9 = true; } else { z9 = false; } if (z9) { if (!a()) { a0 a0Var = this.f9161d; t8.a aVar = a0Var.f8382a; Proxy proxy = a0Var.f8383b; InetSocketAddress inetSocketAddress = a0Var.f8384c; t8.a aVar2 = a0Var.f8382a; List list = aVar.f8381k; m mVar2 = this.f9159b; CopyOnWriteArrayList copyOnWriteArrayList2 = mVar2.D; CopyOnWriteArrayList copyOnWriteArrayList3 = mVar2.D; copyOnWriteArrayList2.add(this); try { try { if (this.f9164g != null) { t k10 = k(); if (k10.f9257b != null || k10.f9258c != null) { copyOnWriteArrayList3.remove(this); Socket socket = this.f9170m; if (socket != null) { u8.g.c(socket); } Socket socket2 = this.f9169l; if (socket2 != null) { u8.g.c(socket2); } return k10; } } if (aVar2.f8373c != null) { z3Var.getClass(); SSLSocketFactory sSLSocketFactory = aVar2.f8373c; Socket socket3 = this.f9169l; t8.p pVar = aVar2.f8379i; Socket createSocket = sSLSocketFactory.createSocket(socket3, pVar.f8477d, pVar.f8478e, true); if (createSocket != null) { SSLSocket sSLSocket = (SSLSocket) createSocket; c m9 = m(list, sSLSocket); t8.g gVar = (t8.g) list.get(m9.f9165h); cVar2 = m9.l(list, sSLSocket); try { gVar.a(sSLSocket, m9.f9166i); j(sSLSocket, gVar); } catch (IOException e10) { e = e10; mVar = mVar2; copyOnWriteArrayList = copyOnWriteArrayList3; cVar = null; z11 = false; try { z3Var.getClass(); com.bumptech.glide.e.m("call", mVar); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress); com.bumptech.glide.e.m(str, proxy); if (uVar.f8518r) { } cVar3 = cVar; t tVar = new t(this, cVar3, e); copyOnWriteArrayList.remove(this); if (!z11) { } return tVar; } catch (Throwable th) { th = th; z10 = z11; copyOnWriteArrayList.remove(this); if (!z10) { } throw th; } } } else { throw new NullPointerException("null cannot be cast to non-null type javax.net.ssl.SSLSocket"); } } else { this.f9170m = this.f9169l; List list2 = aVar2.f8380j; t8.v vVar = t8.v.H2_PRIOR_KNOWLEDGE; if (!list2.contains(vVar)) { vVar = t8.v.HTTP_1_1; } this.f9172o = vVar; cVar2 = null; } try { cVar4 = cVar2; } catch (IOException e11) { e = e11; cVar4 = cVar2; } } catch (IOException e12) { e = e12; mVar = mVar2; copyOnWriteArrayList = copyOnWriteArrayList3; cVar = null; cVar2 = null; } try { mVar = mVar2; } catch (IOException e13) { e = e13; mVar = mVar2; copyOnWriteArrayList = copyOnWriteArrayList3; cVar = null; cVar2 = cVar4; z11 = false; z3Var.getClass(); com.bumptech.glide.e.m("call", mVar); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress); com.bumptech.glide.e.m(str, proxy); if (uVar.f8518r) { } cVar3 = cVar; t tVar2 = new t(this, cVar3, e); copyOnWriteArrayList.remove(this); if (!z11) { } return tVar2; } try { try { try { try { n nVar = new n(uVar.Q, (p) uVar.f8514n.f6300a, this.f9161d, this.f9169l, this.f9170m, this.f9171n, this.f9172o, this.f9173p, this.f9174q, uVar.N); this.f9175r = nVar; nVar.j(); z3Var.getClass(); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress); str = "proxy"; com.bumptech.glide.e.m(str, proxy); try { try { cVar = null; } catch (Throwable th2) { th = th2; copyOnWriteArrayList = copyOnWriteArrayList3; z10 = true; copyOnWriteArrayList.remove(this); if (!z10) { Socket socket4 = this.f9170m; if (socket4 != null) { u8.g.c(socket4); } Socket socket5 = this.f9169l; if (socket5 != null) { u8.g.c(socket5); } } throw th; } } catch (IOException e14) { e = e14; copyOnWriteArrayList = copyOnWriteArrayList3; cVar = null; } } catch (IOException e15) { e = e15; copyOnWriteArrayList = copyOnWriteArrayList3; str = "proxy"; cVar = null; cVar2 = cVar4; z11 = false; z3Var.getClass(); com.bumptech.glide.e.m("call", mVar); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress); com.bumptech.glide.e.m(str, proxy); if (uVar.f8518r) { if (!(e instanceof ProtocolException) && !(e instanceof InterruptedIOException) && ((!(e instanceof SSLHandshakeException) || !(e.getCause() instanceof CertificateException)) && !(e instanceof SSLPeerUnverifiedException) && (e instanceof SSLException))) { z12 = true; if (!z12) { cVar3 = cVar2; t tVar22 = new t(this, cVar3, e); copyOnWriteArrayList.remove(this); if (!z11) { Socket socket6 = this.f9170m; if (socket6 != null) { u8.g.c(socket6); } Socket socket7 = this.f9169l; if (socket7 != null) { u8.g.c(socket7); } } return tVar22; } } z12 = false; if (!z12) { } } cVar3 = cVar; t tVar222 = new t(this, cVar3, e); copyOnWriteArrayList.remove(this); if (!z11) { } return tVar222; } try { t tVar3 = new t(this, (Throwable) null, 6); copyOnWriteArrayList3.remove(this); return tVar3; } catch (IOException e16) { e = e16; copyOnWriteArrayList = copyOnWriteArrayList3; cVar2 = cVar4; z11 = true; z3Var.getClass(); com.bumptech.glide.e.m("call", mVar); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress); com.bumptech.glide.e.m(str, proxy); if (uVar.f8518r) { } cVar3 = cVar; t tVar2222 = new t(this, cVar3, e); copyOnWriteArrayList.remove(this); if (!z11) { } return tVar2222; } } catch (Throwable th3) { th = th3; copyOnWriteArrayList = copyOnWriteArrayList3; z10 = false; copyOnWriteArrayList.remove(this); if (!z10) { } throw th; } } catch (IOException e17) { e = e17; copyOnWriteArrayList = copyOnWriteArrayList3; } } catch (IOException e18) { e = e18; copyOnWriteArrayList = copyOnWriteArrayList3; cVar = null; cVar2 = cVar4; z11 = false; z3Var.getClass(); com.bumptech.glide.e.m("call", mVar); com.bumptech.glide.e.m("inetSocketAddress", inetSocketAddress); com.bumptech.glide.e.m(str, proxy); if (uVar.f8518r) { } cVar3 = cVar; t tVar22222 = new t(this, cVar3, e); copyOnWriteArrayList.remove(this); if (!z11) { } return tVar22222; } } catch (Throwable th4) { th = th4; copyOnWriteArrayList = copyOnWriteArrayList3; } } else { throw new IllegalStateException("already connected".toString()); } } else { throw new IllegalStateException("TCP not connected".toString()); } } @Override public final n g() { this.f9159b.f9208m.P.a(this.f9161d); r e10 = this.f9160c.e(this, this.f9162e); if (e10 != null) { return e10.f9253a; } n nVar = this.f9175r; com.bumptech.glide.e.j(nVar); synchronized (nVar) { p pVar = (p) this.f9158a.f8514n.f6300a; pVar.getClass(); t8.n nVar2 = u8.g.f8733a; pVar.f9245e.add(nVar); pVar.f9243c.d(pVar.f9244d, 0L); this.f9159b.a(nVar); } z3 z3Var = this.f9167j; m mVar = this.f9159b; z3Var.getClass(); com.bumptech.glide.e.m("call", mVar); return nVar; } @Override public final void h() { } public final void i() { int i10; Socket createSocket; Proxy.Type type = this.f9161d.f8383b.type(); if (type == null) { i10 = -1; } else { i10 = b.f9157a[type.ordinal()]; } if (i10 != 1 && i10 != 2) { createSocket = new Socket(this.f9161d.f8383b); } else { createSocket = this.f9161d.f8382a.f8372b.createSocket(); com.bumptech.glide.e.j(createSocket); } this.f9169l = createSocket; if (!this.f9168k) { createSocket.setSoTimeout(this.f9158a.L); try { b9.m mVar = b9.m.f1309a; b9.m.f1309a.e(createSocket, this.f9161d.f8384c, this.f9158a.K); try { this.f9173p = new h9.o(com.bumptech.glide.e.Z(createSocket)); this.f9174q = com.bumptech.glide.e.i(com.bumptech.glide.e.X(createSocket)); return; } catch (NullPointerException e10) { if (!com.bumptech.glide.e.h(e10.getMessage(), "throw with null exception")) { return; } else { throw new IOException(e10); } } } catch (ConnectException e11) { ConnectException connectException = new ConnectException(com.bumptech.glide.e.a0("Failed to connect to ", this.f9161d.f8384c)); connectException.initCause(e11); throw connectException; } } throw new IOException("canceled"); } public final void j(SSLSocket sSLSocket, t8.g gVar) { t8.v vVar; t8.a aVar = this.f9161d.f8382a; try { if (gVar.f8437b) { b9.m mVar = b9.m.f1309a; b9.m.f1309a.d(sSLSocket, aVar.f8379i.f8477d, aVar.f8380j); } sSLSocket.startHandshake(); SSLSession session = sSLSocket.getSession(); com.bumptech.glide.e.l("sslSocketSession", session); t8.l l9 = y7.g.l(session); HostnameVerifier hostnameVerifier = aVar.f8374d; com.bumptech.glide.e.j(hostnameVerifier); if (!hostnameVerifier.verify(aVar.f8379i.f8477d, session)) { List a10 = l9.a(); if (!a10.isEmpty()) { X509Certificate x509Certificate = (X509Certificate) a10.get(0); StringBuilder sb = new StringBuilder("\n |Hostname "); sb.append(aVar.f8379i.f8477d); sb.append(" not verified:\n | certificate: "); t8.d dVar = t8.d.f8407c; com.bumptech.glide.e.m("certificate", x509Certificate); h9.h hVar = h9.h.f3569p; byte[] encoded = x509Certificate.getPublicKey().getEncoded(); com.bumptech.glide.e.l("publicKey.encoded", encoded); sb.append(com.bumptech.glide.e.a0("sha256/", b9.k.v(encoded).b("SHA-256").a())); sb.append("\n | DN: "); sb.append((Object) x509Certificate.getSubjectDN().getName()); sb.append("\n | subjectAltNames: "); sb.append(s5.p.x0(f9.c.a(x509Certificate, 2), f9.c.a(x509Certificate, 7))); sb.append("\n "); throw new SSLPeerUnverifiedException(c6.i.H0(sb.toString())); } throw new SSLPeerUnverifiedException("Hostname " + aVar.f8379i.f8477d + " not verified (no certificates)"); } t8.d dVar2 = aVar.f8375e; com.bumptech.glide.e.j(dVar2); this.f9171n = new t8.l(l9.f8459a, l9.f8460b, l9.f8461c, new k6.u(5, dVar2, l9, aVar)); com.bumptech.glide.e.m("hostname", aVar.f8379i.f8477d); Iterator it = dVar2.f8408a.iterator(); String str = null; if (!it.hasNext()) { if (gVar.f8437b) { b9.m mVar2 = b9.m.f1309a; str = b9.m.f1309a.f(sSLSocket); } this.f9170m = sSLSocket; this.f9173p = new h9.o(com.bumptech.glide.e.Z(sSLSocket)); this.f9174q = com.bumptech.glide.e.i(com.bumptech.glide.e.X(sSLSocket)); if (str != null) { vVar = t8.t.h(str); } else { vVar = t8.v.HTTP_1_1; } this.f9172o = vVar; b9.m mVar3 = b9.m.f1309a; b9.m.f1309a.a(sSLSocket); return; } a.a.r(it.next()); throw null; } catch (Throwable th) { b9.m mVar4 = b9.m.f1309a; b9.m.f1309a.a(sSLSocket); u8.g.c(sSLSocket); throw th; } } public final t k() { i.v vVar = this.f9164g; com.bumptech.glide.e.j(vVar); a0 a0Var = this.f9161d; String str = "CONNECT " + u8.g.k(a0Var.f8382a.f8379i, true) + " HTTP/1.1"; h9.o oVar = this.f9173p; com.bumptech.glide.e.j(oVar); h9.n nVar = this.f9174q; com.bumptech.glide.e.j(nVar); z8.h hVar = new z8.h(null, this, oVar, nVar); h9.v e10 = oVar.e(); long j10 = this.f9158a.L; TimeUnit timeUnit = TimeUnit.MILLISECONDS; e10.g(j10, timeUnit); nVar.e().g(r8.M, timeUnit); hVar.j((t8.n) vVar.f3893d, str); hVar.d(); x g10 = hVar.g(false); com.bumptech.glide.e.j(g10); g10.b(vVar); y a10 = g10.a(); long f10 = u8.g.f(a10); if (f10 != -1) { z8.e i10 = hVar.i(f10); u8.g.i(i10, Integer.MAX_VALUE, timeUnit); i10.close(); } int i11 = a10.f8557p; if (i11 != 200) { if (i11 == 407) { ((z3) a0Var.f8382a.f8376f).getClass(); throw new IOException("Failed to authenticate with proxy"); } throw new IOException(com.bumptech.glide.e.a0("Unexpected response code for CONNECT: ", Integer.valueOf(i11))); } if (oVar.f3590n.J() && nVar.f3587n.J()) { return new t(this, (Throwable) null, 6); } throw new IOException("TLS tunnel buffered too many bytes!"); } public final c l(List list, SSLSocket sSLSocket) { int i10; boolean z9; boolean z10; String[] strArr; String[] strArr2; com.bumptech.glide.e.m("connectionSpecs", list); int i11 = this.f9165h; int i12 = i11 + 1; int size = list.size(); do { i10 = i12; if (i10 < size) { i12 = i10 + 1; t8.g gVar = (t8.g) list.get(i10); gVar.getClass(); if (!gVar.f8436a || (((strArr = gVar.f8439d) != null && !u8.e.e(strArr, sSLSocket.getEnabledProtocols(), u5.a.f8712m)) || ((strArr2 = gVar.f8438c) != null && !u8.e.e(strArr2, sSLSocket.getEnabledCipherSuites(), t8.e.f8411c)))) { z9 = false; } else { z9 = true; } } else { return null; } } while (!z9); if (i11 != -1) { z10 = true; } else { z10 = false; } return new c(this.f9158a, this.f9159b, this.f9160c, this.f9161d, this.f9162e, this.f9163f, this.f9164g, i10, z10); } public final c m(List list, SSLSocket sSLSocket) { com.bumptech.glide.e.m("connectionSpecs", list); if (this.f9165h != -1) { return this; } c l9 = l(list, sSLSocket); if (l9 != null) { return l9; } StringBuilder sb = new StringBuilder("Unable to find acceptable protocols. isFallback="); sb.append(this.f9166i); sb.append(", modes="); sb.append(list); sb.append(", supported protocols="); String[] enabledProtocols = sSLSocket.getEnabledProtocols(); com.bumptech.glide.e.j(enabledProtocols); String arrays = Arrays.toString(enabledProtocols); com.bumptech.glide.e.l("toString(this)", arrays); sb.append(arrays); throw new UnknownServiceException(sb.toString()); } }