1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-29 15:51:17 +00:00

Fix SSL handshake failed on Android 7.0 devices (fixes #262) (fixes #266)

This commit is contained in:
Catfriend1 2019-01-23 09:07:43 +01:00
parent 16769b137f
commit 0900d50379

View file

@ -180,6 +180,20 @@ public class Constants {
* to syncthing core v0.14.53+.
*/
public static Boolean osSupportsTLS12() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
// Pre-Lollipop devices don't support TLS 1.2
return false;
}
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
/**
* SSLProtocolException: SSL handshake failed on Android N/7.0,
* missing support for elliptic curves.
* See https://issuetracker.google.com/issues/37122132
*/
return false;
}
return true;
}
}