apkfuckery/com.discord/smali/okhttp3/r.smali

427 lines
9.9 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public final Lokhttp3/r;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "Handshake.java"
2019-02-04 20:08:30 +00:00
# instance fields
2019-02-27 00:16:35 +00:00
.field private final bml:Lokhttp3/z;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
.field public final bmm:Lokhttp3/h;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
.field public final bmn:Ljava/util/List;
2019-02-04 20:08:30 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/security/cert/Certificate;",
">;"
}
.end annotation
.end field
2019-02-27 00:16:35 +00:00
.field private final bmo:Ljava/util/List;
2019-02-04 20:08:30 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/security/cert/Certificate;",
">;"
}
.end annotation
.end field
# direct methods
.method private constructor <init>(Lokhttp3/z;Lokhttp3/h;Ljava/util/List;Ljava/util/List;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lokhttp3/z;",
"Lokhttp3/h;",
"Ljava/util/List<",
"Ljava/security/cert/Certificate;",
">;",
"Ljava/util/List<",
"Ljava/security/cert/Certificate;",
">;)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2019-02-27 00:16:35 +00:00
iput-object p1, p0, Lokhttp3/r;->bml:Lokhttp3/z;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
iput-object p2, p0, Lokhttp3/r;->bmm:Lokhttp3/h;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
iput-object p3, p0, Lokhttp3/r;->bmn:Ljava/util/List;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
iput-object p4, p0, Lokhttp3/r;->bmo:Ljava/util/List;
2019-02-04 20:08:30 +00:00
return-void
.end method
.method public static a(Ljavax/net/ssl/SSLSession;)Lokhttp3/r;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getCipherSuite()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_5
const-string v1, "SSL_NULL_WITH_NULL_NULL"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_4
2019-02-17 02:24:41 +00:00
invoke-static {v0}, Lokhttp3/h;->dw(Ljava/lang/String;)Lokhttp3/h;
2019-02-04 20:08:30 +00:00
move-result-object v0
invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getProtocol()Ljava/lang/String;
move-result-object v1
if-eqz v1, :cond_3
const-string v2, "NONE"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2
2019-02-27 00:16:35 +00:00
invoke-static {v1}, Lokhttp3/z;->dT(Ljava/lang/String;)Lokhttp3/z;
2019-02-04 20:08:30 +00:00
move-result-object v1
:try_start_0
invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getPeerCertificates()[Ljava/security/cert/Certificate;
move-result-object v2
:try_end_0
.catch Ljavax/net/ssl/SSLPeerUnverifiedException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
const/4 v2, 0x0
:goto_0
if-eqz v2, :cond_0
2019-02-17 02:24:41 +00:00
invoke-static {v2}, Lokhttp3/internal/c;->l([Ljava/lang/Object;)Ljava/util/List;
2019-02-04 20:08:30 +00:00
move-result-object v2
goto :goto_1
:cond_0
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
move-result-object v2
:goto_1
invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getLocalCertificates()[Ljava/security/cert/Certificate;
move-result-object p0
if-eqz p0, :cond_1
2019-02-17 02:24:41 +00:00
invoke-static {p0}, Lokhttp3/internal/c;->l([Ljava/lang/Object;)Ljava/util/List;
2019-02-04 20:08:30 +00:00
move-result-object p0
goto :goto_2
:cond_1
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
move-result-object p0
:goto_2
new-instance v3, Lokhttp3/r;
invoke-direct {v3, v1, v0, v2, p0}, Lokhttp3/r;-><init>(Lokhttp3/z;Lokhttp3/h;Ljava/util/List;Ljava/util/List;)V
return-object v3
:cond_2
new-instance p0, Ljava/io/IOException;
const-string v0, "tlsVersion == NONE"
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p0
:cond_3
new-instance p0, Ljava/lang/IllegalStateException;
const-string v0, "tlsVersion == null"
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:cond_4
new-instance p0, Ljava/io/IOException;
const-string v0, "cipherSuite == SSL_NULL_WITH_NULL_NULL"
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p0
:cond_5
new-instance p0, Ljava/lang/IllegalStateException;
const-string v0, "cipherSuite == null"
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.end method
2019-02-27 00:16:35 +00:00
.method private static ac(Ljava/util/List;)Ljava/util/List;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Ljava/security/cert/Certificate;",
">;)",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/security/cert/Certificate;
instance-of v2, v1, Ljava/security/cert/X509Certificate;
if-eqz v2, :cond_0
check-cast v1, Ljava/security/cert/X509Certificate;
invoke-virtual {v1}, Ljava/security/cert/X509Certificate;->getSubjectDN()Ljava/security/Principal;
move-result-object v1
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_0
invoke-virtual {v1}, Ljava/security/cert/Certificate;->getType()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_1
return-object v0
.end method
2019-02-04 20:08:30 +00:00
# virtual methods
.method public final equals(Ljava/lang/Object;)Z
.locals 3
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
instance-of v0, p1, Lokhttp3/r;
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
check-cast p1, Lokhttp3/r;
2019-02-27 00:16:35 +00:00
iget-object v0, p0, Lokhttp3/r;->bml:Lokhttp3/z;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
iget-object v2, p1, Lokhttp3/r;->bml:Lokhttp3/z;
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Lokhttp3/z;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
2019-02-27 00:16:35 +00:00
iget-object v0, p0, Lokhttp3/r;->bmm:Lokhttp3/h;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
iget-object v2, p1, Lokhttp3/r;->bmm:Lokhttp3/h;
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
2019-02-27 00:16:35 +00:00
iget-object v0, p0, Lokhttp3/r;->bmn:Ljava/util/List;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
iget-object v2, p1, Lokhttp3/r;->bmn:Ljava/util/List;
2019-02-04 20:08:30 +00:00
invoke-interface {v0, v2}, Ljava/util/List;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
2019-02-27 00:16:35 +00:00
iget-object v0, p0, Lokhttp3/r;->bmo:Ljava/util/List;
2019-02-04 20:08:30 +00:00
2019-02-27 00:16:35 +00:00
iget-object p1, p1, Lokhttp3/r;->bmo:Ljava/util/List;
2019-02-04 20:08:30 +00:00
invoke-interface {v0, p1}, Ljava/util/List;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_1
const/4 p1, 0x1
return p1
:cond_1
return v1
.end method
.method public final hashCode()I
.locals 2
2019-02-27 00:16:35 +00:00
iget-object v0, p0, Lokhttp3/r;->bml:Lokhttp3/z;
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Lokhttp3/z;->hashCode()I
move-result v0
add-int/lit16 v0, v0, 0x20f
mul-int/lit8 v0, v0, 0x1f
2019-02-27 00:16:35 +00:00
iget-object v1, p0, Lokhttp3/r;->bmm:Lokhttp3/h;
2019-02-04 20:08:30 +00:00
invoke-virtual {v1}, Ljava/lang/Object;->hashCode()I
move-result v1
add-int/2addr v0, v1
mul-int/lit8 v0, v0, 0x1f
2019-02-27 00:16:35 +00:00
iget-object v1, p0, Lokhttp3/r;->bmn:Ljava/util/List;
2019-02-04 20:08:30 +00:00
invoke-interface {v1}, Ljava/util/List;->hashCode()I
move-result v1
add-int/2addr v0, v1
mul-int/lit8 v0, v0, 0x1f
2019-02-27 00:16:35 +00:00
iget-object v1, p0, Lokhttp3/r;->bmo:Ljava/util/List;
2019-02-04 20:08:30 +00:00
invoke-interface {v1}, Ljava/util/List;->hashCode()I
move-result v1
add-int/2addr v0, v1
return v0
.end method
2019-02-27 00:16:35 +00:00
.method public final toString()Ljava/lang/String;
.locals 2
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "Handshake{tlsVersion="
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v1, p0, Lokhttp3/r;->bml:Lokhttp3/z;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " cipherSuite="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lokhttp3/r;->bmm:Lokhttp3/h;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " peerCertificates="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lokhttp3/r;->bmn:Ljava/util/List;
invoke-static {v1}, Lokhttp3/r;->ac(Ljava/util/List;)Ljava/util/List;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " localCertificates="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lokhttp3/r;->bmo:Ljava/util/List;
invoke-static {v1}, Lokhttp3/r;->ac(Ljava/util/List;)Ljava/util/List;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 v1, 0x7d
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method