Browse Source

Fix always failing SSL with empty sslTrustKey

pull/187/head
Mathijs van de Nes 10 years ago
parent
commit
15bcbb03a2
  1. 2
      app/src/main/java/org/transdroid/daemon/util/HttpHelper.java

2
app/src/main/java/org/transdroid/daemon/util/HttpHelper.java

@ -130,7 +130,7 @@ public class HttpHelper { @@ -130,7 +130,7 @@ public class HttpHelper {
// Register http and https sockets
SchemeRegistry registry = new SchemeRegistry();
SocketFactory httpsSocketFactory;
if (sslTrustKey != null) {
if (sslTrustKey != null && sslTrustKey.length() != 0) {
httpsSocketFactory = new TlsSniSocketFactory(sslTrustKey);
} else if (sslTrustAll) {
httpsSocketFactory = new TlsSniSocketFactory(true);

Loading…
Cancel
Save