1 year ago
#375832
James
Find out all SSL chain to root using PHP
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 :)
php
openssl
certificate
0 Answers
Your Answer