mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-23 16:44:59 +03:00
Очистка CommonName от лишних кавычек
This commit is contained in:
parent
c0566b7654
commit
c0b100ab7f
2
dist/crypto-pro.js
vendored
2
dist/crypto-pro.js
vendored
@ -4088,7 +4088,7 @@ exports._afterPluginsLoaded = function (fn) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports._extractCommonName = function (subjectName) { var _a; return (_a = subjectName.match(/CN=(.+?)(?:,|$)/)) === null || _a === void 0 ? void 0 : _a[1]; };
|
||||
exports._extractCommonName = function (subjectName) { var _a, _b; return (_b = (_a = subjectName.match(/CN="?(.+?)"?(?:,|$)/)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"'); };
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
2
dist/crypto-pro.js.map
vendored
2
dist/crypto-pro.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/crypto-pro.min.js
vendored
2
dist/crypto-pro.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/crypto-pro.min.js.map
vendored
2
dist/crypto-pro.min.js.map
vendored
File diff suppressed because one or more lines are too long
@ -3686,7 +3686,7 @@ exports._afterPluginsLoaded = (fn) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports._extractCommonName = (subjectName) => { var _a; return (_a = subjectName.match(/CN=(.+?)(?:,|$)/)) === null || _a === void 0 ? void 0 : _a[1]; };
|
||||
exports._extractCommonName = (subjectName) => { var _a, _b; return (_b = (_a = subjectName.match(/CN="?(.+?)"?(?:,|$)/)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"'); };
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
File diff suppressed because one or more lines are too long
@ -24,6 +24,6 @@ describe('_extractCommonName', () => {
|
||||
', ',
|
||||
);
|
||||
|
||||
expect(_extractCommonName(string)).toBe('"ООО ""Сампо-Сервис"""');
|
||||
expect(_extractCommonName(string)).toBe('ООО "Сампо-Сервис"');
|
||||
});
|
||||
});
|
||||
|
@ -1,2 +1,2 @@
|
||||
export const _extractCommonName = (subjectName: string): string | undefined =>
|
||||
subjectName.match(/CN=(.+?)(?:,|$)/)?.[1];
|
||||
subjectName.match(/CN="?(.+?)"?(?:,|$)/)?.[1]?.replace(/"{2}/g, '"');
|
||||
|
Loading…
Reference in New Issue
Block a user