172 lines
4.5 KiB
Smali
172 lines
4.5 KiB
Smali
.class public final Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# 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 = 0x19
|
|
name = "CustomTrustRootIndex"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
|
|
|
.field public final trustManager:Ljavax/net/ssl/X509TrustManager;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljavax/net/ssl/X509TrustManager;Ljava/lang/reflect/Method;)V
|
|
.locals 0
|
|
|
|
.line 369
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p1, p0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 392
|
|
:cond_0
|
|
instance-of v1, p1, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 395
|
|
:cond_1
|
|
check-cast p1, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
|
|
|
|
.line 396
|
|
iget-object v3, p1, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
|
|
|
iget-object p1, p1, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
|
|
|
.line 397
|
|
invoke-virtual {v1, p1}, Ljava/lang/reflect/Method;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move v0, v2
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public findByIssuerAndSignature(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
|
|
|
|
filled-new-array {p1}, [Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
.line 376
|
|
invoke-virtual {v1, v2, p1}, 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_0
|
|
|
|
.line 379
|
|
invoke-virtual {p1}, Ljava/security/cert/TrustAnchor;->getTrustedCert()Ljava/security/cert/X509Certificate;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
:catch_1
|
|
:cond_0
|
|
:goto_0
|
|
return-object v0
|
|
|
|
.line 382
|
|
:goto_1
|
|
new-instance v0, Ljava/lang/AssertionError;
|
|
|
|
const-string v1, "unable to get issues and signature"
|
|
|
|
invoke-direct {v0, v1, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
|
|
|
|
.line 401
|
|
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$CustomTrustRootIndex;->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
|