diff --git a/src/Certificate.php b/src/Certificate.php new file mode 100755 index 0000000..08db78b --- /dev/null +++ b/src/Certificate.php @@ -0,0 +1,87 @@ + $title, 'description' => $description, 'code' => $titleCode]; + + }, $extractedEntities); + } + + return []; + } +} \ No newline at end of file diff --git a/src/Helpers/Messages/HumanReadebleCPErrors.php b/src/Helpers/Messages/HumanReadebleCPErrors.php new file mode 100755 index 0000000..9f6e9b2 --- /dev/null +++ b/src/Helpers/Messages/HumanReadebleCPErrors.php @@ -0,0 +1,8 @@ + 'Неструктурированное имя', + 'CN' => 'Удостоверяющий центр', + 'C' => 'Страна', + 'S' => 'Регион', + 'STREET' => 'Адрес', + 'O' => 'Компания', + 'OU' => 'Тип', + 'T' => 'Должность', + 'OGRN' => 'ОГРН', + 'OGRNIP' => 'ОГРНИП', + 'SNILS' => 'СНИЛС', + 'INN' => 'ИНН', + 'INNLE' => 'ИНН рганизации', + 'E' => 'Email', + 'L' => 'Город', + ]; +} \ No newline at end of file diff --git a/src/Tags/SubjectTagsTranslations.php b/src/Tags/SubjectTagsTranslations.php new file mode 100755 index 0000000..36975ce --- /dev/null +++ b/src/Tags/SubjectTagsTranslations.php @@ -0,0 +1,27 @@ + 'Неструктурированное имя', + 'CN' => 'Владелец', + 'SN' => 'Фамилия', + 'G' => 'Имя Отчество', + 'C' => 'Страна', + 'S' => 'Регион', + 'STREET' => 'Адрес', + 'O' => 'Компания', + 'OU' => 'Отдел/подразделение', + 'T' => 'Должность', + 'OGRN' => 'ОГРН', + 'OGRNIP' => 'ОГРНИП', + 'SNILS' => 'СНИЛС', + 'INN' => 'ИНН', + 'INNLE' => 'ИНН рганизации', + 'E' => 'Email', + 'L' => 'Город', + ]; +} \ No newline at end of file diff --git a/src/Tags/TagsCodes.php b/src/Tags/TagsCodes.php new file mode 100755 index 0000000..a3d79a1 --- /dev/null +++ b/src/Tags/TagsCodes.php @@ -0,0 +1,27 @@ + ['UN', 'unstructuredName'], + 'CN' => ['CN', 'commonName'], + 'SN' => ['SN', 'surname'], + 'G' => ['G', 'givenName', 'gn'], + 'C' => ['C', 'countryName'], + 'S' => ['S', 'ST', 'stateOrProvinceName'], + 'STREET' => ['STREET', 'streetAddress'], + 'O' => ['O', 'organizationName'], + 'OU' => ['OU', 'organizationalUnitName'], + 'T' => ['T', 'TITLE'], + 'OGRN' => ['OGRN', 'ОГРН'], + 'OGRNIP' => ['OGRNIP', 'ОГРНИП'], + 'SNILS' => ['СНИЛС', 'SNILS'], + 'INN' => ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN'], + 'INNLE' => ['ИННЮЛ', 'ИНН ЮЛ', 'INNLE', 'INN LE', 'ИНН организации'], + 'E' => ['E', 'email', 'emailAddress', 'pkcs9email'], + 'L' => ['L', 'localityName'], + ]; +} \ No newline at end of file diff --git a/src/Tags/TagsCodesInterface.php b/src/Tags/TagsCodesInterface.php new file mode 100755 index 0000000..a674385 --- /dev/null +++ b/src/Tags/TagsCodesInterface.php @@ -0,0 +1,8 @@ + 'UN', + '2.5.4.3' => 'CN', + '2.5.4.4' => 'SN', + '2.5.4.42' => 'G', + '2.5.4.6' => 'C', + '2.5.4.8' => 'S', + '2.5.4.9' => 'STREET', + '2.5.4.10' => 'O', + '2.5.4.11' => 'OU', + '2.5.4.12' => 'T', + '1.2.643.100.1' => 'OGRN', + '1.2.643.100.5' => 'OGRNIP', + '1.2.643.100.3' => 'SNILS', + '1.2.643.3.131.1.1' => 'INN', + '1.2.643.100.4' => 'INNLE', + '1.2.840.113549.1.9.1' => 'E', + '2.5.4.7' => 'L', + ]; +} \ No newline at end of file diff --git a/src/Tags/TagsOIDsInterface.php b/src/Tags/TagsOIDsInterface.php new file mode 100755 index 0000000..bb5637f --- /dev/null +++ b/src/Tags/TagsOIDsInterface.php @@ -0,0 +1,10 @@ + $values) + { + if (is_object($values)) + { + $values = (array) $values; + } + + if (!is_array($values)) + { + $reverseMap[strtolower((string) $values)] = $key; + } + else + { + foreach ($values as $value) + { + $reverseMap[strtolower($value)] = $key; + } + } + } + } + + return $reverseMap; + } +} \ No newline at end of file