本文介绍了如果SSL证书有效,请检查Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果给定主机的SSL证书有效,有没有办法检查JavaScript? (非阻塞)

Is there a way to check in JavaScript if given a host it's SSL certificate is valid? (non blocking)

在我的例子中,我想显示:你也可以使用https:// ..如果通过JavaScript我可以请求<$

In my case I want to display: "you can also use https://.." if via JavaScript I can make a request to https://my_url without being asked to accept an untrusted certificate.

这可以异步完成吗?

推荐答案

这个问题没有意义。您无法获取服务器的SSL证书,而无需打开与其的SSL连接,一旦你这样做,告诉用户他们也可以做到这一点是有点无意义。

The question doesn't make sense. You can't get the server's SSL certificate without opening an SSL connection to it, and once you've done that, telling the user they can do that too is a bit pointless.

这篇关于如果SSL证书有效,请检查Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-29 20:41
查看更多