257 lines
6.2 KiB
Smali
257 lines
6.2 KiB
Smali
.class public final Lo0/g0/h/d;
|
|
.super Lo0/g0/h/f;
|
|
.source "Jdk9Platform.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Ljava/lang/reflect/Method;
|
|
|
|
.field public final e:Ljava/lang/reflect/Method;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
|
|
.locals 1
|
|
|
|
const-string v0, "setProtocolMethod"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "getProtocolMethod"
|
|
|
|
invoke-static {p2, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lo0/g0/h/f;-><init>()V
|
|
|
|
iput-object p1, p0, Lo0/g0/h/d;->d:Ljava/lang/reflect/Method;
|
|
|
|
iput-object p2, p0, Lo0/g0/h/d;->e:Ljava/lang/reflect/Method;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public e(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lo0/y;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string p2, "failed to set SSL parameters"
|
|
|
|
const-string v0, "sslSocket"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "protocols"
|
|
|
|
invoke-static {p3, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getSSLParameters()Ljavax/net/ssl/SSLParameters;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p3, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p3
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v5, v2
|
|
|
|
check-cast v5, Lo0/y;
|
|
|
|
sget-object v6, Lo0/y;->d:Lo0/y;
|
|
|
|
if-eq v5, v6, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v3, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
new-instance p3, Ljava/util/ArrayList;
|
|
|
|
const/16 v2, 0xa
|
|
|
|
invoke-static {v0, v2}, Lf/n/a/k/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {p3, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_2
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lo0/y;
|
|
|
|
iget-object v2, v2, Lo0/y;->protocol:Ljava/lang/String;
|
|
|
|
invoke-virtual {p3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
iget-object v0, p0, Lo0/g0/h/d;->d:Ljava/lang/reflect/Method;
|
|
|
|
new-array v2, v3, [Ljava/lang/Object;
|
|
|
|
new-array v3, v4, [Ljava/lang/String;
|
|
|
|
invoke-virtual {p3, v3}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p3, :cond_4
|
|
|
|
aput-object p3, v2, v4
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-virtual {p1, v1}, Ljavax/net/ssl/SSLSocket;->setSSLParameters(Ljavax/net/ssl/SSLParameters;)V
|
|
|
|
return-void
|
|
|
|
:cond_4
|
|
new-instance p1, Lkotlin/TypeCastException;
|
|
|
|
const-string p3, "null cannot be cast to non-null type kotlin.Array<T>"
|
|
|
|
invoke-direct {p1, p3}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
new-instance p3, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {p3, p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw p3
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
new-instance p3, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {p3, p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw p3
|
|
.end method
|
|
|
|
.method public h(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const-string v0, "failed to get ALPN selected protocol"
|
|
|
|
const-string v1, "socket"
|
|
|
|
invoke-static {p1, v1}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lo0/g0/h/d;->e:Ljava/lang/reflect/Method;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v1, p1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/String;
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, ""
|
|
|
|
invoke-static {p1, v1}, Lk0/o/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:goto_0
|
|
const/4 p1, 0x0
|
|
|
|
:cond_1
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
new-instance v1, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v1
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
new-instance v1, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v1
|
|
.end method
|