275 lines
7.4 KiB
Smali
275 lines
7.4 KiB
Smali
.class public final Lokhttp3/internal/tls/BasicTrustRootIndex;
|
|
.super Ljava/lang/Object;
|
|
.source "BasicTrustRootIndex.kt"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/internal/tls/TrustRootIndex;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nBasicTrustRootIndex.kt\nKotlin\n*S Kotlin\n*F\n+ 1 BasicTrustRootIndex.kt\nokhttp3/internal/tls/BasicTrustRootIndex\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n*L\n1#1,56:1\n256#2,2:57\n355#3,7:59\n*E\n*S KotlinDebug\n*F\n+ 1 BasicTrustRootIndex.kt\nokhttp3/internal/tls/BasicTrustRootIndex\n*L\n37#1,2:57\n28#1,7:59\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0010\"\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0002\u0008\u0003\n\u0002\u0010\u0008\n\u0000\u0018\u00002\u00020\u0001B\u0019\u0012\u0012\u0010\u0002\u001a\n\u0012\u0006\u0008\u0001\u0012\u00020\u00040\u0003\"\u00020\u0004\u00a2\u0006\u0002\u0010\u0005J\u0013\u0010\n\u001a\u00020\u000b2\u0008\u0010\u000c\u001a\u0004\u0018\u00010\rH\u0096\u0002J\u0012\u0010\u000e\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u000f\u001a\u00020\u0004H\u0016J\u0008\u0010\u0010\u001a\u00020\u0011H\u0016R \u0010\u0006\u001a\u0014\u0012\u0004\u0012\u00020\u0008\u0012\n\u0012\u0008\u0012\u0004\u0012\u00020\u00040\t0\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0012"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/tls/BasicTrustRootIndex;",
|
|
"Lokhttp3/internal/tls/TrustRootIndex;",
|
|
"caCerts",
|
|
"",
|
|
"Ljava/security/cert/X509Certificate;",
|
|
"([Ljava/security/cert/X509Certificate;)V",
|
|
"subjectToCaCerts",
|
|
"",
|
|
"Ljavax/security/auth/x500/X500Principal;",
|
|
"",
|
|
"equals",
|
|
"",
|
|
"other",
|
|
"",
|
|
"findByIssuerAndSignature",
|
|
"cert",
|
|
"hashCode",
|
|
"",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final subjectToCaCerts:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljavax/security/auth/x500/X500Principal;",
|
|
"Ljava/util/Set<",
|
|
"Ljava/security/cert/X509Certificate;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public varargs constructor <init>([Ljava/security/cert/X509Certificate;)V
|
|
.locals 6
|
|
.param p1 # [Ljava/security/cert/X509Certificate;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "caCerts"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
new-instance v0, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
.line 3
|
|
array-length v1, p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_1
|
|
|
|
aget-object v3, p1, v2
|
|
|
|
.line 4
|
|
invoke-virtual {v3}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "caCert.subjectX500Principal"
|
|
|
|
invoke-static {v4, v5}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 5
|
|
invoke-interface {v0, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
.line 6
|
|
new-instance v5, Ljava/util/LinkedHashSet;
|
|
|
|
invoke-direct {v5}, Ljava/util/LinkedHashSet;-><init>()V
|
|
|
|
.line 7
|
|
invoke-interface {v0, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 8
|
|
:cond_0
|
|
check-cast v5, Ljava/util/Set;
|
|
|
|
.line 9
|
|
invoke-interface {v5, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 10
|
|
:cond_1
|
|
iput-object v0, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eq p1, p0, :cond_1
|
|
|
|
.line 1
|
|
instance-of v0, p1, Lokhttp3/internal/tls/BasicTrustRootIndex;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast p1, Lokhttp3/internal/tls/BasicTrustRootIndex;
|
|
|
|
iget-object p1, p1, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->g(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p1, 0x1
|
|
|
|
:goto_1
|
|
return p1
|
|
.end method
|
|
|
|
.method public findByIssuerAndSignature(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate;
|
|
.locals 4
|
|
.param p1 # Ljava/security/cert/X509Certificate;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
|
|
const-string v0, "cert"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getIssuerX500Principal()Ljavax/security/auth/x500/X500Principal;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Set;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 3
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Ljava/security/cert/X509Certificate;
|
|
|
|
.line 4
|
|
:try_start_0
|
|
invoke-virtual {v3}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p1, v3}, Ljava/security/cert/X509Certificate;->verify(Ljava/security/PublicKey;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v3, :cond_0
|
|
|
|
move-object v1, v2
|
|
|
|
.line 5
|
|
:cond_1
|
|
check-cast v1, Ljava/security/cert/X509Certificate;
|
|
|
|
:cond_2
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|