From eb8cbd7317a22608caad02b789012a6306c536b5 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 4 Jun 2023 16:16:07 -0500 Subject: [PATCH] X509: backport EV subjects --- phpseclib/File/X509.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 5e6377a1..1018b8ea 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -1340,6 +1340,10 @@ class File_X509 '2.5.4.45' => 'id-at-uniqueIdentifier', '2.5.4.72' => 'id-at-role', '2.5.4.16' => 'id-at-postalAddress', + '1.3.6.1.4.1.311.60.2.1.3' => 'jurisdictionOfIncorporationCountryName', + '1.3.6.1.4.1.311.60.2.1.2' => 'jurisdictionOfIncorporationStateOrProvinceName', + '1.3.6.1.4.1.311.60.2.1.1' => 'jurisdictionLocalityName', + '2.5.4.15' => 'id-at-businessCategory', '0.9.2342.19200300.100.1.25' => 'id-domainComponent', '1.2.840.113549.1.9' => 'pkcs-9', @@ -2618,6 +2622,20 @@ class File_X509 function _translateDNProp($propName) { switch (strtolower($propName)) { + case 'jurisdictionofincorporationcountryname': + case 'jurisdictioncountryname': + case 'jurisdictionc': + return 'jurisdictionOfIncorporationCountryName'; + case 'jurisdictionofincorporationstateorprovincename': + case 'jurisdictionstateorprovincename': + case 'jurisdictionst': + return 'jurisdictionOfIncorporationStateOrProvinceName'; + case 'jurisdictionlocalityname': + case 'jurisdictionl': + return 'jurisdictionLocalityName'; + case 'id-at-businesscategory': + case 'businesscategory': + return 'id-at-businessCategory'; case 'id-at-countryname': case 'countryname': case 'c':