正在查看: Antivirus Cleaner v1.2.0.0 应用的 ao1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 ao1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.yandex.mobile.ads.impl;
import com.yandex.mobile.ads.impl.fo;
import com.yandex.mobile.ads.impl.hh0;
import com.yandex.mobile.ads.impl.if0;
import com.yandex.mobile.ads.impl.mm1;
import com.yandex.mobile.ads.impl.rh1;
import com.yandex.mobile.ads.impl.vp1;
import com.yandex.mobile.ads.impl.vq1;
import io.appmetrica.analytics.coreutils.internal.StringUtils;
import java.io.IOException;
import java.net.ConnectException;
import java.net.InetSocketAddress;
import java.net.ProtocolException;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketException;
import java.net.UnknownServiceException;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
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.CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.LongCompanionObject;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.text.StringsKt;
@SourceDebugExtension({"SMAP\nRealConnection.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RealConnection.kt\ncom/monetization/ads/embedded/okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 Util.kt\ncom/monetization/ads/embedded/okhttp/src/main/kotlin/okhttp3/internal/Util\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,765:1\n1#2:766\n606#3,4:767\n606#3,4:774\n613#3,4:778\n1747#4,3:771\n*S KotlinDebug\n*F\n+ 1 RealConnection.kt\ncom/monetization/ads/embedded/okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection\n*L\n529#1:767,4\n582#1:774,4\n648#1:778,4\n574#1:771,3\n*E\n"})
public final class ao1 extends hh0.b {
private final vs1 b;
private Socket c;
private Socket d;
private if0 e;
private mm1 f;
private hh0 g;
private wf.g h;
private wf.f i;
private boolean j;
private boolean k;
private int l;
private int m;
private int n;
private int o;
private final ArrayList p;
private long q;
public class a {
public static final int[] a;
static {
int[] iArr = new int[Proxy.Type.values().length];
try {
iArr[Proxy.Type.DIRECT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Proxy.Type.HTTP.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
a = iArr;
}
}
public static final class b extends Lambda implements Function0<List<? extends Certificate>> {
final fo b;
final if0 c;
final ab d;
public b(fo foVar, if0 if0Var, ab abVar) {
super(0);
this.b = foVar;
this.c = if0Var;
this.d = abVar;
}
@Override
public final List<? extends Certificate> invoke() {
eo a = this.b.a();
Intrinsics.checkNotNull(a);
return a.a(this.d.k().g(), this.c.c());
}
}
@SourceDebugExtension({"SMAP\nRealConnection.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RealConnection.kt\ncom/monetization/ads/embedded/okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection$connectTls$2\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,765:1\n1549#2:766\n1620#2,3:767\n*S KotlinDebug\n*F\n+ 1 RealConnection.kt\ncom/monetization/ads/embedded/okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection$connectTls$2\n*L\n411#1:766\n411#1:767,3\n*E\n"})
public static final class c extends Lambda implements Function0<List<? extends X509Certificate>> {
public c() {
super(0);
}
@Override
public final List<? extends X509Certificate> invoke() {
if0 if0Var = ao1.this.e;
Intrinsics.checkNotNull(if0Var);
List<Certificate> c = if0Var.c();
ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(c, 10));
for (Certificate certificate : c) {
Intrinsics.checkNotNull(certificate, "null cannot be cast to non-null type java.security.cert.X509Certificate");
arrayList.add((X509Certificate) certificate);
}
return arrayList;
}
}
public ao1(co1 connectionPool, vs1 route) {
Intrinsics.checkNotNullParameter(connectionPool, "connectionPool");
Intrinsics.checkNotNullParameter(route, "route");
this.b = route;
this.o = 1;
this.p = new ArrayList();
this.q = LongCompanionObject.MAX_VALUE;
}
private final void n() throws IOException {
zx1 zx1Var;
Socket socket = this.d;
Intrinsics.checkNotNull(socket);
wf.g gVar = this.h;
Intrinsics.checkNotNull(gVar);
wf.f fVar = this.i;
Intrinsics.checkNotNull(fVar);
socket.setSoTimeout(0);
hh0 hh0Var = new hh0(new hh0.a(l42.h).a(socket, this.b.a().k().g(), gVar, fVar).a(this).j());
this.g = hh0Var;
zx1Var = hh0.C;
this.o = zx1Var.c();
hh0.l(hh0Var);
}
public final ArrayList b() {
return this.p;
}
public final long c() {
return this.q;
}
public final boolean d() {
return this.j;
}
public final int e() {
return this.l;
}
public final if0 f() {
return this.e;
}
public final synchronized void g() {
this.m++;
}
public final boolean h() {
return this.g != null;
}
public final synchronized void i() {
this.k = true;
}
public final synchronized void j() {
this.j = true;
}
public final vs1 k() {
return this.b;
}
public final void l() {
this.j = true;
}
public final Socket m() {
Socket socket = this.d;
Intrinsics.checkNotNull(socket);
return socket;
}
public final String toString() {
Object obj;
String g = this.b.a().k().g();
int i = this.b.a().k().i();
Proxy b2 = this.b.b();
InetSocketAddress d = this.b.d();
if0 if0Var = this.e;
if (if0Var == null || (obj = if0Var.a()) == null) {
obj = "none";
}
return "Connection{" + g + StringUtils.PROCESS_POSTFIX_DELIMITER + i + ", proxy=" + b2 + " hostAddress=" + d + " cipherSuite=" + obj + " protocol=" + this.f + "}";
}
public final void a() {
Socket socket = this.c;
if (socket != null) {
g92.a(socket);
}
}
public final void a(int i, int i2, int i3, boolean z, zn1 call, w50 eventListener) {
Intrinsics.checkNotNullParameter(call, "call");
Intrinsics.checkNotNullParameter(eventListener, "eventListener");
if (this.f == null) {
List<rr> b2 = this.b.a().b();
sr srVar = new sr(b2);
if (this.b.a().j() == null) {
if (b2.contains(rr.f)) {
String g = this.b.a().k().g();
int i4 = rh1.c;
if (!rh1.a.a().a(g)) {
throw new xs1(new UnknownServiceException("CLEARTEXT communication to " + g + " not permitted by network security policy"));
}
} else {
throw new xs1(new UnknownServiceException("CLEARTEXT communication not enabled for client"));
}
} else if (this.b.a().e().contains(mm1.h)) {
throw new xs1(new UnknownServiceException("H2_PRIOR_KNOWLEDGE cannot be used with HTTPS"));
}
xs1 xs1Var = null;
do {
try {
if (this.b.c()) {
a(i, i2, i3, call, eventListener);
if (this.c == null) {
if (!this.b.c() && this.c == null) {
throw new xs1(new ProtocolException("Too many tunnel connections attempted: 21"));
}
this.q = System.nanoTime();
return;
}
} else {
a(i, i2, call, eventListener);
}
a(srVar, call, eventListener);
InetSocketAddress d = this.b.d();
Proxy b3 = this.b.b();
eventListener.getClass();
w50.a(call, d, b3);
if (!this.b.c()) {
}
this.q = System.nanoTime();
return;
} catch (IOException e) {
Socket socket = this.d;
if (socket != null) {
g92.a(socket);
}
Socket socket2 = this.c;
if (socket2 != null) {
g92.a(socket2);
}
this.d = null;
this.c = null;
this.h = null;
this.i = null;
this.e = null;
this.f = null;
this.g = null;
this.o = 1;
InetSocketAddress d2 = this.b.d();
Proxy b4 = this.b.b();
eventListener.getClass();
w50.a(call, d2, b4, e);
if (xs1Var == null) {
xs1Var = new xs1(e);
} else {
xs1Var.a(e);
}
if (!z) {
throw xs1Var;
}
}
} while (srVar.a(e));
throw xs1Var;
}
throw new IllegalStateException("already connected");
}
private final void a(int i, int i2, zn1 zn1Var, w50 w50Var) throws IOException {
Socket createSocket;
Proxy b2 = this.b.b();
ab a2 = this.b.a();
Proxy.Type type = b2.type();
int i3 = type == null ? -1 : a.a[type.ordinal()];
if (i3 != 1 && i3 != 2) {
createSocket = new Socket(b2);
} else {
createSocket = a2.i().createSocket();
Intrinsics.checkNotNull(createSocket);
}
this.c = createSocket;
InetSocketAddress d = this.b.d();
w50Var.getClass();
w50.b(zn1Var, d, b2);
createSocket.setSoTimeout(i2);
try {
int i4 = rh1.c;
rh1.a.a().a(createSocket, this.b.d(), i);
try {
this.h = wf.f0.d(wf.f0.l(createSocket));
this.i = wf.f0.c(wf.f0.h(createSocket));
} catch (NullPointerException e) {
if (Intrinsics.areEqual(e.getMessage(), "throw with null exception")) {
throw new IOException(e);
}
}
} catch (ConnectException e2) {
ConnectException connectException = new ConnectException("Failed to connect to " + this.b.d());
connectException.initCause(e2);
throw connectException;
}
}
private final void a(sr srVar) throws IOException {
mm1 mm1Var;
ab a2 = this.b.a();
SSLSocketFactory j = a2.j();
SSLSocket sSLSocket = null;
String str = null;
try {
Intrinsics.checkNotNull(j);
Socket createSocket = j.createSocket(this.c, a2.k().g(), a2.k().i(), true);
Intrinsics.checkNotNull(createSocket, "null cannot be cast to non-null type javax.net.ssl.SSLSocket");
SSLSocket sSLSocket2 = (SSLSocket) createSocket;
try {
rr a3 = srVar.a(sSLSocket2);
if (a3.b()) {
int i = rh1.c;
rh1.a.a().a(sSLSocket2, a2.k().g(), a2.e());
}
sSLSocket2.startHandshake();
SSLSession session = sSLSocket2.getSession();
Intrinsics.checkNotNull(session);
if0 a4 = if0.a.a(session);
HostnameVerifier d = a2.d();
Intrinsics.checkNotNull(d);
if (!d.verify(a2.k().g(), session)) {
List<Certificate> c2 = a4.c();
if (!c2.isEmpty()) {
Certificate certificate = c2.get(0);
Intrinsics.checkNotNull(certificate, "null cannot be cast to non-null type java.security.cert.X509Certificate");
X509Certificate x509Certificate = (X509Certificate) certificate;
String g = a2.k().g();
fo foVar = fo.c;
throw new SSLPeerUnverifiedException(StringsKt.trimMargin$default("\n |Hostname " + g + " not verified:\n | certificate: " + fo.b.a(x509Certificate) + "\n | DN: " + x509Certificate.getSubjectDN().getName() + "\n | subjectAltNames: " + ee1.a(x509Certificate) + "\n ", null, 1, null));
}
throw new SSLPeerUnverifiedException("Hostname " + a2.k().g() + " not verified (no certificates)");
}
fo a5 = a2.a();
Intrinsics.checkNotNull(a5);
this.e = new if0(a4.d(), a4.a(), a4.b(), new b(a5, a4, a2));
a5.a(a2.k().g(), new c());
if (a3.b()) {
int i2 = rh1.c;
str = rh1.a.a().b(sSLSocket2);
}
this.d = sSLSocket2;
this.h = wf.f0.d(wf.f0.l(sSLSocket2));
this.i = wf.f0.c(wf.f0.h(sSLSocket2));
if (str != null) {
mm1.c.getClass();
mm1Var = mm1.a.a(str);
} else {
mm1Var = mm1.e;
}
this.f = mm1Var;
int i3 = rh1.c;
rh1.a.a().a(sSLSocket2);
} catch (Throwable th) {
th = th;
sSLSocket = sSLSocket2;
if (sSLSocket != null) {
int i4 = rh1.c;
rh1.a.a().a(sSLSocket);
}
if (sSLSocket != null) {
g92.a((Socket) sSLSocket);
}
throw th;
}
} catch (Throwable th2) {
th = th2;
}
}
private final void a(int i, int i2, int i3, zn1 call, w50 w50Var) throws IOException {
vp1 a2 = new vp1.a().a(this.b.a().k()).a("CONNECT", (yp1) null).b("Host", g92.a(this.b.a().k(), true)).b("Proxy-Connection", "Keep-Alive").b("User-Agent", "okhttp/4.9.3").a();
vp1 a3 = this.b.a().g().a(this.b, new vq1.a().a(a2).a(mm1.e).a(407).a("Preemptive Authenticate").a(g92.c).b(-1L).a(-1L).c().a());
if (a3 != null) {
a2 = a3;
}
gi0 g = a2.g();
for (int i4 = 0; i4 < 21; i4++) {
a(i, i2, call, w50Var);
a2 = a(i2, i3, a2, g);
if (a2 == null) {
return;
}
Socket socket = this.c;
if (socket != null) {
g92.a(socket);
}
this.c = null;
this.i = null;
this.h = null;
InetSocketAddress inetSocketAddress = this.b.d();
Proxy proxy = this.b.b();
Intrinsics.checkNotNullParameter(call, "call");
Intrinsics.checkNotNullParameter(inetSocketAddress, "inetSocketAddress");
Intrinsics.checkNotNullParameter(proxy, "proxy");
}
}
private final vp1 a(int i, int i2, vp1 vp1Var, gi0 gi0Var) throws IOException {
String str = "CONNECT " + g92.a(gi0Var, true) + " HTTP/1.1";
while (true) {
wf.g gVar = this.h;
Intrinsics.checkNotNull(gVar);
wf.f fVar = this.i;
Intrinsics.checkNotNull(fVar);
fh0 fh0Var = new fh0(null, this, gVar, fVar);
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
gVar.timeout().timeout(i, timeUnit);
fVar.timeout().timeout(i2, timeUnit);
fh0Var.a(vp1Var.d(), str);
fh0Var.a();
vq1.a a2 = fh0Var.a(false);
Intrinsics.checkNotNull(a2);
vq1 a3 = a2.a(vp1Var).a();
fh0Var.c(a3);
int d = a3.d();
if (d == 200) {
if (gVar.C().q0() && fVar.C().q0()) {
return null;
}
throw new IOException("TLS tunnel buffered too many bytes!");
}
if (d == 407) {
vp1 a4 = this.b.a().g().a(this.b, a3);
if (a4 != null) {
if (StringsKt.equals("close", vq1.a(a3, "Connection"), true)) {
return a4;
}
vp1Var = a4;
} else {
throw new IOException("Failed to authenticate with proxy");
}
} else {
throw new IOException("Unexpected response code for CONNECT: " + a3.d());
}
}
}
private final void a(sr srVar, zn1 call, w50 w50Var) throws IOException {
if (this.b.a().j() == null) {
List<mm1> e = this.b.a().e();
mm1 mm1Var = mm1.h;
if (e.contains(mm1Var)) {
this.d = this.c;
this.f = mm1Var;
n();
return;
} else {
this.d = this.c;
this.f = mm1.e;
return;
}
}
w50Var.getClass();
Intrinsics.checkNotNullParameter(call, "call");
a(srVar);
Intrinsics.checkNotNullParameter(call, "call");
if (this.f == mm1.g) {
n();
}
}
public final boolean a(com.yandex.mobile.ads.impl.ab r6, java.util.List<com.yandex.mobile.ads.impl.vs1> r7) {
throw new UnsupportedOperationException("Method not decompiled: com.yandex.mobile.ads.impl.ao1.a(com.yandex.mobile.ads.impl.ab, java.util.List):boolean");
}
public final c60 a(fe1 client, do1 chain) throws SocketException {
Intrinsics.checkNotNullParameter(client, "client");
Intrinsics.checkNotNullParameter(chain, "chain");
Socket socket = this.d;
Intrinsics.checkNotNull(socket);
wf.g gVar = this.h;
Intrinsics.checkNotNull(gVar);
wf.f fVar = this.i;
Intrinsics.checkNotNull(fVar);
hh0 hh0Var = this.g;
if (hh0Var != null) {
return new mh0(client, this, chain, hh0Var);
}
socket.setSoTimeout(chain.h());
wf.u0 timeout = gVar.timeout();
long e = chain.e();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
timeout.timeout(e, timeUnit);
fVar.timeout().timeout(chain.g(), timeUnit);
return new fh0(client, this, gVar, fVar);
}
@Override
public final synchronized void a(hh0 connection, zx1 settings) {
Intrinsics.checkNotNullParameter(connection, "connection");
Intrinsics.checkNotNullParameter(settings, "settings");
this.o = settings.c();
}
@Override
public final void a(oh0 stream) throws IOException {
Intrinsics.checkNotNullParameter(stream, "stream");
stream.a(t50.h, (IOException) null);
}
public final void a(long j) {
this.q = j;
}
public final synchronized void a(zn1 call, IOException failure) {
try {
Intrinsics.checkNotNullParameter(call, "call");
if (failure instanceof z22) {
t50 t50Var = ((z22) failure).b;
if (t50Var == t50.h) {
int i = this.n + 1;
this.n = i;
if (i > 1) {
this.j = true;
this.l++;
}
} else if (t50Var != t50.i || !call.j()) {
this.j = true;
this.l++;
}
} else if (!h() || (failure instanceof qr)) {
this.j = true;
if (this.m == 0) {
if (failure != null) {
fe1 client = call.c();
vs1 failedRoute = this.b;
Intrinsics.checkNotNullParameter(client, "client");
Intrinsics.checkNotNullParameter(failedRoute, "failedRoute");
Intrinsics.checkNotNullParameter(failure, "failure");
if (failedRoute.b().type() != Proxy.Type.DIRECT) {
ab a2 = failedRoute.a();
a2.h().connectFailed(a2.k().l(), failedRoute.b().address(), failure);
}
client.n().b(failedRoute);
}
this.l++;
}
}
} catch (Throwable th) {
throw th;
}
}
private final boolean a(gi0 gi0Var) {
if0 if0Var;
if (g92.f && !Thread.holdsLock(this)) {
throw new AssertionError("Thread " + Thread.currentThread().getName() + " MUST hold lock on " + this);
}
gi0 k = this.b.a().k();
if (gi0Var.i() != k.i()) {
return false;
}
if (Intrinsics.areEqual(gi0Var.g(), k.g())) {
return true;
}
if (this.k || (if0Var = this.e) == null) {
return false;
}
Intrinsics.checkNotNull(if0Var);
List<Certificate> c2 = if0Var.c();
if (c2.isEmpty()) {
return false;
}
String g = gi0Var.g();
Certificate certificate = c2.get(0);
Intrinsics.checkNotNull(certificate, "null cannot be cast to non-null type java.security.cert.X509Certificate");
return ee1.a(g, (X509Certificate) certificate);
}
public final boolean a(boolean z) {
long j;
if (g92.f && Thread.holdsLock(this)) {
throw new AssertionError("Thread " + Thread.currentThread().getName() + " MUST NOT hold lock on " + this);
}
long nanoTime = System.nanoTime();
Socket socket = this.c;
Intrinsics.checkNotNull(socket);
Socket socket2 = this.d;
Intrinsics.checkNotNull(socket2);
wf.g gVar = this.h;
Intrinsics.checkNotNull(gVar);
if (socket.isClosed() || socket2.isClosed() || socket2.isInputShutdown() || socket2.isOutputShutdown()) {
return false;
}
hh0 hh0Var = this.g;
if (hh0Var != null) {
return hh0Var.a(nanoTime);
}
synchronized (this) {
j = nanoTime - this.q;
}
if (j < 10000000000L || !z) {
return true;
}
return g92.a(socket2, gVar);
}
}