Fix trusted certificate setting with Tasker plugin.
This commit is contained in:
parent
276b2ad46b
commit
b5df50adda
@ -279,7 +279,7 @@ public class ApiRequest extends AsyncTask<HashMap<String,String>, Integer, JsonE
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void trustAllHosts(boolean trustAnyCert, boolean trustAnyHost) {
|
public static void trustAllHosts(boolean trustAnyCert, boolean trustAnyHost) {
|
||||||
try {
|
try {
|
||||||
if (trustAnyCert) {
|
if (trustAnyCert) {
|
||||||
X509TrustManager easyTrustManager = new X509TrustManager() {
|
X509TrustManager easyTrustManager = new X509TrustManager() {
|
||||||
|
@ -80,6 +80,7 @@ public class TaskerReceiver extends BroadcastReceiver {
|
|||||||
String login = prefs.getString("login", "").trim();
|
String login = prefs.getString("login", "").trim();
|
||||||
String password = prefs.getString("password", "").trim();
|
String password = prefs.getString("password", "").trim();
|
||||||
String ttrssUrl = prefs.getString("ttrss_url", "").trim();
|
String ttrssUrl = prefs.getString("ttrss_url", "").trim();
|
||||||
|
ApiRequest.trustAllHosts(prefs.getBoolean("ssl_trust_any", false), prefs.getBoolean("ssl_trust_any_host", false));
|
||||||
|
|
||||||
if (ttrssUrl.equals("")) {
|
if (ttrssUrl.equals("")) {
|
||||||
Toast toast = Toast.makeText(fContext, "Could not download articles: not configured?", Toast.LENGTH_SHORT);
|
Toast toast = Toast.makeText(fContext, "Could not download articles: not configured?", Toast.LENGTH_SHORT);
|
||||||
|
Loading…
Reference in New Issue
Block a user