Просмотр исходного кода

Using simplified way of removeKeys method

Isntead of having to find the hostname and port from an URL (which might be more tricky than expected), we now can simply pass down the URL and `AdvancedX509KeyManager` will take care of finding the port from the URL.

Signed-off-by: Elv1zz <elv1zz.git@gmail.com>
Elv1zz 2 лет назад
Родитель
Сommit
d59e16cb4c

+ 1 - 2
app/src/main/java/com/owncloud/android/ui/NextcloudWebViewClient.kt

@@ -16,7 +16,6 @@ import com.owncloud.android.lib.common.network.NetworkUtils
 import com.owncloud.android.lib.common.utils.Log_OC
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog
 import java.io.ByteArrayInputStream
-import java.net.MalformedURLException
 import java.security.cert.CertificateException
 import java.security.cert.CertificateFactory
 import java.security.cert.X509Certificate
@@ -112,7 +111,7 @@ open class NextcloudWebViewClient(val supportFragmentManager: FragmentManager) :
             // chosen client certificate alias does not seem to work -> discard it
             val failingUrl = request?.url ?: return
             val context = view?.context ?: return
-            AdvancedX509KeyManager(context).removeKeys(failingUrl.host, failingUrl.port)
+            AdvancedX509KeyManager(context).removeKeys(failingUrl)
         }
     }
 }