使用 PHP 找出所有 SSL 链到 root
我正在寻找一种从域名到root的所有SSL链的方法。
我将openssl_x509_parse与stream_context_create一起使用。我得到了证书,发行人等。从那里,我正在遇到一个艰难的地方,找到了中间的词根。
print_r输出的一部分是[pertionalfoaccess]。我认为我应该在那里找到它,因此我解析了这条线(包含CA发行人的一条,而不是OCSP的发行人),并以相同的方式处理。有时我会看到根名,有时它可以直接链接到Cacert,我不知道该如何解析。
有没有一种方法可以每次使用OpenSL_X509_PARSE恢复中间和根?
谢谢 :)
I'm looking for a way to find all SSL chain from domain name to root.
I use openssl_x509_parse with stream_context_create. I got the certificate, issuer etc. From there I'm having a hardway finding the intermediate if any and root issuer.
Part of the print_r output is [authorityInfoAccess]. I figured I should find it there, so I parsed this line (the one containing CA Issuers not the one with OCSP) and processed it the same way. Sometimes I can see the root name, sometimes it gives me a direct link to cacert which I don't know how to parse.
Is there a way to recover intermediate and root everytime with openssl_x509_parse ?
Thank you :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论