mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
229 lines
6.5 KiB
Smali
229 lines
6.5 KiB
Smali
.class public final Lokhttp3/CertificatePinner$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "CertificatePinner.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/CertificatePinner;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nCertificatePinner.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CertificatePinner.kt\nokhttp3/CertificatePinner$Companion\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,370:1\n1#2:371\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0010\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u0008H\u0007J\u000c\u0010\t\u001a\u00020\n*\u00020\u000bH\u0007J\u000c\u0010\u000c\u001a\u00020\n*\u00020\u000bH\u0007R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X\u0087\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\r"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/CertificatePinner$Companion;",
|
|
"",
|
|
"()V",
|
|
"DEFAULT",
|
|
"Lokhttp3/CertificatePinner;",
|
|
"pin",
|
|
"",
|
|
"certificate",
|
|
"Ljava/security/cert/Certificate;",
|
|
"sha1Hash",
|
|
"Lokio/ByteString;",
|
|
"Ljava/security/cert/X509Certificate;",
|
|
"sha256Hash",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 345
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
.line 345
|
|
invoke-direct {p0}, Lokhttp3/CertificatePinner$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final pin(Ljava/security/cert/Certificate;)Ljava/lang/String;
|
|
.locals 2
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string v0, "certificate"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 365
|
|
instance-of v0, p1, Ljava/security/cert/X509Certificate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 366
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "sha256/"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
move-object v1, p0
|
|
|
|
check-cast v1, Lokhttp3/CertificatePinner$Companion;
|
|
|
|
check-cast p1, Ljava/security/cert/X509Certificate;
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/CertificatePinner$Companion;->sha256Hash(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokio/ByteString;->base64()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 365
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p1, "Certificate pinning requires X509 certificates"
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public final sha1Hash(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
|
|
.locals 6
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$sha1Hash"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 351
|
|
sget-object v0, Lokio/ByteString;->Companion:Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "publicKey"
|
|
|
|
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p0}, Ljava/security/PublicKey;->getEncoded()[B
|
|
|
|
move-result-object v1
|
|
|
|
const-string p0, "publicKey.encoded"
|
|
|
|
invoke-static {v1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static/range {v0 .. v5}, Lokio/ByteString$Companion;->of$default(Lokio/ByteString$Companion;[BIIILjava/lang/Object;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokio/ByteString;->sha1()Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final sha256Hash(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
|
|
.locals 6
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$sha256Hash"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 355
|
|
sget-object v0, Lokio/ByteString;->Companion:Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "publicKey"
|
|
|
|
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p0}, Ljava/security/PublicKey;->getEncoded()[B
|
|
|
|
move-result-object v1
|
|
|
|
const-string p0, "publicKey.encoded"
|
|
|
|
invoke-static {v1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static/range {v0 .. v5}, Lokio/ByteString$Companion;->of$default(Lokio/ByteString$Companion;[BIIILjava/lang/Object;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokio/ByteString;->sha256()Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|