123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- .class public final Lokhttp3/internal/tls/BasicTrustRootIndex;
- .super Ljava/lang/Object;
- .source ""
- # 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/Set<",
- "Ljava/security/cert/X509Certificate;",
- ">;>;"
- }
- .end annotation
- .end field
- # direct methods
- .method public varargs constructor <init>([Ljava/security/cert/X509Certificate;)V
- .locals 6
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance v0, Ljava/util/LinkedHashMap;
- invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
- iput-object v0, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
- array-length v0, p1
- const/4 v1, 0x0
- :goto_0
- if-ge v1, v0, :cond_1
- aget-object v2, p1, v1
- invoke-virtual {v2}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal;
- move-result-object v3
- iget-object v4, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
- invoke-interface {v4, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v4
- check-cast v4, Ljava/util/Set;
- if-nez v4, :cond_0
- new-instance v4, Ljava/util/LinkedHashSet;
- const/4 v5, 0x1
- invoke-direct {v4, v5}, Ljava/util/LinkedHashSet;-><init>(I)V
- iget-object v5, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
- invoke-interface {v5, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- :cond_0
- invoke-interface {v4, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
- add-int/lit8 v1, v1, 0x1
- goto :goto_0
- :cond_1
- return-void
- .end method
- # virtual methods
- .method public equals(Ljava/lang/Object;)Z
- .locals 2
- const/4 v0, 0x1
- if-ne p1, p0, :cond_0
- return v0
- :cond_0
- instance-of v1, p1, Lokhttp3/internal/tls/BasicTrustRootIndex;
- if-eqz v1, :cond_1
- check-cast p1, Lokhttp3/internal/tls/BasicTrustRootIndex;
- iget-object p1, p1, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
- iget-object v1, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
- invoke-interface {p1, v1}, Ljava/util/Map;->equals(Ljava/lang/Object;)Z
- move-result p1
- if-eqz p1, :cond_1
- goto :goto_0
- :cond_1
- const/4 v0, 0x0
- :goto_0
- return v0
- .end method
- .method public findByIssuerAndSignature(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate;
- .locals 4
- invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getIssuerX500Principal()Ljavax/security/auth/x500/X500Principal;
- move-result-object v0
- 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-nez v0, :cond_0
- return-object v1
- :cond_0
- invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
- move-result-object v0
- :goto_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
- check-cast v2, Ljava/security/cert/X509Certificate;
- invoke-virtual {v2}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
- move-result-object v3
- :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
- return-object v2
- :catch_0
- nop
- goto :goto_0
- :cond_1
- return-object v1
- .end method
- .method public hashCode()I
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/tls/BasicTrustRootIndex;->subjectToCaCerts:Ljava/util/Map;
- invoke-interface {v0}, Ljava/util/Map;->hashCode()I
- move-result v0
- return v0
- .end method
|