327 lines
9.6 KiB
Smali
327 lines
9.6 KiB
Smali
.class public final Lokhttp3/internal/platform/android/Android10SocketAdapter;
|
|
.super Ljava/lang/Object;
|
|
.source "Android10SocketAdapter.kt"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/internal/platform/android/SocketAdapter;
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/platform/android/Android10SocketAdapter$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nAndroid10SocketAdapter.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Android10SocketAdapter.kt\nokhttp3/internal/platform/android/Android10SocketAdapter\n+ 2 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,77:1\n37#2,2:78\n*E\n*S KotlinDebug\n*F\n+ 1 Android10SocketAdapter.kt\nokhttp3/internal/platform/android/Android10SocketAdapter\n*L\n60#1,2:78\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {}
|
|
d1 = {
|
|
"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0002\u0008\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0005\u0008\u0007\u0018\u0000 \u00112\u00020\u0001:\u0001\u0011B\u0007\u00a2\u0006\u0004\u0008\u000f\u0010\u0010J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016J\u0008\u0010\u0006\u001a\u00020\u0004H\u0016J\u0012\u0010\u0008\u001a\u0004\u0018\u00010\u00072\u0006\u0010\u0003\u001a\u00020\u0002H\u0017J(\u0010\u000e\u001a\u00020\r2\u0006\u0010\u0003\u001a\u00020\u00022\u0008\u0010\t\u001a\u0004\u0018\u00010\u00072\u000c\u0010\u000c\u001a\u0008\u0012\u0004\u0012\u00020\u000b0\nH\u0017\u00a8\u0006\u0012"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/platform/android/Android10SocketAdapter;",
|
|
"Lokhttp3/internal/platform/android/SocketAdapter;",
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
"sslSocket",
|
|
"",
|
|
"matchesSocket",
|
|
"isSupported",
|
|
"",
|
|
"getSelectedProtocol",
|
|
"hostname",
|
|
"",
|
|
"Lokhttp3/Protocol;",
|
|
"protocols",
|
|
"Lkotlin/d1;",
|
|
"configureTlsExtensions",
|
|
"<init>",
|
|
"()V",
|
|
"Companion",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lokhttp3/internal/SuppressSignatureCheck;
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lokhttp3/internal/platform/android/Android10SocketAdapter$Companion;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lokhttp3/internal/platform/android/Android10SocketAdapter$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/platform/android/Android10SocketAdapter$Companion;-><init>(Lkotlin/jvm/internal/u;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/platform/android/Android10SocketAdapter;->Companion:Lokhttp3/internal/platform/android/Android10SocketAdapter$Companion;
|
|
|
|
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
|
|
|
|
|
|
# virtual methods
|
|
.method public configureTlsExtensions(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
|
|
.locals 1
|
|
.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 build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
.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 p2, "protocols"
|
|
|
|
invoke-static {p3, p2}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 p2, 0x1
|
|
|
|
.line 1
|
|
:try_start_0
|
|
invoke-static {p1, p2}, Landroid/net/ssl/SSLSockets;->setUseSessionTickets(Ljavax/net/ssl/SSLSocket;Z)V
|
|
|
|
.line 2
|
|
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getSSLParameters()Ljavax/net/ssl/SSLParameters;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "sslParameters"
|
|
|
|
.line 3
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lokhttp3/internal/platform/Platform;->Companion:Lokhttp3/internal/platform/Platform$Companion;
|
|
|
|
invoke-virtual {v0, p3}, Lokhttp3/internal/platform/Platform$Companion;->alpnProtocolNames(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object p3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
.line 4
|
|
invoke-interface {p3, v0}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
check-cast p3, [Ljava/lang/String;
|
|
|
|
invoke-virtual {p2, p3}, Ljavax/net/ssl/SSLParameters;->setApplicationProtocols([Ljava/lang/String;)V
|
|
|
|
.line 5
|
|
invoke-virtual {p1, p2}, Ljavax/net/ssl/SSLSocket;->setSSLParameters(Ljavax/net/ssl/SSLParameters;)V
|
|
|
|
return-void
|
|
|
|
.line 6
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string p2, "null cannot be cast to non-null type kotlin.Array<T>"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 7
|
|
new-instance p2, Ljava/io/IOException;
|
|
|
|
const-string p3, "Android internal error"
|
|
|
|
invoke-direct {p2, p3, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw p2
|
|
.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 Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
.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
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getApplicationProtocol()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string v0, ""
|
|
|
|
.line 2
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
:goto_0
|
|
const/4 p1, 0x0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public isSupported()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lokhttp3/internal/platform/android/Android10SocketAdapter;->Companion:Lokhttp3/internal/platform/android/Android10SocketAdapter$Companion;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/platform/android/Android10SocketAdapter$Companion;->isSupported()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public matchesSocket(Ljavax/net/ssl/SSLSocket;)Z
|
|
.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
|
|
|
|
.line 1
|
|
invoke-static {p1}, Landroid/net/ssl/SSLSockets;->isSupportedSocket(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public matchesSocketFactory(Ljavax/net/ssl/SSLSocketFactory;)Z
|
|
.locals 1
|
|
.param p1 # Ljavax/net/ssl/SSLSocketFactory;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "sslSocketFactory"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
invoke-static {p0, p1}, Lokhttp3/internal/platform/android/SocketAdapter$DefaultImpls;->matchesSocketFactory(Lokhttp3/internal/platform/android/SocketAdapter;Ljavax/net/ssl/SSLSocketFactory;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public trustManager(Ljavax/net/ssl/SSLSocketFactory;)Ljavax/net/ssl/X509TrustManager;
|
|
.locals 1
|
|
.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
|
|
|
|
.line 1
|
|
invoke-static {p0, p1}, Lokhttp3/internal/platform/android/SocketAdapter$DefaultImpls;->trustManager(Lokhttp3/internal/platform/android/SocketAdapter;Ljavax/net/ssl/SSLSocketFactory;)Ljavax/net/ssl/X509TrustManager;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|