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

查看:1033
本文介绍了有没有办法使用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天全站免登陆