mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-23 16:44:59 +03:00
Исправления в соответсвии с приказом ФСБ России (#40)
Внесены изменения с учётом Приказа ФСБ России от 13.04.2021 N 142 "О внесении изменения в приказ ФСБ России от 27 декабря 2011 г. N 796 "Об утверждении Требований к средствам электронной подписи и Требований к средствам удостоверяющего центра" * Добавил чтение полей, перечисленных в приказе ФСБ России от 27 декабря 2011 г. N 796 * Добавил OIDы полей, перечисленных в приказе ФСБ России от 27 декабря 2011 г. N 796 * Расширил варианты названия для полей подписи, в соответствии с рекомендациями ISO/IEC 9594-8:2008 * Выпуск версии 2.3.3
This commit is contained in:
parent
35d99909a8
commit
c09fac36c3
4
dist/constants/oids-dictionary.d.ts
vendored
4
dist/constants/oids-dictionary.d.ts
vendored
@ -2,6 +2,10 @@ export declare const OIDS_DICTIONARY: {
|
||||
'1.2.643.2.2.34.6': string;
|
||||
'1.2.643.2.39.1.1': string;
|
||||
'1.2.643.3.131.1.1': string;
|
||||
'1.2.643.100.4': string;
|
||||
'1.2.643.100.1': string;
|
||||
'1.2.643.100.5': string;
|
||||
'1.2.643.100.3': string;
|
||||
'1.2.643.3.141.1.1': string;
|
||||
'1.2.643.3.141.1.2': string;
|
||||
'1.2.643.3.2.100.65.13.11': string;
|
||||
|
2
dist/crypto-pro-js.d.ts
vendored
2
dist/crypto-pro-js.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for crypto-pro-js 2.3.2
|
||||
// Type definitions for crypto-pro-js 2.3.3
|
||||
// Project: crypto-pro-js
|
||||
// Definitions by: Artem Vasilev https://github.com/kernusr
|
||||
|
||||
|
195
dist/crypto-pro-js.js
vendored
195
dist/crypto-pro-js.js
vendored
File diff suppressed because one or more lines are too long
2
dist/crypto-pro-js.js.map
vendored
2
dist/crypto-pro-js.js.map
vendored
File diff suppressed because one or more lines are too long
6
dist/crypto-pro-js.min.js
vendored
6
dist/crypto-pro-js.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/crypto-pro-js.min.js.map
vendored
2
dist/crypto-pro-js.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/helpers/_extractCommonName.d.ts
vendored
2
dist/helpers/_extractCommonName.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const _extractCommonName: (subjectName: string) => string;
|
||||
export declare const _extractCommonName: (subjectName: string) => string | undefined;
|
||||
|
@ -1 +1 @@
|
||||
export declare const _extractMeaningfulErrorMessage: (error: Error) => string;
|
||||
export declare const _extractMeaningfulErrorMessage: (error: Error) => string | null;
|
||||
|
21
examples/script-tag/package-lock.json
generated
21
examples/script-tag/package-lock.json
generated
@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "crypto-pro-example-es5-script-tag",
|
||||
"version": "0.0.0",
|
||||
"version": "2.3.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "crypto-pro-example-es5-script-tag",
|
||||
"version": "0.0.0",
|
||||
"version": "2.3.3",
|
||||
"dependencies": {
|
||||
"crypto-pro-js": "^2.3.2"
|
||||
"crypto-pro-js": "^2.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"node-static": "0.7.11",
|
||||
@ -59,9 +59,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/crypto-pro-js": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.2.tgz",
|
||||
"integrity": "sha512-XD5STnobroyuli5k/8udnv5oOwZpVhf1/3uoD7/FMSbBQSTstu1IOS+uckFC3I2LRvDOmdzntYAZqyY/1/NB1A=="
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.3.tgz",
|
||||
"integrity": "sha512-ge6PXRw6pu2kXeaqwEpHvmQEuSRQWJcVfQfPfF5gGONIi+jUHFsvkeS5ojFcKKBDqFHnYUQXFZ1aMKDGdoVRqg==",
|
||||
"engines": {
|
||||
"node": "~16"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
@ -311,9 +314,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"crypto-pro-js": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.2.tgz",
|
||||
"integrity": "sha512-XD5STnobroyuli5k/8udnv5oOwZpVhf1/3uoD7/FMSbBQSTstu1IOS+uckFC3I2LRvDOmdzntYAZqyY/1/NB1A=="
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.3.tgz",
|
||||
"integrity": "sha512-ge6PXRw6pu2kXeaqwEpHvmQEuSRQWJcVfQfPfF5gGONIi+jUHFsvkeS5ojFcKKBDqFHnYUQXFZ1aMKDGdoVRqg=="
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "crypto-pro-example-es5-script-tag",
|
||||
"version": "0.0.0",
|
||||
"version": "2.3.3",
|
||||
"description": "Пример использования пакета crypto-pro через тэг script",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@ -13,6 +13,6 @@
|
||||
"symlink-dir": "3.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"crypto-pro-js": "^2.3.2"
|
||||
"crypto-pro-js": "^2.3.3"
|
||||
}
|
||||
}
|
||||
|
4
lib/constants/oids-dictionary.d.ts
vendored
4
lib/constants/oids-dictionary.d.ts
vendored
@ -2,6 +2,10 @@ export declare const OIDS_DICTIONARY: {
|
||||
'1.2.643.2.2.34.6': string;
|
||||
'1.2.643.2.39.1.1': string;
|
||||
'1.2.643.3.131.1.1': string;
|
||||
'1.2.643.100.4': string;
|
||||
'1.2.643.100.1': string;
|
||||
'1.2.643.100.5': string;
|
||||
'1.2.643.100.3': string;
|
||||
'1.2.643.3.141.1.1': string;
|
||||
'1.2.643.3.141.1.2': string;
|
||||
'1.2.643.3.2.100.65.13.11': string;
|
||||
|
2
lib/crypto-pro-js.d.ts
vendored
2
lib/crypto-pro-js.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for crypto-pro-js 2.3.2
|
||||
// Type definitions for crypto-pro-js 2.3.3
|
||||
// Project: crypto-pro-js
|
||||
// Definitions by: Artem Vasilev https://github.com/kernusr
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
lib/helpers/_extractCommonName.d.ts
vendored
2
lib/helpers/_extractCommonName.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const _extractCommonName: (subjectName: string) => string;
|
||||
export declare const _extractCommonName: (subjectName: string) => string | undefined;
|
||||
|
@ -1 +1 @@
|
||||
export declare const _extractMeaningfulErrorMessage: (error: Error) => string;
|
||||
export declare const _extractMeaningfulErrorMessage: (error: Error) => string | null;
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "crypto-pro-js",
|
||||
"version": "2.3.2",
|
||||
"version": "2.3.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "crypto-pro-js",
|
||||
"version": "2.3.2",
|
||||
"version": "2.3.3",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "25.1.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "crypto-pro-js",
|
||||
"version": "2.3.2",
|
||||
"version": "2.3.3",
|
||||
"description": "Асинхронный JavaScript API для работы с КриптоПРО ЭЦП Browser Plug-In. Forked from https://github.com/vgoma/crypto-pro",
|
||||
"main": "./lib/crypto-pro-js.js",
|
||||
"types": "./lib/crypto-pro-js.d.ts",
|
||||
|
@ -1,18 +1,19 @@
|
||||
import { TagsTranslations } from './tags-translations';
|
||||
|
||||
export const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [
|
||||
{ possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },
|
||||
{ possibleNames: ['CN'], translation: 'Удостоверяющий центр' },
|
||||
{ possibleNames: ['C'], translation: 'Страна' },
|
||||
{ possibleNames: ['S'], translation: 'Регион' },
|
||||
{ possibleNames: ['STREET'], translation: 'Адрес' },
|
||||
{ possibleNames: ['O'], translation: 'Компания' },
|
||||
{ possibleNames: ['OU'], translation: 'Тип' },
|
||||
{ possibleNames: ['T'], translation: 'Должность' },
|
||||
{ possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },
|
||||
{ possibleNames: ['CN', 'commonName'], translation: 'Удостоверяющий центр' },
|
||||
{ possibleNames: ['C', 'countryName'], translation: 'Страна' },
|
||||
{ possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },
|
||||
{ possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },
|
||||
{ possibleNames: ['O', 'organizationName'], translation: 'Компания' },
|
||||
{ possibleNames: ['OU', 'organizationalUnitName'], translation: 'Тип' },
|
||||
{ possibleNames: ['T', 'TITLE'], translation: 'Должность' },
|
||||
{ possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },
|
||||
{ possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },
|
||||
{ possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },
|
||||
{ possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },
|
||||
{ possibleNames: ['E'], translation: 'Email' },
|
||||
{ possibleNames: ['L'], translation: 'Город' },
|
||||
{ possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },
|
||||
{ possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },
|
||||
{ possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },
|
||||
{ possibleNames: ['L', 'localityName'], translation: 'Город' },
|
||||
];
|
||||
|
@ -2,6 +2,10 @@ export const OIDS_DICTIONARY = {
|
||||
'1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',
|
||||
'1.2.643.2.39.1.1': 'Использование в программных продуктах системы "1С:Предприятие 8"',
|
||||
'1.2.643.3.131.1.1': 'ИНН',
|
||||
'1.2.643.100.4': 'ИНН организации',
|
||||
'1.2.643.100.1': 'ОГРН',
|
||||
'1.2.643.100.5': 'ОГРНИП',
|
||||
'1.2.643.100.3': 'СНИЛС',
|
||||
'1.2.643.3.141.1.1': 'РНС ФСС',
|
||||
'1.2.643.3.141.1.2': 'КП ФСС',
|
||||
'1.2.643.3.2.100.65.13.11': 'Использование в системе АИС "Госзакупки" Сахалинской области.',
|
||||
|
@ -1,20 +1,21 @@
|
||||
import { TagsTranslations } from './tags-translations';
|
||||
|
||||
export const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [
|
||||
{ possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },
|
||||
{ possibleNames: ['CN'], translation: 'Владелец' },
|
||||
{ possibleNames: ['SN'], translation: 'Фамилия' },
|
||||
{ possibleNames: ['G'], translation: 'Имя Отчество' },
|
||||
{ possibleNames: ['C'], translation: 'Страна' },
|
||||
{ possibleNames: ['S'], translation: 'Регион' },
|
||||
{ possibleNames: ['STREET'], translation: 'Адрес' },
|
||||
{ possibleNames: ['O'], translation: 'Компания' },
|
||||
{ possibleNames: ['OU'], translation: 'Отдел/подразделение' },
|
||||
{ possibleNames: ['T'], translation: 'Должность' },
|
||||
{ possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },
|
||||
{ possibleNames: ['CN', 'commonName'], translation: 'Владелец' },
|
||||
{ possibleNames: ['SN', 'surname'], translation: 'Фамилия' },
|
||||
{ possibleNames: ['G', 'givenName', 'gn'], translation: 'Имя Отчество' },
|
||||
{ possibleNames: ['C', 'countryName'], translation: 'Страна' },
|
||||
{ possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },
|
||||
{ possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },
|
||||
{ possibleNames: ['O', 'organizationName'], translation: 'Компания' },
|
||||
{ possibleNames: ['OU', 'organizationalUnitName'], translation: 'Отдел/подразделение' },
|
||||
{ possibleNames: ['T', 'TITLE'], translation: 'Должность' },
|
||||
{ possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },
|
||||
{ possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },
|
||||
{ possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },
|
||||
{ possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },
|
||||
{ possibleNames: ['E'], translation: 'Email' },
|
||||
{ possibleNames: ['L'], translation: 'Город' },
|
||||
{ possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },
|
||||
{ possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },
|
||||
{ possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },
|
||||
{ possibleNames: ['L', 'localityName'], translation: 'Город' },
|
||||
];
|
||||
|
@ -18,8 +18,8 @@ describe('_parseCertInfo', () => {
|
||||
'OID.1.2.643.6.3.1.4.1=Петров',
|
||||
'UNKNOWN=неизвестный тэг',
|
||||
'E=email@example.ru',
|
||||
'INN=007811514257',
|
||||
'ИНН организации=007811514257',
|
||||
'INN=997811514257',
|
||||
'ИНН ЮЛ=007811514257',
|
||||
'OGRN=1127847087885',
|
||||
'SNILS=11617693460',
|
||||
].join(', ');
|
||||
@ -96,13 +96,13 @@ describe('_parseCertInfo', () => {
|
||||
isTranslated: true,
|
||||
},
|
||||
{
|
||||
description: '007811514257',
|
||||
description: '997811514257',
|
||||
title: 'ИНН',
|
||||
isTranslated: true,
|
||||
},
|
||||
{
|
||||
description: '007811514257',
|
||||
title: 'ИНН',
|
||||
title: 'ИНН организации',
|
||||
isTranslated: true,
|
||||
},
|
||||
{
|
||||
@ -128,8 +128,8 @@ describe('_parseCertInfo', () => {
|
||||
'L=Санкт-Петербург',
|
||||
'S=78 Санкт-Петербург',
|
||||
'C=RU',
|
||||
'INN=007813317783',
|
||||
'ИНН организации=007813317783',
|
||||
'INN=997813317783',
|
||||
'INNLE=007813317783',
|
||||
'OGRN=1057810150892',
|
||||
'E=uc@sampokey.ru',
|
||||
].join(', ');
|
||||
@ -176,13 +176,13 @@ describe('_parseCertInfo', () => {
|
||||
isTranslated: true,
|
||||
},
|
||||
{
|
||||
description: '007813317783',
|
||||
description: '997813317783',
|
||||
title: 'ИНН',
|
||||
isTranslated: true,
|
||||
},
|
||||
{
|
||||
description: '007813317783',
|
||||
title: 'ИНН',
|
||||
title: 'ИНН организации',
|
||||
isTranslated: true,
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user