问题
The php reference has functions like openssl_csr_get_subject, but how do I get the subjectAltNames from the csr?
回答1:
I dont think that its possible, I instead went with phpseclib to do this for me.
回答2:
Try openssl_x509_parse
alternative subjects can read as extensions, I believe you will find:
[extensions][subjectAltName] => DNS:*.cacert.org, DNS:cacert.org, DNS:*.cacert.net, DNS:cacert.net, DNS:*.cacert.com, DNS:cacert.com
来源:https://stackoverflow.com/questions/15982778/how-do-you-get-the-subjectaltname-from-a-csr-in-php