You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
3.8 KiB
171 lines
3.8 KiB
.class public final Lokhttp3/internal/tls/RealTrustRootIndex; |
|
.super Ljava/lang/Object; |
|
.source "RealTrustRootIndex.java" |
|
|
|
# interfaces |
|
.implements Lokhttp3/internal/tls/TrustRootIndex; |
|
|
|
|
|
# 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/List", |
|
"<", |
|
"Ljava/security/cert/X509Certificate;", |
|
">;>;" |
|
} |
|
.end annotation |
|
.end field |
|
|
|
|
|
# direct methods |
|
.method public varargs constructor <init>([Ljava/security/cert/X509Certificate;)V |
|
.locals 6 |
|
|
|
.prologue |
|
.line 29 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
.line 30 |
|
new-instance v0, Ljava/util/LinkedHashMap; |
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V |
|
|
|
iput-object v0, p0, Lokhttp3/internal/tls/RealTrustRootIndex;->subjectToCaCerts:Ljava/util/Map; |
|
|
|
.line 31 |
|
array-length v2, p1 |
|
|
|
const/4 v0, 0x0 |
|
|
|
move v1, v0 |
|
|
|
:goto_0 |
|
if-ge v1, v2, :cond_1 |
|
|
|
aget-object v3, p1, v1 |
|
|
|
.line 32 |
|
invoke-virtual {v3}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal; |
|
|
|
move-result-object v4 |
|
|
|
.line 33 |
|
iget-object v0, p0, Lokhttp3/internal/tls/RealTrustRootIndex;->subjectToCaCerts:Ljava/util/Map; |
|
|
|
invoke-interface {v0, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/util/List; |
|
|
|
.line 34 |
|
if-nez v0, :cond_0 |
|
|
|
.line 35 |
|
new-instance v0, Ljava/util/ArrayList; |
|
|
|
const/4 v5, 0x1 |
|
|
|
invoke-direct {v0, v5}, Ljava/util/ArrayList;-><init>(I)V |
|
|
|
.line 36 |
|
iget-object v5, p0, Lokhttp3/internal/tls/RealTrustRootIndex;->subjectToCaCerts:Ljava/util/Map; |
|
|
|
invoke-interface {v5, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 38 |
|
:cond_0 |
|
invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z |
|
|
|
.line 31 |
|
add-int/lit8 v0, v1, 0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 40 |
|
:cond_1 |
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public findByIssuerAndSignature(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate; |
|
.locals 4 |
|
|
|
.prologue |
|
const/4 v1, 0x0 |
|
|
|
.line 43 |
|
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getIssuerX500Principal()Ljavax/security/auth/x500/X500Principal; |
|
|
|
move-result-object v0 |
|
|
|
.line 44 |
|
iget-object v2, p0, Lokhttp3/internal/tls/RealTrustRootIndex;->subjectToCaCerts:Ljava/util/Map; |
|
|
|
invoke-interface {v2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/util/List; |
|
|
|
.line 45 |
|
if-nez v0, :cond_0 |
|
|
|
move-object v0, v1 |
|
|
|
.line 56 |
|
:goto_0 |
|
return-object v0 |
|
|
|
.line 47 |
|
:cond_0 |
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator; |
|
|
|
move-result-object v2 |
|
|
|
:goto_1 |
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/security/cert/X509Certificate; |
|
|
|
.line 48 |
|
invoke-virtual {v0}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey; |
|
|
|
move-result-object v3 |
|
|
|
.line 50 |
|
:try_start_0 |
|
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 |
|
|
|
goto :goto_0 |
|
|
|
.line 52 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
goto :goto_1 |
|
|
|
:cond_1 |
|
move-object v0, v1 |
|
|
|
.line 56 |
|
goto :goto_0 |
|
.end method
|
|
|