I am developing an Android application using client certificate authentication in WebView. The certificate (cert.pfx) and password are built into the application.
When executing a client certificate authentication request using an ajax call, the following function is called in WebView:
@Override public void onReceivedClientCertRequest(WebView view, final ClientCertRequest request) {}
As I understand it, I need to call:
request.proceed(PrivateKey privateKey, X509Certificate[] chain)
Any idea of ββcreating PrivateKey and X509Certificate objects from a built-in certificate to continue the request. By the way, is this the right way to implement client certificate authentication in an Android app? if not, please advice.
source share