====== OCSP Must staple (TLS Feature status_request) ====== 是 SSL 证书里面的一个 x509 Extention,OID 是 ''1.3.6.1.5.5.7.1.24''。标准里也叫 TLS Feature status_request (([[https://tools.ietf.org/id/draft-hallambaker-tlsfeature-00.html#rfc.section.3.1.1]]))。 有这个扩展的证书,在浏览器浏览的时候,如果服务器没发 OCSP Staple,那浏览器应该直接阻止连接。 除了 Firefox 外,目前没有主流的桌面浏览器强制失败。遇到这种情况 Firefox 会提示 ''MOZILLA_PKIX_ERROR_REQUIRED_TLS_FEATURE_MISSING'' (([[https://support.mozilla.org/en-US/questions/1149911]])) ——其实我感觉这里的 TLS Feature 就是 status_request 了。 Firefox 可通过 about:config 中的 ''security.ssl.enable_ocsp_must_staple'' 关闭。 ===== 检测 ===== ==== SSL Labs ==== 证书要求 OCSP Must Staple,但是服务器没有发送 OCSP Staple,显示为 **OCSP Must Staple: Supported, OCSP response not stapled** 并以黄色标出: {{ ::ocsp-must-staple-failed.jpg }} 证书要求 OCSP Must Staple,并且成功发送 OCSP Staple,显示为 **OCSP Must Staple: Supported** 并以绿色标出: {{ ::ocsp-must-staple-supported.jpg }} 证书不要求的话不显示 **OCSP Must Staple** 项。 ==== 命令行工具 ==== OpenSSL 连接服务器并输出证书((老版本 openssl 的 s_client 可能要 -servername tcdw.net 才能有 SNI,参考 [[https://serverfault.com/a/661982]])): echo | openssl s_client -connect tcdw.net:443 | openssl x509 -noout -text 结果: ... X509v3 extensions: ... TLS Feature: status_request 老版本: 1.3.6.1.5.5.7.1.24: 0.... ===== 相关博文 ===== [[https://scotthelme.co.uk/ocsp-must-staple/]] [[https://www.entrust.com/blog/2014/06/ocsp-must-staple/]] [[https://blog.apnic.net/2019/01/15/is-the-web-ready-for-ocsp-must-staple/]] {{tag>SSL OCSP 博客备用 TIL}}