b.smali
3.8 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
.class public final Lb/h0/l/b;
.super Ljava/lang/Object;
# interfaces
.implements Lb/h0/l/e;
# instance fields
.field public final a:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljavax/security/auth/x500/X500Principal;",
"Ljava/util/Set<",
"Ljava/security/cert/X509Certificate;",
">;>;"
}
.end annotation
.end field
# direct methods
.method public varargs constructor <init>([Ljava/security/cert/X509Certificate;)V
.locals 6
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/LinkedHashMap;
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
iput-object v0, p0, Lb/h0/l/b;->a:Ljava/util/Map;
array-length v0, p1
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_1
aget-object v2, p1, v1
invoke-virtual {v2}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal;
move-result-object v3
iget-object v4, p0, Lb/h0/l/b;->a:Ljava/util/Map;
invoke-interface {v4, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/util/Set;
if-nez v4, :cond_0
new-instance v4, Ljava/util/LinkedHashSet;
const/4 v5, 0x1
invoke-direct {v4, v5}, Ljava/util/LinkedHashSet;-><init>(I)V
iget-object v5, p0, Lb/h0/l/b;->a:Ljava/util/Map;
invoke-interface {v5, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_0
invoke-interface {v4, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_1
return-void
.end method
# virtual methods
.method public a(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate;
.locals 4
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getIssuerX500Principal()Ljavax/security/auth/x500/X500Principal;
move-result-object v0
iget-object v1, p0, Lb/h0/l/b;->a:Ljava/util/Map;
invoke-interface {v1, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Set;
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
:cond_0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:catch_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/security/cert/X509Certificate;
invoke-virtual {v2}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
move-result-object v3
:try_start_0
invoke-virtual {p1, v3}, Ljava/security/cert/X509Certificate;->verify(Ljava/security/PublicKey;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-object v2
:cond_1
return-object v1
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 2
const/4 v0, 0x1
if-ne p1, p0, :cond_0
return v0
:cond_0
instance-of v1, p1, Lb/h0/l/b;
if-eqz v1, :cond_1
check-cast p1, Lb/h0/l/b;
iget-object p1, p1, Lb/h0/l/b;->a:Ljava/util/Map;
iget-object v1, p0, Lb/h0/l/b;->a:Ljava/util/Map;
invoke-interface {p1, v1}, Ljava/util/Map;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_1
goto :goto_0
:cond_1
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public hashCode()I
.locals 1
iget-object v0, p0, Lb/h0/l/b;->a:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->hashCode()I
move-result v0
return v0
.end method