有没有办法使用 JavaScript 获取 SSL 证书详细信息? [英] Is there a way to get SSL certificate details using JavaScript?

查看:40
本文介绍了有没有办法使用 JavaScript 获取 SSL 证书详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想收集特定网站上 SSL 证书的某些详细信息.我知道在 Linux/MacOSX 上使用 openssl 工具很简单.然而,在 JavaScript 中是否可能相同或相似?

I'd like to gather certain details of an SSL certificate on a particular web-site. I know this is straightforward using the openssl tool on Linux/MacOSX. However is the same or similar possible in JavaScript?

我了解浏览器处理套接字连接并且 SSL 握手发生在任何一方发送数据之前.但是,在 XMLHTTPRequest 中,我想知道是否可以将这些详细信息作为某种响应代码等获取?

I understand that the browser handles socket connections and that the SSL handshake occurs prior to any party sending data. However in an XMLHTTPRequest, I'd like to know if its possible to get these details as some sort of response code etc?

推荐答案

这些信息根本没有暴露给 javascript,它很少使用(永远不会,因为它不可用,但它 很少使用)它被认为不足以添加到 javascript 对象模型中,我想......对于任何很少使用的功能都被遗漏了.

This information simply isn't exposed to javascript, it is so rarely used (well never since it isn't available, but it would be rarely used) that it wasn't deemed important enough to add to the javascript object model I suppose...same for any very rarely used feature left out of anything.

当然,出于安全原因,它也可能被排除在外......我目前没有足够的创造力来提出一个,但我相信那里也有一个漏洞利用.

Of course, it could have also been left out for security reasons...I'm not creative enough to come up with one at the moment, but I'm sure there's an exploit to be had there as well.

这篇关于有没有办法使用 JavaScript 获取 SSL 证书详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆