123 lines
3.2 KiB
Smali
123 lines
3.2 KiB
Smali
.class public Lcom/tencent/open/utils/HttpUtils$a;
|
|
.super Lorg/apache/http/conn/ssl/SSLSocketFactory;
|
|
.source "ProGuard"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/tencent/open/utils/HttpUtils;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "a"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final a:Ljavax/net/ssl/SSLContext;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/security/KeyStore;)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/security/NoSuchAlgorithmException;,
|
|
Ljava/security/KeyManagementException;,
|
|
Ljava/security/KeyStoreException;,
|
|
Ljava/security/UnrecoverableKeyException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1000
|
|
invoke-direct {p0, p1}, Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>(Ljava/security/KeyStore;)V
|
|
|
|
const-string p1, "TLS"
|
|
|
|
.line 994
|
|
invoke-static {p1}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/tencent/open/utils/HttpUtils$a;->a:Ljavax/net/ssl/SSLContext;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 1004
|
|
:try_start_0
|
|
new-instance v0, Lcom/tencent/open/utils/HttpUtils$b;
|
|
|
|
invoke-direct {v0}, Lcom/tencent/open/utils/HttpUtils$b;-><init>()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-object v0, p1
|
|
|
|
.line 1008
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/tencent/open/utils/HttpUtils$a;->a:Ljavax/net/ssl/SSLContext;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljavax/net/ssl/TrustManager;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v0, v2, v3
|
|
|
|
invoke-virtual {v1, p1, v2, p1}, Ljavax/net/ssl/SSLContext;->init([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createSocket()Ljava/net/Socket;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1020
|
|
iget-object v0, p0, Lcom/tencent/open/utils/HttpUtils$a;->a:Ljavax/net/ssl/SSLContext;
|
|
|
|
invoke-virtual {v0}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljavax/net/ssl/SSLSocketFactory;->createSocket()Ljava/net/Socket;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public createSocket(Ljava/net/Socket;Ljava/lang/String;IZ)Ljava/net/Socket;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;,
|
|
Ljava/net/UnknownHostException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1015
|
|
iget-object v0, p0, Lcom/tencent/open/utils/HttpUtils$a;->a:Ljavax/net/ssl/SSLContext;
|
|
|
|
invoke-virtual {v0}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Ljavax/net/ssl/SSLSocketFactory;->createSocket(Ljava/net/Socket;Ljava/lang/String;IZ)Ljava/net/Socket;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|