diff --git a/app/app.iml b/app/app.iml
index fc630d9..8841e64 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -64,14 +64,6 @@
-
-
-
-
-
-
-
-
@@ -80,6 +72,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/java/org/openlp/android2/OpenLP.java b/app/src/main/java/org/openlp/android2/OpenLP.java
index 34b7a3a..a0818b8 100644
--- a/app/src/main/java/org/openlp/android2/OpenLP.java
+++ b/app/src/main/java/org/openlp/android2/OpenLP.java
@@ -35,7 +35,6 @@ import android.view.WindowManager;
import org.openlp.android2.activities.SettingsActivity;
import org.openlp.android2.common.NavigationOptions;
-import org.openlp.android2.common.NukeSSLCerts;
import org.openlp.android2.dialogs.AlertDisplayDialog;
import org.openlp.android2.dialogs.BlankDisplayDialog;
import org.openlp.android2.fragments.AboutFragment;
@@ -66,7 +65,6 @@ public class OpenLP extends ActionBarActivity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
- new NukeSSLCerts().nuke();
doPreferenceCheck();
diff --git a/app/src/main/java/org/openlp/android2/common/NukeSSLCerts.java b/app/src/main/java/org/openlp/android2/common/NukeSSLCerts.java
deleted file mode 100644
index bd11174..0000000
--- a/app/src/main/java/org/openlp/android2/common/NukeSSLCerts.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/******************************************************************************
- * OpenLP - Open Source Lyrics Projection *
- * --------------------------------------------------------------------------- *
- * Copyright (c) 2011-2016 OpenLP Android Developers *
- * --------------------------------------------------------------------------- *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU General Public License as published by the Free *
- * Software Foundation; version 2 of the License. *
- * *
- * This program is distributed in the hope that it will be useful, but WITHOUT *
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
- * more details. *
- * *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., 59 *
- * Temple Place, Suite 330, Boston, MA 02111-1307 USA *
- *******************************************************************************/
-package org.openlp.android2.common;
-
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.X509Certificate;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-
-public class NukeSSLCerts {
- protected static final String TAG = "NukeSSLCerts";
-
- public static void nuke() {
- try {
- TrustManager[] trustAllCerts = new TrustManager[]{
- new X509TrustManager() {
- public X509Certificate[] getAcceptedIssuers() {
- X509Certificate[] myTrustedAnchors = new X509Certificate[0];
- return myTrustedAnchors;
- }
-
- @Override
- public void checkClientTrusted(X509Certificate[] certs, String authType) {
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] certs, String authType) {
- }
- }
- };
- SSLContext sc = null;
- try {
- sc = SSLContext.getInstance("TLS");
- } catch (NoSuchAlgorithmException e) {
- e.printStackTrace();
- }
- try {
- sc.init(null, trustAllCerts, new java.security.SecureRandom());
- } catch (KeyManagementException e) {
- e.printStackTrace();
- }
- HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
- // Create all-trusting host name verifier
- HostnameVerifier allHostsValid = new HostnameVerifier() {
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
- };
- // Install the all-trusting host verifier
- HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
- } catch (Exception e) {
- }
- }
-}
diff --git a/app/src/main/java/org/openlp/android2/common/OpenLPURLBuilder.java b/app/src/main/java/org/openlp/android2/common/OpenLPURLBuilder.java
index a9c1084..3ba6c87 100644
--- a/app/src/main/java/org/openlp/android2/common/OpenLPURLBuilder.java
+++ b/app/src/main/java/org/openlp/android2/common/OpenLPURLBuilder.java
@@ -67,12 +67,11 @@ public class OpenLPURLBuilder {
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Boolean useSSL = sharedPrefs.getBoolean(context.getString(R.string.key_ssl_use), false);
String host = sharedPrefs.getString(context.getString(R.string.key_host),
context.getString(R.string.host_default_value));
String port = sharedPrefs.getString(context.getString(R.string.key_port), "4316");
- return String.format("http%s://%s:%s", useSSL ? "s" : "", host, port);
+ return String.format("http://%s:%s", host, port);
}
}
diff --git a/app/src/main/java/org/openlp/android2/fragments/WebFragment.java b/app/src/main/java/org/openlp/android2/fragments/WebFragment.java
index ac8b892..8857c5c 100644
--- a/app/src/main/java/org/openlp/android2/fragments/WebFragment.java
+++ b/app/src/main/java/org/openlp/android2/fragments/WebFragment.java
@@ -19,12 +19,10 @@
package org.openlp.android2.fragments;
import android.app.Fragment;
-import android.net.http.SslError;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import org.openlp.android2.R;
@@ -75,9 +73,5 @@ public class WebFragment extends Fragment {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return false;
}
- @Override
- public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
- handler.proceed(); // Ignore SSL certificate errors
- }
}
}
diff --git a/app/src/main/res/values/keyStrings.xml b/app/src/main/res/values/keyStrings.xml
index 578fe53..9afc890 100644
--- a/app/src/main/res/values/keyStrings.xml
+++ b/app/src/main/res/values/keyStrings.xml
@@ -8,6 +8,4 @@
key_userid
key_password
key_shared_preferences
- key_ssl_use
-
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0d6bc72..c4da2b5 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -20,8 +20,6 @@
Configure Network
Password
Server Details
- Use HTTPS
- Specify whether HTTPS should be used
Connection Timeout
Select a value (milliseconds)
Username
diff --git a/build.gradle b/build.gradle
index f6e9073..e220f0b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.1.0'
+ classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files