801 lines
24 KiB
Smali
801 lines
24 KiB
Smali
.class public Lokhttp3/internal/platform/Platform;
|
|
.super Ljava/lang/Object;
|
|
.source "Platform.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/platform/Platform$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {}
|
|
d1 = {
|
|
"\u0000r\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0004\n\u0002\u0010\u0003\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0007\u0008\u0016\u0018\u0000 02\u00020\u0001:\u00010B\u0007\u00a2\u0006\u0004\u0008.\u0010/J\u0006\u0010\u0003\u001a\u00020\u0002J\u0008\u0010\u0005\u001a\u00020\u0004H\u0016J\u0008\u0010\u0007\u001a\u00020\u0006H\u0016J\u0012\u0010\n\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\u0008H\u0016J-\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u000c\u001a\u00020\u000b2\u0008\u0010\r\u001a\u0004\u0018\u00010\u00022\u0011\u0010\u0011\u001a\r\u0012\t\u0012\u00070\u000f\u00a2\u0006\u0002\u0008\u00100\u000eH\u0016J\u0010\u0010\u0014\u001a\u00020\u00122\u0006\u0010\u000c\u001a\u00020\u000bH\u0016J\u0012\u0010\u0015\u001a\u0004\u0018\u00010\u00022\u0006\u0010\u000c\u001a\u00020\u000bH\u0016J \u0010\u001c\u001a\u00020\u00122\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u001b\u001a\u00020\u001aH\u0016J&\u0010!\u001a\u00020\u00122\u0006\u0010\u001d\u001a\u00020\u00022\u0008\u0008\u0002\u0010\u001e\u001a\u00020\u001a2\n\u0008\u0002\u0010 \u001a\u0004\u0018\u00010\u001fH\u0016J\u0010\u0010#\u001a\u00020\"2\u0006\u0010\r\u001a\u00020\u0002H\u0016J\u0012\u0010%\u001a\u0004\u0018\u00010\u00012\u0006\u0010$\u001a\u00020\u0002H\u0016J\u001a\u0010\'\u001a\u00020\u00122\u0006\u0010\u001d\u001a\u00020\u00022\u0008\u0010&\u001a\u0004\u0018\u00010\u0001H\u0016J\u0010\u0010)\u001a\u00020(2\u0006\u0010\n\u001a\u00020\u0006H\u0016J\u0010\u0010+\u001a\u00020*2\u0006\u0010\n\u001a\u00020\u0006H\u0016J\u0010\u0010,\u001a\u00020\u00082\u0006\u0010\n\u001a\u00020\u0006H\u0016J\u0008\u0010-\u001a\u00020\u0002H\u0016\u00a8\u00061"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/platform/Platform;",
|
|
"",
|
|
"",
|
|
"getPrefix",
|
|
"Ljavax/net/ssl/SSLContext;",
|
|
"newSSLContext",
|
|
"Ljavax/net/ssl/X509TrustManager;",
|
|
"platformTrustManager",
|
|
"Ljavax/net/ssl/SSLSocketFactory;",
|
|
"sslSocketFactory",
|
|
"trustManager",
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
"sslSocket",
|
|
"hostname",
|
|
"",
|
|
"Lokhttp3/Protocol;",
|
|
"Lkotlin/jvm/JvmSuppressWildcards;",
|
|
"protocols",
|
|
"Lkotlin/d1;",
|
|
"configureTlsExtensions",
|
|
"afterHandshake",
|
|
"getSelectedProtocol",
|
|
"Ljava/net/Socket;",
|
|
"socket",
|
|
"Ljava/net/InetSocketAddress;",
|
|
"address",
|
|
"",
|
|
"connectTimeout",
|
|
"connectSocket",
|
|
"message",
|
|
"level",
|
|
"",
|
|
"t",
|
|
"log",
|
|
"",
|
|
"isCleartextTrafficPermitted",
|
|
"closer",
|
|
"getStackTraceForCloseable",
|
|
"stackTrace",
|
|
"logCloseableLeak",
|
|
"Lokhttp3/internal/tls/CertificateChainCleaner;",
|
|
"buildCertificateChainCleaner",
|
|
"Lokhttp3/internal/tls/TrustRootIndex;",
|
|
"buildTrustRootIndex",
|
|
"newSslSocketFactory",
|
|
"toString",
|
|
"<init>",
|
|
"()V",
|
|
"Companion",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lokhttp3/internal/platform/Platform$Companion;
|
|
|
|
.field public static final INFO:I = 0x4
|
|
|
|
.field public static final WARN:I = 0x5
|
|
|
|
.field private static final logger:Ljava/util/logging/Logger;
|
|
|
|
.field private static volatile platform:Lokhttp3/internal/platform/Platform;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lokhttp3/internal/platform/Platform$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/platform/Platform$Companion;-><init>(Lkotlin/jvm/internal/u;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/platform/Platform;->Companion:Lokhttp3/internal/platform/Platform$Companion;
|
|
|
|
.line 1
|
|
invoke-static {v0}, Lokhttp3/internal/platform/Platform$Companion;->access$findPlatform(Lokhttp3/internal/platform/Platform$Companion;)Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/platform/Platform;->platform:Lokhttp3/internal/platform/Platform;
|
|
|
|
.line 2
|
|
const-class v0, Lokhttp3/OkHttpClient;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/platform/Platform;->logger:Ljava/util/logging/Logger;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getPlatform$cp()Lokhttp3/internal/platform/Platform;
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lokhttp3/internal/platform/Platform;->platform:Lokhttp3/internal/platform/Platform;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setPlatform$cp(Lokhttp3/internal/platform/Platform;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
sput-object p0, Lokhttp3/internal/platform/Platform;->platform:Lokhttp3/internal/platform/Platform;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final get()Lokhttp3/internal/platform/Platform;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
sget-object v0, Lokhttp3/internal/platform/Platform;->Companion:Lokhttp3/internal/platform/Platform$Companion;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/platform/Platform$Companion;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic log$default(Lokhttp3/internal/platform/Platform;Ljava/lang/String;ILjava/lang/Throwable;ILjava/lang/Object;)V
|
|
.locals 1
|
|
|
|
if-nez p5, :cond_2
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
move p2, v0
|
|
|
|
:cond_0
|
|
and-int/2addr p4, v0
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
.line 1
|
|
:cond_1
|
|
invoke-virtual {p0, p1, p2, p3}, Lokhttp3/internal/platform/Platform;->log(Ljava/lang/String;ILjava/lang/Throwable;)V
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_2
|
|
new-instance p0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string p1, "Super calls with default arguments not supported in this target, function: log"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public afterHandshake(Ljavax/net/ssl/SSLSocket;)V
|
|
.locals 1
|
|
.param p1 # Ljavax/net/ssl/SSLSocket;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "sslSocket"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public buildCertificateChainCleaner(Ljavax/net/ssl/X509TrustManager;)Lokhttp3/internal/tls/CertificateChainCleaner;
|
|
.locals 1
|
|
.param p1 # Ljavax/net/ssl/X509TrustManager;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "trustManager"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
new-instance v0, Lokhttp3/internal/tls/BasicCertificateChainCleaner;
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/internal/platform/Platform;->buildTrustRootIndex(Ljavax/net/ssl/X509TrustManager;)Lokhttp3/internal/tls/TrustRootIndex;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Lokhttp3/internal/tls/BasicCertificateChainCleaner;-><init>(Lokhttp3/internal/tls/TrustRootIndex;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public buildTrustRootIndex(Ljavax/net/ssl/X509TrustManager;)Lokhttp3/internal/tls/TrustRootIndex;
|
|
.locals 2
|
|
.param p1 # Ljavax/net/ssl/X509TrustManager;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "trustManager"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
new-instance v0, Lokhttp3/internal/tls/BasicTrustRootIndex;
|
|
|
|
invoke-interface {p1}, Ljavax/net/ssl/X509TrustManager;->getAcceptedIssuers()[Ljava/security/cert/X509Certificate;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "trustManager.acceptedIssuers"
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
array-length v1, p1
|
|
|
|
invoke-static {p1, v1}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, [Ljava/security/cert/X509Certificate;
|
|
|
|
invoke-direct {v0, p1}, Lokhttp3/internal/tls/BasicTrustRootIndex;-><init>([Ljava/security/cert/X509Certificate;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public configureTlsExtensions(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
|
|
.locals 0
|
|
.param p1 # Ljavax/net/ssl/SSLSocket;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Ljava/util/List;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/Protocol;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string p2, "sslSocket"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string p1, "protocols"
|
|
|
|
invoke-static {p3, p1}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public connectSocket(Ljava/net/Socket;Ljava/net/InetSocketAddress;I)V
|
|
.locals 1
|
|
.param p1 # Ljava/net/Socket;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/net/InetSocketAddress;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "socket"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "address"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
invoke-virtual {p1, p2, p3}, Ljava/net/Socket;->connect(Ljava/net/SocketAddress;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getPrefix()Ljava/lang/String;
|
|
.locals 1
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "OkHttp"
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getSelectedProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
.locals 1
|
|
.param p1 # Ljavax/net/ssl/SSLSocket;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
|
|
const-string v0, "sslSocket"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getStackTraceForCloseable(Ljava/lang/String;)Ljava/lang/Object;
|
|
.locals 2
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
|
|
const-string v0, "closer"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
sget-object v0, Lokhttp3/internal/platform/Platform;->logger:Ljava/util/logging/Logger;
|
|
|
|
sget-object v1, Ljava/util/logging/Level;->FINE:Ljava/util/logging/Level;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/logging/Logger;->isLoggable(Ljava/util/logging/Level;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v0, Ljava/lang/Throwable;
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/Throwable;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isCleartextTrafficPermitted(Ljava/lang/String;)Z
|
|
.locals 1
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "hostname"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public log(Ljava/lang/String;ILjava/lang/Throwable;)V
|
|
.locals 1
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Ljava/lang/Throwable;
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "message"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x5
|
|
|
|
if-ne p2, v0, :cond_0
|
|
|
|
.line 1
|
|
sget-object p2, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object p2, Ljava/util/logging/Level;->INFO:Ljava/util/logging/Level;
|
|
|
|
.line 2
|
|
:goto_0
|
|
sget-object v0, Lokhttp3/internal/platform/Platform;->logger:Ljava/util/logging/Logger;
|
|
|
|
invoke-virtual {v0, p2, p1, p3}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public logCloseableLeak(Ljava/lang/String;Ljava/lang/Object;)V
|
|
.locals 1
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "message"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
const-string v0, " To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x5
|
|
|
|
.line 2
|
|
check-cast p2, Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {p0, p1, v0, p2}, Lokhttp3/internal/platform/Platform;->log(Ljava/lang/String;ILjava/lang/Throwable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public newSSLContext()Ljavax/net/ssl/SSLContext;
|
|
.locals 2
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "TLS"
|
|
|
|
.line 1
|
|
invoke-static {v0}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "SSLContext.getInstance(\"TLS\")"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public newSslSocketFactory(Ljavax/net/ssl/X509TrustManager;)Ljavax/net/ssl/SSLSocketFactory;
|
|
.locals 3
|
|
.param p1 # Ljavax/net/ssl/X509TrustManager;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "trustManager"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
:try_start_0
|
|
invoke-virtual {p0}, Lokhttp3/internal/platform/Platform;->newSSLContext()Ljavax/net/ssl/SSLContext;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljavax/net/ssl/TrustManager;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p1, v1, v2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {v0, p1, v1, p1}, Ljavax/net/ssl/SSLContext;->init([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V
|
|
|
|
.line 3
|
|
invoke-virtual {v0}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "newSSLContext().apply {\n\u2026ll)\n }.socketFactory"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/security/GeneralSecurityException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 4
|
|
new-instance v0, Ljava/lang/AssertionError;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "No System TLS: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public platformTrustManager()Ljavax/net/ssl/X509TrustManager;
|
|
.locals 4
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-static {}, Ljavax/net/ssl/TrustManagerFactory;->getDefaultAlgorithm()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
invoke-static {v0}, Ljavax/net/ssl/TrustManagerFactory;->getInstance(Ljava/lang/String;)Ljavax/net/ssl/TrustManagerFactory;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 3
|
|
invoke-virtual {v0, v1}, Ljavax/net/ssl/TrustManagerFactory;->init(Ljava/security/KeyStore;)V
|
|
|
|
const-string v1, "factory"
|
|
|
|
.line 4
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljavax/net/ssl/TrustManagerFactory;->getTrustManagers()[Ljavax/net/ssl/TrustManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lkotlin/jvm/internal/f0;->m(Ljava/lang/Object;)V
|
|
|
|
.line 5
|
|
array-length v1, v0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
aget-object v1, v0, v3
|
|
|
|
instance-of v1, v1, Ljavax/net/ssl/X509TrustManager;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v2, v3
|
|
|
|
:goto_0
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 6
|
|
aget-object v0, v0, v3
|
|
|
|
const-string v1, "null cannot be cast to non-null type javax.net.ssl.X509TrustManager"
|
|
|
|
invoke-static {v0, v1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
check-cast v0, Ljavax/net/ssl/X509TrustManager;
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
const-string v1, "Unexpected default trust managers: "
|
|
|
|
.line 7
|
|
invoke-static {v1}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "java.util.Arrays.toString(this)"
|
|
|
|
invoke-static {v0, v2}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 8
|
|
new-instance v1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "javaClass.simpleName"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public trustManager(Ljavax/net/ssl/SSLSocketFactory;)Ljavax/net/ssl/X509TrustManager;
|
|
.locals 3
|
|
.param p1 # Ljavax/net/ssl/SSLSocketFactory;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
|
|
const-string v0, "sslSocketFactory"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
const-string v1, "sun.security.ssl.SSLContextImpl"
|
|
|
|
.line 1
|
|
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "sslContextClass"
|
|
|
|
.line 2
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v2, "context"
|
|
|
|
invoke-static {p1, v1, v2}, Lokhttp3/internal/Util;->readFieldOrNull(Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 3
|
|
const-class v1, Ljavax/net/ssl/X509TrustManager;
|
|
|
|
const-string v2, "trustManager"
|
|
|
|
invoke-static {p1, v1, v2}, Lokhttp3/internal/Util;->readFieldOrNull(Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljavax/net/ssl/X509TrustManager;
|
|
:try_end_0
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
move-object v0, p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 4
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "java.lang.reflect.InaccessibleObjectException"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/f0;->g(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
xor-int/lit8 v1, v1, 0x1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_1
|
|
throw p1
|
|
|
|
:catch_1
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|