2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lokhttp3/internal/g/b;
|
|
|
|
.super Lokhttp3/internal/g/f;
|
|
|
|
.source "ConscryptPlatform.java"
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method private constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lokhttp3/internal/g/f;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
.method private static GO()Ljava/security/Provider;
|
2019-10-09 23:16:36 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-static {}, Lorg/conscrypt/Conscrypt;->newProviderBuilder()Lorg/conscrypt/Conscrypt$ProviderBuilder;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lorg/conscrypt/Conscrypt$ProviderBuilder;->provideTrustManager()Lorg/conscrypt/Conscrypt$ProviderBuilder;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lorg/conscrypt/Conscrypt$ProviderBuilder;->build()Ljava/security/Provider;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
.method public static GP()Lokhttp3/internal/g/b;
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v1, "org.conscrypt.Conscrypt"
|
|
|
|
|
|
|
|
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
|
|
|
|
invoke-static {}, Lorg/conscrypt/Conscrypt;->isAvailable()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v1, Lokhttp3/internal/g/b;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Lokhttp3/internal/g/b;-><init>()V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2019-10-11 21:55:41 +00:00
|
|
|
.method public final GM()Ljavax/net/ssl/SSLContext;
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 3
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v0, "TLSv1.3"
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-static {}, Lokhttp3/internal/g/b;->GO()Ljava/security/Provider;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;Ljava/security/Provider;)Ljavax/net/ssl/SSLContext;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
const-string v1, "TLS"
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-static {}, Lokhttp3/internal/g/b;->GO()Ljava/security/Provider;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;Ljava/security/Provider;)Ljavax/net/ssl/SSLContext;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
new-instance v1, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string v2, "No TLS provider"
|
|
|
|
|
|
|
|
invoke-direct {v1, v2, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final a(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lokhttp3/u;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->isConscrypt(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lorg/conscrypt/Conscrypt;->setUseSessionTickets(Ljavax/net/ssl/SSLSocket;Z)V
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lorg/conscrypt/Conscrypt;->setHostname(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
:cond_0
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p3}, Lokhttp3/internal/g/f;->X(Ljava/util/List;)Ljava/util/List;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
new-array p3, p3, [Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-interface {p2, p3}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, [Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lorg/conscrypt/Conscrypt;->setApplicationProtocols(Ljavax/net/ssl/SSLSocket;[Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-super {p0, p1, p2, p3}, Lokhttp3/internal/g/f;->a(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final b(Ljavax/net/ssl/SSLSocketFactory;)Ljavax/net/ssl/X509TrustManager;
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Ljavax/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->isConscrypt(Ljavax/net/ssl/SSLSocketFactory;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Lokhttp3/internal/g/f;->b(Ljavax/net/ssl/SSLSocketFactory;)Ljavax/net/ssl/X509TrustManager;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_0
|
|
|
|
const-class v0, Ljava/lang/Object;
|
|
|
|
|
|
|
|
const-string v1, "sslParameters"
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v1}, Lokhttp3/internal/g/b;->a(Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
const-class v0, Ljavax/net/ssl/X509TrustManager;
|
|
|
|
|
|
|
|
const-string v1, "x509TrustManager"
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v1}, Lokhttp3/internal/g/b;->a(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/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
|
|
|
|
const-string v1, "clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on Conscrypt"
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final c(Ljavax/net/ssl/SSLSocketFactory;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->isConscrypt(Ljavax/net/ssl/SSLSocketFactory;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lorg/conscrypt/Conscrypt;->setUseEngineSocket(Ljavax/net/ssl/SSLSocketFactory;Z)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final e(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Ljavax/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->isConscrypt(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->getApplicationProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-super {p0, p1}, Lokhttp3/internal/g/f;->e(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|