Browse Source

Merge pull request #187 from mvdnes/ssl_trust_key

Fix always failing SSL with empty sslTrustKey string
pull/176/merge v2.5.0-beta2
Eric Kok 9 years ago
parent
commit
4ce5023c82
  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