Chrome AutoSelectCertificateForUrls主题过滤器 [英] Chrome AutoSelectCertificateForUrls Filter on Subject

查看:161
本文介绍了Chrome AutoSelectCertificateForUrls主题过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前遇到与此未答复的 2016年8月以来的>"Google网上论坛帖子".希望在其他字段(例如主题")上过滤自动选择的证书. Chromium文档对于参数可以使用ISSUER变体.

Currently encountering the same issue as this unanswered Google Groups post from August 2016. Looking to filter the auto-selected certificate on another field such as Subject. The Chromium documentation is not particularly clear on what additional formats the $FILTER argument can take aside from the ISSUER variant.

到目前为止,我已经尝试过:

So far I've tried:

"FILTER": {"MY_TARGET_CN"}
"FILTER": {"SUBJECT": "MY_TARGET_CN"}
"FILTER": {"SUBJECT": {"CN":"MY_TARGET_CN"}}

没有一个产生预期的结果.任何见识将不胜感激!

None have produced the desired results. Any insight would be appreciated!

推荐答案

我遇到了同样的问题,经过多次测试后,我决定研究铬的来源并发现以下问题: 仅针对ISSUER过滤器实施,在源代码中甚至还有"TODO",如在 585 行的 chrome_content_browser_client.cc 文件中所示:

I had the same problem and after many tests I decided to investigate the chromium sources and discovered the following: There is implementation only for ISSUER filters, there is even a "TODO" in the sources as can be seen in the chrome_content_browser_client.cc file on line 585:

...
bool CertMatchesFilter(const net::X509Certificate& cert,
                   const base::DictionaryValue& filter) {
// TODO(markusheintz): This is the minimal required filter implementation.
// Implement a better matcher.

// An empty filter matches any client certificate since no requirements are
// specified at all.
if (filter.empty())
  return true;

std::string common_name;
if (filter.GetString("ISSUER.CN", &common_name) &&
  (cert.issuer().common_name == common_name)) {
  return true;
}
  return false;
}
...

错误报告已存在于: bugs.chromium.org

这篇关于Chrome AutoSelectCertificateForUrls主题过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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