apkfuckery/com.discord/smali_classes2/a0/g$b.smali

170 lines
4.1 KiB
Smali
Raw Normal View History

2019-12-21 01:41:59 +00:00
.class public final La0/g$b;
2019-07-24 11:27:29 +00:00
.super Ljava/lang/Object;
2020-02-20 19:33:18 +00:00
.source "CertificatePinner.kt"
2019-07-24 11:27:29 +00:00
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
2019-12-21 01:41:59 +00:00
value = La0/g;
2019-07-24 11:27:29 +00:00
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x19
name = "b"
2019-07-24 11:27:29 +00:00
.end annotation
2020-03-10 23:21:53 +00:00
# direct methods
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
2019-08-14 23:59:34 +00:00
2020-03-10 23:21:53 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2019-07-24 11:27:29 +00:00
2020-03-10 23:21:53 +00:00
return-void
.end method
2019-07-24 11:27:29 +00:00
2020-02-20 19:33:18 +00:00
# virtual methods
2020-03-10 23:21:53 +00:00
.method public final a(Ljava/security/cert/Certificate;)Ljava/lang/String;
.locals 1
2019-07-24 11:27:29 +00:00
2020-03-10 23:21:53 +00:00
const-string v0, "certificate"
2019-07-24 11:27:29 +00:00
2020-02-20 19:33:18 +00:00
invoke-static {p1, v0}, Lw/u/b/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2020-03-10 23:21:53 +00:00
instance-of v0, p1, Ljava/security/cert/X509Certificate;
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
if-eqz v0, :cond_0
2019-12-18 09:41:56 +00:00
2020-03-10 23:21:53 +00:00
const-string v0, "sha256/"
2019-12-18 09:41:56 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {v0}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-12-20 07:00:35 +00:00
2020-03-10 23:21:53 +00:00
move-result-object v0
2019-12-20 07:00:35 +00:00
2020-03-10 23:21:53 +00:00
check-cast p1, Ljava/security/cert/X509Certificate;
2019-12-20 07:00:35 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {p0, p1}, La0/g$b;->b(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
2019-12-20 07:00:35 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2019-12-21 01:41:59 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {p1}, Lokio/ByteString;->a()Ljava/lang/String;
2019-12-21 01:41:59 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2019-12-21 01:41:59 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-12-21 01:41:59 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
return-object p1
2020-02-20 19:33:18 +00:00
:cond_0
2020-03-10 23:21:53 +00:00
new-instance p1, Ljava/lang/IllegalArgumentException;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const-string v0, "Certificate pinning requires X509 certificates"
2019-07-24 11:27:29 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
move-result-object v0
2019-07-24 11:27:29 +00:00
2020-03-10 23:21:53 +00:00
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
throw p1
.end method
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
.method public final a(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
.locals 3
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
if-eqz p1, :cond_0
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
sget-object v0, Lokio/ByteString;->g:Lokio/ByteString$a;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const-string v1, "publicKey"
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {p1, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-interface {p1}, Ljava/security/PublicKey;->getEncoded()[B
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const-string v1, "publicKey.encoded"
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {p1, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const/4 v1, 0x3
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const/4 v2, 0x0
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {v0, p1, v2, v2, v1}, Lokio/ByteString$a;->a(Lokio/ByteString$a;[BIII)Lokio/ByteString;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {p1}, Lokio/ByteString;->h()Lokio/ByteString;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
return-object p1
2020-02-20 19:33:18 +00:00
:cond_0
2020-03-10 23:21:53 +00:00
const-string p1, "$this$toSha1ByteString"
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const/4 p1, 0x0
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
throw p1
2019-07-24 11:27:29 +00:00
.end method
2020-03-10 23:21:53 +00:00
.method public final b(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
2020-02-20 19:33:18 +00:00
.locals 3
2020-03-10 23:21:53 +00:00
if-eqz p1, :cond_0
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
sget-object v0, Lokio/ByteString;->g:Lokio/ByteString$a;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const-string v1, "publicKey"
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {p1, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-interface {p1}, Ljava/security/PublicKey;->getEncoded()[B
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const-string v1, "publicKey.encoded"
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {p1, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const/4 v1, 0x3
2020-02-20 19:33:18 +00:00
const/4 v2, 0x0
2020-03-10 23:21:53 +00:00
invoke-static {v0, p1, v2, v2, v1}, Lokio/ByteString$a;->a(Lokio/ByteString$a;[BIII)Lokio/ByteString;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-virtual {p1}, Lokio/ByteString;->i()Lokio/ByteString;
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
move-result-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
return-object p1
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
:cond_0
const-string p1, "$this$toSha256ByteString"
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
const/4 p1, 0x0
2020-02-20 19:33:18 +00:00
2020-03-10 23:21:53 +00:00
throw p1
2020-02-20 19:33:18 +00:00
.end method