-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround TLS fragmented records (#32)
Task/Issue URL: https://app.asana.com/0/1202279501986195/1205874074739543/f ### Description We currently don't have support for TLS fragmented records and we think that lack of support is cause for the crashes/issues we see described in the asana task. This PR doesn't support fragmented records but it takes them into consideration when parsing the TLS. The main goal would be twofold: * avoid issues/crashes due to out of bounds buffer addressing on a fragmented record * eagerly check TLS extensions to still block trakcers on fragmented records when the SNI falls into the first record ### Steps to test this PR - [x] from this branch, publish the library to maven local ie. `./gradlew clean assemble publishToMavenLocal` - [ ] In the DDG android app apply the following path ```diff Subject: [PATCH] Maven local use --- Index: build.gradle IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/build.gradle b/build.gradle --- a/build.gradle (revision d11f7491d7ab4b27223fd352f83c26be403e79ed) +++ b/build.gradle (revision 3b1fe446b5d33e4d8a7f400137134ea0b5a797d7) @@ -40,6 +40,7 @@ repositories { google() mavenCentral() + mavenLocal() } configurations.all { resolutionStrategy.force 'org.objenesis:objenesis:2.6' Index: versions.properties IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>ISO-8859-1 =================================================================== diff --git a/versions.properties b/versions.properties --- a/versions.properties (revision d11f7491d7ab4b27223fd352f83c26be403e79ed) +++ b/versions.properties (revision 3b1fe446b5d33e4d8a7f400137134ea0b5a797d7) @@ -55,7 +55,7 @@ version.com.android.installreferrer..installreferrer=2.2 -version.com.duckduckgo.netguard..netguard-android=1.6.0 +version.com.duckduckgo.netguard..netguard-android=1.7.0-SNAPSHOT version.com.duckduckgo.synccrypto..sync-crypto-android=0.3.0 ``` - [x] build DDG app - [x] AppTP smoke tests
- Loading branch information
Showing
6 changed files
with
73 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
CMakeCache.txt | ||
src/.vscode/ | ||
*.o | ||
*test_tls |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
int is_valid_utf8(const char *str) { | ||
return 1; | ||
} |
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