308 lines
8.6 KiB
Smali
308 lines
8.6 KiB
Smali
.class public Lokhttp3/internal/platform/Jdk9Platform;
|
|
.super Lokhttp3/internal/platform/Platform;
|
|
.source "Jdk9Platform.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/platform/Jdk9Platform$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nJdk9Platform.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Jdk9Platform.kt\nokhttp3/internal/platform/Jdk9Platform\n+ 2 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,89:1\n37#2,2:90\n*E\n*S KotlinDebug\n*F\n+ 1 Jdk9Platform.kt\nokhttp3/internal/platform/Jdk9Platform\n*L\n36#1,2:90\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {}
|
|
d1 = {
|
|
"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0005\u0008\u0016\u0018\u0000 \u00132\u00020\u0001:\u0001\u0013B\u0007\u00a2\u0006\u0004\u0008\u0011\u0010\u0012J-\u0010\u000b\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\u00022\u0008\u0010\u0005\u001a\u0004\u0018\u00010\u00042\u0011\u0010\t\u001a\r\u0012\t\u0012\u00070\u0007\u00a2\u0006\u0002\u0008\u00080\u0006H\u0017J\u0012\u0010\u000c\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0017J\u0012\u0010\u0010\u001a\u0004\u0018\u00010\u000f2\u0006\u0010\u000e\u001a\u00020\rH\u0016\u00a8\u0006\u0014"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/platform/Jdk9Platform;",
|
|
"Lokhttp3/internal/platform/Platform;",
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
"sslSocket",
|
|
"",
|
|
"hostname",
|
|
"",
|
|
"Lokhttp3/Protocol;",
|
|
"Lkotlin/jvm/JvmSuppressWildcards;",
|
|
"protocols",
|
|
"Lkotlin/d1;",
|
|
"configureTlsExtensions",
|
|
"getSelectedProtocol",
|
|
"Ljavax/net/ssl/SSLSocketFactory;",
|
|
"sslSocketFactory",
|
|
"Ljavax/net/ssl/X509TrustManager;",
|
|
"trustManager",
|
|
"<init>",
|
|
"()V",
|
|
"Companion",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lokhttp3/internal/platform/Jdk9Platform$Companion;
|
|
|
|
.field private static final isAvailable:Z
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
new-instance v0, Lokhttp3/internal/platform/Jdk9Platform$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/platform/Jdk9Platform$Companion;-><init>(Lkotlin/jvm/internal/u;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/platform/Jdk9Platform;->Companion:Lokhttp3/internal/platform/Jdk9Platform$Companion;
|
|
|
|
const-string v0, "java.specification.version"
|
|
|
|
.line 1
|
|
invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {v0}, Lkotlin/text/t;->X0(Ljava/lang/String;)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 3
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
const/16 v3, 0x9
|
|
|
|
if-lt v1, v3, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
:cond_1
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_2
|
|
:try_start_0
|
|
const-class v1, Ljavax/net/ssl/SSLSocket;
|
|
|
|
const-string v3, "getApplicationProtocol"
|
|
|
|
new-array v4, v2, [Ljava/lang/Class;
|
|
|
|
invoke-virtual {v1, v3, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
:try_end_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 5
|
|
:goto_0
|
|
sput-boolean v0, Lokhttp3/internal/platform/Jdk9Platform;->isAvailable:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lokhttp3/internal/platform/Platform;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$isAvailable$cp()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-boolean v0, Lokhttp3/internal/platform/Jdk9Platform;->isAvailable:Z
|
|
|
|
return v0
|
|
.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 system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/Protocol;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lokhttp3/internal/SuppressSignatureCheck;
|
|
.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
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getSSLParameters()Ljavax/net/ssl/SSLParameters;
|
|
|
|
move-result-object p2
|
|
|
|
.line 2
|
|
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-string v0, "sslParameters"
|
|
|
|
.line 3
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
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
|
|
|
|
const-string v0, "null cannot be cast to non-null type kotlin.Array<T>"
|
|
|
|
invoke-static {p3, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
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
|
|
.end method
|
|
|
|
.method public getSelectedProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
.locals 2
|
|
.param p1 # Ljavax/net/ssl/SSLSocket;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lokhttp3/internal/SuppressSignatureCheck;
|
|
.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
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
:try_start_0
|
|
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getApplicationProtocol()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string v1, ""
|
|
|
|
.line 2
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
:try_end_0
|
|
.catch Ljava/lang/UnsupportedOperationException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
move-object v0, p1
|
|
|
|
:catch_0
|
|
:goto_1
|
|
return-object v0
|
|
.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
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v0, "clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on JDK 9+"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|