mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 05:07:40 +00:00
Added cipher list for Android versions between 11 and 21.
BUG: 368172
This commit is contained in:
parent
e2e78cb562
commit
b25ec2d133
@ -209,13 +209,17 @@ public class SslHelper {
|
|||||||
// These cipher suites are most common of them that are accepted by kde and android during handshake
|
// These cipher suites are most common of them that are accepted by kde and android during handshake
|
||||||
ArrayList<String> supportedCiphers = new ArrayList<>();
|
ArrayList<String> supportedCiphers = new ArrayList<>();
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
supportedCiphers.add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384");
|
supportedCiphers.add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); // API 20+
|
||||||
supportedCiphers.add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256");
|
supportedCiphers.add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); // API 20+
|
||||||
supportedCiphers.add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA");
|
supportedCiphers.add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); // API 11+
|
||||||
|
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
|
supportedCiphers.add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); // API 11+
|
||||||
|
supportedCiphers.add("SSL_RSA_WITH_RC4_128_SHA"); // API 9+
|
||||||
|
supportedCiphers.add("SSL_RSA_WITH_RC4_128_MD5"); // API 9+
|
||||||
} else {
|
} else {
|
||||||
// Following ciphers are for and due to old devices
|
// Following ciphers are for and due to old devices
|
||||||
supportedCiphers.add("SSL_RSA_WITH_RC4_128_SHA");
|
supportedCiphers.add("SSL_RSA_WITH_RC4_128_SHA"); // API 9+
|
||||||
supportedCiphers.add("SSL_RSA_WITH_RC4_128_MD5");
|
supportedCiphers.add("SSL_RSA_WITH_RC4_128_MD5"); // API 9+
|
||||||
}
|
}
|
||||||
socket.setEnabledCipherSuites(supportedCiphers.toArray(new String[supportedCiphers.size()]));
|
socket.setEnabledCipherSuites(supportedCiphers.toArray(new String[supportedCiphers.size()]));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user