是否可以在android webview中存储SSL证书

发布于 2024-12-06 09:13:11 字数 582 浏览 1 评论 0原文

在我正在开发的应用程序中,我必须向网络服务器发送 HTTPS 请求。当我直接执行此操作(没有 webview)时,我收到了证书不受信任的错误。

但是,当我使用 android webview 加载 HTTPS URL 时,

public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
handler.proceed() ;
}

当我收到 SSL 证书不可信错误时,我可以继续连接。

我的疑问是

1)如果我使用上述方法,Android Webview 是否会将证书实际存储在其密钥库中?

2)同样的 Webview 是否能够使用其密钥库中的证书来接受与同一个 HTTPS 服务器的进一步连接?

3)我们能否以编程方式将一些证书放入 webview 的密钥库中,以便它接受与启用 HTTPS 的服务器的所有连接?

我对很多问题感到困惑问题。

请帮忙。

In the app I'm working on, I have to make an HTTPS post to a web server. I was getting certificate not trusted errors when i do it directly(without webview).

But when i use android webview to load the HTTPS URL i can do

public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
handler.proceed() ;
}

to proceed with the connection when i get a SSL certificate not trusted error.

My doubt is

1)if i use the above method will Android Webview actually store the certificate in its keystore?

2)Also will the same Webview be able to use the certificate in its keystore to accept the further connections to the same HTTPS server?

3)Can we programatically put some certificate in the webview's keystore so that it accepts all connections to an HTTPS enabled server?

I am confused with lot of questions.

Please help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文