From: David A. Velasco Date: Wed, 26 Jun 2013 10:45:35 +0000 (+0200) Subject: Fixed false error message and lack of recheck when a server certificate is explicitly... X-Git-Tag: oc-android-1.4.3~13^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/04803ae879ce8762c2b59656a0b5c1614c18712f?hp=--cc Fixed false error message and lack of recheck when a server certificate is explicitly accepted by the user in the login view --- 04803ae879ce8762c2b59656a0b5c1614c18712f diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 51185520..6eae48f0 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -1270,7 +1270,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList * Called from SslValidatorDialog when a new server certificate was correctly saved. */ public void onSavedCertificate() { - mOperationThread = mOcServerChkOperation.retry(this, mHandler); + checkOcServer(); } /** diff --git a/src/com/owncloud/android/ui/dialog/SslValidatorDialog.java b/src/com/owncloud/android/ui/dialog/SslValidatorDialog.java index a5766eee..6ae4156d 100644 --- a/src/com/owncloud/android/ui/dialog/SslValidatorDialog.java +++ b/src/com/owncloud/android/ui/dialog/SslValidatorDialog.java @@ -18,6 +18,7 @@ package com.owncloud.android.ui.dialog; import java.io.IOException; +import java.security.GeneralSecurityException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; @@ -111,7 +112,13 @@ public class SslValidatorDialog extends Dialog { else Log_OC.d(TAG, "Nobody there to notify the certificate was saved"); - } catch (Exception e) { + } catch (GeneralSecurityException e) { + dismiss(); + if (mListener != null) + mListener.onFailedSavingCertificate(); + Log_OC.e(TAG, "Server certificate could not be saved in the known servers trust store ", e); + + } catch (IOException e) { dismiss(); if (mListener != null) mListener.onFailedSavingCertificate();