-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Improvements to remote certificate verification in SslStream (
#77386) * Extract existing validation code into a separate class * Implement AndroidDexBuilderTask * Implement TrustManager proxy * Integrate the trust manager proxy with SslStream on Android * Update tests * Update System.Net.Http tests * Update System.Net.Security tests * Fix packaging * Propagate caught exceptions * Build and pack .jar * Optimize allocation and deallocation of memory for certificate data * Fix building .jar * Cleanup * Remove complicated certificate copying * Remove unnecessary JNI classes and methods * Simplify and fix the core implementation * Update enabled and disabled tests * Cleanup * Renaming * Remove unnecessary changes * Fix invoking validation even when the Java callbacks aren't called (no peer certificate to validate) * Minor refactoring * Enable more unnecessarily disabled tests * Refactor exception handling * Update disabled tests * Renaming * Remove network security config workarounds * Keep existing active issue * Remove unnecessary changes * Remove unnecessary code * Enable more disabled tests * Fix throwing exception * Fix intptr_t cast to Java * Remove initialization lock * Update naming * Fix type casting * Improve throwing validation exception * Experiment with code structure * Fix repeated calls to beginHandshake * Make SslStream proxy mandatory * Add missing attributes * Free temporary buffer * Update src/native/libs/System.Security.Cryptography.Native.Android/pal_sslstream.c Co-authored-by: Elinor Fung <[email protected]> * Refactor creating array of trust managers * Add comments and clean up pal_sslstream.c * Revert experimental change * Remove special case for IPv6 addresses as hostnames and disable affected tests * Fix duplicate variable after merge * Improve code formatting * Remove the hack with SafeDeleteContextStub * Enable passing test * Remove unnecessary factory * Move clearing selected client certificate out of the remote certificate verification method * Fix typo in comment * Add comment with java equivalent * Move Android specific runtime files into a separate item group * Apply suggestions from code review Co-authored-by: Alexander Köplinger <[email protected]> * Update src/native/libs/build-native.proj Co-authored-by: Alexander Köplinger <[email protected]> * Disable test that fails on Android emualtors Co-authored-by: Elinor Fung <[email protected]> Co-authored-by: Alexander Köplinger <[email protected]>
- Loading branch information
1 parent
4cf8c07
commit c435061
Showing
50 changed files
with
809 additions
and
192 deletions.
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.