[d16-2] [foundation] Add custom trust/certificate validation to NSUrlSessionHandler. Fix #4170 #6110
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basic application (size) for doing an
HttpClient.GetAsync, release/llvm, 64bits onlyThe size increase occurs because of the reference to .net
X509*types.This brings a lot of additional code, including managed cryptographic
code, inside the application - even when the feature is not used.
The solution is to expose an API that only use native (OS) types, which
are mostly already part of the application. This has a very low impact
on existing applications.
It's still possible to hook back to .NET validation if needed (it should
not in most cases) but, in this case, the extra price will only be
paid if used (and can be lower if the code is needed by something else
from the application).
In comparison using other
HttpClienthandler produce app sizes ofBased on/supersede #5733
Fix #4170
Backport of #6103.
/cc @spouliot