From 57e33b4ce727a7fbe29deef0005df426439b77df Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Fri, 11 Dec 2015 11:00:30 +0100 Subject: [PATCH] Use our own SSL socket factory implementation so support all TLS variants and SNI in RSS feed parser. Fixes kat.cr feeds, for example. --- app/src/main/java/org/transdroid/core/rssparser/RssParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/transdroid/core/rssparser/RssParser.java b/app/src/main/java/org/transdroid/core/rssparser/RssParser.java index 64e79015..8373b9bb 100644 --- a/app/src/main/java/org/transdroid/core/rssparser/RssParser.java +++ b/app/src/main/java/org/transdroid/core/rssparser/RssParser.java @@ -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 { 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);