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