diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index b5d787fc..a25949e3 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -1814,7 +1814,7 @@ class File_X509 { return 'id-at-role'; case 'id-at-uniqueidentifier': case 'uniqueidentifier': - case 'x509uniqueidentifier': + case 'x500uniqueidentifier': return 'id-at-uniqueIdentifier'; default: return false; @@ -1933,7 +1933,7 @@ class File_X509 { } // handles everything else - $results = preg_split('#((?:^|, |/)(?:C=|O=|OU=|CN=|L=|ST=|postalCode=|streetAddress=|emailAddress=|serialNumber=|organizationalUnitName=))#', $dn, -1, PREG_SPLIT_DELIM_CAPTURE); + $results = preg_split('#((?:^|, |/)(?:C=|O=|OU=|CN=|L=|ST=|SN=|postalCode=|streetAddress=|emailAddress=|serialNumber=|organizationalUnitName=|title=|description=|role=|x500UniqueIdentifier=))#', $dn, -1, PREG_SPLIT_DELIM_CAPTURE); for ($i = 1; $i < count($results); $i+=2) { $type = trim($results[$i], ', =/'); $value = $results[$i + 1]; @@ -1987,6 +1987,13 @@ class File_X509 { case 'id-at-localityName': $desc = 'L='; break; + case 'id-at-surname': + $desc = 'SN='; + break; + case 'id-at-uniqueIdentifier': + $delim = '/'; + $desc = 'x500UniqueIdentifier='; + break; default: $delim = '/'; $desc = preg_replace('#.+-([^-]+)$#', '$1', $type) . '=';