International PHP Conference 2015

openssl_csr_get_subject

(PHP 5 >= 5.2.0)

openssl_csr_get_subjectGibt das Subject eines CERT zurück

Beschreibung

array openssl_csr_get_subject ( mixed $csr [, bool $use_shortnames ] )
Warnung

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verfügung.

add a note add a note

User Contributed Notes 3 notes

up
0
pdm at wp dot pl
11 days ago
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"
}
up
0
stephan[at]strato-rz[dot]de
6 years ago
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.
up
-2
mikko koivu
5 years ago
this function does not yet return SANs (subject alternative names) fields for UC certificates like those used in exchange 2007.
To Top