Commit 940f059
[Mono.Android] Fix ServerCertificateCustomValidator (#8594)
Fixes: dotnet/runtime#95506
In Release configuration the `X509ExtendedTrustManagerInvoker` class is trimmed and so
the `trustManager is IX509TrustManager tm` pattern matching doesn't work.
This PR addresses the problem in two ways:
* an internal X509 trust manager is now required - it can't silently work with a null
internal trust manager anymore
* `[DynamicDependency]` attribute to prevent trimming of the invoker classes for
the `IX509TrustManager` interface and for the `X509ExtendedTrustManager`
abstract class1 parent 351bfa3 commit 940f059
File tree
2 files changed
+47
-16
lines changed- src
- Mono.Android/Xamarin.Android.Net
- Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks
2 files changed
+47
-16
lines changedLines changed: 13 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 176 | + | |
181 | 177 | | |
182 | 178 | | |
183 | 179 | | |
184 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
185 | 183 | | |
186 | 184 | | |
187 | | - | |
188 | 185 | | |
189 | 186 | | |
190 | 187 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
519 | 553 | | |
520 | 554 | | |
521 | 555 | | |
| |||
0 commit comments