I creating a application which display a specific site to the user and I'm using web view to acoomplish that task. When I try to load that specific site web view shows nothing and log cat says,
E/chromium: [ERROR:ssl_client_socket_impl.cc(946)] handshake failed; returned -1, SSL error code 1, net_error -202
So after some searching I found this answer to ignore this SSL Certificate error and using following code I'm enable to load that site.
webView.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
Log.d("ssl_error", error.toString());
}
});
As I send error.toString()
to log cat, It says,
primary error: 3 certificate: Issued to: [some details of the company of that specific site] Issued by: CN=GeoTrust RSA CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US; on URL: [that spefic site url]
But I want to fix that error without ignoring that.
As in the previously mentioned stack overflow answer I'm unable to match the details of https://developer.android.com/training/articles/security-config to solve this problem without ignoring it. What should I do with network configuration to solve this problem ?
Note:- I want to work with only one specific site. No need to work with any site