apkfuckery/com.discord/smali_classes2/n0/h.smali

461 lines
9.8 KiB
Smali
Raw Normal View History

2020-07-23 01:06:17 +00:00
.class public final Ln0/h;
2020-05-17 12:40:10 +00:00
.super Ljava/lang/Object;
2020-07-23 01:06:17 +00:00
.source "CertificatePinner.kt"
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Ln0/h$b;,
Ln0/h$a;
}
.end annotation
# static fields
.field public static final c:Ln0/h;
.field public static final d:Ln0/h$a;
2020-05-17 12:40:10 +00:00
# instance fields
2020-07-23 01:06:17 +00:00
.field public final a:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Ln0/h$b;",
">;"
}
.end annotation
.end field
.field public final b:Ln0/g0/j/c;
2020-05-17 12:40:10 +00:00
# direct methods
2020-07-23 01:06:17 +00:00
.method public static constructor <clinit>()V
.locals 3
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
new-instance v0, Ln0/h$a;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
const/4 v1, 0x0
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
invoke-direct {v0, v1}, Ln0/h$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
sput-object v0, Ln0/h;->d:Ln0/h$a;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
new-instance v0, Ljava/util/ArrayList;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
new-instance v2, Ln0/h;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
invoke-static {v0}, Lj0/j/l;->toSet(Ljava/lang/Iterable;)Ljava/util/Set;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
move-result-object v0
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
invoke-direct {v2, v0, v1}, Ln0/h;-><init>(Ljava/util/Set;Ln0/g0/j/c;)V
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
sput-object v2, Ln0/h;->c:Ln0/h;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
return-void
2020-07-22 00:04:40 +00:00
.end method
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
.method public constructor <init>(Ljava/util/Set;Ln0/g0/j/c;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
2020-07-22 00:04:40 +00:00
value = {
2020-07-23 01:06:17 +00:00
"(",
"Ljava/util/Set<",
"Ln0/h$b;",
">;",
"Ln0/g0/j/c;",
")V"
2020-07-22 00:04:40 +00:00
}
.end annotation
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
if-eqz p1, :cond_0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Ln0/h;->a:Ljava/util/Set;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
iput-object p2, p0, Ln0/h;->b:Ln0/g0/j/c;
2020-05-17 12:40:10 +00:00
2020-07-14 22:43:59 +00:00
return-void
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
:cond_0
const-string p1, "pins"
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
const/4 p1, 0x0
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
throw p1
2020-07-22 00:04:40 +00:00
.end method
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
# virtual methods
.method public final a(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
.locals 7
.annotation system Ldalvik/annotation/Signature;
2020-07-22 00:04:40 +00:00
value = {
2020-07-23 01:06:17 +00:00
"(",
"Ljava/lang/String;",
"Lkotlin/jvm/functions/Function0<",
"+",
"Ljava/util/List<",
"+",
"Ljava/security/cert/X509Certificate;",
">;>;)V"
2020-07-22 00:04:40 +00:00
}
.end annotation
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
const/4 v0, 0x0
if-eqz p1, :cond_e
sget-object v1, Lj0/j/n;->d:Lj0/j/n;
iget-object v2, p0, Ln0/h;->a:Ljava/util/Set;
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_0
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_6
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ln0/h$b;
if-eqz v3, :cond_5
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
const/4 v4, 0x2
const/4 v5, 0x0
const-string v6, "*."
invoke-static {v0, v6, v5, v4}, Lj0/u/k;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZI)Z
move-result v4
if-nez v4, :cond_4
invoke-static {p1, v0}, Lj0/o/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
move-result v4
if-eqz v4, :cond_1
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
:cond_1
instance-of v4, v1, Lj0/o/c/v/a;
if-eqz v4, :cond_3
instance-of v4, v1, Lj0/o/c/v/c;
if-eqz v4, :cond_2
goto :goto_1
:cond_2
const-string p1, "kotlin.collections.MutableList"
invoke-static {v1, p1}, Lj0/o/c/u;->throwCce(Ljava/lang/Object;Ljava/lang/String;)V
throw v0
:cond_3
:goto_1
invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_4
const/16 p2, 0x2e
const/4 v1, 0x6
invoke-static {p1, p2, v5, v5, v1}, Lj0/u/p;->indexOf$default(Ljava/lang/CharSequence;CIZI)I
invoke-virtual {p1}, Ljava/lang/String;->length()I
throw v0
:cond_5
throw v0
:cond_6
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
move-result v2
if-eqz v2, :cond_7
2020-07-16 19:51:49 +00:00
2020-07-22 00:04:40 +00:00
return-void
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
:cond_7
invoke-interface {p2}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object p2
check-cast p2, Ljava/util/List;
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_8
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_a
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/security/cert/X509Certificate;
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
move-result-object v3
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_8
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ln0/h$b;
if-eqz p1, :cond_9
throw v0
:cond_9
throw v0
:cond_a
const-string v0, "Certificate pinning failure!"
const-string v2, "\n Peer certificate chain:"
invoke-static {v0, v2}, Lf/e/b/a/a;->H(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-05-17 12:40:10 +00:00
move-result-object v0
2020-07-23 01:06:17 +00:00
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
move-result-object p2
:goto_2
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v2
const-string v3, "\n "
if-eqz v2, :cond_c
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/security/cert/X509Certificate;
if-eqz v2, :cond_b
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
sget-object v3, Ln0/h;->d:Ln0/h$a;
invoke-virtual {v3, v2}, Ln0/h$a;->a(Ljava/security/cert/Certificate;)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, ": "
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/security/cert/X509Certificate;->getSubjectDN()Ljava/security/Principal;
move-result-object v2
const-string v3, "x509Certificate.subjectDN"
invoke-static {v2, v3}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {v2}, Ljava/security/Principal;->getName()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
goto :goto_2
:cond_b
new-instance p1, Lkotlin/TypeCastException;
const-string p2, "null cannot be cast to non-null type java.security.cert.X509Certificate"
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p1
:cond_c
const-string p2, "\n Pinned certificates for "
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
const-string p1, ":"
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
move-result-object p1
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
:goto_3
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
move-result p2
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
if-eqz p2, :cond_d
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
move-result-object p2
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
check-cast p2, Ln0/h$b;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
goto :goto_3
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
:cond_d
2020-07-22 00:04:40 +00:00
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-07-23 01:06:17 +00:00
move-result-object p1
const-string p2, "StringBuilder().apply(builderAction).toString()"
invoke-static {p1, p2}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
new-instance p2, Ljavax/net/ssl/SSLPeerUnverifiedException;
invoke-direct {p2, p1}, Ljavax/net/ssl/SSLPeerUnverifiedException;-><init>(Ljava/lang/String;)V
throw p2
2020-07-14 22:43:59 +00:00
2020-07-23 01:06:17 +00:00
:cond_e
const-string p1, "hostname"
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
throw v0
2020-07-16 19:51:49 +00:00
.end method
2020-07-23 01:06:17 +00:00
.method public equals(Ljava/lang/Object;)Z
.locals 2
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
instance-of v0, p1, Ln0/h;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
if-eqz v0, :cond_0
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
check-cast p1, Ln0/h;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
iget-object v0, p1, Ln0/h;->a:Ljava/util/Set;
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
iget-object v1, p0, Ln0/h;->a:Ljava/util/Set;
invoke-static {v0, v1}, Lj0/o/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
iget-object p1, p1, Ln0/h;->b:Ln0/g0/j/c;
iget-object v0, p0, Ln0/h;->b:Ln0/g0/j/c;
invoke-static {p1, v0}, Lj0/o/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
if-eqz p1, :cond_0
const/4 p1, 0x1
goto :goto_0
2020-07-16 19:51:49 +00:00
2020-07-23 01:06:17 +00:00
:cond_0
2020-07-22 00:04:40 +00:00
const/4 p1, 0x0
2020-07-23 01:06:17 +00:00
:goto_0
return p1
.end method
.method public hashCode()I
.locals 2
iget-object v0, p0, Ln0/h;->a:Ljava/util/Set;
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
move-result v0
add-int/lit16 v0, v0, 0x5ed
mul-int/lit8 v0, v0, 0x29
iget-object v1, p0, Ln0/h;->b:Ln0/g0/j/c;
if-eqz v1, :cond_0
invoke-virtual {v1}, Ljava/lang/Object;->hashCode()I
move-result v1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
add-int/2addr v0, v1
return v0
2020-05-17 12:40:10 +00:00
.end method