From: David A. Velasco Date: Mon, 10 Sep 2012 08:53:11 +0000 (+0200) Subject: Fixed the lack of warning when a non trusted SSL certificate is found if the user... X-Git-Tag: oc-android-1.4.3~185 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/f3d61ef57832e5ca37f00ec6702207e0f208bb30 Fixed the lack of warning when a non trusted SSL certificate is found if the user creates a new account without the protocol prefix in the URL and both HTTPS and HTTP are available in the server --- diff --git a/src/com/owncloud/android/authenticator/ConnectionCheckOperation.java b/src/com/owncloud/android/authenticator/ConnectionCheckOperation.java index 7ed61eab..17b0dc23 100644 --- a/src/com/owncloud/android/authenticator/ConnectionCheckOperation.java +++ b/src/com/owncloud/android/authenticator/ConnectionCheckOperation.java @@ -121,7 +121,7 @@ public class ConnectionCheckOperation extends RemoteOperation { if (tryConnection(client, "https://" + mUrl + AccountUtils.STATUS_PATH)) { return new RemoteOperationResult(RemoteOperationResult.ResultCode.OK_SSL); - } else if (mLatestResult.isSslRecoverableException()) { + } else if (!mLatestResult.isSslRecoverableException()) { Log.d(TAG, "establishing secure connection failed, trying non secure connection"); client.setBaseUri(Uri.parse("http://" + mUrl + AccountUtils.STATUS_PATH));