Fixed the lack of warning when a non trusted SSL certificate is found if the user...
authorDavid A. Velasco <dvelasco@solidgear.es>
Mon, 10 Sep 2012 08:53:11 +0000 (10:53 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Mon, 10 Sep 2012 08:53:11 +0000 (10:53 +0200)
src/com/owncloud/android/authenticator/ConnectionCheckOperation.java

index 7ed61ea..17b0dc2 100644 (file)
@@ -121,7 +121,7 @@ public class ConnectionCheckOperation extends RemoteOperation {
             if (tryConnection(client, "https://" + mUrl + AccountUtils.STATUS_PATH)) {
                 return new RemoteOperationResult(RemoteOperationResult.ResultCode.OK_SSL);
                                
             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));
                 
                 Log.d(TAG, "establishing secure connection failed, trying non secure connection");
                 client.setBaseUri(Uri.parse("http://" + mUrl + AccountUtils.STATUS_PATH));