-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Replace tls configuration with NetCipher for all Android versions #7372
Replace tls configuration with NetCipher for all Android versions #7372
Conversation
4224165
to
e43c760
Compare
The PR works also on Android 9 but it fails on Android 10. I figured out that OkHttp 3.12.13 is calling the method So I came up with adding my own public String getApplicationProtocol() {
String result = null;
try {
result = (String) delegate
.getClass()
.getMethod("getApplicationProtocol")
.invoke(delegate);
} catch (Exception e) {
e.printStackTrace();
}
return result;
} In the end to get it working we would have to either upgrade OkHttp or convince NetCipher to fix something in their code. In short NetCipher will not be a solution for now! I guess I have to reopen #7350 |
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.
Code looks - on the first impression - good.
However this has to be tested with some devices to ensure nothing gets broken.
Some minor changes:
Did some quick testing and the YT kiosk immediately throws an error on my emulator: Exception
Crash log
|
Jup! This is the problem with NetCipher not yet implementing those methods. See #issuecomment-966884189 |
but looks like the owner of the repository is willing to merge a PR containing the missing methods added in https://developer.android.com/reference/javax/net/ssl/SSLSocket the missing methods are: |
5ccfd2b
to
2f09ee2
Compare
Let NetCipher sort out the TlsVersions and CipherSuites that it considers save.
2f09ee2
to
6dcfe72
Compare
Hope everything is fixed now! Now we just have to wait until a new NetCipher version is released. If someone wants to test with my NetCipher changes applied just replace below line in - implementation "info.guardianproject.netcipher:netcipher:${netcipherVersion}"
+ implementation 'com.gitlab.evermind-zz.NetCipher:netcipher:c6fa69b' |
Maybe we should also add an option to enable/disable this in the preferences. |
Closing this for now:
Can be reopened / recreated when the situation changes. |
What is it?
Description of the changes in your PR
PR is tested on Android 4.4 and Android 7.1.2
EDIT: The PR works also on Android 9 but it fails on Android 10. See #issuecomment-966884189
This Pull request will render the following pull requests obsolete:
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence