mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 06:11:19 +00:00
This commit is contained in:
parent
16769b137f
commit
0900d50379
1 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue