©
本文档使用
php.cn手册 发布
(PHP 5 >= 5.2.0)
openssl_csr_get_subject — Returns the subject of a CERT
$csr
[, bool $use_shortnames
= true
] )本函数还未编写文档,仅有参数列表。
[#1] pdm at wp dot pl [2015-08-21 10:11:29]
openssl_csr_get_subject('somedomain.com',false);
return
array(7) {
["countryName"]=> string "XX"
["stateOrProvinceName"]=> string "xxxxxxxxx"
["localityName"]=> string "xxxxxxxx"
["organizationName"]=> string "xxxxxxxxx"
["organizationalUnitName"]=>string "xxxx"
["commonName"]=>string "xxx"
["emailAddress"]=>string "xxx"
}
openssl_csr_get_subject('somedomain.com',true);
return
array(7) {
["C"]=> string "XX"
["ST"]=> string "xxxxxxxxx"
["L"]=> string "xxxxxxxx"
["O"]=> string "xxxxxxxxx"
["OU"]=>string "xxxx"
["CN"]=>string "xxx"
["emailAddress"]=>string "xxx"
}
[#2] mikko koivu [2010-07-21 09:10:09]
this function does not yet return SANs (subject alternative names) fields for UC certificates like those used in exchange 2007.
[#3] stephan[at]strato-rz[dot]de [2009-01-21 01:13:53]
The returning assoziative array is indexed with the fields
in the subject so you should have a array key named CN,OU and so on.