正在查看: CityMall v1.42.1 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CityMall v1.42.1 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package u7;
import C7.d;
import D7.G;
import D7.V;
import java.io.IOException;
import java.net.ConnectException;
import java.net.Proxy;
import java.net.Socket;
import java.security.Principal;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import kotlin.collections.AbstractC0471p;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import okhttp3.Call;
import okhttp3.Connection;
import okhttp3.EventListener;
import okhttp3.internal.concurrent.TaskRunner;
import okhttp3.internal.http.ExchangeCodec;
import okio.BufferedSink;
import okio.BufferedSource;
import p7.C0492a;
import p7.m;
import p7.o;
import p7.s;
import p7.t;
import p7.u;
import p7.w;
import p7.y;
import x7.f;
import x7.l;
public final class f extends f.d implements Connection {
public static final a t = new a(null);
private Socket c;
private Socket d;
private m e;
private t f;
private x7.f g;
private BufferedSource h;
private BufferedSink i;
private boolean j;
private boolean k;
private int l;
private int m;
private int n;
private int o;
private final List p;
private long q;
private final h r;
private final y s;
public static final class a {
private a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
static final class b extends kotlin.jvm.internal.k implements Function0 {
final p7.d i;
final m j;
final C0492a k;
b(p7.d dVar, m mVar, C0492a c0492a) {
super(0);
this.i = dVar;
this.j = mVar;
this.k = c0492a;
}
@Override
public final List invoke() {
B7.c d = this.i.d();
kotlin.jvm.internal.j.f(d);
return d.a(this.j.d(), this.k.l().i());
}
}
static final class c extends kotlin.jvm.internal.k implements Function0 {
c() {
super(0);
}
@Override
public final List invoke() {
m mVar = f.this.e;
kotlin.jvm.internal.j.f(mVar);
List<Certificate> d = mVar.d();
ArrayList arrayList = new ArrayList(AbstractC0471p.v(d, 10));
for (Certificate certificate : d) {
if (certificate == null) {
throw new NullPointerException("null cannot be cast to non-null type java.security.cert.X509Certificate");
}
arrayList.add((X509Certificate) certificate);
}
return arrayList;
}
}
public static final class d extends d.AbstractC0001d {
final u7.c d;
final BufferedSource e;
final BufferedSink f;
d(u7.c cVar, BufferedSource bufferedSource, BufferedSink bufferedSink, boolean z, BufferedSource bufferedSource2, BufferedSink bufferedSink2) {
super(z, bufferedSource2, bufferedSink2);
this.d = cVar;
this.e = bufferedSource;
this.f = bufferedSink;
}
@Override
public void close() {
this.d.a(-1L, true, true, null);
}
}
public f(h connectionPool, y route) {
kotlin.jvm.internal.j.i(connectionPool, "connectionPool");
kotlin.jvm.internal.j.i(route, "route");
this.r = connectionPool;
this.s = route;
this.o = 1;
this.p = new ArrayList();
this.q = Long.MAX_VALUE;
}
private final boolean B(List list) {
List<y> list2 = list;
if ((list2 instanceof Collection) && list2.isEmpty()) {
return false;
}
for (y yVar : list2) {
Proxy.Type type = yVar.b().type();
Proxy.Type type2 = Proxy.Type.DIRECT;
if (type == type2 && this.s.b().type() == type2 && kotlin.jvm.internal.j.d(this.s.d(), yVar.d())) {
return true;
}
}
return false;
}
private final void F(int i) {
Socket socket = this.d;
kotlin.jvm.internal.j.f(socket);
BufferedSource bufferedSource = this.h;
kotlin.jvm.internal.j.f(bufferedSource);
BufferedSink bufferedSink = this.i;
kotlin.jvm.internal.j.f(bufferedSink);
socket.setSoTimeout(0);
x7.f a2 = new f.b(true, TaskRunner.h).m(socket, this.s.a().l().i(), bufferedSource, bufferedSink).k(this).l(i).a();
this.g = a2;
this.o = x7.f.N.a().d();
x7.f.l2(a2, false, null, 3, null);
}
private final boolean G(o oVar) {
m mVar;
if (q7.c.h && !Thread.holdsLock(this)) {
StringBuilder sb = new StringBuilder();
sb.append("Thread ");
Thread currentThread = Thread.currentThread();
kotlin.jvm.internal.j.h(currentThread, "Thread.currentThread()");
sb.append(currentThread.getName());
sb.append(" MUST hold lock on ");
sb.append(this);
throw new AssertionError(sb.toString());
}
o l = this.s.a().l();
if (oVar.o() != l.o()) {
return false;
}
if (kotlin.jvm.internal.j.d(oVar.i(), l.i())) {
return true;
}
if (this.k || (mVar = this.e) == null) {
return false;
}
kotlin.jvm.internal.j.f(mVar);
return e(oVar, mVar);
}
private final boolean e(o oVar, m mVar) {
List d2 = mVar.d();
if (d2.isEmpty()) {
return false;
}
B7.d dVar = B7.d.a;
String i = oVar.i();
Object obj = d2.get(0);
if (obj != null) {
return dVar.e(i, (X509Certificate) obj);
}
throw new NullPointerException("null cannot be cast to non-null type java.security.cert.X509Certificate");
}
private final void h(int i, int i2, Call call, EventListener eventListener) {
Socket socket;
int i3;
Proxy b2 = this.s.b();
C0492a a2 = this.s.a();
Proxy.Type type = b2.type();
if (type != null && ((i3 = g.a[type.ordinal()]) == 1 || i3 == 2)) {
socket = a2.j().createSocket();
kotlin.jvm.internal.j.f(socket);
} else {
socket = new Socket(b2);
}
this.c = socket;
eventListener.j(call, this.s.d(), b2);
socket.setSoTimeout(i2);
try {
y7.j.c.g().f(socket, this.s.d(), i);
try {
this.h = G.d(G.m(socket));
this.i = G.c(G.i(socket));
} catch (NullPointerException e) {
if (kotlin.jvm.internal.j.d(e.getMessage(), "throw with null exception")) {
throw new IOException(e);
}
}
} catch (ConnectException e2) {
ConnectException connectException = new ConnectException("Failed to connect to " + this.s.d());
connectException.initCause(e2);
throw connectException;
}
}
private final void i(u7.b bVar) {
C0492a a2 = this.s.a();
SSLSocketFactory k = a2.k();
SSLSocket sSLSocket = null;
try {
kotlin.jvm.internal.j.f(k);
Socket createSocket = k.createSocket(this.c, a2.l().i(), a2.l().o(), true);
if (createSocket == null) {
throw new NullPointerException("null cannot be cast to non-null type javax.net.ssl.SSLSocket");
}
SSLSocket sSLSocket2 = (SSLSocket) createSocket;
try {
p7.h a3 = bVar.a(sSLSocket2);
if (a3.h()) {
y7.j.c.g().e(sSLSocket2, a2.l().i(), a2.f());
}
sSLSocket2.startHandshake();
SSLSession sslSocketSession = sSLSocket2.getSession();
m.a aVar = m.e;
kotlin.jvm.internal.j.h(sslSocketSession, "sslSocketSession");
m a4 = aVar.a(sslSocketSession);
HostnameVerifier e = a2.e();
kotlin.jvm.internal.j.f(e);
if (e.verify(a2.l().i(), sslSocketSession)) {
p7.d a5 = a2.a();
kotlin.jvm.internal.j.f(a5);
this.e = new m(a4.e(), a4.a(), a4.c(), new b(a5, a4, a2));
a5.b(a2.l().i(), new c());
String h = a3.h() ? y7.j.c.g().h(sSLSocket2) : null;
this.d = sSLSocket2;
this.h = G.d(G.m(sSLSocket2));
this.i = G.c(G.i(sSLSocket2));
this.f = h != null ? t.i.a(h) : t.HTTP_1_1;
y7.j.c.g().b(sSLSocket2);
return;
}
List d2 = a4.d();
if (d2.isEmpty()) {
throw new SSLPeerUnverifiedException("Hostname " + a2.l().i() + " not verified (no certificates)");
}
Object obj = d2.get(0);
if (obj == null) {
throw new NullPointerException("null cannot be cast to non-null type java.security.cert.X509Certificate");
}
X509Certificate x509Certificate = (X509Certificate) obj;
StringBuilder sb = new StringBuilder();
sb.append("\n |Hostname ");
sb.append(a2.l().i());
sb.append(" not verified:\n | certificate: ");
sb.append(p7.d.d.a(x509Certificate));
sb.append("\n | DN: ");
Principal subjectDN = x509Certificate.getSubjectDN();
kotlin.jvm.internal.j.h(subjectDN, "cert.subjectDN");
sb.append(subjectDN.getName());
sb.append("\n | subjectAltNames: ");
sb.append(B7.d.a.a(x509Certificate));
sb.append("\n ");
throw new SSLPeerUnverifiedException(kotlin.text.k.h(sb.toString(), null, 1, null));
} catch (Throwable th) {
th = th;
sSLSocket = sSLSocket2;
if (sSLSocket != null) {
y7.j.c.g().b(sSLSocket);
}
if (sSLSocket != null) {
q7.c.k(sSLSocket);
}
throw th;
}
} catch (Throwable th2) {
th = th2;
}
}
private final void j(int i, int i2, int i3, Call call, EventListener eventListener) {
u l = l();
o l2 = l.l();
for (int i4 = 0; i4 < 21; i4++) {
h(i, i2, call, eventListener);
l = k(i2, i3, l, l2);
if (l == null) {
return;
}
Socket socket = this.c;
if (socket != null) {
q7.c.k(socket);
}
this.c = null;
this.i = null;
this.h = null;
eventListener.h(call, this.s.d(), this.s.b(), null);
}
}
private final u k(int i, int i2, u uVar, o oVar) {
String str = "CONNECT " + q7.c.P(oVar, true) + " HTTP/1.1";
while (true) {
BufferedSource bufferedSource = this.h;
kotlin.jvm.internal.j.f(bufferedSource);
BufferedSink bufferedSink = this.i;
kotlin.jvm.internal.j.f(bufferedSink);
w7.b bVar = new w7.b(null, this, bufferedSource, bufferedSink);
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
bufferedSource.timeout().g(i, timeUnit);
bufferedSink.timeout().g(i2, timeUnit);
bVar.A(uVar.f(), str);
bVar.b();
w.a g = bVar.g(false);
kotlin.jvm.internal.j.f(g);
w c2 = g.r(uVar).c();
bVar.z(c2);
int u = c2.u();
if (u == 200) {
if (bufferedSource.i().f1() && bufferedSink.i().f1()) {
return null;
}
throw new IOException("TLS tunnel buffered too many bytes!");
}
if (u != 407) {
throw new IOException("Unexpected response code for CONNECT: " + c2.u());
}
u a2 = this.s.a().h().a(this.s, c2);
if (a2 == null) {
throw new IOException("Failed to authenticate with proxy");
}
if (kotlin.text.k.t("close", w.I(c2, "Connection", null, 2, null), true)) {
return a2;
}
uVar = a2;
}
}
private final u l() {
u b2 = new u.a().n(this.s.a().l()).g("CONNECT", null).e("Host", q7.c.P(this.s.a().l(), true)).e("Proxy-Connection", "Keep-Alive").e("User-Agent", "okhttp/4.9.2").b();
u a2 = this.s.a().h().a(this.s, new w.a().r(b2).p(t.HTTP_1_1).g(407).m("Preemptive Authenticate").b(q7.c.c).s(-1L).q(-1L).j("Proxy-Authenticate", "OkHttp-Preemptive").c());
return a2 != null ? a2 : b2;
}
private final void m(u7.b bVar, int i, Call call, EventListener eventListener) {
if (this.s.a().k() != null) {
eventListener.C(call);
i(bVar);
eventListener.B(call, this.e);
if (this.f == t.HTTP_2) {
F(i);
return;
}
return;
}
List f = this.s.a().f();
t tVar = t.H2_PRIOR_KNOWLEDGE;
if (!f.contains(tVar)) {
this.d = this.c;
this.f = t.HTTP_1_1;
} else {
this.d = this.c;
this.f = tVar;
F(i);
}
}
public y A() {
return this.s;
}
public final void C(long j) {
this.q = j;
}
public final void D(boolean z) {
this.j = z;
}
public Socket E() {
Socket socket = this.d;
kotlin.jvm.internal.j.f(socket);
return socket;
}
public final synchronized void H(e call, IOException iOException) {
try {
kotlin.jvm.internal.j.i(call, "call");
if (iOException instanceof l) {
if (((l) iOException).a == x7.b.REFUSED_STREAM) {
int i = this.n + 1;
this.n = i;
if (i > 1) {
this.j = true;
this.l++;
}
} else if (((l) iOException).a != x7.b.CANCEL || !call.isCanceled()) {
this.j = true;
this.l++;
}
} else if (!v() || (iOException instanceof x7.a)) {
this.j = true;
if (this.m == 0) {
if (iOException != null) {
g(call.j(), this.s, iOException);
}
this.l++;
}
}
} finally {
}
}
@Override
public synchronized void a(x7.f connection, x7.k settings) {
kotlin.jvm.internal.j.i(connection, "connection");
kotlin.jvm.internal.j.i(settings, "settings");
this.o = settings.d();
}
@Override
public void b(x7.h stream) {
kotlin.jvm.internal.j.i(stream, "stream");
stream.d(x7.b.REFUSED_STREAM, null);
}
public final void d() {
Socket socket = this.c;
if (socket != null) {
q7.c.k(socket);
}
}
public final void f(int r17, int r18, int r19, int r20, boolean r21, okhttp3.Call r22, okhttp3.EventListener r23) {
throw new UnsupportedOperationException("Method not decompiled: u7.f.f(int, int, int, int, boolean, okhttp3.Call, okhttp3.EventListener):void");
}
public final void g(s client, y failedRoute, IOException failure) {
kotlin.jvm.internal.j.i(client, "client");
kotlin.jvm.internal.j.i(failedRoute, "failedRoute");
kotlin.jvm.internal.j.i(failure, "failure");
if (failedRoute.b().type() != Proxy.Type.DIRECT) {
C0492a a2 = failedRoute.a();
a2.i().connectFailed(a2.l().t(), failedRoute.b().address(), failure);
}
client.w().b(failedRoute);
}
public final List n() {
return this.p;
}
public final long o() {
return this.q;
}
public final boolean p() {
return this.j;
}
public final int q() {
return this.l;
}
public m r() {
return this.e;
}
public final synchronized void s() {
this.m++;
}
public final boolean t(C0492a address, List list) {
kotlin.jvm.internal.j.i(address, "address");
if (q7.c.h && !Thread.holdsLock(this)) {
StringBuilder sb = new StringBuilder();
sb.append("Thread ");
Thread currentThread = Thread.currentThread();
kotlin.jvm.internal.j.h(currentThread, "Thread.currentThread()");
sb.append(currentThread.getName());
sb.append(" MUST hold lock on ");
sb.append(this);
throw new AssertionError(sb.toString());
}
if (this.p.size() >= this.o || this.j || !this.s.a().d(address)) {
return false;
}
if (kotlin.jvm.internal.j.d(address.l().i(), A().a().l().i())) {
return true;
}
if (this.g == null || list == null || !B(list) || address.e() != B7.d.a || !G(address.l())) {
return false;
}
try {
p7.d a2 = address.a();
kotlin.jvm.internal.j.f(a2);
String i = address.l().i();
m r = r();
kotlin.jvm.internal.j.f(r);
a2.a(i, r.d());
return true;
} catch (SSLPeerUnverifiedException unused) {
return false;
}
}
public String toString() {
Object obj;
StringBuilder sb = new StringBuilder();
sb.append("Connection{");
sb.append(this.s.a().l().i());
sb.append(':');
sb.append(this.s.a().l().o());
sb.append(',');
sb.append(" proxy=");
sb.append(this.s.b());
sb.append(" hostAddress=");
sb.append(this.s.d());
sb.append(" cipherSuite=");
m mVar = this.e;
if (mVar == null || (obj = mVar.a()) == null) {
obj = "none";
}
sb.append(obj);
sb.append(" protocol=");
sb.append(this.f);
sb.append('}');
return sb.toString();
}
public final boolean u(boolean z) {
long j;
if (q7.c.h && Thread.holdsLock(this)) {
StringBuilder sb = new StringBuilder();
sb.append("Thread ");
Thread currentThread = Thread.currentThread();
kotlin.jvm.internal.j.h(currentThread, "Thread.currentThread()");
sb.append(currentThread.getName());
sb.append(" MUST NOT hold lock on ");
sb.append(this);
throw new AssertionError(sb.toString());
}
long nanoTime = System.nanoTime();
Socket socket = this.c;
kotlin.jvm.internal.j.f(socket);
Socket socket2 = this.d;
kotlin.jvm.internal.j.f(socket2);
BufferedSource bufferedSource = this.h;
kotlin.jvm.internal.j.f(bufferedSource);
if (socket.isClosed() || socket2.isClosed() || socket2.isInputShutdown() || socket2.isOutputShutdown()) {
return false;
}
x7.f fVar = this.g;
if (fVar != null) {
return fVar.X1(nanoTime);
}
synchronized (this) {
j = nanoTime - this.q;
}
if (j < 10000000000L || !z) {
return true;
}
return q7.c.D(socket2, bufferedSource);
}
public final boolean v() {
return this.g != null;
}
public final ExchangeCodec w(s client, v7.f chain) {
kotlin.jvm.internal.j.i(client, "client");
kotlin.jvm.internal.j.i(chain, "chain");
Socket socket = this.d;
kotlin.jvm.internal.j.f(socket);
BufferedSource bufferedSource = this.h;
kotlin.jvm.internal.j.f(bufferedSource);
BufferedSink bufferedSink = this.i;
kotlin.jvm.internal.j.f(bufferedSink);
x7.f fVar = this.g;
if (fVar != null) {
return new x7.g(client, this, chain, fVar);
}
socket.setSoTimeout(chain.j());
V timeout = bufferedSource.timeout();
long g = chain.g();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
timeout.g(g, timeUnit);
bufferedSink.timeout().g(chain.i(), timeUnit);
return new w7.b(client, this, bufferedSource, bufferedSink);
}
public final d.AbstractC0001d x(u7.c exchange) {
kotlin.jvm.internal.j.i(exchange, "exchange");
Socket socket = this.d;
kotlin.jvm.internal.j.f(socket);
BufferedSource bufferedSource = this.h;
kotlin.jvm.internal.j.f(bufferedSource);
BufferedSink bufferedSink = this.i;
kotlin.jvm.internal.j.f(bufferedSink);
socket.setSoTimeout(0);
z();
return new d(exchange, bufferedSource, bufferedSink, true, bufferedSource, bufferedSink);
}
public final synchronized void y() {
this.k = true;
}
public final synchronized void z() {
this.j = true;
}
}