c.smali
4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
.class public Lb/h0/j/c;
.super Lb/h0/j/g;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lb/h0/j/g;-><init>()V
return-void
.end method
.method public static d()Lb/h0/j/c;
.locals 2
const/4 v0, 0x0
:try_start_0
const-string v1, "org.conscrypt.Conscrypt"
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
invoke-static {}, Lorg/conscrypt/Conscrypt;->isAvailable()Z
move-result v1
if-nez v1, :cond_0
return-object v0
:cond_0
new-instance v1, Lb/h0/j/c;
invoke-direct {v1}, Lb/h0/j/c;-><init>()V
:try_end_0
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
return-object v1
:catch_0
return-object v0
.end method
# virtual methods
.method public a(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljavax/net/ssl/SSLSocket;",
"Ljava/lang/String;",
"Ljava/util/List<",
"Lb/x;",
">;)V"
}
.end annotation
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->isConscrypt(Ljavax/net/ssl/SSLSocket;)Z
move-result v0
if-eqz v0, :cond_1
if-eqz p2, :cond_0
const/4 v0, 0x1
invoke-static {p1, v0}, Lorg/conscrypt/Conscrypt;->setUseSessionTickets(Ljavax/net/ssl/SSLSocket;Z)V
invoke-static {p1, p2}, Lorg/conscrypt/Conscrypt;->setHostname(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;)V
:cond_0
invoke-static {p3}, Lb/h0/j/g;->a(Ljava/util/List;)Ljava/util/List;
move-result-object p2
const/4 p3, 0x0
new-array p3, p3, [Ljava/lang/String;
check-cast p2, Ljava/util/ArrayList;
invoke-virtual {p2, p3}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p2
check-cast p2, [Ljava/lang/String;
invoke-static {p1, p2}, Lorg/conscrypt/Conscrypt;->setApplicationProtocols(Ljavax/net/ssl/SSLSocket;[Ljava/lang/String;)V
:cond_1
return-void
.end method
.method public a(Ljavax/net/ssl/SSLSocketFactory;)V
.locals 1
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->isConscrypt(Ljavax/net/ssl/SSLSocketFactory;)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
invoke-static {p1, v0}, Lorg/conscrypt/Conscrypt;->setUseEngineSocket(Ljavax/net/ssl/SSLSocketFactory;Z)V
:cond_0
return-void
.end method
.method public b(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->isConscrypt(Ljavax/net/ssl/SSLSocket;)Z
move-result v0
if-eqz v0, :cond_0
invoke-static {p1}, Lorg/conscrypt/Conscrypt;->getApplicationProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
move-result-object p1
return-object p1
:cond_0
const/4 p1, 0x0
return-object p1
.end method
.method public b()Ljavax/net/ssl/SSLContext;
.locals 3
const-string v0, "TLSv1.3"
:try_start_0
invoke-virtual {p0}, Lb/h0/j/c;->e()Ljava/security/Provider;
move-result-object v1
invoke-static {v0, v1}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;Ljava/security/Provider;)Ljavax/net/ssl/SSLContext;
move-result-object v0
:try_end_0
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
const-string v1, "TLS"
:try_start_1
invoke-virtual {p0}, Lb/h0/j/c;->e()Ljava/security/Provider;
move-result-object v2
invoke-static {v1, v2}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;Ljava/security/Provider;)Ljavax/net/ssl/SSLContext;
move-result-object v0
:try_end_1
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_1 .. :try_end_1} :catch_1
return-object v0
:catch_1
new-instance v1, Ljava/lang/IllegalStateException;
const-string v2, "No TLS provider"
invoke-direct {v1, v2, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.end method
.method public final e()Ljava/security/Provider;
.locals 1
invoke-static {}, Lorg/conscrypt/Conscrypt;->newProviderBuilder()Lorg/conscrypt/Conscrypt$ProviderBuilder;
move-result-object v0
invoke-virtual {v0}, Lorg/conscrypt/Conscrypt$ProviderBuilder;->provideTrustManager()Lorg/conscrypt/Conscrypt$ProviderBuilder;
move-result-object v0
invoke-virtual {v0}, Lorg/conscrypt/Conscrypt$ProviderBuilder;->build()Ljava/security/Provider;
move-result-object v0
return-object v0
.end method