How do you get the subjectAltName from a CSR in php?

☆樱花仙子☆ 提交于 2019-12-11 01:59:26

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!