-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Foundation] Implement the server certificate custom validation callback usage in NSUrlSessionHandler #15117
Merged
rolfbjarne
merged 26 commits into
xamarin:main
from
simonrozsival:nsurlsessionhandler-server-certificate-custom-validation-callback
Oct 17, 2022
Merged
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b0dbe59
WIP invoke server certificate custom validation callback
simonrozsival 916b931
WIP add tests
simonrozsival 6bd110a
Fix sec trust param type
simonrozsival 6e20ea4
WIP improve chain building
simonrozsival f0b8dd0
Make it build
akoeplinger c6ae804
Merge branch 'main' of https://github.com/xamarin/xamarin-macios into…
simonrozsival 4326052
Update tests
simonrozsival 78509b2
Fix build and update implementation
simonrozsival 9a6deda
Run the new tests only in .NET builds
simonrozsival 09ec0ce
Fix default certificate evaluation
simonrozsival eeb3495
Fix tests
simonrozsival f9a46f4
Merge branch 'main' into nsurlsessionhandler-server-certificate-custo…
simonrozsival c9d822d
Fix using GetCertificateChain on systems which don't support it
simonrozsival 06d972d
Merge branch 'nsurlsessionhandler-server-certificate-custom-validatio…
simonrozsival 65a2df3
Minor code touchup
simonrozsival cee43a2
Merge branch 'main' into nsurlsessionhandler-server-certificate-custo…
rolfbjarne 9227f2b
Fix code formatting
simonrozsival 799ac3c
Update X509Chain building
simonrozsival 4307863
Merge branch 'nsurlsessionhandler-server-certificate-custom-validatio…
simonrozsival f772124
Merge branch 'main' into nsurlsessionhandler-server-certificate-custo…
simonrozsival 27b368f
Use helper class to fix trimming issues
simonrozsival 40da74f
Fixes
simonrozsival db36a5d
Add missing setter
simonrozsival d691f6d
Merge remote-tracking branch 'origin/main' into nsurlsessionhandler-s…
rolfbjarne 7fb65da
Improve code to make the linker able to remove more code.
rolfbjarne df170fc
Fix build.
rolfbjarne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if both are set? Do we trust the native one of the manage APIs? Should we always trust first the results from ServerCertificateCustomValidationCallback ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted to trust the certificate if either of the callbacks trusts the certificate. It's basically the same in the #else branch. I guess the comment should be updated as well. Unless the callbacks contain some weird side effects, the order in which they are invoked doesn't matter. I'm not sure there's really a much better way of doing it.