-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Android] Improvements to remote certificate verification in SslStream #77386
Merged
simonrozsival
merged 74 commits into
dotnet:main
from
simonrozsival:android-remote-certificate-verification-improvements
Jan 16, 2023
Merged
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
4fdd70a
Extract existing validation code into a separate class
simonrozsival a4726a6
Implement AndroidDexBuilderTask
simonrozsival 18214ea
Implement TrustManager proxy
simonrozsival 193f3c6
Integrate the trust manager proxy with SslStream on Android
simonrozsival 6e8659f
Update tests
simonrozsival c84e355
Update System.Net.Http tests
simonrozsival f1d429f
Update System.Net.Security tests
simonrozsival 3e72ff3
Fix packaging
simonrozsival 2d9a2ec
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival 04da7c9
Propagate caught exceptions
simonrozsival 28c360b
Build and pack .jar
simonrozsival 220a83e
Optimize allocation and deallocation of memory for certificate data
simonrozsival c483e31
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival e42a67d
Fix building .jar
simonrozsival 476bd84
Cleanup
simonrozsival f3fb8c5
Remove complicated certificate copying
simonrozsival f579d38
Remove unnecessary JNI classes and methods
simonrozsival 663c40d
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival e68908b
Simplify and fix the core implementation
simonrozsival 9cfd08b
Update enabled and disabled tests
simonrozsival 1bc237e
Cleanup
simonrozsival 7b04be0
Renaming
simonrozsival 2f70a5d
Remove unnecessary changes
simonrozsival af18da7
Fix invoking validation even when the Java callbacks aren't called (n…
simonrozsival 4a7c785
Minor refactoring
simonrozsival 21a69ed
Enable more unnecessarily disabled tests
simonrozsival 6cb7122
Refactor exception handling
simonrozsival 7aa11a9
Update disabled tests
simonrozsival 405dd0c
Renaming
simonrozsival 0e86a01
Remove network security config workarounds
simonrozsival b4f0e81
Keep existing active issue
simonrozsival c74d272
Remove unnecessary changes
simonrozsival 90ea148
Remove unnecessary code
simonrozsival 343cc65
Enable more disabled tests
simonrozsival 2dd1ab7
Fix throwing exception
simonrozsival d7d95e0
Fix intptr_t cast to Java
simonrozsival aeb5714
Remove initialization lock
simonrozsival b4b5589
Update naming
simonrozsival 3118376
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival c16ad79
Fix type casting
simonrozsival 446d4a3
Improve throwing validation exception
simonrozsival 4b4af02
Experiment with code structure
simonrozsival ae2fb90
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival eb41d22
Fix repeated calls to beginHandshake
simonrozsival e9c018f
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival c2038ac
Make SslStream proxy mandatory
simonrozsival ac72811
Add missing attributes
simonrozsival 3c7378a
Free temporary buffer
simonrozsival 010516c
Update src/native/libs/System.Security.Cryptography.Native.Android/pa…
simonrozsival 9681df0
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival ccae3e2
Refactor creating array of trust managers
simonrozsival 019a83d
Add comments and clean up pal_sslstream.c
simonrozsival fb793fa
Merge branch 'android-remote-certificate-verification-improvements' o…
simonrozsival 5d26948
Revert experimental change
simonrozsival 2dec0d5
Remove special case for IPv6 addresses as hostnames and disable affec…
simonrozsival 6d55d21
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival 0d42b22
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival 694589b
Fix duplicate variable after merge
simonrozsival 315ca06
Improve code formatting
simonrozsival 9c1e0a3
Merge branch 'main' into android-remote-certificate-verification-impr…
simonrozsival b94a12c
Remove the hack with SafeDeleteContextStub
simonrozsival 061285a
Enable passing test
simonrozsival 52e65b1
Merge branch 'android-remote-certificate-verification-improvements' o…
simonrozsival d2d695a
Remove unnecessary factory
simonrozsival b6f5385
Move clearing selected client certificate out of the remote certifica…
simonrozsival 6a0b8ef
Fix typo in comment
simonrozsival e5d1e8d
Add comment with java equivalent
simonrozsival 292b893
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival 50befcf
Move Android specific runtime files into a separate item group
simonrozsival 34e7fac
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival 5dcf43a
Merge branch 'main' of https://github.com/dotnet/runtime into android…
simonrozsival f3d9ac4
Apply suggestions from code review
simonrozsival 1338689
Update src/native/libs/build-native.proj
simonrozsival f4ff98a
Disable test that fails on Android emualtors
simonrozsival 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
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
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
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
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.
It seems like that can be turned off..????
https://developer.android.com/reference/java/net/IDN
Is this because it does not like "::1" format?
Would it work in the long form? e.g. "0:0:0:0:0:0:0:1" or "[0:0:0:0:0:0:0:1]"?
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.
It has an allow list of characters that doesn't include
:
, it's not just about the loopback address specifically so the long forms don't work either. We can't turn it off AFAIK. I'm by no means an expert in this area but from what I read it's a bad practice to put IP addresses into SNI host name (see #79143).