-
Notifications
You must be signed in to change notification settings - Fork 538
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
[Mono.Android] Add support for AndroidMessageHandler ClientCertificates #8961
Merged
jonpryor
merged 15 commits into
dotnet:main
from
simonrozsival:android-message-handler-support-client-certificate
Jul 10, 2024
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
945991f
Implement support for client certificates
simonrozsival e486d33
Add test
simonrozsival a5f6f12
Suppress credscan error caused by a self-signed test certificate
simonrozsival 15d77a4
Update apkdesc file
simonrozsival d183594
Addressing review comments
simonrozsival 7dabc57
Revert unnecessary change
simonrozsival fc41236
Fix conversion of X509Certificate2 to Java Certificate
simonrozsival 50d06db
Update apk size
simonrozsival 7ae6527
Update gdn suppressions file
simonrozsival 3b8f788
Merge branch 'main' of https://github.com/dotnet/android into android…
simonrozsival 78afa3c
Merge branch 'main' into android-message-handler-support-client-certi…
jonathanpeppers e6aa1ef
Update apk sizes
simonrozsival 9233d67
Merge branch 'main' of https://github.com/dotnet/android into android…
simonrozsival 25e3eeb
Merge remote-tracking branch 'origin/main' into android-message-handl…
jonpryor 108b196
Flush .apkdesc files
jonpryor 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
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
Oops, something went wrong.
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.
I believe that this is somewhat contrary to the Framework design guidelines; from Property Design:
For example, consider this snippet:
Because C# collection initializer syntax is repeated
.Add()
calls, the above is equivalent to:which is an invalid state: having any
ClientCertificates
should requireClientCertificateOption.Manual
, as per the current check, but (as far as I can tell) nothing actually validates this ordering.(And nothing should validate "ordering"!)
I think it would thus be preferable to delay the "consistency check" until…
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.
First of all, thanks for the detailed feedback, @jonpryor!
You have a great point here, this design choice isn't great. I'm following
HttpClientHandler
which also throws. I would personally keep this in line with the runtime, but I don't have a strong preference and I can definitely modify the code.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.
On the one hand, following what
HttpClientHandler
is doing makes sense.On the other hand, I'm not convinced that actually fixes the implicit ordering issues.
A quick glance through the
HttpClientHandler
unit tests forClientCertificates
suggests that this ordering issue is not tested at all. Fortunately, I don't see any issues on dotnet/runtime about this either…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.
The required order makes sense to me. The error you get is helpful too and expected