Android WebView complains that the certificate is not trusted, but is trusted in all other browsers


disconnection

My app opens a link to an external website in a webview. We do not control this external website. If you open this link in a mobile browser or a browser on a PC it works fine. In each case, the certificate is "trusted". However, in the Android Webview, I get an "untrusted certificate" error, and Google policy doesn't allow me to simply ignore the error. What could be the problem? Is this a bug in Webview?

Zegna Van Rankunu

Typically, browsers handle certificates a little differently to solve the problem you're having. I'm not familiar with browser internals to point to something completely different, but I'd recommend that they keep a regularly updated list of trusted certificate authorities (CAs) rather than a list of trusted CAs stored on the device.

The certificate received can be trusted:

  • via Android OS;
  • By applying (see method below). I'm guessing this is an alternative option used by browsers.

You will have to fix this by providing modifiers SSLContext. How to provide a modified SSLContext can be found here .

This is not your case, but this problem also occurs when the certificate is self-signed. This is an issue when developing an application and connecting to a TLS-enabled backend that uses a self-signed certificate.

Related


GeoTrust SSL certificate on Android is not trusted

Vojtech I've purchased an Extended Validation SSL certificate from GeoTrust and configured it to get an A grade: https://www.ssllabs.com/ssltest/analyze.html?d=goout.cz However, on my Android device on Chrome, I get "Certificate not trusted". What could be the

How to install a trusted CA certificate on an Android device?

Bjorn Marshall Lake I have created my own CA certificate and now I want to install it on an Android Froyo device (HTC Desire Z) so that the device trusts my certificate. Android stores the CA certificate in the Java keystore /system/etc/security/cacerts.bks. I

How to install a trusted CA certificate on an Android device?

Bjorn Marshall Lake I have created my own CA certificate and now I want to install it on an Android Froyo device (HTC Desire Z) so that the device trusts my certificate. Android stores the CA certificate in the Java keystore /system/etc/security/cacerts.bks. I

Android Studio: The server's certificate is not trusted

x Is it safe to ignore this warning? When I create a new project in Android Studio it shows: Server's certificate is not trusted Certificate details Issued To CN (Common Name) *.google.com O (Organization) Google Inc L (Locality) Mount

Android SSLContext trusted certificate not working with API 8

Collar scale 91 I have the following code for configuration and SSL connection and instantiation of one JsonRpcHttpClientusing Jsonrpc4j implementation : public static void createJsonRpcClient(Context ctx) throws NoSuchAlgorithmException, KeyStoreException, Ce

Android HTTPS error No trusted server certificate

Sebu Murugan I have an existing API server with HTTPS. When I access it from an Android app, it shows an HTTPS error: Untrusted server certificate. How can I access HTTPS URLs from my Android app? Lord Shiva This problem occurs if the SSL certificate is not in

How to install a trusted CA certificate on an Android device?

Bjorn Marshall Lake I have created my own CA certificate and now I want to install it on an Android Froyo device (HTC Desire Z) so that the device trusts my certificate. Android stores the CA certificate in the Java keystore /system/etc/security/cacerts.bks. I

Android SSLContext trusted certificate not working with API 8

Collar scale 91 I have the following code for configuration and SSL connection and instantiation of one JsonRpcHttpClientusing Jsonrpc4j implementation : public static void createJsonRpcClient(Context ctx) throws NoSuchAlgorithmException, KeyStoreException, Ce

Gradle: No trusted certificate found

OBit: I'm trying to build my Android project on Ubuntu-Server using Gradle. Building with Android-Studio on Windows 10 PC works fine But use ./gradlew buildor ./gradlew cleanfails with the following output: FAILURE: Build failed with an exception. * What went

my ssl certificate is not trusted

b4rt3kk: I have made the certificate on the server using the following command: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt and configure everything correctly, when typing https

my ssl certificate is not trusted

b4rt3kk: I have made the certificate on the server using the following command: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt and configure everything correctly, when typing https

The "iPhone Distribution" certificate is not trusted

Adam Zayn I just installed a new iPhone distribution certificate that was exported as .p12 from someone else's computer. When I try to archive with a profile bound to this new certificate, I get this invalid trust settings error: Restore the system default tru

my ssl certificate is not trusted

b4rt3kk I have made the certificate on the server using the following command: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt and configure everything correctly, when typing https

SSL certificate is not trusted

Chris Dutro I have a problem with my SSL certificate. Usually it seems to work fine, but sometimes the user's browser will issue a warning that it is not trusted. I know very little about SSL certificates, but the following information may or may not be releva

The "iPhone Distribution" certificate is not trusted

Adam Zayn I just installed a new iPhone distribution certificate that was exported as .p12 from someone else's computer. When I try to archive with a profile bound to this new certificate, I get this invalid trust settings error: Restore the system default tru

Certificate not trusted by Websphere

Nabil I have a web application that calls a SOAP web service secured over SSL. (https://zzzzzzzzzzzz/xxxxx). The server sends two certificates (Root and Leaf), so I imported both certificates using properties: com.ibm.websphere.ssl.retrieveLeafCert. To enable

Firefox gives "Certificate not trusted"

bean I'm using Tomcat 7, APR and DigiCert to sign a "star" certificate for my organization. I have a connector defined as follows: <Connector protocol="HTTP/1.1" port="8443" maxThreads="200" scheme="https" secure="true" SSLEnab

Gradle: No trusted certificate found

OBit: I'm trying to build my Android project on Ubuntu-Server using Gradle. Building with Android-Studio on Windows 10 PC works fine But use ./gradlew buildor ./gradlew cleanfails with the following output: FAILURE: Build failed with an exception. * What went

my ssl certificate is not trusted

b4rt3kk: I have made the certificate on the server using the following command: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt and configure everything correctly, when typing https

The "iPhone Distribution" certificate is not trusted

Adam Zayn I just installed a new iPhone distribution certificate that was exported as .p12 from someone else's computer. When I try to archive with a profile bound to this new certificate, I get this invalid trust settings error: Restore the system default tru

SoapFault: No trusted certificate found

Sargon 1 introduce I'm working on a feature for an accounting system that takes an XML file with data about sales, sends it to a government server, and receives a response message. You will also need some certificates to ensure the authenticity of the sender.