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.
154 lines
3.6 KiB
154 lines
3.6 KiB
2 years ago
|
.class public final Lokhttp3/internal/tls/AndroidTrustRootIndex;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "AndroidTrustRootIndex.java"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Lokhttp3/internal/tls/TrustRootIndex;
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field private final findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
||
|
|
||
|
.field private final trustManager:Ljavax/net/ssl/X509TrustManager;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Ljavax/net/ssl/X509TrustManager;Ljava/lang/reflect/Method;)V
|
||
|
.locals 0
|
||
|
|
||
|
.prologue
|
||
|
.line 34
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
.line 35
|
||
|
iput-object p2, p0, Lokhttp3/internal/tls/AndroidTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
||
|
|
||
|
.line 36
|
||
|
iput-object p1, p0, Lokhttp3/internal/tls/AndroidTrustRootIndex;->trustManager:Ljavax/net/ssl/X509TrustManager;
|
||
|
|
||
|
.line 37
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static get(Ljavax/net/ssl/X509TrustManager;)Lokhttp3/internal/tls/TrustRootIndex;
|
||
|
.locals 5
|
||
|
|
||
|
.prologue
|
||
|
.line 57
|
||
|
:try_start_0
|
||
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "findTrustAnchorByIssuerAndSignature"
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
new-array v2, v2, [Ljava/lang/Class;
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
const-class v4, Ljava/security/cert/X509Certificate;
|
||
|
|
||
|
aput-object v4, v2, v3
|
||
|
|
||
|
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
.line 59
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
invoke-virtual {v1, v0}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
||
|
|
||
|
.line 60
|
||
|
new-instance v0, Lokhttp3/internal/tls/AndroidTrustRootIndex;
|
||
|
|
||
|
invoke-direct {v0, p0, v1}, Lokhttp3/internal/tls/AndroidTrustRootIndex;-><init>(Ljavax/net/ssl/X509TrustManager;Ljava/lang/reflect/Method;)V
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
.line 62
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
.line 61
|
||
|
:catch_0
|
||
|
move-exception v0
|
||
|
|
||
|
.line 62
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public findByIssuerAndSignature(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate;
|
||
|
.locals 5
|
||
|
|
||
|
.prologue
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
.line 41
|
||
|
:try_start_0
|
||
|
iget-object v0, p0, Lokhttp3/internal/tls/AndroidTrustRootIndex;->findByIssuerAndSignatureMethod:Ljava/lang/reflect/Method;
|
||
|
|
||
|
iget-object v2, p0, Lokhttp3/internal/tls/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 {v0, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/security/cert/TrustAnchor;
|
||
|
|
||
|
.line 43
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
.line 44
|
||
|
invoke-virtual {v0}, Ljava/security/cert/TrustAnchor;->getTrustedCert()Ljava/security/cert/X509Certificate;
|
||
|
: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
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 49
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
move-object v0, v1
|
||
|
|
||
|
.line 44
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 46
|
||
|
:catch_0
|
||
|
move-exception v0
|
||
|
|
||
|
.line 47
|
||
|
new-instance v0, Ljava/lang/AssertionError;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
.line 48
|
||
|
:catch_1
|
||
|
move-exception v0
|
||
|
|
||
|
move-object v0, v1
|
||
|
|
||
|
.line 49
|
||
|
goto :goto_0
|
||
|
.end method
|