AndroidPlatform$AndroidTrustRootIndex.smali
.class final Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;
.super Ljava/lang/Object;
.source "AndroidPlatform.java"
# interfaces
.implements Lokhttp3/internal/tls/TrustRootIndex;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/platform/AndroidPlatform;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = "AndroidTrustRootIndex"
.end annotation
# instance fields
.field private final findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
.field private final trustManager:Ljavax/net/ssl/X509TrustManager;
# direct methods
.method constructor <init>(Ljavax/net/ssl/X509TrustManager;Ljava/lang/reflect/Method;)V
.registers 3
.line 393
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 394
iput-object p2, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
.line 395
iput-object p1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.registers 6
const/4 v0, 0x1
if-ne p1, p0, :cond_4
return v0
.line 417
:cond_4
instance-of v1, p1, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;
const/4 v2, 0x0
if-nez v1, :cond_a
return v2
.line 420
:cond_a
check-cast p1, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;
.line 421
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
iget-object v3, p1, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_21
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
iget-object p1, p1, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
.line 422
invoke-virtual {v1, p1}, Ljava/lang/reflect/Method;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_21
goto :goto_22
:cond_21
const/4 v0, 0x0
:goto_22
return v0
.end method
.method public findByIssuerAndSignature(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate;
.registers 7
const/4 v0, 0x0
.line 400
:try_start_1
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
iget-object v2, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
const/4 v3, 0x1
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
aput-object p1, v3, v4
invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/security/cert/TrustAnchor;
if-eqz p1, :cond_17
.line 403
invoke-virtual {p1}, Ljava/security/cert/TrustAnchor;->getTrustedCert()Ljava/security/cert/X509Certificate;
move-result-object v0
:try_end_17
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_17} :catch_18
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_17} :catch_17
:catch_17
:cond_17
return-object v0
:catch_18
move-exception p1
const-string v0, "unable to get issues and signature"
.line 406
invoke-static {v0, p1}, Lokhttp3/internal/Util;->assertionError(Ljava/lang/String;Ljava/lang/Exception;)Ljava/lang/AssertionError;
move-result-object p1
throw p1
.end method
.method public hashCode()I
.registers 3
.line 427
iget-object v0, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
move-result v0
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
invoke-virtual {v1}, Ljava/lang/reflect/Method;->hashCode()I
move-result v1
mul-int/lit8 v1, v1, 0x1f
add-int/2addr v0, v1
return v0
.end method