有没有办法从 Chrome 扩展程序访问证书信息
我想从 Google Chrome 扩展程序访问 SSL 证书信息。
我查看了此处的 API:http://code.google.com/chrome/extensions/api_index.html ,但没有看到任何可以完成工作的东西。
理想情况下,我想访问发行者、有效期、主题、序列号等...
这在 Mozilla/Firefox 中似乎是可能的:
https://developer.mozilla.org/En/How_to_check_the_security_state_of_an_XMLHTTPRequest_over_SSL
http://www.sslshopper.com/article-perspectives-扩展更改如何-firefox-handles-ssl-certificates.html
I'd like to access SSL certificate information from a Google Chrome extension.
I took a look at the APIs here: http://code.google.com/chrome/extensions/api_index.html, but didn't see anything that would get the job done.
Ideally I'd like to get access to Issuer, Validity Period, Subject, Serial Number, etc...
This seems to be possible in Mozilla/Firefox:
https://developer.mozilla.org/En/How_to_check_the_security_state_of_an_XMLHTTPRequest_over_SSL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
2018年答案:webextensions(使用Chrome扩展API)可以在Firefox 62中执行此操作
您需要制作一个WebExtension,也称为浏览器扩展。
请参阅访问 MDN 上的安全信息
您还可以查看文档:
您需要 Firefox 62。
这是一个有效的
background.js
manifest.json
:它也可以在 Chromium 中实现一次 此代码已合并。
2018 answer: webextensions (which use the Chrome extension API) can do this in Firefox 62
You'll need to make a WebExtension, which is also called a browser extension.
See accessing security information on MDN
You can also check out the docs for:
You'll need Firefox 62.
Here's a working
background.js
manifest.json
:It also may be implemented in Chromium once this code is merged.
目前尚不可用,但有 Chromium API 提案 webRequest SSL Hooks(从 02/27/2012 开始)处理此主题。
It is currently not available, but there's the Chromium API proposal webRequest SSL Hooks (from 02/27/2012) which treats this topic.
您可以使用
NPAPI插件
来做到这一点。You can use a
NPAPI plugin
to do that.