Browse Source

Use our own SSL socket factory implementation so support all TLS variants and SNI in RSS feed parser. Fixes kat.cr feeds, for example.

pull/280/head
Eric Kok 9 years ago
parent
commit
57e33b4ce7
  1. 3
      app/src/main/java/org/transdroid/core/rssparser/RssParser.java

3
app/src/main/java/org/transdroid/core/rssparser/RssParser.java

@ -18,6 +18,7 @@ import org.apache.http.params.BasicHttpParams; @@ -18,6 +18,7 @@ import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.transdroid.daemon.util.HttpHelper;
import org.transdroid.daemon.util.TlsSniSocketFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
@ -131,7 +132,7 @@ public class RssParser extends DefaultHandler { @@ -131,7 +132,7 @@ public class RssParser extends DefaultHandler {
SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme("http", new PlainSocketFactory(), 80));
registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
registry.register(new Scheme("https", new TlsSniSocketFactory(), 443));
HttpParams httpparams = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpparams, 5000);

Loading…
Cancel
Save