-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Support for TLS 1.1 and 1.2 on Android 4.x #7192
Comments
Thanks to @HenryStevens I quickly managed to create a proof of concept. It is fairly straight forward as it just creates a custom |
@fkoester maybe you could create a PR so it's reviewed? Probably it's the only way for this to be merged into |
Sorry to bump this up. |
I've used @fkoester patch successfully, however I have no experience in Android and I don't know if the linked code provided can be sent as is in a PR. Edit |
Hi @fkoester! Have you managed to run TLS 1.2 with the latest RN versions? |
@kompot @finalquest @alvaromb |
I have a PR ready with the following code square/okhttp#2372 (comment) It is working perfectly under Android 4.x |
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
So, I rebased to the latest react-native master and and created a branch for a PR: https://github.com/bringnow/react-native/tree/enable-tls-1.2 @alvaromb Thanks for the hint! I incorporated some of the implementation details of @gotev 's code. Will test my code and then create a PR. |
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
Credits to Alex Gotev (@gotev) for the nice implementation.
PR is shipit'd |
Summary: This is a proposed patch for issue #7192. Android 4.1-4.4 has support for TLS 1.1 and 1.2 but it is disabled by default. Because of the known security issues and more and more servers switching to TLS 1.2 only, it would be nice for react-native to enable this support. I demonstrated a demo application which showcases the problem and can be used to test this patch. All sources and documentation for it can be found here: https://github.com/bringnow/react-native-tls-test Credits to Alex Gotev (gotev) for the nice implementation. Closes #9840 Differential Revision: D4099446 Pulled By: lacker fbshipit-source-id: 94db320dce6d27f98169e63f834562360c00eef7
Summary: This is a proposed patch for issue facebook#7192. Android 4.1-4.4 has support for TLS 1.1 and 1.2 but it is disabled by default. Because of the known security issues and more and more servers switching to TLS 1.2 only, it would be nice for react-native to enable this support. I demonstrated a demo application which showcases the problem and can be used to test this patch. All sources and documentation for it can be found here: https://github.com/bringnow/react-native-tls-test Credits to Alex Gotev (gotev) for the nice implementation. Closes facebook#9840 Differential Revision: D4099446 Pulled By: lacker fbshipit-source-id: 94db320dce6d27f98169e63f834562360c00eef7
It seems that enabling TLS 1.2 on Android < 5.0 yet with the default RN implementation, right? Besides forking RN, what can be a solution please? |
Any updates on this? |
I'm shocked that this is still not resolved. |
I just recognized that react-native 0.24.1 on Android 4.x devices fails to connect to HTTPS servers which allow only TLS 1.2, e.g. following Mozilla's recommended "modern compatibility" configuration [1].
According to the Android documentation TLS 1.2 is also supported on Android API level 16+ (Android 4.1+), but enabled by default only for API level 20+ (Android 5.0+) [2]
If using Android's native SSLSocketFactory implementation, it is quite simple to enable the TLS 1.2 support [3]. I am not sure though, if and how this is also possible for react-native applications. I also do not know why the Android developers did not enable it by default, so there might be any downsides on doing so. Therefore a config option to turn the support on/off would probably be a good idea.
I would like to create a pull request for this but before digging into the react-native code I wanted to create this issue in case someone else is able to push me in the right direction (or even say it's impossible).
[1] https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
[2] https://developer.android.com/reference/javax/net/ssl/SSLSocket.html
[3] http://blog.dev-area.net/2015/08/13/android-4-1-enable-tls-1-1-and-tls-1-2/
The text was updated successfully, but these errors were encountered: