Android webview and certs on 4.4.2

邮差的信 提交于 2019-12-24 09:14:08

问题


I am trying to get client Samsung tablet to work with site requiring client devices to have cert. I can get it working on tablets with 5.0+ because webview has onReceivedClientCertRequest. So I can use that to then load the cert and the key.

But I am having problems on tablets running 4.4.2 because that onReceivedClientCertRequest function is for 5+. When I run on 4.4.2 my concern is that the logger shows:

'12-23 12:46:07.541 20804-20804/com.example.ssltest I/chromium: [INFO:aw_content_browser_client.cc(349)] Client certificate request from rejected. (Client certificates not supported in WebView)'

...is is true that I can't use webview on tablets running<5 if site requires client cert?

If not true, can someone help me on how to do it?


回答1:


You can install user certificates on a 4.4.2 tablet. This would not be the right solution for production code (for production you would usually have a trusted cert anyways), but is good for testing a site which does not have a trusted cert.

To do this:

  1. Download the cert file to the phone.
  2. In the Settings go to the security tab. In it under Credential storage find Install from SD card:

  1. Select the file you downloaded:

  1. You need to install a PIN/Password if you don't already have one.


来源:https://stackoverflow.com/questions/41306089/android-webview-and-certs-on-4-4-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!