@peculiar/certificates-viewer 2.0.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/_commonjsHelpers-cb1f949a.js +23 -0
- package/dist/cjs/{download-cd98aa01.js → certification_request-96951e7b.js} +2880 -3313
- package/dist/cjs/{dom-760f300f.js → dom-f57e260e.js} +4 -1
- package/dist/cjs/download-5e7d5455.js +438 -0
- package/dist/cjs/{index-2973f90a.js → index-064e95c7.js} +287 -634
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/{l10n-e971a5ac.js → l10n-2e7def18.js} +72 -90
- package/dist/cjs/loader.cjs.js +12 -3
- package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +1426 -1391
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +66 -62
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +222 -217
- package/dist/cjs/peculiar.cjs.js +70 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +220 -205
- package/dist/collection/components/attribute-certificate-viewer/holder.js +27 -24
- package/dist/collection/components/attribute-certificate-viewer/issuer.js +11 -8
- package/dist/collection/components/button/button.css +2 -7
- package/dist/collection/components/button/button.js +125 -122
- package/dist/collection/components/button-split/button-split.js +103 -100
- package/dist/collection/components/certificate-decoder/certificate-decoder.css +1 -3
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +158 -155
- package/dist/collection/components/certificate-summary/certificate-summary.js +75 -72
- package/dist/collection/components/certificate-viewer/attributes/activity_description_attribute.js +11 -8
- package/dist/collection/components/certificate-viewer/attributes/as_string_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/basic_attribute.js +11 -8
- package/dist/collection/components/certificate-viewer/attributes/challenge_password_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/index.js +45 -42
- package/dist/collection/components/certificate-viewer/attributes/insurance_value_attribute.js +7 -4
- package/dist/collection/components/certificate-viewer/attributes/name_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/name_part.js +8 -5
- package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +5 -2
- package/dist/collection/components/certificate-viewer/attributes/unstructured_name_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/valuation_ranking_attribute.js +18 -15
- package/dist/collection/components/certificate-viewer/attributes/web_gdpr_attribute.js +13 -10
- package/dist/collection/components/certificate-viewer/basic_information.js +13 -10
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +255 -240
- package/dist/collection/components/certificate-viewer/extensions/archive_rev_info_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/as_string_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/attribute_value.js +4 -1
- package/dist/collection/components/certificate-viewer/extensions/authority_key_identifier_extension.js +18 -15
- package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +12 -9
- package/dist/collection/components/certificate-viewer/extensions/biometric_syntax_extension.js +12 -9
- package/dist/collection/components/certificate-viewer/extensions/ca_version_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/certificate_policies_extension.js +28 -25
- package/dist/collection/components/certificate-viewer/extensions/certificate_template_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/certificate_transparency_extension.js +13 -10
- package/dist/collection/components/certificate-viewer/extensions/crl_distribution_points_extension.js +11 -8
- package/dist/collection/components/certificate-viewer/extensions/crl_reason_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/enroll_cert_type_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/entrust_version_info_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/extended_key_usage_extension.js +5 -2
- package/dist/collection/components/certificate-viewer/extensions/general_name_part.js +55 -52
- package/dist/collection/components/certificate-viewer/extensions/index.js +112 -109
- package/dist/collection/components/certificate-viewer/extensions/info_access_syntax_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/key_usage_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/lei_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/lei_role_extennsion.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/logotype_extension.js +49 -46
- package/dist/collection/components/certificate-viewer/extensions/name_constraints_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/netscape_cert_type_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/netscape_comment_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/policy_constraints_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/policy_mappings_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/private_key_usage_period_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/qc_statements_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/subject_alternative_name_extension.js +5 -2
- package/dist/collection/components/certificate-viewer/extensions/subject_directory_attributes_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/subject_key_identifier_extension.js +18 -15
- package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/tn_auth_list_extension.js +10 -7
- package/dist/collection/components/certificate-viewer/get_string_by_oid.js +8 -5
- package/dist/collection/components/certificate-viewer/issuer_name.js +9 -6
- package/dist/collection/components/certificate-viewer/miscellaneous.js +29 -26
- package/dist/collection/components/certificate-viewer/public_key.js +31 -28
- package/dist/collection/components/certificate-viewer/row.js +35 -32
- package/dist/collection/components/certificate-viewer/signature.js +12 -9
- package/dist/collection/components/certificate-viewer/subject_name.js +8 -5
- package/dist/collection/components/certificate-viewer/thumbprints.js +15 -12
- package/dist/collection/components/certificates-viewer/certificates-viewer.css +1 -19
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +384 -381
- package/dist/collection/components/circular-progress/circular-progress.css +2 -24
- package/dist/collection/components/circular-progress/circular-progress.js +73 -70
- package/dist/collection/components/csr-viewer/csr-viewer.js +197 -188
- package/dist/collection/components/highlight-words/highlight-words.js +56 -53
- package/dist/collection/components/link/link.css +1 -3
- package/dist/collection/components/link/link.js +60 -57
- package/dist/collection/components/text-hider/text-hider.js +75 -72
- package/dist/collection/components/typography/typography.css +1 -3
- package/dist/collection/components/typography/typography.js +126 -123
- package/dist/collection/constants/logs.js +79 -76
- package/dist/collection/constants/oids.js +2301 -2298
- package/dist/collection/crypto/asn_data.js +33 -32
- package/dist/collection/crypto/attribute.js +52 -49
- package/dist/collection/crypto/csr.js +64 -61
- package/dist/collection/crypto/extension.js +126 -123
- package/dist/collection/crypto/index.js +3 -0
- package/dist/collection/crypto/name.js +33 -32
- package/dist/collection/crypto/provider.js +28 -25
- package/dist/collection/crypto/utils.js +24 -21
- package/dist/collection/crypto/x509_attribute_certificate.js +61 -58
- package/dist/collection/crypto/x509_certificate.js +107 -104
- package/dist/collection/index.js +5 -1
- package/dist/collection/utils/date_formatter.js +19 -16
- package/dist/collection/utils/download.js +18 -15
- package/dist/collection/utils/download_from_buffer.js +30 -25
- package/dist/collection/utils/history.js +5 -2
- package/dist/collection/utils/index.js +3 -0
- package/dist/collection/utils/is_link.js +4 -1
- package/dist/collection/utils/l10n.js +28 -25
- package/dist/collection/utils/parse_hash.js +16 -13
- package/dist/collection/utils/query_stringify.js +12 -9
- package/dist/collection/utils/read_file.js +43 -40
- package/dist/collection/utils/third_party_links.js +3 -0
- package/dist/collection/utils/validator.js +15 -12
- package/dist/esm/_commonjsHelpers-bfbd2ad8.js +20 -0
- package/dist/esm/{download-1ff0a3be.js → certification_request-48e8b956.js} +2898 -3328
- package/dist/esm/{dom-91ed8d21.js → dom-f1b08a97.js} +4 -1
- package/dist/esm/download-cf68ac2c.js +434 -0
- package/dist/esm/{index-5ef692cc.js → index-bbd484d9.js} +278 -624
- package/dist/esm/index.js +5 -0
- package/dist/esm/{l10n-c8cf6930.js → l10n-ead9928b.js} +71 -86
- package/dist/esm/{loader.mjs → loader.js} +11 -2
- package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +1425 -1390
- package/dist/esm/peculiar-certificate-summary_3.entry.js +66 -62
- package/dist/esm/peculiar-certificates-viewer.entry.js +222 -217
- package/dist/esm/peculiar.js +73 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/index.js +2 -2
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -1
- package/dist/peculiar/index.esm.js +4 -0
- package/dist/peculiar/p-452d69af.entry.js +113 -0
- package/dist/peculiar/p-886e9c53.js +87 -0
- package/dist/peculiar/p-9ae6b1f8.entry.js +4 -0
- package/dist/peculiar/{p-3d1015c2.js → p-9f4ee110.js} +5 -2
- package/dist/peculiar/p-c774ec0b.js +18 -0
- package/dist/peculiar/p-d09b762f.js +33 -0
- package/dist/peculiar/p-d0b55fbb.js +4 -0
- package/dist/peculiar/p-e5f99586.entry.js +4 -0
- package/dist/peculiar/p-f7683ba5.js +5 -0
- package/dist/peculiar/peculiar.esm.js +4 -1
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +56 -56
- package/dist/types/components/attribute-certificate-viewer/holder.d.ts +1 -1
- package/dist/types/components/attribute-certificate-viewer/issuer.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +17 -17
- package/dist/types/components/button-split/button-split.d.ts +10 -10
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +16 -16
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -4
- package/dist/types/components/certificate-viewer/attributes/activity_description_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/as_string_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/basic_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/challenge_password_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/index.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/insurance_value_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/name_part.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/type_relationship_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/unstructured_name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/valuation_ranking_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/web_gdpr_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/basic_information.d.ts +6 -6
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +66 -66
- package/dist/types/components/certificate-viewer/extensions/archive_rev_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/as_string_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/authority_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/basic_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/basic_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/biometric_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/ca_version_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_policies_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_template_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_transparency_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/crl_distribution_points_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/crl_reason_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/enroll_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/entrust_version_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/extended_key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/general_name_part.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/index.d.ts +2 -2
- package/dist/types/components/certificate-viewer/extensions/info_access_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/lei_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/lei_role_extennsion.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/logotype_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/name_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/netscape_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/netscape_comment_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/policy_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/policy_mappings_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/private_key_usage_period_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/qc_statements_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_alternative_name_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_directory_attributes_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/timestamp_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/tn_auth_list_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/issuer_name.d.ts +2 -2
- package/dist/types/components/certificate-viewer/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-viewer/public_key.d.ts +1 -1
- package/dist/types/components/certificate-viewer/row.d.ts +7 -7
- package/dist/types/components/certificate-viewer/signature.d.ts +1 -1
- package/dist/types/components/certificate-viewer/subject_name.d.ts +1 -1
- package/dist/types/components/certificate-viewer/thumbprints.d.ts +1 -1
- package/dist/types/components/certificate-viewer/types.d.ts +26 -0
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +64 -64
- package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +45 -45
- package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
- package/dist/types/components/link/link.d.ts +6 -6
- package/dist/types/components/text-hider/text-hider.d.ts +4 -4
- package/dist/types/components/typography/typography.d.ts +18 -18
- package/dist/types/components.d.ts +11 -3
- package/dist/types/constants/logs.d.ts +76 -76
- package/dist/types/constants/oids.d.ts +2293 -2293
- package/dist/types/crypto/asn_data.d.ts +6 -6
- package/dist/types/crypto/attribute.d.ts +3 -3
- package/dist/types/crypto/csr.d.ts +19 -19
- package/dist/types/crypto/extension.d.ts +3 -3
- package/dist/types/crypto/name.d.ts +7 -7
- package/dist/types/crypto/provider.d.ts +15 -15
- package/dist/types/crypto/x509_attribute_certificate.d.ts +22 -22
- package/dist/types/crypto/x509_certificate.d.ts +28 -28
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interface.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +230 -217
- package/dist/types/utils/download.d.ts +8 -8
- package/dist/types/utils/download_from_buffer.d.ts +3 -3
- package/dist/types/utils/l10n.d.ts +43 -43
- package/dist/types/utils/read_file.d.ts +7 -7
- package/loader/cdn.js +3 -1
- package/loader/index.cjs.js +3 -1
- package/loader/index.d.ts +0 -1
- package/loader/index.es2017.js +5 -0
- package/loader/{index.mjs → index.js} +4 -2
- package/loader/package.json +4 -5
- package/package.json +14 -15
- package/dist/cjs/css-shim-1b988199.js +0 -6
- package/dist/cjs/patch-15ea31af.js +0 -112
- package/dist/cjs/shadow-css-376763e9.js +0 -385
- package/dist/esm/css-shim-5ce2b5c4.js +0 -4
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/patch-f8a17185.js +0 -109
- package/dist/esm/peculiar.mjs +0 -6
- package/dist/esm/shadow-css-95922619.js +0 -383
- package/dist/esm-es5/css-shim-5ce2b5c4.js +0 -122
- package/dist/esm-es5/dom-91ed8d21.js +0 -468
- package/dist/esm-es5/download-1ff0a3be.js +0 -12692
- package/dist/esm-es5/index-5ef692cc.js +0 -1839
- package/dist/esm-es5/index.mjs +0 -0
- package/dist/esm-es5/l10n-c8cf6930.js +0 -758
- package/dist/esm-es5/loader.mjs +0 -10
- package/dist/esm-es5/patch-f8a17185.js +0 -106
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_9.entry.js +0 -2168
- package/dist/esm-es5/peculiar-certificate-summary_3.entry.js +0 -83
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +0 -290
- package/dist/esm-es5/peculiar.mjs +0 -5
- package/dist/esm-es5/shadow-css-95922619.js +0 -408
- package/dist/index.mjs +0 -1
- package/dist/peculiar/p-0ad0b6e8.js +0 -1
- package/dist/peculiar/p-198d9121.js +0 -1
- package/dist/peculiar/p-294c4ef9.entry.js +0 -1
- package/dist/peculiar/p-3d339152.system.entry.js +0 -1
- package/dist/peculiar/p-4b7cd42f.js +0 -12
- package/dist/peculiar/p-50ea2036.system.js +0 -1
- package/dist/peculiar/p-557d912f.system.js +0 -1
- package/dist/peculiar/p-75076c56.system.js +0 -21
- package/dist/peculiar/p-84e8326d.entry.js +0 -110
- package/dist/peculiar/p-94f96303.system.js +0 -100
- package/dist/peculiar/p-983b5210.system.entry.js +0 -1
- package/dist/peculiar/p-9f815f76.system.js +0 -1
- package/dist/peculiar/p-aa0a9b36.system.js +0 -1
- package/dist/peculiar/p-bd1f9066.system.js +0 -36
- package/dist/peculiar/p-bd949790.js +0 -1
- package/dist/peculiar/p-cf1841f8.js +0 -30
- package/dist/peculiar/p-dbdd61e7.entry.js +0 -1
- package/dist/peculiar/p-dc6b70b2.js +0 -100
- package/dist/peculiar/p-fb53799e.system.js +0 -1
- package/dist/peculiar/p-fc92385a.system.entry.js +0 -457
- package/dist/peculiar/p-fdad110e.system.js +0 -13
- package/dist/peculiar/peculiar.js +0 -132
- package/dist/peculiar.js +0 -30
- package/loader/index.es2017.mjs +0 -3
- package/loader/node-main.js +0 -3
|
@@ -1,2168 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
|
-
function step(op) {
|
|
28
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
29
|
-
while (_) try {
|
|
30
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
31
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32
|
-
switch (op[0]) {
|
|
33
|
-
case 0: case 1: t = op; break;
|
|
34
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
35
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
36
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
37
|
-
default:
|
|
38
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
39
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
40
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
41
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
42
|
-
if (t[2]) _.ops.pop();
|
|
43
|
-
_.trys.pop(); continue;
|
|
44
|
-
}
|
|
45
|
-
op = body.call(thisArg, _);
|
|
46
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
47
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
import { h, r as registerInstance, H as Host, c as createEvent } from './index-5ef692cc.js';
|
|
51
|
-
import { d as dateDiff, l as l10n, a as dateShort, h as history } from './l10n-c8cf6930.js';
|
|
52
|
-
import { A as AsnData, a as Attribute$1, b as build_2, i as id_pkcs9_at_extensionRequest, c as AsnParser, E as ExtensionRequest, d as Extension, e as AsnConvert, f as id_pkcs9_at_unstructuredName, U as UnstructuredName, g as id_pkcs9_at_challengePassword, C as ChallengePassword, h as id_ValuationRanking, V as ValuationRanking, j as id_InsuranceValue, I as InsuranceValue, k as id_WebGDPR, W as WebGDPR, l as id_ActivityDescription, m as ActivityDescription, n as id_TypeRelationship, T as TypeRelationship, o as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, p as id_DomainNameOwner, q as DomainNameOwner, r as id_DomainNameLegalRepresentative, s as DomainNameLegalRepresentative, t as id_DomainNameBeneficiary, u as DomainNameBeneficiary, v as certificateRawToBuffer, w as AttributeCertificate, x as getCertificateThumbprint, y as hexFormat, z as base64Format, B as CertificationRequest, N as Name, F as id_ecPublicKey, G as ECParameters, H as id_rsaEncryption, R as RSAPublicKey, O as OIDs, J as Name$1, K as OtherName, L as DisplayText, M as UserNotice, P as build_1, Q as EDIPartyName, S as AsnIntegerArrayBufferConverter, X as KeyUsage, Y as BasicConstraints, Z as ExtendedKeyUsage, _ as SubjectKeyIdentifier, $ as AuthorityKeyIdentifier, a0 as CRLDistributionPoints, a1 as AuthorityInfoAccessSyntax, a2 as SubjectInfoAccessSyntax, a3 as SubjectAlternativeName, a4 as CertificatePolicies, a5 as CertificateTransparency, a6 as NameConstraints, a7 as CertificateTemplate, a8 as EnrollCertTypeChoice, a9 as CaVersion, aa as QCStatements, ab as NetscapeComment, ac as NetscapeCertType, ad as LeiRole, ae as LeiChoice, af as Timestamp, ag as ArchiveRevInfo, ah as CRLReason, ai as SubjectDirectoryAttributes, aj as PrivateKeyUsagePeriod, ak as EntrustVersionInfo, al as BiometricSyntax, am as LogotypeExtn, an as TNAuthorizationList, ao as PolicyConstraints, ap as PolicyMappings, aq as Download, ar as isPem, as as isX509Pem, at as isPkcs10Pem, au as isX509AttributePem, av as X509Certificate } from './download-1ff0a3be.js';
|
|
53
|
-
/**
|
|
54
|
-
* @license
|
|
55
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the MIT license found in the
|
|
58
|
-
* LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/
|
|
60
|
-
/**
|
|
61
|
-
* Read file as Binary string
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```js
|
|
65
|
-
* const file = new File(['file'], 'file.pdf', { type: 'text/plain' });
|
|
66
|
-
* readAsBinaryString(file)
|
|
67
|
-
* .then(result => console.log('Readed success', result))
|
|
68
|
-
* .catch(err => console.log('An error occured when reading file', err));
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
function readAsBinaryString(file) {
|
|
72
|
-
return new Promise(function (resolve, reject) {
|
|
73
|
-
var reader = new FileReader();
|
|
74
|
-
reader.onload = function () { return resolve({
|
|
75
|
-
value: reader.result,
|
|
76
|
-
fileName: file.name,
|
|
77
|
-
fileSize: file.size,
|
|
78
|
-
sourceMime: file.type,
|
|
79
|
-
}); };
|
|
80
|
-
reader.onerror = function () { return reject(reader.error); };
|
|
81
|
-
reader.readAsBinaryString(file);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @license
|
|
86
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the MIT license found in the
|
|
89
|
-
* LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/
|
|
91
|
-
var Attribute = /** @class */ (function (_super) {
|
|
92
|
-
__extends(Attribute, _super);
|
|
93
|
-
function Attribute(raw) {
|
|
94
|
-
var _this = _super.call(this, raw, Attribute$1) || this;
|
|
95
|
-
var asnExtnValue = _this.getAsnExtnValue();
|
|
96
|
-
switch (_this.asn.type) {
|
|
97
|
-
case id_DomainNameBeneficiary:
|
|
98
|
-
_this.value = AsnParser.parse(asnExtnValue, DomainNameBeneficiary);
|
|
99
|
-
break;
|
|
100
|
-
case id_DomainNameLegalRepresentative:
|
|
101
|
-
_this.value = AsnParser.parse(asnExtnValue, DomainNameLegalRepresentative);
|
|
102
|
-
break;
|
|
103
|
-
case id_DomainNameOwner:
|
|
104
|
-
_this.value = AsnParser.parse(asnExtnValue, DomainNameOwner);
|
|
105
|
-
break;
|
|
106
|
-
case id_DomainNameTechnicalOperator:
|
|
107
|
-
_this.value = AsnParser.parse(asnExtnValue, DomainNameTechnicalOperator);
|
|
108
|
-
break;
|
|
109
|
-
case id_TypeRelationship:
|
|
110
|
-
_this.value = AsnParser.parse(asnExtnValue, TypeRelationship);
|
|
111
|
-
break;
|
|
112
|
-
case id_ActivityDescription:
|
|
113
|
-
_this.value = AsnParser.parse(asnExtnValue, ActivityDescription);
|
|
114
|
-
break;
|
|
115
|
-
case id_WebGDPR:
|
|
116
|
-
_this.value = AsnParser.parse(asnExtnValue, WebGDPR);
|
|
117
|
-
break;
|
|
118
|
-
case id_InsuranceValue:
|
|
119
|
-
_this.value = AsnParser.parse(asnExtnValue, InsuranceValue);
|
|
120
|
-
break;
|
|
121
|
-
case id_ValuationRanking:
|
|
122
|
-
_this.value = AsnParser.parse(asnExtnValue, ValuationRanking);
|
|
123
|
-
break;
|
|
124
|
-
case id_pkcs9_at_challengePassword:
|
|
125
|
-
_this.value = AsnParser.parse(asnExtnValue, ChallengePassword);
|
|
126
|
-
break;
|
|
127
|
-
case id_pkcs9_at_unstructuredName:
|
|
128
|
-
_this.value = AsnParser.parse(asnExtnValue, UnstructuredName);
|
|
129
|
-
break;
|
|
130
|
-
case id_pkcs9_at_extensionRequest: {
|
|
131
|
-
var extensionRequest = AsnParser.parse(asnExtnValue, ExtensionRequest);
|
|
132
|
-
_this.value = extensionRequest
|
|
133
|
-
.map(function (e) { return new Extension(AsnConvert.serialize(e)); });
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
default:
|
|
137
|
-
_this.value = build_2.ToHex(asnExtnValue);
|
|
138
|
-
}
|
|
139
|
-
return _this;
|
|
140
|
-
}
|
|
141
|
-
Attribute.prototype.getAsnExtnValue = function () {
|
|
142
|
-
return this.asn.values[0];
|
|
143
|
-
};
|
|
144
|
-
return Attribute;
|
|
145
|
-
}(AsnData));
|
|
146
|
-
/**
|
|
147
|
-
* @license
|
|
148
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the MIT license found in the
|
|
151
|
-
* LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/
|
|
153
|
-
var X509AttributeCertificate = /** @class */ (function (_super) {
|
|
154
|
-
__extends(X509AttributeCertificate, _super);
|
|
155
|
-
function X509AttributeCertificate(raw) {
|
|
156
|
-
var _this = this;
|
|
157
|
-
var _a;
|
|
158
|
-
_this = _super.call(this, certificateRawToBuffer(raw), AttributeCertificate) || this;
|
|
159
|
-
_this.thumbprints = {};
|
|
160
|
-
_this.type = 'X.509 Attribute Certificate';
|
|
161
|
-
var acinfo = _this.asn.acinfo;
|
|
162
|
-
_this.serialNumber = build_2.ToHex(acinfo.serialNumber);
|
|
163
|
-
_this.version = acinfo.version;
|
|
164
|
-
var notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;
|
|
165
|
-
if (!notBefore) {
|
|
166
|
-
throw new Error("Cannot get 'notBefore' value");
|
|
167
|
-
}
|
|
168
|
-
_this.notBefore = notBefore;
|
|
169
|
-
var notAfter = acinfo.attrCertValidityPeriod.notAfterTime;
|
|
170
|
-
if (!notAfter) {
|
|
171
|
-
throw new Error("Cannot get 'notAfter' value");
|
|
172
|
-
}
|
|
173
|
-
_this.notAfter = notAfter;
|
|
174
|
-
_this.validity = dateDiff(_this.notBefore, _this.notAfter);
|
|
175
|
-
_this.issuer = acinfo.issuer.v1Form || ((_a = acinfo.issuer.v2Form) === null || _a === void 0 ? void 0 : _a.issuerName);
|
|
176
|
-
_this.holder = acinfo.holder;
|
|
177
|
-
return _this;
|
|
178
|
-
}
|
|
179
|
-
Object.defineProperty(X509AttributeCertificate.prototype, "signature", {
|
|
180
|
-
get: function () {
|
|
181
|
-
var _c = this.asn, signatureValue = _c.signatureValue, signatureAlgorithm = _c.signatureAlgorithm;
|
|
182
|
-
return {
|
|
183
|
-
value: signatureValue,
|
|
184
|
-
algorithm: signatureAlgorithm.algorithm,
|
|
185
|
-
};
|
|
186
|
-
},
|
|
187
|
-
enumerable: false,
|
|
188
|
-
configurable: true
|
|
189
|
-
});
|
|
190
|
-
X509AttributeCertificate.prototype.parseExtensions = function () {
|
|
191
|
-
var acinfo = this.asn.acinfo;
|
|
192
|
-
if (acinfo.extensions) {
|
|
193
|
-
this.extensions = acinfo.extensions
|
|
194
|
-
.map(function (e) { return new Extension(AsnConvert.serialize(e)); });
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
X509AttributeCertificate.prototype.parseAttributes = function () {
|
|
198
|
-
var acinfo = this.asn.acinfo;
|
|
199
|
-
if (acinfo.attributes) {
|
|
200
|
-
this.attributes = acinfo.attributes
|
|
201
|
-
.map(function (e) { return new Attribute(AsnConvert.serialize(e)); });
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
X509AttributeCertificate.prototype.getThumbprint = function (algorithm) {
|
|
205
|
-
if (algorithm === void 0) { algorithm = 'SHA-1'; }
|
|
206
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
207
|
-
var thumbprint, error_1;
|
|
208
|
-
return __generator(this, function (_c) {
|
|
209
|
-
switch (_c.label) {
|
|
210
|
-
case 0:
|
|
211
|
-
_c.trys.push([0, 2, , 3]);
|
|
212
|
-
return [4 /*yield*/, getCertificateThumbprint(algorithm, this.raw)];
|
|
213
|
-
case 1:
|
|
214
|
-
thumbprint = _c.sent();
|
|
215
|
-
this.thumbprints[algorithm['name'] || algorithm] = build_2.ToHex(thumbprint);
|
|
216
|
-
return [3 /*break*/, 3];
|
|
217
|
-
case 2:
|
|
218
|
-
error_1 = _c.sent();
|
|
219
|
-
console.error('Error thumbprint get:', error_1);
|
|
220
|
-
return [3 /*break*/, 3];
|
|
221
|
-
case 3: return [2 /*return*/];
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
X509AttributeCertificate.prototype.exportAsBase64 = function () {
|
|
227
|
-
return build_2.ToBase64(this.raw);
|
|
228
|
-
};
|
|
229
|
-
X509AttributeCertificate.prototype.exportAsHexFormatted = function () {
|
|
230
|
-
return hexFormat(build_2.ToHex(this.raw));
|
|
231
|
-
};
|
|
232
|
-
X509AttributeCertificate.prototype.exportAsPemFormatted = function () {
|
|
233
|
-
return "-----BEGIN ATTRIBUTE CERTIFICATE-----\n" + base64Format(this.exportAsBase64()) + "\n-----END ATTRIBUTE CERTIFICATE-----";
|
|
234
|
-
};
|
|
235
|
-
Object.defineProperty(X509AttributeCertificate.prototype, "commonName", {
|
|
236
|
-
get: function () {
|
|
237
|
-
return "attribute-certificate-" + this.thumbprints['SHA-1'];
|
|
238
|
-
},
|
|
239
|
-
enumerable: false,
|
|
240
|
-
configurable: true
|
|
241
|
-
});
|
|
242
|
-
return X509AttributeCertificate;
|
|
243
|
-
}(AsnData));
|
|
244
|
-
/**
|
|
245
|
-
* @license
|
|
246
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the MIT license found in the
|
|
249
|
-
* LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/
|
|
251
|
-
var CSR = /** @class */ (function (_super) {
|
|
252
|
-
__extends(CSR, _super);
|
|
253
|
-
function CSR(raw) {
|
|
254
|
-
var _this = _super.call(this, certificateRawToBuffer(raw), CertificationRequest) || this;
|
|
255
|
-
_this.thumbprints = {};
|
|
256
|
-
_this.type = 'PKCS#10 Certificate Request';
|
|
257
|
-
var certificationRequestInfo = _this.asn.certificationRequestInfo;
|
|
258
|
-
_this.subject = new Name(certificationRequestInfo.subject).toJSON();
|
|
259
|
-
_this.version = certificationRequestInfo.version;
|
|
260
|
-
return _this;
|
|
261
|
-
}
|
|
262
|
-
Object.defineProperty(CSR.prototype, "publicKey", {
|
|
263
|
-
get: function () {
|
|
264
|
-
var _c = this.asn.certificationRequestInfo.subjectPKInfo, subjectPublicKey = _c.subjectPublicKey, algorithm = _c.algorithm;
|
|
265
|
-
var params;
|
|
266
|
-
if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {
|
|
267
|
-
params = AsnConvert.parse(algorithm.parameters, ECParameters);
|
|
268
|
-
}
|
|
269
|
-
if (algorithm.algorithm === id_rsaEncryption) {
|
|
270
|
-
params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);
|
|
271
|
-
}
|
|
272
|
-
var spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);
|
|
273
|
-
return {
|
|
274
|
-
params: params,
|
|
275
|
-
value: spki,
|
|
276
|
-
algorithm: algorithm.algorithm,
|
|
277
|
-
};
|
|
278
|
-
},
|
|
279
|
-
enumerable: false,
|
|
280
|
-
configurable: true
|
|
281
|
-
});
|
|
282
|
-
Object.defineProperty(CSR.prototype, "signature", {
|
|
283
|
-
get: function () {
|
|
284
|
-
var _c = this.asn, signature = _c.signature, signatureAlgorithm = _c.signatureAlgorithm;
|
|
285
|
-
return {
|
|
286
|
-
value: signature,
|
|
287
|
-
algorithm: signatureAlgorithm.algorithm,
|
|
288
|
-
};
|
|
289
|
-
},
|
|
290
|
-
enumerable: false,
|
|
291
|
-
configurable: true
|
|
292
|
-
});
|
|
293
|
-
Object.defineProperty(CSR.prototype, "commonName", {
|
|
294
|
-
get: function () {
|
|
295
|
-
if (!this.subject) {
|
|
296
|
-
return '';
|
|
297
|
-
}
|
|
298
|
-
for (var i = 0; i < this.subject.length; i += 1) {
|
|
299
|
-
var name = this.subject[i];
|
|
300
|
-
if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {
|
|
301
|
-
return name.value;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
return '';
|
|
305
|
-
},
|
|
306
|
-
enumerable: false,
|
|
307
|
-
configurable: true
|
|
308
|
-
});
|
|
309
|
-
CSR.prototype.getThumbprint = function (algorithm) {
|
|
310
|
-
if (algorithm === void 0) { algorithm = 'SHA-1'; }
|
|
311
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
312
|
-
var thumbprint, error_2;
|
|
313
|
-
return __generator(this, function (_c) {
|
|
314
|
-
switch (_c.label) {
|
|
315
|
-
case 0:
|
|
316
|
-
_c.trys.push([0, 2, , 3]);
|
|
317
|
-
return [4 /*yield*/, getCertificateThumbprint(algorithm, this.raw)];
|
|
318
|
-
case 1:
|
|
319
|
-
thumbprint = _c.sent();
|
|
320
|
-
this.thumbprints[algorithm['name'] || algorithm] = build_2.ToHex(thumbprint);
|
|
321
|
-
return [3 /*break*/, 3];
|
|
322
|
-
case 2:
|
|
323
|
-
error_2 = _c.sent();
|
|
324
|
-
console.error('Error thumbprint get:', error_2);
|
|
325
|
-
return [3 /*break*/, 3];
|
|
326
|
-
case 3: return [2 /*return*/];
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
});
|
|
330
|
-
};
|
|
331
|
-
CSR.prototype.parseAttributes = function () {
|
|
332
|
-
var certificationRequestInfo = this.asn.certificationRequestInfo;
|
|
333
|
-
if (certificationRequestInfo.attributes) {
|
|
334
|
-
this.attributes = certificationRequestInfo.attributes
|
|
335
|
-
.map(function (e) { return new Attribute(AsnConvert.serialize(e)); });
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
CSR.prototype.exportAsBase64 = function () {
|
|
339
|
-
return build_2.ToBase64(this.raw);
|
|
340
|
-
};
|
|
341
|
-
CSR.prototype.exportAsHexFormatted = function () {
|
|
342
|
-
return hexFormat(build_2.ToHex(this.raw));
|
|
343
|
-
};
|
|
344
|
-
CSR.prototype.exportAsPemFormatted = function () {
|
|
345
|
-
return "-----BEGIN CERTIFICATE REQUEST-----\n" + base64Format(this.exportAsBase64()) + "\n-----END CERTIFICATE REQUEST-----";
|
|
346
|
-
};
|
|
347
|
-
return CSR;
|
|
348
|
-
}(AsnData));
|
|
349
|
-
/**
|
|
350
|
-
* @license
|
|
351
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the MIT license found in the
|
|
354
|
-
* LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/
|
|
356
|
-
function getStringByOID(value) {
|
|
357
|
-
var oid = OIDs[value];
|
|
358
|
-
if (oid) {
|
|
359
|
-
return oid + " (" + value + ")";
|
|
360
|
-
}
|
|
361
|
-
return value;
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* @license
|
|
365
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
366
|
-
*
|
|
367
|
-
* This source code is licensed under the MIT license found in the
|
|
368
|
-
* LICENSE file in the root directory of this source tree.
|
|
369
|
-
*/
|
|
370
|
-
function isLink(value) {
|
|
371
|
-
return value.indexOf('http') === 0;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* @license
|
|
375
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
376
|
-
*
|
|
377
|
-
* This source code is licensed under the MIT license found in the
|
|
378
|
-
* LICENSE file in the root directory of this source tree.
|
|
379
|
-
*/
|
|
380
|
-
var RowTitle = function (props) {
|
|
381
|
-
var value = props.value;
|
|
382
|
-
if (!value) {
|
|
383
|
-
return null;
|
|
384
|
-
}
|
|
385
|
-
return (h("tr", { class: "title" }, h("td", { colSpan: 2 }, h("peculiar-typography", { type: "h6" }, value))));
|
|
386
|
-
};
|
|
387
|
-
var RowValue = function (props) {
|
|
388
|
-
var name = props.name, value = props.value, monospace = props.monospace, collapse = props.collapse, href = props.href, extraValue = props.extraValue;
|
|
389
|
-
if (!name) {
|
|
390
|
-
return null;
|
|
391
|
-
}
|
|
392
|
-
if (value === undefined || value === null) {
|
|
393
|
-
return null;
|
|
394
|
-
}
|
|
395
|
-
var elementValue;
|
|
396
|
-
if (collapse) {
|
|
397
|
-
elementValue = (h("peculiar-text-hider", null, value));
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
elementValue = value;
|
|
401
|
-
}
|
|
402
|
-
var hasValue = !!value.toString();
|
|
403
|
-
return (h("tr", null, h("td", { colSpan: hasValue ? 1 : 2 }, h("peculiar-typography", { color: "grey_5" }, name, hasValue ? ':' : '')), hasValue && (h("td", { class: {
|
|
404
|
-
monospace: monospace,
|
|
405
|
-
} }, (isLink(value.toString()) || href) ? (h("peculiar-link", { href: href || value.toString() }, value)) : (h("peculiar-typography", { monospace: monospace }, elementValue, extraValue))))));
|
|
406
|
-
};
|
|
407
|
-
/**
|
|
408
|
-
* @license
|
|
409
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
410
|
-
*
|
|
411
|
-
* This source code is licensed under the MIT license found in the
|
|
412
|
-
* LICENSE file in the root directory of this source tree.
|
|
413
|
-
*/
|
|
414
|
-
var Signature = function (props) {
|
|
415
|
-
var signature = props.signature;
|
|
416
|
-
if (!signature) {
|
|
417
|
-
return null;
|
|
418
|
-
}
|
|
419
|
-
return [
|
|
420
|
-
h(RowTitle, { value: l10n.getString('signature') }),
|
|
421
|
-
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(signature.algorithm) }),
|
|
422
|
-
h(RowValue, { name: l10n.getString('value'), value: build_2.ToHex(signature.value), monospace: true, collapse: true }),
|
|
423
|
-
];
|
|
424
|
-
};
|
|
425
|
-
/**
|
|
426
|
-
* @license
|
|
427
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
428
|
-
*
|
|
429
|
-
* This source code is licensed under the MIT license found in the
|
|
430
|
-
* LICENSE file in the root directory of this source tree.
|
|
431
|
-
*/
|
|
432
|
-
var BasicAttribute = function (props, children) {
|
|
433
|
-
var attribute = props.attribute;
|
|
434
|
-
return ([
|
|
435
|
-
h(RowValue, { name: "Name", value: getStringByOID(attribute.asn.type) }),
|
|
436
|
-
children,
|
|
437
|
-
h("tr", null, h("td", { colSpan: 2, class: "divider" }, h("span", { class: "bg_fill" }))),
|
|
438
|
-
]);
|
|
439
|
-
};
|
|
440
|
-
/**
|
|
441
|
-
* @license
|
|
442
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
443
|
-
*
|
|
444
|
-
* This source code is licensed under the MIT license found in the
|
|
445
|
-
* LICENSE file in the root directory of this source tree.
|
|
446
|
-
*/
|
|
447
|
-
var NamePart = function (props) {
|
|
448
|
-
var name = props.name;
|
|
449
|
-
if (!name) {
|
|
450
|
-
return null;
|
|
451
|
-
}
|
|
452
|
-
return name.map(function (relativeDistinguishedName) { return (relativeDistinguishedName.map(function (attributeTypeAndValue) { return (h(RowValue, { name: OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() })); })); });
|
|
453
|
-
};
|
|
454
|
-
/**
|
|
455
|
-
* @license
|
|
456
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
457
|
-
*
|
|
458
|
-
* This source code is licensed under the MIT license found in the
|
|
459
|
-
* LICENSE file in the root directory of this source tree.
|
|
460
|
-
*/
|
|
461
|
-
var NameAttribute = function (props) {
|
|
462
|
-
var attribute = props.attribute;
|
|
463
|
-
return (h(BasicAttribute, { attribute: attribute }, h(NamePart, { name: attribute.value })));
|
|
464
|
-
};
|
|
465
|
-
/**
|
|
466
|
-
* @license
|
|
467
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
468
|
-
*
|
|
469
|
-
* This source code is licensed under the MIT license found in the
|
|
470
|
-
* LICENSE file in the root directory of this source tree.
|
|
471
|
-
*/
|
|
472
|
-
var names = {
|
|
473
|
-
otherName: 'Other Name',
|
|
474
|
-
rfc822Name: 'RFC 822 Name',
|
|
475
|
-
dNSName: 'DNS Name',
|
|
476
|
-
x400Address: 'X400 Address',
|
|
477
|
-
directoryName: 'Directory Name',
|
|
478
|
-
ediPartyName: 'Edi Party Name ',
|
|
479
|
-
uniformResourceIdentifier: 'URI',
|
|
480
|
-
iPAddress: 'IP Address',
|
|
481
|
-
registeredID: 'Registered ID',
|
|
482
|
-
};
|
|
483
|
-
var GeneralNamePart = function (props) {
|
|
484
|
-
var generalName = props.generalName, getDNSNameLink = props.getDNSNameLink, getIPAddressLink = props.getIPAddressLink;
|
|
485
|
-
if (!generalName) {
|
|
486
|
-
return null;
|
|
487
|
-
}
|
|
488
|
-
return Object.keys(generalName).map(function (name) {
|
|
489
|
-
var value = generalName[name];
|
|
490
|
-
if (value instanceof Name$1) {
|
|
491
|
-
return [
|
|
492
|
-
h(RowValue, { name: names[name] || name, value: "" }),
|
|
493
|
-
value.map(function (relativeDistinguishedName) { return (relativeDistinguishedName.map(function (attributeTypeAndValue) { return (h(RowValue, { name: OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() })); })); }),
|
|
494
|
-
];
|
|
495
|
-
}
|
|
496
|
-
if (value instanceof OtherName) {
|
|
497
|
-
try {
|
|
498
|
-
var text = AsnParser.parse(value.value, DisplayText);
|
|
499
|
-
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value: text.toString() }));
|
|
500
|
-
}
|
|
501
|
-
catch (error) {
|
|
502
|
-
//
|
|
503
|
-
}
|
|
504
|
-
try {
|
|
505
|
-
var text = AsnParser.parse(value.value, UserNotice);
|
|
506
|
-
if (text.explicitText) {
|
|
507
|
-
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value: text.explicitText.toString() }));
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
catch (error) {
|
|
511
|
-
//
|
|
512
|
-
}
|
|
513
|
-
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value: build_2.ToHex(value.value), monospace: true }));
|
|
514
|
-
}
|
|
515
|
-
if (build_1.isBufferSource(value)) {
|
|
516
|
-
return (h(RowValue, { name: names[name] || name, value: build_2.ToString(value) }));
|
|
517
|
-
}
|
|
518
|
-
if (value instanceof EDIPartyName) {
|
|
519
|
-
return (h(RowValue, { name: names[name] || name, value: build_2.ToString(value.partyName) }));
|
|
520
|
-
}
|
|
521
|
-
if (name === 'dNSName') {
|
|
522
|
-
return (h(RowValue, { name: names[name] || name, value: value, href: getDNSNameLink(value) }));
|
|
523
|
-
}
|
|
524
|
-
if (name === 'iPAddress') {
|
|
525
|
-
return (h(RowValue, { name: names[name] || name, value: value, href: getIPAddressLink(value) }));
|
|
526
|
-
}
|
|
527
|
-
return (h(RowValue, { name: names[name] || name, value: value }));
|
|
528
|
-
});
|
|
529
|
-
};
|
|
530
|
-
/**
|
|
531
|
-
* @license
|
|
532
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
533
|
-
*
|
|
534
|
-
* This source code is licensed under the MIT license found in the
|
|
535
|
-
* LICENSE file in the root directory of this source tree.
|
|
536
|
-
*/
|
|
537
|
-
var ActivityDescriptionAttribute = function (props) {
|
|
538
|
-
var attribute = props.attribute;
|
|
539
|
-
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Code Authority", value: "" }), h(GeneralNamePart, { generalName: attribute.value.codeAuthority, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } }), h(RowValue, { name: "Code Id", value: "" }), h(GeneralNamePart, { generalName: attribute.value.codeId, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } }), h(RowValue, { name: "Short Name", value: attribute.value.shortName }), h(RowValue, { name: "Short Description", value: attribute.value.shortDescription })));
|
|
540
|
-
};
|
|
541
|
-
/**
|
|
542
|
-
* @license
|
|
543
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
544
|
-
*
|
|
545
|
-
* This source code is licensed under the MIT license found in the
|
|
546
|
-
* LICENSE file in the root directory of this source tree.
|
|
547
|
-
*/
|
|
548
|
-
var WebGdprAttribute = function (props) {
|
|
549
|
-
var attribute = props.attribute;
|
|
550
|
-
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Assessment Authority", value: "" }), h(GeneralNamePart, { generalName: attribute.value.assessmentAuthority, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } }), h(RowValue, { name: "Assessment Location", value: "" }), h(GeneralNamePart, { generalName: attribute.value.assessmentLocation, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } }), h(RowValue, { name: "Assessment Ref", value: "" }), h(GeneralNamePart, { generalName: attribute.value.assessmentRef, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } }), h(RowValue, { name: "Data Storage Territory", value: attribute.value.dataStorageTerritory }), h(RowValue, { name: "Description", value: attribute.value.description })));
|
|
551
|
-
};
|
|
552
|
-
/**
|
|
553
|
-
* @license
|
|
554
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
555
|
-
*
|
|
556
|
-
* This source code is licensed under the MIT license found in the
|
|
557
|
-
* LICENSE file in the root directory of this source tree.
|
|
558
|
-
*/
|
|
559
|
-
var InsuranceValueAttribute = function (props) {
|
|
560
|
-
var attribute = props.attribute;
|
|
561
|
-
var value = attribute.value.base + " * 10^" + attribute.value.degree + " " + attribute.value.location;
|
|
562
|
-
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: value })));
|
|
563
|
-
};
|
|
564
|
-
/**
|
|
565
|
-
* @license
|
|
566
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
567
|
-
*
|
|
568
|
-
* This source code is licensed under the MIT license found in the
|
|
569
|
-
* LICENSE file in the root directory of this source tree.
|
|
570
|
-
*/
|
|
571
|
-
var TypeRelationshipAttribute = function (props) {
|
|
572
|
-
var attribute = props.attribute;
|
|
573
|
-
return (h(BasicAttribute, { attribute: attribute }, Object.keys(attribute.value).map(function (keyName) { return (h(RowValue, { name: keyName, value: attribute.value[keyName].toNumber() ? 'YES' : 'NO' })); })));
|
|
574
|
-
};
|
|
575
|
-
/**
|
|
576
|
-
* @license
|
|
577
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
578
|
-
*
|
|
579
|
-
* This source code is licensed under the MIT license found in the
|
|
580
|
-
* LICENSE file in the root directory of this source tree.
|
|
581
|
-
*/
|
|
582
|
-
var getValueRank = function (value) {
|
|
583
|
-
var ratio = 1;
|
|
584
|
-
if (value / 100 > 1) {
|
|
585
|
-
ratio = 100;
|
|
586
|
-
}
|
|
587
|
-
else if (value / 10 > 1) {
|
|
588
|
-
ratio = 10;
|
|
589
|
-
}
|
|
590
|
-
return value + "/" + 5 * ratio;
|
|
591
|
-
};
|
|
592
|
-
var ValuationRankingAttribute = function (props) {
|
|
593
|
-
var attribute = props.attribute;
|
|
594
|
-
var values = Object.keys(attribute.value).map(function (keyName) { return ([
|
|
595
|
-
getValueRank(attribute.value[keyName]),
|
|
596
|
-
h("br", null),
|
|
597
|
-
]); });
|
|
598
|
-
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: values })));
|
|
599
|
-
};
|
|
600
|
-
/**
|
|
601
|
-
* @license
|
|
602
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
603
|
-
*
|
|
604
|
-
* This source code is licensed under the MIT license found in the
|
|
605
|
-
* LICENSE file in the root directory of this source tree.
|
|
606
|
-
*/
|
|
607
|
-
var AsStringAttribute = function (props) {
|
|
608
|
-
var attribute = props.attribute;
|
|
609
|
-
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: attribute.value, monospace: true })));
|
|
610
|
-
};
|
|
611
|
-
/**
|
|
612
|
-
* @license
|
|
613
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
614
|
-
*
|
|
615
|
-
* This source code is licensed under the MIT license found in the
|
|
616
|
-
* LICENSE file in the root directory of this source tree.
|
|
617
|
-
*/
|
|
618
|
-
var UnstructuredNameAttribute = function (props) {
|
|
619
|
-
var attribute = props.attribute;
|
|
620
|
-
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: attribute.value.utf8String })));
|
|
621
|
-
};
|
|
622
|
-
/**
|
|
623
|
-
* @license
|
|
624
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
625
|
-
*
|
|
626
|
-
* This source code is licensed under the MIT license found in the
|
|
627
|
-
* LICENSE file in the root directory of this source tree.
|
|
628
|
-
*/
|
|
629
|
-
var ChallengePasswordAttribute = function (props) {
|
|
630
|
-
var attribute = props.attribute;
|
|
631
|
-
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: attribute.value.toString() })));
|
|
632
|
-
};
|
|
633
|
-
/**
|
|
634
|
-
* @license
|
|
635
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
636
|
-
*
|
|
637
|
-
* This source code is licensed under the MIT license found in the
|
|
638
|
-
* LICENSE file in the root directory of this source tree.
|
|
639
|
-
*/
|
|
640
|
-
var Attributes = function (props) {
|
|
641
|
-
var attributes = props.attributes;
|
|
642
|
-
if (!attributes || !attributes.length) {
|
|
643
|
-
return null;
|
|
644
|
-
}
|
|
645
|
-
return ([
|
|
646
|
-
h(RowTitle, { value: "Attributes" }),
|
|
647
|
-
attributes.map(function (attribute) {
|
|
648
|
-
try {
|
|
649
|
-
if (attribute.value instanceof Name$1) {
|
|
650
|
-
return (h(NameAttribute, { attribute: attribute }));
|
|
651
|
-
}
|
|
652
|
-
if (attribute.value instanceof ActivityDescription) {
|
|
653
|
-
return (h(ActivityDescriptionAttribute, { attribute: attribute }));
|
|
654
|
-
}
|
|
655
|
-
if (attribute.value instanceof WebGDPR) {
|
|
656
|
-
return (h(WebGdprAttribute, { attribute: attribute }));
|
|
657
|
-
}
|
|
658
|
-
if (attribute.value instanceof InsuranceValue) {
|
|
659
|
-
return (h(InsuranceValueAttribute, { attribute: attribute }));
|
|
660
|
-
}
|
|
661
|
-
if (attribute.value instanceof TypeRelationship) {
|
|
662
|
-
return (h(TypeRelationshipAttribute, { attribute: attribute }));
|
|
663
|
-
}
|
|
664
|
-
if (attribute.value instanceof ValuationRanking) {
|
|
665
|
-
return (h(ValuationRankingAttribute, { attribute: attribute }));
|
|
666
|
-
}
|
|
667
|
-
if (attribute.value instanceof UnstructuredName) {
|
|
668
|
-
return (h(UnstructuredNameAttribute, { attribute: attribute }));
|
|
669
|
-
}
|
|
670
|
-
if (attribute.value instanceof ChallengePassword) {
|
|
671
|
-
return (h(ChallengePasswordAttribute, { attribute: attribute }));
|
|
672
|
-
}
|
|
673
|
-
if (typeof attribute.value === 'string') {
|
|
674
|
-
return (h(AsStringAttribute, { attribute: attribute }));
|
|
675
|
-
}
|
|
676
|
-
return (h(BasicAttribute, { attribute: attribute }));
|
|
677
|
-
}
|
|
678
|
-
catch (error) {
|
|
679
|
-
console.error('Error render attribute:', attribute.asn.type);
|
|
680
|
-
return null;
|
|
681
|
-
}
|
|
682
|
-
}),
|
|
683
|
-
]);
|
|
684
|
-
};
|
|
685
|
-
/**
|
|
686
|
-
* @license
|
|
687
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
688
|
-
*
|
|
689
|
-
* This source code is licensed under the MIT license found in the
|
|
690
|
-
* LICENSE file in the root directory of this source tree.
|
|
691
|
-
*/
|
|
692
|
-
var Thumbprints = function (props) {
|
|
693
|
-
var thumbprints = props.thumbprints;
|
|
694
|
-
if (!thumbprints) {
|
|
695
|
-
return null;
|
|
696
|
-
}
|
|
697
|
-
var keys = Object.keys(thumbprints);
|
|
698
|
-
if (!keys.length) {
|
|
699
|
-
return null;
|
|
700
|
-
}
|
|
701
|
-
return [
|
|
702
|
-
h(RowTitle, { value: l10n.getString('fingerprints') }),
|
|
703
|
-
keys.map(function (name) { return (h(RowValue, { name: name, value: thumbprints[name], monospace: true })); }),
|
|
704
|
-
];
|
|
705
|
-
};
|
|
706
|
-
/**
|
|
707
|
-
* @license
|
|
708
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
709
|
-
*
|
|
710
|
-
* This source code is licensed under the MIT license found in the
|
|
711
|
-
* LICENSE file in the root directory of this source tree.
|
|
712
|
-
*/
|
|
713
|
-
var BasicExtension = function (props, children) {
|
|
714
|
-
var extension = props.extension;
|
|
715
|
-
return ([
|
|
716
|
-
h(RowValue, { name: "Name", value: getStringByOID(extension.asn.extnID) }),
|
|
717
|
-
h(RowValue, { name: "Critical", value: extension.asn.critical ? 'YES' : 'NO' }),
|
|
718
|
-
children,
|
|
719
|
-
h("tr", null, h("td", { colSpan: 2, class: "divider" }, h("span", { class: "bg_fill" }))),
|
|
720
|
-
]);
|
|
721
|
-
};
|
|
722
|
-
/**
|
|
723
|
-
* @license
|
|
724
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
725
|
-
*
|
|
726
|
-
* This source code is licensed under the MIT license found in the
|
|
727
|
-
* LICENSE file in the root directory of this source tree.
|
|
728
|
-
*/
|
|
729
|
-
var KeyUsageExtension = function (props) {
|
|
730
|
-
var extension = props.extension;
|
|
731
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Usage", value: extension.value.toJSON().join(', ') })));
|
|
732
|
-
};
|
|
733
|
-
/**
|
|
734
|
-
* @license
|
|
735
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
736
|
-
*
|
|
737
|
-
* This source code is licensed under the MIT license found in the
|
|
738
|
-
* LICENSE file in the root directory of this source tree.
|
|
739
|
-
*/
|
|
740
|
-
var BasicConstraintsExtension = function (props) {
|
|
741
|
-
var extension = props.extension;
|
|
742
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Certificate Authority", value: extension.value.cA ? 'YES' : 'NO' }), h(RowValue, { name: "Path Length Constraint", value: extension.value.pathLenConstraint })));
|
|
743
|
-
};
|
|
744
|
-
/**
|
|
745
|
-
* @license
|
|
746
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
747
|
-
*
|
|
748
|
-
* This source code is licensed under the MIT license found in the
|
|
749
|
-
* LICENSE file in the root directory of this source tree.
|
|
750
|
-
*/
|
|
751
|
-
var ExtendedKeyUsageExtension = function (props) {
|
|
752
|
-
var extension = props.extension;
|
|
753
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (usage, arrayIndex) { return (h(RowValue, { name: "Purpose #" + (arrayIndex + 1), value: getStringByOID(usage) })); })));
|
|
754
|
-
};
|
|
755
|
-
/**
|
|
756
|
-
* @license
|
|
757
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
758
|
-
*
|
|
759
|
-
* This source code is licensed under the MIT license found in the
|
|
760
|
-
* LICENSE file in the root directory of this source tree.
|
|
761
|
-
*/
|
|
762
|
-
var SubjectKeyIdentifierExtension = function (props) {
|
|
763
|
-
var extension = props.extension, getSubjectKeyIdChildrenLink = props.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink = props.getSubjectKeyIdSiblingsLink;
|
|
764
|
-
var keyId = build_2.ToHex(extension.value.buffer);
|
|
765
|
-
var childrenLink = getSubjectKeyIdChildrenLink(keyId);
|
|
766
|
-
var siblingsLink = getSubjectKeyIdSiblingsLink(keyId);
|
|
767
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
|
|
768
|
-
childrenLink && (h("span", null, "\u00A0[", h("peculiar-link", { href: childrenLink }, "children"), "]")),
|
|
769
|
-
siblingsLink && (h("span", null, "\u00A0[", h("peculiar-link", { href: siblingsLink }, "siblings"), "]")),
|
|
770
|
-
] })));
|
|
771
|
-
};
|
|
772
|
-
/**
|
|
773
|
-
* @license
|
|
774
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
775
|
-
*
|
|
776
|
-
* This source code is licensed under the MIT license found in the
|
|
777
|
-
* LICENSE file in the root directory of this source tree.
|
|
778
|
-
*/
|
|
779
|
-
var AuthorityKeyIdentifierExtension = function (props) {
|
|
780
|
-
var extension = props.extension, getAuthKeyIdParentLink = props.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink = props.getAuthKeyIdSiblingsLink;
|
|
781
|
-
var keyId = build_2.ToHex(extension.value.keyIdentifier.buffer);
|
|
782
|
-
var parentLink = getAuthKeyIdParentLink(keyId);
|
|
783
|
-
var siblingsLink = getAuthKeyIdSiblingsLink(keyId);
|
|
784
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
|
|
785
|
-
parentLink && (h("span", null, "\u00A0[", h("peculiar-link", { href: parentLink }, "parents"), "]")),
|
|
786
|
-
siblingsLink && (h("span", null, "\u00A0[", h("peculiar-link", { href: siblingsLink }, "siblings"), "]")),
|
|
787
|
-
] })));
|
|
788
|
-
};
|
|
789
|
-
/**
|
|
790
|
-
* @license
|
|
791
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
792
|
-
*
|
|
793
|
-
* This source code is licensed under the MIT license found in the
|
|
794
|
-
* LICENSE file in the root directory of this source tree.
|
|
795
|
-
*/
|
|
796
|
-
var CRLDistributionPointsExtension = function (props) {
|
|
797
|
-
var extension = props.extension;
|
|
798
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (point) {
|
|
799
|
-
var _a, _b;
|
|
800
|
-
return ([
|
|
801
|
-
(_a = point.distributionPoint) === null || _a === void 0 ? void 0 : _a.fullName.map(function (gn) { return (h(GeneralNamePart, Object.assign({ generalName: gn }, props))); }),
|
|
802
|
-
(_b = point.cRLIssuer) === null || _b === void 0 ? void 0 : _b.map(function (gn) { return (h(GeneralNamePart, Object.assign({ generalName: gn }, props))); }),
|
|
803
|
-
]);
|
|
804
|
-
})));
|
|
805
|
-
};
|
|
806
|
-
/**
|
|
807
|
-
* @license
|
|
808
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
809
|
-
*
|
|
810
|
-
* This source code is licensed under the MIT license found in the
|
|
811
|
-
* LICENSE file in the root directory of this source tree.
|
|
812
|
-
*/
|
|
813
|
-
var InfoAccessSyntaxExtension = function (props) {
|
|
814
|
-
var extension = props.extension;
|
|
815
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (description, arrayIndex) { return ([
|
|
816
|
-
h(RowValue, { name: "Description #" + (arrayIndex + 1), value: "" }),
|
|
817
|
-
h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }),
|
|
818
|
-
h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props)),
|
|
819
|
-
]); })));
|
|
820
|
-
};
|
|
821
|
-
/**
|
|
822
|
-
* @license
|
|
823
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
824
|
-
*
|
|
825
|
-
* This source code is licensed under the MIT license found in the
|
|
826
|
-
* LICENSE file in the root directory of this source tree.
|
|
827
|
-
*/
|
|
828
|
-
var SubjectAlternativeNameExtension = function (props) {
|
|
829
|
-
var extension = props.extension;
|
|
830
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (gn) { return (h(GeneralNamePart, Object.assign({ generalName: gn }, props))); })));
|
|
831
|
-
};
|
|
832
|
-
/**
|
|
833
|
-
* @license
|
|
834
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
835
|
-
*
|
|
836
|
-
* This source code is licensed under the MIT license found in the
|
|
837
|
-
* LICENSE file in the root directory of this source tree.
|
|
838
|
-
*/
|
|
839
|
-
var CertificatePoliciesExtension = function (props) {
|
|
840
|
-
var extension = props.extension;
|
|
841
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (policy, arrayIndex) {
|
|
842
|
-
var _a;
|
|
843
|
-
return ([
|
|
844
|
-
h(RowValue, { name: "Policy #" + (arrayIndex + 1), value: "" }),
|
|
845
|
-
h(RowValue, { name: "ID", value: getStringByOID(policy.policyIdentifier) }),
|
|
846
|
-
(_a = policy.policyQualifiers) === null || _a === void 0 ? void 0 : _a.map(function (qualifierInfo, indexInfo) {
|
|
847
|
-
var data = [
|
|
848
|
-
h(RowValue, { name: "Qualifier #" + (arrayIndex + 1) + "." + (indexInfo + 1), value: "" }),
|
|
849
|
-
h(RowValue, { name: "ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
|
|
850
|
-
];
|
|
851
|
-
if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
|
|
852
|
-
var value = AsnParser.parse(qualifierInfo.qualifier, DisplayText);
|
|
853
|
-
data.push(h(RowValue, { name: "Value", value: value.toString() }));
|
|
854
|
-
}
|
|
855
|
-
if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
|
|
856
|
-
var value = AsnParser.parse(qualifierInfo.qualifier, UserNotice);
|
|
857
|
-
if (value.explicitText) {
|
|
858
|
-
data.push(h(RowValue, { name: "Value", value: value.explicitText.toString() }));
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
return data;
|
|
862
|
-
}),
|
|
863
|
-
]);
|
|
864
|
-
})));
|
|
865
|
-
};
|
|
866
|
-
/**
|
|
867
|
-
* @license
|
|
868
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
869
|
-
*
|
|
870
|
-
* This source code is licensed under the MIT license found in the
|
|
871
|
-
* LICENSE file in the root directory of this source tree.
|
|
872
|
-
*/
|
|
873
|
-
var logs = {
|
|
874
|
-
'9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5': 'Akamai CT',
|
|
875
|
-
'39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9': 'Alpha CT',
|
|
876
|
-
a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638: 'CNNIC CT',
|
|
877
|
-
cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900: 'Certly.IO',
|
|
878
|
-
'1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4': 'Cloudflare “Nimbus2017”',
|
|
879
|
-
db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64: 'Cloudflare “Nimbus2018”',
|
|
880
|
-
'747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56': 'Cloudflare “Nimbus2019”',
|
|
881
|
-
'5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558': 'Cloudflare “Nimbus2020”',
|
|
882
|
-
'4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8': 'Cloudflare “Nimbus2021”',
|
|
883
|
-
'41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6': 'Cloudflare “Nimbus2022”',
|
|
884
|
-
'7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52': 'Cloudflare “Nimbus2023”',
|
|
885
|
-
'6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5': 'DigiCert Nessie2018',
|
|
886
|
-
fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c: 'DigiCert Nessie2019',
|
|
887
|
-
c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565: 'DigiCert Nessie2020',
|
|
888
|
-
eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9: 'DigiCert Nessie2021',
|
|
889
|
-
'51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5': 'DigiCert Nessie2022',
|
|
890
|
-
b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a: 'DigiCert Nessie2023',
|
|
891
|
-
'5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd': 'DigiCert Server',
|
|
892
|
-
'8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f': 'DigiCert Server 2',
|
|
893
|
-
c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360: 'DigiCert Yeti2018',
|
|
894
|
-
e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe: 'DigiCert Yeti2019',
|
|
895
|
-
f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273: 'DigiCert Yeti2020',
|
|
896
|
-
'5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca': 'DigiCert Yeti2021',
|
|
897
|
-
'2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02': 'DigiCert Yeti2022',
|
|
898
|
-
'35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c': 'DigiCert Yeti2023',
|
|
899
|
-
'717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668': 'GDCA 1',
|
|
900
|
-
'14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a': 'GDCA 2',
|
|
901
|
-
c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa: 'GDCA CT #1',
|
|
902
|
-
'924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01': 'GDCA CT #2',
|
|
903
|
-
fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28: 'Google “Argon2017”',
|
|
904
|
-
a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25: 'Google “Argon2018”',
|
|
905
|
-
'63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d': 'Google “Argon2019”',
|
|
906
|
-
b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e: 'Google “Argon2020”',
|
|
907
|
-
f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3: 'Google “Argon2021”',
|
|
908
|
-
'2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784': 'Google “Argon2022”',
|
|
909
|
-
'68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4': 'Google “Aviator”',
|
|
910
|
-
c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6: 'Google “Crucible”',
|
|
911
|
-
'1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb': 'Google “Daedalus”',
|
|
912
|
-
'293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478': 'Google “Icarus”',
|
|
913
|
-
a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10: 'Google “Pilot”',
|
|
914
|
-
ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb: 'Google “Rocketeer”',
|
|
915
|
-
bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185: 'Google “Skydiver”',
|
|
916
|
-
'52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03': 'Google “Solera2018”',
|
|
917
|
-
'0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00': 'Google “Solera2019”',
|
|
918
|
-
'1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7': 'Google “Solera2020”',
|
|
919
|
-
a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7: 'Google “Solera2021”',
|
|
920
|
-
'697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3': 'Google “Solera2022”',
|
|
921
|
-
a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681: 'Google “Submariner”',
|
|
922
|
-
b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77: 'Google “Testtube”',
|
|
923
|
-
b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e: 'Google “Xenon2018”',
|
|
924
|
-
'084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0': 'Google “Xenon2019”',
|
|
925
|
-
'07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c': 'Google “Xenon2020”',
|
|
926
|
-
'7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7': 'Google “Xenon2021”',
|
|
927
|
-
'46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47': 'Google “Xenon2022”',
|
|
928
|
-
'7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3': 'Izenpe',
|
|
929
|
-
'8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566': 'Izenpe “Argi”',
|
|
930
|
-
'296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd': 'Let“s Encrypt ”Clicky”',
|
|
931
|
-
'537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440': 'Nordu “flimsy”',
|
|
932
|
-
aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd: 'Nordu “plausible”',
|
|
933
|
-
e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273: 'PuChuangSiDa CT',
|
|
934
|
-
cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6: 'SHECA CT 1',
|
|
935
|
-
'32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623': 'SHECA CT 2',
|
|
936
|
-
db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98: 'Sectigo (Comodo) “Dodo” CT',
|
|
937
|
-
'6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913': 'Sectigo (Comodo) “Mammoth” CT',
|
|
938
|
-
'5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c': 'Sectigo (Comodo) “Sabre” CT',
|
|
939
|
-
'34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef': 'StartCom',
|
|
940
|
-
ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc: 'Symantec',
|
|
941
|
-
a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2: 'Symantec Deneb',
|
|
942
|
-
'15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f': 'Symantec “Sirius”',
|
|
943
|
-
bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5: 'Symantec “Vega”',
|
|
944
|
-
b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b: 'Up In The Air “Behind the Sofa”',
|
|
945
|
-
ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d: 'Venafi',
|
|
946
|
-
'03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b': 'Venafi Gen2 CT',
|
|
947
|
-
'41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263': 'WoSign',
|
|
948
|
-
'63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7': 'WoSign 2',
|
|
949
|
-
'9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b': 'WoSign CT #1',
|
|
950
|
-
};
|
|
951
|
-
/**
|
|
952
|
-
* @license
|
|
953
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
954
|
-
*
|
|
955
|
-
* This source code is licensed under the MIT license found in the
|
|
956
|
-
* LICENSE file in the root directory of this source tree.
|
|
957
|
-
*/
|
|
958
|
-
var CertificateTransparencyExtension = function (props) {
|
|
959
|
-
var extension = props.extension;
|
|
960
|
-
return (h(BasicExtension, { extension: extension }, extension.value.toJSON().map(function (signedCertificateTimestamp, arrayIndex) { return ([
|
|
961
|
-
h(RowValue, { name: "SCT #" + (arrayIndex + 1), value: "" }),
|
|
962
|
-
h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }),
|
|
963
|
-
h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }),
|
|
964
|
-
h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }),
|
|
965
|
-
h(RowValue, { name: "Timestamp", value: dateShort(signedCertificateTimestamp.timestamp) }),
|
|
966
|
-
h(RowValue, { name: "Signature Algorithm", value: (signedCertificateTimestamp.hashAlgorithm + " " + signedCertificateTimestamp.signatureAlgorithm).toUpperCase() }),
|
|
967
|
-
h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true }),
|
|
968
|
-
]); })));
|
|
969
|
-
};
|
|
970
|
-
/**
|
|
971
|
-
* @license
|
|
972
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
973
|
-
*
|
|
974
|
-
* This source code is licensed under the MIT license found in the
|
|
975
|
-
* LICENSE file in the root directory of this source tree.
|
|
976
|
-
*/
|
|
977
|
-
var NameConstraintsExtension = function (props) {
|
|
978
|
-
var _a, _b;
|
|
979
|
-
var extension = props.extension;
|
|
980
|
-
return (h(BasicExtension, { extension: extension }, (_a = extension.value.excludedSubtrees) === null || _a === void 0 ? void 0 :
|
|
981
|
-
_a.map(function (generalSubtree) { return (h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props))); }), (_b = extension.value.permittedSubtrees) === null || _b === void 0 ? void 0 :
|
|
982
|
-
_b.map(function (generalSubtree) { return (h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props))); })));
|
|
983
|
-
};
|
|
984
|
-
/**
|
|
985
|
-
* @license
|
|
986
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
987
|
-
*
|
|
988
|
-
* This source code is licensed under the MIT license found in the
|
|
989
|
-
* LICENSE file in the root directory of this source tree.
|
|
990
|
-
*/
|
|
991
|
-
var CertificateTemplateExtension = function (props) {
|
|
992
|
-
var extension = props.extension;
|
|
993
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Template ID", value: extension.value.templateID }), h(RowValue, { name: "Template Major Version", value: extension.value.templateMajorVersion }), h(RowValue, { name: "Template Minor Version", value: extension.value.templateMinorVersion })));
|
|
994
|
-
};
|
|
995
|
-
/**
|
|
996
|
-
* @license
|
|
997
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
998
|
-
*
|
|
999
|
-
* This source code is licensed under the MIT license found in the
|
|
1000
|
-
* LICENSE file in the root directory of this source tree.
|
|
1001
|
-
*/
|
|
1002
|
-
var EnrollCertTypeChoiceExtension = function (props) {
|
|
1003
|
-
var extension = props.extension;
|
|
1004
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Name", value: extension.value.toString() })));
|
|
1005
|
-
};
|
|
1006
|
-
/**
|
|
1007
|
-
* @license
|
|
1008
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1009
|
-
*
|
|
1010
|
-
* This source code is licensed under the MIT license found in the
|
|
1011
|
-
* LICENSE file in the root directory of this source tree.
|
|
1012
|
-
*/
|
|
1013
|
-
var CaVersionExtension = function (props) {
|
|
1014
|
-
var extension = props.extension;
|
|
1015
|
-
var version = extension.value.getVersion();
|
|
1016
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Certificate Index", value: version.certificateIndex }), h(RowValue, { name: "Key Index", value: version.keyIndex })));
|
|
1017
|
-
};
|
|
1018
|
-
/**
|
|
1019
|
-
* @license
|
|
1020
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1021
|
-
*
|
|
1022
|
-
* This source code is licensed under the MIT license found in the
|
|
1023
|
-
* LICENSE file in the root directory of this source tree.
|
|
1024
|
-
*/
|
|
1025
|
-
var QCStatementsExtension = function (props) {
|
|
1026
|
-
var extension = props.extension;
|
|
1027
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (statement, arrayIndex) { return ([
|
|
1028
|
-
h(RowValue, { name: "Statement #" + (arrayIndex + 1), value: "" }),
|
|
1029
|
-
h(RowValue, { name: "ID", value: getStringByOID(statement.statementId) }),
|
|
1030
|
-
h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ? build_2.ToHex(statement.statementInfo) : null, monospace: true }),
|
|
1031
|
-
]); })));
|
|
1032
|
-
};
|
|
1033
|
-
/**
|
|
1034
|
-
* @license
|
|
1035
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1036
|
-
*
|
|
1037
|
-
* This source code is licensed under the MIT license found in the
|
|
1038
|
-
* LICENSE file in the root directory of this source tree.
|
|
1039
|
-
*/
|
|
1040
|
-
var NetscapeCommentExtension = function (props) {
|
|
1041
|
-
var extension = props.extension;
|
|
1042
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Comment", value: extension.value.value })));
|
|
1043
|
-
};
|
|
1044
|
-
/**
|
|
1045
|
-
* @license
|
|
1046
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1047
|
-
*
|
|
1048
|
-
* This source code is licensed under the MIT license found in the
|
|
1049
|
-
* LICENSE file in the root directory of this source tree.
|
|
1050
|
-
*/
|
|
1051
|
-
var NetscapeCertTypeExtension = function (props) {
|
|
1052
|
-
var extension = props.extension;
|
|
1053
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Type", value: extension.value.toJSON().join(', ') })));
|
|
1054
|
-
};
|
|
1055
|
-
/**
|
|
1056
|
-
* @license
|
|
1057
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1058
|
-
*
|
|
1059
|
-
* This source code is licensed under the MIT license found in the
|
|
1060
|
-
* LICENSE file in the root directory of this source tree.
|
|
1061
|
-
*/
|
|
1062
|
-
var LeiRoleExtension = function (props) {
|
|
1063
|
-
var extension = props.extension;
|
|
1064
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Role", value: extension.value.text })));
|
|
1065
|
-
};
|
|
1066
|
-
/**
|
|
1067
|
-
* @license
|
|
1068
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1069
|
-
*
|
|
1070
|
-
* This source code is licensed under the MIT license found in the
|
|
1071
|
-
* LICENSE file in the root directory of this source tree.
|
|
1072
|
-
*/
|
|
1073
|
-
var LeiExtension = function (props) {
|
|
1074
|
-
var extension = props.extension, getLEILink = props.getLEILink;
|
|
1075
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Identifier", value: extension.value.text, href: getLEILink(extension.value.text) })));
|
|
1076
|
-
};
|
|
1077
|
-
/**
|
|
1078
|
-
* @license
|
|
1079
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1080
|
-
*
|
|
1081
|
-
* This source code is licensed under the MIT license found in the
|
|
1082
|
-
* LICENSE file in the root directory of this source tree.
|
|
1083
|
-
*/
|
|
1084
|
-
var TimestampExtension = function (props) {
|
|
1085
|
-
var extension = props.extension;
|
|
1086
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Version", value: extension.value.version }), h(GeneralNamePart, Object.assign({ generalName: extension.value.location }, props)), h(RowValue, { name: "Requires Auth", value: extension.value.requiresAuth ? 'YES' : 'NO' })));
|
|
1087
|
-
};
|
|
1088
|
-
/**
|
|
1089
|
-
* @license
|
|
1090
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1091
|
-
*
|
|
1092
|
-
* This source code is licensed under the MIT license found in the
|
|
1093
|
-
* LICENSE file in the root directory of this source tree.
|
|
1094
|
-
*/
|
|
1095
|
-
var ArchiveRevInfoExtension = function (props) {
|
|
1096
|
-
var extension = props.extension;
|
|
1097
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Version", value: extension.value.version })));
|
|
1098
|
-
};
|
|
1099
|
-
/**
|
|
1100
|
-
* @license
|
|
1101
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1102
|
-
*
|
|
1103
|
-
* This source code is licensed under the MIT license found in the
|
|
1104
|
-
* LICENSE file in the root directory of this source tree.
|
|
1105
|
-
*/
|
|
1106
|
-
var CRLReasonExtension = function (props) {
|
|
1107
|
-
var extension = props.extension;
|
|
1108
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Reason", value: extension.value.toJSON() })));
|
|
1109
|
-
};
|
|
1110
|
-
/**
|
|
1111
|
-
* @license
|
|
1112
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1113
|
-
*
|
|
1114
|
-
* This source code is licensed under the MIT license found in the
|
|
1115
|
-
* LICENSE file in the root directory of this source tree.
|
|
1116
|
-
*/
|
|
1117
|
-
function getAttributeValue(attribute) {
|
|
1118
|
-
return build_2.ToString(attribute.values[0]);
|
|
1119
|
-
}
|
|
1120
|
-
/**
|
|
1121
|
-
* @license
|
|
1122
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1123
|
-
*
|
|
1124
|
-
* This source code is licensed under the MIT license found in the
|
|
1125
|
-
* LICENSE file in the root directory of this source tree.
|
|
1126
|
-
*/
|
|
1127
|
-
var SubjectDirectoryAttributesExtension = function (props) {
|
|
1128
|
-
var extension = props.extension;
|
|
1129
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (attribute, arrayIndex) { return ([
|
|
1130
|
-
h(RowValue, { name: "Attribute #" + (arrayIndex + 1), value: "" }),
|
|
1131
|
-
h(RowValue, { name: "Type", value: getStringByOID(attribute.type) }),
|
|
1132
|
-
h(RowValue, { name: "Value", value: getAttributeValue(attribute) }),
|
|
1133
|
-
]); })));
|
|
1134
|
-
};
|
|
1135
|
-
/**
|
|
1136
|
-
* @license
|
|
1137
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1138
|
-
*
|
|
1139
|
-
* This source code is licensed under the MIT license found in the
|
|
1140
|
-
* LICENSE file in the root directory of this source tree.
|
|
1141
|
-
*/
|
|
1142
|
-
var AsStringExtension = function (props) {
|
|
1143
|
-
var extension = props.extension;
|
|
1144
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Value", value: extension.value, monospace: true })));
|
|
1145
|
-
};
|
|
1146
|
-
/**
|
|
1147
|
-
* @license
|
|
1148
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1149
|
-
*
|
|
1150
|
-
* This source code is licensed under the MIT license found in the
|
|
1151
|
-
* LICENSE file in the root directory of this source tree.
|
|
1152
|
-
*/
|
|
1153
|
-
var PrivateKeyUsagePeriodExtension = function (props) {
|
|
1154
|
-
var extension = props.extension;
|
|
1155
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Not Before", value: dateShort(extension.value.notBefore) }), h(RowValue, { name: "Not After", value: dateShort(extension.value.notAfter) })));
|
|
1156
|
-
};
|
|
1157
|
-
/**
|
|
1158
|
-
* @license
|
|
1159
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1160
|
-
*
|
|
1161
|
-
* This source code is licensed under the MIT license found in the
|
|
1162
|
-
* LICENSE file in the root directory of this source tree.
|
|
1163
|
-
*/
|
|
1164
|
-
var EntrustVersionInfoExtension = function (props) {
|
|
1165
|
-
var extension = props.extension;
|
|
1166
|
-
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Version", value: extension.value.entrustVers }), h(RowValue, { name: "Info Flags", value: extension.value.entrustInfoFlags.toJSON().join(', ') })));
|
|
1167
|
-
};
|
|
1168
|
-
/**
|
|
1169
|
-
* @license
|
|
1170
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1171
|
-
*
|
|
1172
|
-
* This source code is licensed under the MIT license found in the
|
|
1173
|
-
* LICENSE file in the root directory of this source tree.
|
|
1174
|
-
*/
|
|
1175
|
-
var BiometricSyntaxExtension = function (props) {
|
|
1176
|
-
var extension = props.extension;
|
|
1177
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (data, arrayIndex) { return ([
|
|
1178
|
-
h(RowValue, { name: "Biometric #" + (arrayIndex + 1), value: "" }),
|
|
1179
|
-
h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
|
|
1180
|
-
h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
|
|
1181
|
-
h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
|
|
1182
|
-
h(RowValue, { name: "Hash", value: build_2.ToHex(data.biometricDataHash.buffer), monospace: true }),
|
|
1183
|
-
h(RowValue, { name: "Source Uri", value: data.sourceDataUri }),
|
|
1184
|
-
]); })));
|
|
1185
|
-
};
|
|
1186
|
-
/**
|
|
1187
|
-
* @license
|
|
1188
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1189
|
-
*
|
|
1190
|
-
* This source code is licensed under the MIT license found in the
|
|
1191
|
-
* LICENSE file in the root directory of this source tree.
|
|
1192
|
-
*/
|
|
1193
|
-
var LogotypeExtension = function (props) {
|
|
1194
|
-
var extension = props.extension;
|
|
1195
|
-
var renderImage = function (image) {
|
|
1196
|
-
if (!image) {
|
|
1197
|
-
return null;
|
|
1198
|
-
}
|
|
1199
|
-
return image.map(function (img) {
|
|
1200
|
-
var imageDetails = img.imageDetails;
|
|
1201
|
-
return [
|
|
1202
|
-
h(RowValue, { name: "Image Type", value: imageDetails.mediaType }),
|
|
1203
|
-
h(RowValue, { name: "Image Hash", value: build_2.ToHex(imageDetails.logotypeHash[0].hashValue), monospace: true }),
|
|
1204
|
-
h(RowValue, { name: "Image URL", value: imageDetails.logotypeURI[0], monospace: true, collapse: true }),
|
|
1205
|
-
h(RowValue, { name: "Image Hash Algorithm", value: getStringByOID(imageDetails.logotypeHash[0].hashAlg.algorithm) }),
|
|
1206
|
-
];
|
|
1207
|
-
});
|
|
1208
|
-
};
|
|
1209
|
-
var renderAudio = function (audio) {
|
|
1210
|
-
if (!audio) {
|
|
1211
|
-
return null;
|
|
1212
|
-
}
|
|
1213
|
-
return audio.map(function (aud) {
|
|
1214
|
-
var audioDetails = aud.audioDetails;
|
|
1215
|
-
return [
|
|
1216
|
-
h(RowValue, { name: "Audio Type", value: audioDetails.mediaType }),
|
|
1217
|
-
h(RowValue, { name: "Audio Hash", value: build_2.ToHex(audioDetails.logotypeHash[0].hashValue), monospace: true }),
|
|
1218
|
-
h(RowValue, { name: "Audio URL", value: audioDetails.logotypeURI[0], monospace: true, collapse: true }),
|
|
1219
|
-
h(RowValue, { name: "Audio Hash Algorithm", value: getStringByOID(audioDetails.logotypeHash[0].hashAlg.algorithm) }),
|
|
1220
|
-
];
|
|
1221
|
-
});
|
|
1222
|
-
};
|
|
1223
|
-
var renderLogo = function (title, info) {
|
|
1224
|
-
if (!info || !info.direct) {
|
|
1225
|
-
return null;
|
|
1226
|
-
}
|
|
1227
|
-
var _c = info.direct, image = _c.image, audio = _c.audio;
|
|
1228
|
-
return [
|
|
1229
|
-
h(RowValue, { name: "Type", value: title }),
|
|
1230
|
-
renderImage(image),
|
|
1231
|
-
renderAudio(audio),
|
|
1232
|
-
h("tr", null, h("td", null), h("td", null)),
|
|
1233
|
-
];
|
|
1234
|
-
};
|
|
1235
|
-
return (h(BasicExtension, { extension: extension }, renderLogo('Subject', extension.value.subjectLogo), renderLogo('Issuer', extension.value.issuerLogo)));
|
|
1236
|
-
};
|
|
1237
|
-
/**
|
|
1238
|
-
* @license
|
|
1239
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1240
|
-
*
|
|
1241
|
-
* This source code is licensed under the MIT license found in the
|
|
1242
|
-
* LICENSE file in the root directory of this source tree.
|
|
1243
|
-
*/
|
|
1244
|
-
var TNAuthListExtension = function (props) {
|
|
1245
|
-
var extension = props.extension;
|
|
1246
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (entry, arrayIndex) { return ([
|
|
1247
|
-
h(RowValue, { name: "Entry #" + (arrayIndex + 1), value: "" }),
|
|
1248
|
-
h(RowValue, { name: "SPC", value: entry.spc }),
|
|
1249
|
-
h(RowValue, { name: "Range", value: entry.range ? "start=" + entry.range.start + " count==" + entry.range.count : null }),
|
|
1250
|
-
h(RowValue, { name: "One", value: entry.one }),
|
|
1251
|
-
]); })));
|
|
1252
|
-
};
|
|
1253
|
-
/**
|
|
1254
|
-
* @license
|
|
1255
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1256
|
-
*
|
|
1257
|
-
* This source code is licensed under the MIT license found in the
|
|
1258
|
-
* LICENSE file in the root directory of this source tree.
|
|
1259
|
-
*/
|
|
1260
|
-
var PolicyConstraintsExtension = function (props) {
|
|
1261
|
-
var extension = props.extension;
|
|
1262
|
-
return (h(BasicExtension, { extension: extension }, extension.value.requireExplicitPolicy && (h(RowValue, { name: "Require Explicit Policy", value: AsnIntegerArrayBufferConverter.toASN(extension.value.requireExplicitPolicy).valueBlock.toString() })), extension.value.inhibitPolicyMapping && (h(RowValue, { name: "Inhibit Policy Mapping", value: AsnIntegerArrayBufferConverter.toASN(extension.value.inhibitPolicyMapping).valueBlock.toString() }))));
|
|
1263
|
-
};
|
|
1264
|
-
/**
|
|
1265
|
-
* @license
|
|
1266
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1267
|
-
*
|
|
1268
|
-
* This source code is licensed under the MIT license found in the
|
|
1269
|
-
* LICENSE file in the root directory of this source tree.
|
|
1270
|
-
*/
|
|
1271
|
-
var PolicyMappingsExtension = function (props) {
|
|
1272
|
-
var extension = props.extension;
|
|
1273
|
-
return (h(BasicExtension, { extension: extension }, extension.value.map(function (policy, arrayIndex) { return ([
|
|
1274
|
-
h(RowValue, { name: "Policy #" + (arrayIndex + 1), value: "" }),
|
|
1275
|
-
h(RowValue, { name: "Issuer Domain", value: getStringByOID(policy.issuerDomainPolicy) }),
|
|
1276
|
-
h(RowValue, { name: "Subject Domain", value: getStringByOID(policy.subjectDomainPolicy) }),
|
|
1277
|
-
]); })));
|
|
1278
|
-
};
|
|
1279
|
-
/**
|
|
1280
|
-
* @license
|
|
1281
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1282
|
-
*
|
|
1283
|
-
* This source code is licensed under the MIT license found in the
|
|
1284
|
-
* LICENSE file in the root directory of this source tree.
|
|
1285
|
-
*/
|
|
1286
|
-
var Extensions = function (props) {
|
|
1287
|
-
var extensions = props.extensions, title = props.title;
|
|
1288
|
-
if (!extensions || !extensions.length) {
|
|
1289
|
-
return null;
|
|
1290
|
-
}
|
|
1291
|
-
return ([
|
|
1292
|
-
h(RowTitle, { value: title || 'Extensions' }),
|
|
1293
|
-
extensions.map(function (extension) {
|
|
1294
|
-
try {
|
|
1295
|
-
if (extension.value instanceof KeyUsage) {
|
|
1296
|
-
return (h(KeyUsageExtension, { extension: extension }));
|
|
1297
|
-
}
|
|
1298
|
-
if (extension.value instanceof BasicConstraints) {
|
|
1299
|
-
return (h(BasicConstraintsExtension, { extension: extension }));
|
|
1300
|
-
}
|
|
1301
|
-
if (extension.value instanceof ExtendedKeyUsage) {
|
|
1302
|
-
return (h(ExtendedKeyUsageExtension, { extension: extension }));
|
|
1303
|
-
}
|
|
1304
|
-
if (extension.value instanceof SubjectKeyIdentifier) {
|
|
1305
|
-
return (h(SubjectKeyIdentifierExtension, Object.assign({ extension: extension }, props)));
|
|
1306
|
-
}
|
|
1307
|
-
if (extension.value instanceof AuthorityKeyIdentifier) {
|
|
1308
|
-
return (h(AuthorityKeyIdentifierExtension, Object.assign({ extension: extension }, props)));
|
|
1309
|
-
}
|
|
1310
|
-
if (extension.value instanceof CRLDistributionPoints) {
|
|
1311
|
-
return (h(CRLDistributionPointsExtension, Object.assign({ extension: extension }, props)));
|
|
1312
|
-
}
|
|
1313
|
-
if (extension.value instanceof AuthorityInfoAccessSyntax
|
|
1314
|
-
|| extension.value instanceof SubjectInfoAccessSyntax) {
|
|
1315
|
-
return (h(InfoAccessSyntaxExtension, Object.assign({ extension: extension }, props)));
|
|
1316
|
-
}
|
|
1317
|
-
if (extension.value instanceof SubjectAlternativeName) {
|
|
1318
|
-
return (h(SubjectAlternativeNameExtension, Object.assign({ extension: extension }, props)));
|
|
1319
|
-
}
|
|
1320
|
-
if (extension.value instanceof CertificatePolicies) {
|
|
1321
|
-
return (h(CertificatePoliciesExtension, { extension: extension }));
|
|
1322
|
-
}
|
|
1323
|
-
if (extension.value instanceof CertificateTransparency) {
|
|
1324
|
-
return (h(CertificateTransparencyExtension, { extension: extension }));
|
|
1325
|
-
}
|
|
1326
|
-
if (extension.value instanceof NameConstraints) {
|
|
1327
|
-
return (h(NameConstraintsExtension, Object.assign({ extension: extension }, props)));
|
|
1328
|
-
}
|
|
1329
|
-
if (extension.value instanceof CertificateTemplate) {
|
|
1330
|
-
return (h(CertificateTemplateExtension, { extension: extension }));
|
|
1331
|
-
}
|
|
1332
|
-
if (extension.value instanceof EnrollCertTypeChoice) {
|
|
1333
|
-
return (h(EnrollCertTypeChoiceExtension, { extension: extension }));
|
|
1334
|
-
}
|
|
1335
|
-
if (extension.value instanceof CaVersion) {
|
|
1336
|
-
return (h(CaVersionExtension, { extension: extension }));
|
|
1337
|
-
}
|
|
1338
|
-
if (extension.value instanceof QCStatements) {
|
|
1339
|
-
return (h(QCStatementsExtension, { extension: extension }));
|
|
1340
|
-
}
|
|
1341
|
-
if (extension.value instanceof NetscapeComment) {
|
|
1342
|
-
return (h(NetscapeCommentExtension, { extension: extension }));
|
|
1343
|
-
}
|
|
1344
|
-
if (extension.value instanceof NetscapeCertType) {
|
|
1345
|
-
return (h(NetscapeCertTypeExtension, { extension: extension }));
|
|
1346
|
-
}
|
|
1347
|
-
if (extension.value instanceof LeiRole) {
|
|
1348
|
-
return (h(LeiRoleExtension, { extension: extension }));
|
|
1349
|
-
}
|
|
1350
|
-
if (extension.value instanceof LeiChoice) {
|
|
1351
|
-
return (h(LeiExtension, Object.assign({ extension: extension }, props)));
|
|
1352
|
-
}
|
|
1353
|
-
if (extension.value instanceof Timestamp) {
|
|
1354
|
-
return (h(TimestampExtension, Object.assign({ extension: extension }, props)));
|
|
1355
|
-
}
|
|
1356
|
-
if (extension.value instanceof ArchiveRevInfo) {
|
|
1357
|
-
return (h(ArchiveRevInfoExtension, { extension: extension }));
|
|
1358
|
-
}
|
|
1359
|
-
if (extension.value instanceof CRLReason) {
|
|
1360
|
-
return (h(CRLReasonExtension, { extension: extension }));
|
|
1361
|
-
}
|
|
1362
|
-
if (extension.value instanceof SubjectDirectoryAttributes) {
|
|
1363
|
-
return (h(SubjectDirectoryAttributesExtension, { extension: extension }));
|
|
1364
|
-
}
|
|
1365
|
-
if (extension.value instanceof PrivateKeyUsagePeriod) {
|
|
1366
|
-
return (h(PrivateKeyUsagePeriodExtension, { extension: extension }));
|
|
1367
|
-
}
|
|
1368
|
-
if (extension.value instanceof EntrustVersionInfo) {
|
|
1369
|
-
return (h(EntrustVersionInfoExtension, { extension: extension }));
|
|
1370
|
-
}
|
|
1371
|
-
if (extension.value instanceof BiometricSyntax) {
|
|
1372
|
-
return (h(BiometricSyntaxExtension, { extension: extension }));
|
|
1373
|
-
}
|
|
1374
|
-
if (extension.value instanceof LogotypeExtn) {
|
|
1375
|
-
return (h(LogotypeExtension, { extension: extension }));
|
|
1376
|
-
}
|
|
1377
|
-
if (extension.value instanceof TNAuthorizationList) {
|
|
1378
|
-
return (h(TNAuthListExtension, { extension: extension }));
|
|
1379
|
-
}
|
|
1380
|
-
if (extension.value instanceof PolicyConstraints) {
|
|
1381
|
-
return (h(PolicyConstraintsExtension, { extension: extension }));
|
|
1382
|
-
}
|
|
1383
|
-
if (extension.value instanceof PolicyMappings) {
|
|
1384
|
-
return (h(PolicyMappingsExtension, { extension: extension }));
|
|
1385
|
-
}
|
|
1386
|
-
if (typeof extension.value === 'string') {
|
|
1387
|
-
return (h(AsStringExtension, { extension: extension }));
|
|
1388
|
-
}
|
|
1389
|
-
return (h(BasicExtension, { extension: extension }));
|
|
1390
|
-
}
|
|
1391
|
-
catch (error) {
|
|
1392
|
-
console.error('Error render extension:', extension.asn.extnID);
|
|
1393
|
-
return null;
|
|
1394
|
-
}
|
|
1395
|
-
}),
|
|
1396
|
-
]);
|
|
1397
|
-
};
|
|
1398
|
-
/**
|
|
1399
|
-
* @license
|
|
1400
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1401
|
-
*
|
|
1402
|
-
* This source code is licensed under the MIT license found in the
|
|
1403
|
-
* LICENSE file in the root directory of this source tree.
|
|
1404
|
-
*/
|
|
1405
|
-
var BasicInformation = function (props) {
|
|
1406
|
-
var serialNumber = props.serialNumber, version = props.version, validity = props.validity, notBefore = props.notBefore, notAfter = props.notAfter, type = props.type;
|
|
1407
|
-
return [
|
|
1408
|
-
h(RowTitle, { value: l10n.getString('basicInformation') }),
|
|
1409
|
-
h(RowValue, { name: l10n.getString('type'), value: type }),
|
|
1410
|
-
h(RowValue, { name: l10n.getString('serialNumber'), value: serialNumber, monospace: true }),
|
|
1411
|
-
h(RowValue, { name: l10n.getString('version'), value: version }),
|
|
1412
|
-
h(RowValue, { name: l10n.getString('validity'), value: validity }),
|
|
1413
|
-
h(RowValue, { name: l10n.getString('issued'), value: notBefore ? dateShort(notBefore) : undefined }),
|
|
1414
|
-
h(RowValue, { name: l10n.getString('expired'), value: notAfter ? dateShort(notAfter) : undefined }),
|
|
1415
|
-
];
|
|
1416
|
-
};
|
|
1417
|
-
/**
|
|
1418
|
-
* @license
|
|
1419
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1420
|
-
*
|
|
1421
|
-
* This source code is licensed under the MIT license found in the
|
|
1422
|
-
* LICENSE file in the root directory of this source tree.
|
|
1423
|
-
*/
|
|
1424
|
-
function downloadCertificateAsPem(certificate) {
|
|
1425
|
-
if (certificate instanceof CSR) {
|
|
1426
|
-
Download.certificateRequest.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
|
|
1427
|
-
}
|
|
1428
|
-
else {
|
|
1429
|
-
Download.certificate.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
function downloadCertificateAsDer(certificate) {
|
|
1433
|
-
if (certificate instanceof CSR) {
|
|
1434
|
-
Download.certificateRequest.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
|
|
1435
|
-
}
|
|
1436
|
-
else {
|
|
1437
|
-
Download.certificate.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
var Miscellaneous = function (props) {
|
|
1441
|
-
var certificate = props.certificate;
|
|
1442
|
-
return [
|
|
1443
|
-
h(RowTitle, { value: l10n.getString('miscellaneous') }),
|
|
1444
|
-
h("tr", null, h("td", { class: "vertical_align_middle" }, h("peculiar-typography", { color: "grey_5" }, l10n.getString('download'), ":")), h("td", null, h("peculiar-button-split", { onClick: downloadCertificateAsPem.bind(undefined, certificate), actions: [{
|
|
1445
|
-
text: l10n.getString('download.der'),
|
|
1446
|
-
onClick: downloadCertificateAsDer.bind(undefined, certificate),
|
|
1447
|
-
}] }, l10n.getString('download.pem')))),
|
|
1448
|
-
];
|
|
1449
|
-
};
|
|
1450
|
-
/**
|
|
1451
|
-
* @license
|
|
1452
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1453
|
-
*
|
|
1454
|
-
* This source code is licensed under the MIT license found in the
|
|
1455
|
-
* LICENSE file in the root directory of this source tree.
|
|
1456
|
-
*/
|
|
1457
|
-
var getLEILink = function (lei) { return "https://search.gleif.org/#/record/" + lei; };
|
|
1458
|
-
var getDNSNameLink = function (dnsName) { return "https://search.censys.io/search?resource=hosts&q=dns.names%3A" + dnsName; };
|
|
1459
|
-
var getIPAddressLink = function (ipAddress) { return "https://search.censys.io/search?resource=hosts&q=ip%3A" + ipAddress; };
|
|
1460
|
-
/**
|
|
1461
|
-
* @license
|
|
1462
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1463
|
-
*
|
|
1464
|
-
* This source code is licensed under the MIT license found in the
|
|
1465
|
-
* LICENSE file in the root directory of this source tree.
|
|
1466
|
-
*/
|
|
1467
|
-
var Issuer = function (props) {
|
|
1468
|
-
var issuer = props.issuer;
|
|
1469
|
-
if (!issuer) {
|
|
1470
|
-
return null;
|
|
1471
|
-
}
|
|
1472
|
-
return [
|
|
1473
|
-
h(RowTitle, { value: l10n.getString('issuer') }),
|
|
1474
|
-
issuer.map(function (item) { return (h(GeneralNamePart, { generalName: item, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } })); }),
|
|
1475
|
-
];
|
|
1476
|
-
};
|
|
1477
|
-
/**
|
|
1478
|
-
* @license
|
|
1479
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1480
|
-
*
|
|
1481
|
-
* This source code is licensed under the MIT license found in the
|
|
1482
|
-
* LICENSE file in the root directory of this source tree.
|
|
1483
|
-
*/
|
|
1484
|
-
var Holder = function (props) {
|
|
1485
|
-
var holder = props.holder;
|
|
1486
|
-
if (!holder) {
|
|
1487
|
-
return null;
|
|
1488
|
-
}
|
|
1489
|
-
var baseCertificateID = holder.baseCertificateID, objectDigestInfo = holder.objectDigestInfo;
|
|
1490
|
-
return [
|
|
1491
|
-
h(RowTitle, { value: l10n.getString('holder') }),
|
|
1492
|
-
baseCertificateID && ([
|
|
1493
|
-
baseCertificateID.issuer.map(function (item) { return (h(GeneralNamePart, { generalName: item, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } })); }),
|
|
1494
|
-
h("tr", null, h("td", null), h("td", null)),
|
|
1495
|
-
h(RowValue, { name: l10n.getString('serialNumber'), value: build_2.ToHex(baseCertificateID.serial), monospace: true }),
|
|
1496
|
-
h("tr", null, h("td", null), h("td", null)),
|
|
1497
|
-
]),
|
|
1498
|
-
objectDigestInfo && ([
|
|
1499
|
-
h(RowValue, { name: l10n.getString('digestInfo'), value: "" }),
|
|
1500
|
-
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(objectDigestInfo.digestAlgorithm.algorithm) }),
|
|
1501
|
-
h(RowValue, { name: l10n.getString('value'), value: build_2.ToHex(objectDigestInfo.objectDigest), monospace: true }),
|
|
1502
|
-
h(RowValue, { name: l10n.getString('type'), value: objectDigestInfo.digestedObjectType }),
|
|
1503
|
-
]),
|
|
1504
|
-
];
|
|
1505
|
-
};
|
|
1506
|
-
var certificateViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
|
|
1507
|
-
var AttributeCertificateViewer = /** @class */ (function () {
|
|
1508
|
-
function class_1(hostRef) {
|
|
1509
|
-
var _this = this;
|
|
1510
|
-
registerInstance(this, hostRef);
|
|
1511
|
-
this.isDecodeInProcess = true;
|
|
1512
|
-
this.getAuthKeyIdParentLink = function (value) { var _a; return (_a = _this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
|
|
1513
|
-
this.getAuthKeyIdSiblingsLink = function (value) { var _a; return (_a = _this.authKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
|
|
1514
|
-
this.getSubjectKeyIdChildrenLink = function (value) { var _a; return (_a = _this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
|
|
1515
|
-
this.getSubjectKeyIdSiblingsLink = function (value) { var _a; return (_a = _this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
|
|
1516
|
-
}
|
|
1517
|
-
class_1.prototype.componentWillLoad = function () {
|
|
1518
|
-
this.decodeCertificate(this.certificate);
|
|
1519
|
-
};
|
|
1520
|
-
class_1.prototype.decodeCertificate = function (certificate) {
|
|
1521
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1522
|
-
var error_3;
|
|
1523
|
-
return __generator(this, function (_c) {
|
|
1524
|
-
switch (_c.label) {
|
|
1525
|
-
case 0:
|
|
1526
|
-
this.isDecodeInProcess = true;
|
|
1527
|
-
_c.label = 1;
|
|
1528
|
-
case 1:
|
|
1529
|
-
_c.trys.push([1, 4, , 5]);
|
|
1530
|
-
if (certificate instanceof X509AttributeCertificate) {
|
|
1531
|
-
this.certificateDecoded = certificate;
|
|
1532
|
-
}
|
|
1533
|
-
else if (typeof certificate === 'string') {
|
|
1534
|
-
this.certificateDecoded = new X509AttributeCertificate(certificate);
|
|
1535
|
-
}
|
|
1536
|
-
else {
|
|
1537
|
-
return [2 /*return*/];
|
|
1538
|
-
}
|
|
1539
|
-
this.certificateDecoded.parseExtensions();
|
|
1540
|
-
this.certificateDecoded.parseAttributes();
|
|
1541
|
-
return [4 /*yield*/, this.certificateDecoded.getThumbprint('SHA-1')];
|
|
1542
|
-
case 2:
|
|
1543
|
-
_c.sent();
|
|
1544
|
-
return [4 /*yield*/, this.certificateDecoded.getThumbprint('SHA-256')];
|
|
1545
|
-
case 3:
|
|
1546
|
-
_c.sent();
|
|
1547
|
-
return [3 /*break*/, 5];
|
|
1548
|
-
case 4:
|
|
1549
|
-
error_3 = _c.sent();
|
|
1550
|
-
this.certificateDecodeError = error_3;
|
|
1551
|
-
console.error('Error certificate parse:', error_3);
|
|
1552
|
-
return [3 /*break*/, 5];
|
|
1553
|
-
case 5:
|
|
1554
|
-
this.isDecodeInProcess = false;
|
|
1555
|
-
return [2 /*return*/];
|
|
1556
|
-
}
|
|
1557
|
-
});
|
|
1558
|
-
});
|
|
1559
|
-
};
|
|
1560
|
-
/**
|
|
1561
|
-
* Rerun decodeCertificate if previuos value not equal current value
|
|
1562
|
-
*/
|
|
1563
|
-
class_1.prototype.watchCertificateAndDecode = function (newValue, oldValue) {
|
|
1564
|
-
if (typeof newValue === 'string' && typeof oldValue === 'string') {
|
|
1565
|
-
if (newValue !== oldValue) {
|
|
1566
|
-
this.decodeCertificate(newValue);
|
|
1567
|
-
}
|
|
1568
|
-
return;
|
|
1569
|
-
}
|
|
1570
|
-
if (newValue instanceof X509AttributeCertificate
|
|
1571
|
-
&& oldValue instanceof X509AttributeCertificate) {
|
|
1572
|
-
if (newValue.serialNumber !== oldValue.serialNumber) {
|
|
1573
|
-
this.decodeCertificate(newValue);
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
};
|
|
1577
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1578
|
-
class_1.prototype.renderErrorState = function () {
|
|
1579
|
-
return (h("div", { class: "status_wrapper" }, h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this attribute certificate.")));
|
|
1580
|
-
};
|
|
1581
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1582
|
-
class_1.prototype.renderEmptyState = function () {
|
|
1583
|
-
return (h("div", { class: "status_wrapper" }, h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no attribute certificate available.")));
|
|
1584
|
-
};
|
|
1585
|
-
class_1.prototype.render = function () {
|
|
1586
|
-
if (this.certificateDecodeError) {
|
|
1587
|
-
return this.renderErrorState();
|
|
1588
|
-
}
|
|
1589
|
-
if (!this.certificateDecoded) {
|
|
1590
|
-
return this.renderEmptyState();
|
|
1591
|
-
}
|
|
1592
|
-
return (h(Host, null, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(Issuer, { issuer: this.certificateDecoded.issuer }), h(Holder, { holder: this.certificateDecoded.holder }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
|
|
1593
|
-
};
|
|
1594
|
-
Object.defineProperty(class_1, "watchers", {
|
|
1595
|
-
get: function () {
|
|
1596
|
-
return {
|
|
1597
|
-
"certificate": ["watchCertificateAndDecode"]
|
|
1598
|
-
};
|
|
1599
|
-
},
|
|
1600
|
-
enumerable: false,
|
|
1601
|
-
configurable: true
|
|
1602
|
-
});
|
|
1603
|
-
return class_1;
|
|
1604
|
-
}());
|
|
1605
|
-
AttributeCertificateViewer.style = certificateViewerCss;
|
|
1606
|
-
var buttonCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;width:auto;cursor:pointer;position:relative;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;--pv-button-padding-end:5px;--pv-button-padding-start:5px}.button{font-family:\"Open Sans\", \"Arial\", sans-serif;font-family:var(--pv-font-family);font-size:13px;font-size:var(--pv-font-size-b3);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;border-style:solid;border-width:1px;font-weight:400;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;vertical-align:middle;cursor:inherit;height:30px;line-height:30px;border-radius:2px;padding:0 5px;padding:0 var(--pv-button-padding-end) 0 var(--pv-button-padding-start)}.button::-moz-focus-inner{border:0}.button:focus{outline:none;-webkit-box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1);box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1)}.button[disabled]{opacity:0.5;cursor:not-allowed}.button_stroke{border-color:rgba(53, 132, 247, 0.3);border-color:rgba(var(--pv-color-primary-rgb), 0.3);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);background-color:transparent}.button_fill{border-color:#3584f7;border-color:rgba(var(--pv-color-primary-rgb), 1);background-color:#3584f7;background-color:rgba(var(--pv-color-primary-rgb), 1);color:white;color:rgba(var(--pv-color-light-rgb), 1)}.button_label{-webkit-transition:opacity 200ms;transition:opacity 200ms}.button:hover .button_label{opacity:0.7}";
|
|
1607
|
-
var Button = /** @class */ (function () {
|
|
1608
|
-
function Button(hostRef) {
|
|
1609
|
-
var _this = this;
|
|
1610
|
-
registerInstance(this, hostRef);
|
|
1611
|
-
this.fill = 'stroke';
|
|
1612
|
-
this.handleClick = function (event) {
|
|
1613
|
-
if (_this.disabled) {
|
|
1614
|
-
event.preventDefault();
|
|
1615
|
-
event.stopPropagation();
|
|
1616
|
-
return;
|
|
1617
|
-
}
|
|
1618
|
-
if (_this.onClick) {
|
|
1619
|
-
_this.onClick(event);
|
|
1620
|
-
}
|
|
1621
|
-
};
|
|
1622
|
-
}
|
|
1623
|
-
Button.prototype.render = function () {
|
|
1624
|
-
var isLink = !!this.href;
|
|
1625
|
-
var TagType = isLink ? 'a' : 'button';
|
|
1626
|
-
return (h(TagType, { class: {
|
|
1627
|
-
button: true,
|
|
1628
|
-
button_stroke: this.fill === 'stroke',
|
|
1629
|
-
button_fill: this.fill === 'fill',
|
|
1630
|
-
button_disabled: this.disabled,
|
|
1631
|
-
}, disabled: this.disabled, type: !isLink && 'button', href: isLink && this.href, target: isLink && this.target ? this.target : null, rel: isLink && 'noreferrer noopener', onClick: this.handleClick, part: "base" }, h("span", { part: "label", class: "button_label" }, h("slot", null))));
|
|
1632
|
-
};
|
|
1633
|
-
return Button;
|
|
1634
|
-
}());
|
|
1635
|
-
Button.style = buttonCss;
|
|
1636
|
-
var buttonSplitCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;vertical-align:top;position:relative;white-space:nowrap;font-size:0}.button_split_icon{width:7px;height:5px;display:inline-block;vertical-align:middle}.button_split_with_icon{width:25px;border-bottom-left-radius:0;border-top-left-radius:0}.button_split_with_icon.m_open::part(base):before{position:fixed;width:100%;height:100%;top:0;left:0;content:\"\"}.button_split_action{width:100%}.button_split_container{position:absolute;bottom:calc(100% + 1px);left:0;width:100%;border-radius:2px;-webkit-box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);z-index:1}.button_split>peculiar-button:first-of-type::part(base){border-top-right-radius:0;border-bottom-right-radius:0}.button_split>peculiar-button:last-of-type::part(base){border-top-left-radius:0;border-bottom-left-radius:0}.button_split>peculiar-button:not(:first-child){margin-left:-1px}";
|
|
1637
|
-
var ButtonSplit = /** @class */ (function () {
|
|
1638
|
-
function ButtonSplit(hostRef) {
|
|
1639
|
-
var _this = this;
|
|
1640
|
-
registerInstance(this, hostRef);
|
|
1641
|
-
this.fill = 'stroke';
|
|
1642
|
-
this.actions = [];
|
|
1643
|
-
this.open = false;
|
|
1644
|
-
this.onClickSplitButton = function (event) {
|
|
1645
|
-
event.stopPropagation();
|
|
1646
|
-
_this.open = !_this.open;
|
|
1647
|
-
};
|
|
1648
|
-
}
|
|
1649
|
-
ButtonSplit.prototype.onClickActiveButton = function (action, event) {
|
|
1650
|
-
this.open = false;
|
|
1651
|
-
action(event);
|
|
1652
|
-
};
|
|
1653
|
-
ButtonSplit.prototype.renderActiveSplitState = function () {
|
|
1654
|
-
var _this = this;
|
|
1655
|
-
if (!this.open) {
|
|
1656
|
-
return null;
|
|
1657
|
-
}
|
|
1658
|
-
return (h("div", { class: "button_split_container" }, this.actions.map(function (action) { return (h("peculiar-button", { fill: "fill", class: "button_split_action", onClick: _this.onClickActiveButton.bind(_this, action.onClick) }, action.text)); })));
|
|
1659
|
-
};
|
|
1660
|
-
ButtonSplit.prototype.render = function () {
|
|
1661
|
-
return (h("div", { class: {
|
|
1662
|
-
button_split: true,
|
|
1663
|
-
} }, h("peculiar-button", { fill: this.fill, onClick: this.onClick }, h("slot", null)), h("peculiar-button", { fill: this.fill, onClick: this.onClickSplitButton, class: {
|
|
1664
|
-
button_split_with_icon: true,
|
|
1665
|
-
m_open: this.open,
|
|
1666
|
-
} }, h("svg", { viewBox: "0 0 7 5", xmlns: "http://www.w3.org/2000/svg", class: "button_split_icon" }, h("path", { fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z" }))), this.renderActiveSplitState()));
|
|
1667
|
-
};
|
|
1668
|
-
return ButtonSplit;
|
|
1669
|
-
}());
|
|
1670
|
-
ButtonSplit.style = buttonSplitCss;
|
|
1671
|
-
var certificateDecoderCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block;width:100%;font-size:0}.textarea{min-height:300px;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:14px;font-family:monospace;resize:vertical;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);font-size:14px;font-size:var(--pv-font-size-h7)}.controls{margin-top:10px}.button{position:relative}.button:not(:first-child){margin-left:10px}.viewer{margin-top:64px}.input_file{opacity:0;width:100%;height:100%;top:0;left:0;display:block;position:absolute}";
|
|
1672
|
-
var CertificateDecoder = /** @class */ (function () {
|
|
1673
|
-
function class_2(hostRef) {
|
|
1674
|
-
var _this = this;
|
|
1675
|
-
registerInstance(this, hostRef);
|
|
1676
|
-
this.onClickDecode = function () {
|
|
1677
|
-
var value = _this.inputPaste.value;
|
|
1678
|
-
if (value) {
|
|
1679
|
-
_this.decode(value);
|
|
1680
|
-
}
|
|
1681
|
-
};
|
|
1682
|
-
this.onClickExample = function () {
|
|
1683
|
-
_this.decode(_this.certificateExample);
|
|
1684
|
-
};
|
|
1685
|
-
this.onClickClear = function () {
|
|
1686
|
-
_this.clearValue();
|
|
1687
|
-
};
|
|
1688
|
-
this.onChangeInputFile = function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
1689
|
-
var element, file;
|
|
1690
|
-
return __generator(this, function (_c) {
|
|
1691
|
-
switch (_c.label) {
|
|
1692
|
-
case 0:
|
|
1693
|
-
element = e.target;
|
|
1694
|
-
if (!element.files) return [3 /*break*/, 2];
|
|
1695
|
-
return [4 /*yield*/, readAsBinaryString(element.files[0])];
|
|
1696
|
-
case 1:
|
|
1697
|
-
file = _c.sent();
|
|
1698
|
-
if (typeof file.value === 'string') {
|
|
1699
|
-
this.decode(file.value);
|
|
1700
|
-
}
|
|
1701
|
-
element.value = '';
|
|
1702
|
-
_c.label = 2;
|
|
1703
|
-
case 2: return [2 /*return*/];
|
|
1704
|
-
}
|
|
1705
|
-
});
|
|
1706
|
-
}); };
|
|
1707
|
-
this.onDropFile = function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
1708
|
-
var element, file;
|
|
1709
|
-
return __generator(this, function (_c) {
|
|
1710
|
-
switch (_c.label) {
|
|
1711
|
-
case 0:
|
|
1712
|
-
e.stopPropagation();
|
|
1713
|
-
e.preventDefault();
|
|
1714
|
-
element = e.dataTransfer;
|
|
1715
|
-
if (!element.files) return [3 /*break*/, 2];
|
|
1716
|
-
return [4 /*yield*/, readAsBinaryString(element.files[0])];
|
|
1717
|
-
case 1:
|
|
1718
|
-
file = _c.sent();
|
|
1719
|
-
if (typeof file.value === 'string') {
|
|
1720
|
-
this.decode(file.value);
|
|
1721
|
-
}
|
|
1722
|
-
_c.label = 2;
|
|
1723
|
-
case 2: return [2 /*return*/];
|
|
1724
|
-
}
|
|
1725
|
-
});
|
|
1726
|
-
}); };
|
|
1727
|
-
}
|
|
1728
|
-
class_2.prototype.componentDidLoad = function () {
|
|
1729
|
-
var _this = this;
|
|
1730
|
-
var parsedHash = history.parseHash(window.location.search);
|
|
1731
|
-
if (parsedHash.cert) {
|
|
1732
|
-
/**
|
|
1733
|
-
* Prevent Stencil warning about re-render
|
|
1734
|
-
*/
|
|
1735
|
-
setTimeout(function () { return _this.decode(parsedHash.cert); }, 100);
|
|
1736
|
-
}
|
|
1737
|
-
};
|
|
1738
|
-
class_2.prototype.clearValue = function () {
|
|
1739
|
-
this.inputPaste.value = '';
|
|
1740
|
-
this.certificateDecoded = null;
|
|
1741
|
-
history.replace({ search: '' });
|
|
1742
|
-
};
|
|
1743
|
-
class_2.prototype.setValue = function (value) {
|
|
1744
|
-
this.certificateDecoded = value;
|
|
1745
|
-
this.inputPaste.value = value.exportAsPemFormatted();
|
|
1746
|
-
history.replace({
|
|
1747
|
-
search: history.queryStringify({
|
|
1748
|
-
cert: value.exportAsBase64(),
|
|
1749
|
-
}),
|
|
1750
|
-
});
|
|
1751
|
-
};
|
|
1752
|
-
class_2.prototype.decode = function (certificate) {
|
|
1753
|
-
var isPem$1 = isPem(certificate);
|
|
1754
|
-
var isX509Pem$1 = isX509Pem(certificate);
|
|
1755
|
-
var isPkcs10Pem$1 = isPkcs10Pem(certificate);
|
|
1756
|
-
var isX509AttributePem$1 = isX509AttributePem(certificate);
|
|
1757
|
-
var decoded;
|
|
1758
|
-
var decodeError;
|
|
1759
|
-
if (isPem$1 && !(isX509Pem$1 || isX509AttributePem$1 || isPkcs10Pem$1)) {
|
|
1760
|
-
this.clearValue();
|
|
1761
|
-
alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
|
|
1762
|
-
return;
|
|
1763
|
-
}
|
|
1764
|
-
try {
|
|
1765
|
-
if (isX509Pem$1) {
|
|
1766
|
-
decoded = new X509Certificate(certificate);
|
|
1767
|
-
}
|
|
1768
|
-
if (isX509AttributePem$1) {
|
|
1769
|
-
decoded = new X509AttributeCertificate(certificate);
|
|
1770
|
-
}
|
|
1771
|
-
if (isPkcs10Pem$1) {
|
|
1772
|
-
decoded = new CSR(certificate);
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
catch (error) {
|
|
1776
|
-
decodeError = error;
|
|
1777
|
-
}
|
|
1778
|
-
if (!decoded) {
|
|
1779
|
-
try {
|
|
1780
|
-
decoded = new X509Certificate(certificate);
|
|
1781
|
-
}
|
|
1782
|
-
catch (error) {
|
|
1783
|
-
decodeError = error;
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
if (!decoded) {
|
|
1787
|
-
try {
|
|
1788
|
-
decoded = new X509AttributeCertificate(certificate);
|
|
1789
|
-
}
|
|
1790
|
-
catch (error) {
|
|
1791
|
-
decodeError = error;
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
if (!decoded) {
|
|
1795
|
-
try {
|
|
1796
|
-
decoded = new CSR(certificate);
|
|
1797
|
-
}
|
|
1798
|
-
catch (error) {
|
|
1799
|
-
decodeError = error;
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
if (!decoded) {
|
|
1803
|
-
this.clearValue();
|
|
1804
|
-
console.log(decodeError);
|
|
1805
|
-
alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
|
|
1806
|
-
}
|
|
1807
|
-
else {
|
|
1808
|
-
this.setValue(decoded);
|
|
1809
|
-
}
|
|
1810
|
-
};
|
|
1811
|
-
class_2.prototype.render = function () {
|
|
1812
|
-
var _this = this;
|
|
1813
|
-
return (h(Host, null, h("textarea", { placeholder: "Certificate DER or PEM", class: "textarea", ref: function (el) { _this.inputPaste = el; }, onDrop: this.onDropFile }), h("div", { class: "controls" }, h("peculiar-button", { fill: "fill", class: "button", onClick: this.onClickDecode }, "Decode"), h("peculiar-button", { class: "button" }, "Choose file", h("input", { type: "file", class: "input_file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,.csr,.req", onChange: this.onChangeInputFile, value: "" })), h("peculiar-button", { class: "button", onClick: this.onClickClear }, "Clear"), this.certificateExample && (h("peculiar-button", { class: "button", onClick: this.onClickExample }, "Example"))), this.certificateDecoded instanceof X509Certificate && (h("peculiar-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof X509AttributeCertificate && (h("peculiar-attribute-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof CSR && (h("peculiar-csr-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true }))));
|
|
1814
|
-
};
|
|
1815
|
-
return class_2;
|
|
1816
|
-
}());
|
|
1817
|
-
CertificateDecoder.style = certificateDecoderCss;
|
|
1818
|
-
/**
|
|
1819
|
-
* @license
|
|
1820
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1821
|
-
*
|
|
1822
|
-
* This source code is licensed under the MIT license found in the
|
|
1823
|
-
* LICENSE file in the root directory of this source tree.
|
|
1824
|
-
*/
|
|
1825
|
-
function getPublicKeyModulus(publicKey) {
|
|
1826
|
-
var _a;
|
|
1827
|
-
if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['modulus']) {
|
|
1828
|
-
var length = publicKey.params['modulus'].byteLength;
|
|
1829
|
-
if (length % 2) {
|
|
1830
|
-
length -= 1;
|
|
1831
|
-
}
|
|
1832
|
-
return length * 8;
|
|
1833
|
-
}
|
|
1834
|
-
return null;
|
|
1835
|
-
}
|
|
1836
|
-
function getPublicKeyExponent(publicKey) {
|
|
1837
|
-
var _a;
|
|
1838
|
-
if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['publicExponent']) {
|
|
1839
|
-
return publicKey.params['publicExponent'].byteLength === 3
|
|
1840
|
-
? 65537
|
|
1841
|
-
: 3;
|
|
1842
|
-
}
|
|
1843
|
-
return null;
|
|
1844
|
-
}
|
|
1845
|
-
var PublicKey = function (props) {
|
|
1846
|
-
var _a;
|
|
1847
|
-
var publicKey = props.publicKey;
|
|
1848
|
-
if (!publicKey) {
|
|
1849
|
-
return null;
|
|
1850
|
-
}
|
|
1851
|
-
return [
|
|
1852
|
-
h(RowTitle, { value: l10n.getString('publicKeyInfo') }),
|
|
1853
|
-
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(publicKey.algorithm) }),
|
|
1854
|
-
h(RowValue, { name: l10n.getString('namedCurve'), value: getStringByOID((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['namedCurve']) }),
|
|
1855
|
-
h(RowValue, { name: l10n.getString('exponent'), value: getPublicKeyExponent(publicKey) }),
|
|
1856
|
-
h(RowValue, { name: l10n.getString('modulus'), value: getPublicKeyModulus(publicKey) }),
|
|
1857
|
-
h(RowValue, { name: l10n.getString('value'), value: build_2.ToHex(publicKey.value), monospace: true, collapse: true }),
|
|
1858
|
-
];
|
|
1859
|
-
};
|
|
1860
|
-
/**
|
|
1861
|
-
* @license
|
|
1862
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1863
|
-
*
|
|
1864
|
-
* This source code is licensed under the MIT license found in the
|
|
1865
|
-
* LICENSE file in the root directory of this source tree.
|
|
1866
|
-
*/
|
|
1867
|
-
var SubjectName = function (props) {
|
|
1868
|
-
var name = props.name;
|
|
1869
|
-
return [
|
|
1870
|
-
h(RowTitle, { value: l10n.getString('subjectName') }),
|
|
1871
|
-
name.map(function (n) { return (h(RowValue, { name: n.name || n.type, value: n.value })); }),
|
|
1872
|
-
];
|
|
1873
|
-
};
|
|
1874
|
-
/**
|
|
1875
|
-
* @license
|
|
1876
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
1877
|
-
*
|
|
1878
|
-
* This source code is licensed under the MIT license found in the
|
|
1879
|
-
* LICENSE file in the root directory of this source tree.
|
|
1880
|
-
*/
|
|
1881
|
-
var IssuerName = function (props) {
|
|
1882
|
-
var name = props.name, issuerDnLink = props.issuerDnLink;
|
|
1883
|
-
var title = l10n.getString('issuerName');
|
|
1884
|
-
return [
|
|
1885
|
-
h(RowTitle, { value: issuerDnLink ? (h("peculiar-link", { href: issuerDnLink, type: "h6" }, title)) : title }),
|
|
1886
|
-
name.map(function (n) { return (h(RowValue, { name: n.name || n.type, value: n.value })); }),
|
|
1887
|
-
];
|
|
1888
|
-
};
|
|
1889
|
-
var certificateViewerCss$1 = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
|
|
1890
|
-
var CertificateViewer = /** @class */ (function () {
|
|
1891
|
-
function class_3(hostRef) {
|
|
1892
|
-
var _this = this;
|
|
1893
|
-
registerInstance(this, hostRef);
|
|
1894
|
-
this.isDecodeInProcess = true;
|
|
1895
|
-
this.getAuthKeyIdParentLink = function (value) { var _a; return (_a = _this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
|
|
1896
|
-
this.getAuthKeyIdSiblingsLink = function (value) { var _a; return (_a = _this.authKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
|
|
1897
|
-
this.getSubjectKeyIdChildrenLink = function (value) { var _a; return (_a = _this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
|
|
1898
|
-
this.getSubjectKeyIdSiblingsLink = function (value) { var _a; return (_a = _this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
|
|
1899
|
-
}
|
|
1900
|
-
class_3.prototype.componentWillLoad = function () {
|
|
1901
|
-
this.decodeCertificate(this.certificate);
|
|
1902
|
-
};
|
|
1903
|
-
class_3.prototype.decodeCertificate = function (certificate) {
|
|
1904
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1905
|
-
var error_4;
|
|
1906
|
-
return __generator(this, function (_c) {
|
|
1907
|
-
switch (_c.label) {
|
|
1908
|
-
case 0:
|
|
1909
|
-
this.isDecodeInProcess = true;
|
|
1910
|
-
_c.label = 1;
|
|
1911
|
-
case 1:
|
|
1912
|
-
_c.trys.push([1, 4, , 5]);
|
|
1913
|
-
if (certificate instanceof X509Certificate) {
|
|
1914
|
-
this.certificateDecoded = certificate;
|
|
1915
|
-
}
|
|
1916
|
-
else if (typeof certificate === 'string') {
|
|
1917
|
-
this.certificateDecoded = new X509Certificate(certificate);
|
|
1918
|
-
}
|
|
1919
|
-
else {
|
|
1920
|
-
return [2 /*return*/];
|
|
1921
|
-
}
|
|
1922
|
-
this.certificateDecoded.parseExtensions();
|
|
1923
|
-
return [4 /*yield*/, this.certificateDecoded.getThumbprint('SHA-1')];
|
|
1924
|
-
case 2:
|
|
1925
|
-
_c.sent();
|
|
1926
|
-
return [4 /*yield*/, this.certificateDecoded.getThumbprint('SHA-256')];
|
|
1927
|
-
case 3:
|
|
1928
|
-
_c.sent();
|
|
1929
|
-
return [3 /*break*/, 5];
|
|
1930
|
-
case 4:
|
|
1931
|
-
error_4 = _c.sent();
|
|
1932
|
-
this.certificateDecodeError = error_4;
|
|
1933
|
-
console.error('Error certificate parse:', error_4);
|
|
1934
|
-
return [3 /*break*/, 5];
|
|
1935
|
-
case 5:
|
|
1936
|
-
this.isDecodeInProcess = false;
|
|
1937
|
-
return [2 /*return*/];
|
|
1938
|
-
}
|
|
1939
|
-
});
|
|
1940
|
-
});
|
|
1941
|
-
};
|
|
1942
|
-
/**
|
|
1943
|
-
* Rerun decodeCertificate if previuos value not equal current value
|
|
1944
|
-
*/
|
|
1945
|
-
class_3.prototype.watchCertificateAndDecode = function (newValue, oldValue) {
|
|
1946
|
-
if (typeof newValue === 'string' && typeof oldValue === 'string') {
|
|
1947
|
-
if (newValue !== oldValue) {
|
|
1948
|
-
this.decodeCertificate(newValue);
|
|
1949
|
-
}
|
|
1950
|
-
return;
|
|
1951
|
-
}
|
|
1952
|
-
if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {
|
|
1953
|
-
if (newValue.serialNumber !== oldValue.serialNumber) {
|
|
1954
|
-
this.decodeCertificate(newValue);
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
};
|
|
1958
|
-
class_3.prototype.getIssuerDnLink = function () {
|
|
1959
|
-
return this.issuerDnLink;
|
|
1960
|
-
};
|
|
1961
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1962
|
-
class_3.prototype.renderErrorState = function () {
|
|
1963
|
-
return (h("div", { class: "status_wrapper" }, h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this certificate.")));
|
|
1964
|
-
};
|
|
1965
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1966
|
-
class_3.prototype.renderEmptyState = function () {
|
|
1967
|
-
return (h("div", { class: "status_wrapper" }, h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no certificate available.")));
|
|
1968
|
-
};
|
|
1969
|
-
class_3.prototype.render = function () {
|
|
1970
|
-
if (this.certificateDecodeError) {
|
|
1971
|
-
return this.renderErrorState();
|
|
1972
|
-
}
|
|
1973
|
-
if (!this.certificateDecoded) {
|
|
1974
|
-
return this.renderEmptyState();
|
|
1975
|
-
}
|
|
1976
|
-
return (h(Host, { "data-view": this.view }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(SubjectName, { name: this.certificateDecoded.subject }), h(IssuerName, { name: this.certificateDecoded.issuer, issuerDnLink: this.getIssuerDnLink() }), h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
|
|
1977
|
-
};
|
|
1978
|
-
Object.defineProperty(class_3, "watchers", {
|
|
1979
|
-
get: function () {
|
|
1980
|
-
return {
|
|
1981
|
-
"certificate": ["watchCertificateAndDecode"]
|
|
1982
|
-
};
|
|
1983
|
-
},
|
|
1984
|
-
enumerable: false,
|
|
1985
|
-
configurable: true
|
|
1986
|
-
});
|
|
1987
|
-
return class_3;
|
|
1988
|
-
}());
|
|
1989
|
-
CertificateViewer.style = certificateViewerCss$1;
|
|
1990
|
-
var certificateViewerCss$2 = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
|
|
1991
|
-
var CsrViewer = /** @class */ (function () {
|
|
1992
|
-
function class_4(hostRef) {
|
|
1993
|
-
var _this = this;
|
|
1994
|
-
registerInstance(this, hostRef);
|
|
1995
|
-
this.isDecodeInProcess = true;
|
|
1996
|
-
this.getAuthKeyIdParentLink = function (value) { return value; };
|
|
1997
|
-
this.getAuthKeyIdSiblingsLink = function (value) { return value; };
|
|
1998
|
-
this.getSubjectKeyIdChildrenLink = function (value) { var _a; return (_a = _this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
|
|
1999
|
-
this.getSubjectKeyIdSiblingsLink = function (value) { var _a; return (_a = _this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
|
|
2000
|
-
}
|
|
2001
|
-
class_4.prototype.componentWillLoad = function () {
|
|
2002
|
-
this.decodeCertificate(this.certificate);
|
|
2003
|
-
};
|
|
2004
|
-
class_4.prototype.decodeCertificate = function (certificate) {
|
|
2005
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2006
|
-
var error_5;
|
|
2007
|
-
return __generator(this, function (_c) {
|
|
2008
|
-
switch (_c.label) {
|
|
2009
|
-
case 0:
|
|
2010
|
-
this.isDecodeInProcess = true;
|
|
2011
|
-
_c.label = 1;
|
|
2012
|
-
case 1:
|
|
2013
|
-
_c.trys.push([1, 4, , 5]);
|
|
2014
|
-
if (certificate instanceof CSR) {
|
|
2015
|
-
this.certificateDecoded = certificate;
|
|
2016
|
-
}
|
|
2017
|
-
else if (typeof certificate === 'string') {
|
|
2018
|
-
this.certificateDecoded = new CSR(certificate);
|
|
2019
|
-
}
|
|
2020
|
-
else {
|
|
2021
|
-
return [2 /*return*/];
|
|
2022
|
-
}
|
|
2023
|
-
this.certificateDecoded.parseAttributes();
|
|
2024
|
-
return [4 /*yield*/, this.certificateDecoded.getThumbprint('SHA-1')];
|
|
2025
|
-
case 2:
|
|
2026
|
-
_c.sent();
|
|
2027
|
-
return [4 /*yield*/, this.certificateDecoded.getThumbprint('SHA-256')];
|
|
2028
|
-
case 3:
|
|
2029
|
-
_c.sent();
|
|
2030
|
-
return [3 /*break*/, 5];
|
|
2031
|
-
case 4:
|
|
2032
|
-
error_5 = _c.sent();
|
|
2033
|
-
this.certificateDecodeError = error_5;
|
|
2034
|
-
console.error('Error certificate parse:', error_5);
|
|
2035
|
-
return [3 /*break*/, 5];
|
|
2036
|
-
case 5:
|
|
2037
|
-
this.isDecodeInProcess = false;
|
|
2038
|
-
return [2 /*return*/];
|
|
2039
|
-
}
|
|
2040
|
-
});
|
|
2041
|
-
});
|
|
2042
|
-
};
|
|
2043
|
-
/**
|
|
2044
|
-
* Rerun decodeCertificate if previuos value not equal current value
|
|
2045
|
-
*/
|
|
2046
|
-
class_4.prototype.watchCertificateAndDecode = function (newValue, oldValue) {
|
|
2047
|
-
if (typeof newValue === 'string' && typeof oldValue === 'string') {
|
|
2048
|
-
if (newValue !== oldValue) {
|
|
2049
|
-
this.decodeCertificate(newValue);
|
|
2050
|
-
}
|
|
2051
|
-
return;
|
|
2052
|
-
}
|
|
2053
|
-
if (newValue instanceof CSR
|
|
2054
|
-
&& oldValue instanceof CSR) {
|
|
2055
|
-
if (newValue.commonName !== oldValue.commonName) {
|
|
2056
|
-
this.decodeCertificate(newValue);
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
};
|
|
2060
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2061
|
-
class_4.prototype.renderErrorState = function () {
|
|
2062
|
-
return (h("div", { class: "status_wrapper" }, h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this certificate request.")));
|
|
2063
|
-
};
|
|
2064
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2065
|
-
class_4.prototype.renderEmptyState = function () {
|
|
2066
|
-
return (h("div", { class: "status_wrapper" }, h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no certificate request available.")));
|
|
2067
|
-
};
|
|
2068
|
-
class_4.prototype.getExtensionRequestAttribute = function () {
|
|
2069
|
-
if (!this.certificateDecoded) {
|
|
2070
|
-
return undefined;
|
|
2071
|
-
}
|
|
2072
|
-
return this.certificateDecoded.attributes
|
|
2073
|
-
.find(function (attribute) { return attribute.asn.type === '1.2.840.113549.1.9.14'; });
|
|
2074
|
-
};
|
|
2075
|
-
class_4.prototype.render = function () {
|
|
2076
|
-
if (this.certificateDecodeError) {
|
|
2077
|
-
return this.renderErrorState();
|
|
2078
|
-
}
|
|
2079
|
-
if (!this.certificateDecoded) {
|
|
2080
|
-
return this.renderEmptyState();
|
|
2081
|
-
}
|
|
2082
|
-
var extensionRequestAttribute = this.getExtensionRequestAttribute();
|
|
2083
|
-
return (h(Host, { "data-view": this.view }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(SubjectName, { name: this.certificateDecoded.subject }), h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), h(Extensions, { extensions: extensionRequestAttribute === null || extensionRequestAttribute === void 0 ? void 0 : extensionRequestAttribute.value, title: "Extension Request", getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
|
|
2084
|
-
};
|
|
2085
|
-
Object.defineProperty(class_4, "watchers", {
|
|
2086
|
-
get: function () {
|
|
2087
|
-
return {
|
|
2088
|
-
"certificate": ["watchCertificateAndDecode"]
|
|
2089
|
-
};
|
|
2090
|
-
},
|
|
2091
|
-
enumerable: false,
|
|
2092
|
-
configurable: true
|
|
2093
|
-
});
|
|
2094
|
-
return class_4;
|
|
2095
|
-
}());
|
|
2096
|
-
CsrViewer.style = certificateViewerCss$2;
|
|
2097
|
-
var linkCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:inline-block}.link{font-family:\"Open Sans\", \"Arial\", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);font-weight:400;margin:0;padding:0;word-break:break-all}.link_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.link_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.link_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.link_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.link_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.link:hover{text-decoration:none}";
|
|
2098
|
-
var Link = /** @class */ (function () {
|
|
2099
|
-
function Link(hostRef) {
|
|
2100
|
-
registerInstance(this, hostRef);
|
|
2101
|
-
/**
|
|
2102
|
-
* Typography type.
|
|
2103
|
-
*/
|
|
2104
|
-
this.type = 'b3';
|
|
2105
|
-
}
|
|
2106
|
-
Link.prototype.render = function () {
|
|
2107
|
-
var _c;
|
|
2108
|
-
return (h("a", { href: this.href, target: "_blank", rel: "noreferrer noopener", class: (_c = {
|
|
2109
|
-
link: true
|
|
2110
|
-
},
|
|
2111
|
-
_c["link_type_" + (this.type || 'b3')] = true,
|
|
2112
|
-
_c) }, h("slot", null)));
|
|
2113
|
-
};
|
|
2114
|
-
return Link;
|
|
2115
|
-
}());
|
|
2116
|
-
Link.style = linkCss;
|
|
2117
|
-
var textHiderCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}.text{display:inline-block;width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.text.m_opened{white-space:initial}.action{vertical-align:top;display:inline-block;width:60px;text-align:right;position:relative;top:-6px}.button_action{width:30px}.expand_icon{width:7px;height:5px;display:inline-block}.m_opened .expand_icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}";
|
|
2118
|
-
var TextHider = /** @class */ (function () {
|
|
2119
|
-
function TextHider(hostRef) {
|
|
2120
|
-
registerInstance(this, hostRef);
|
|
2121
|
-
this.textExpand = createEvent(this, "textExpand", 7);
|
|
2122
|
-
this.opened = false;
|
|
2123
|
-
}
|
|
2124
|
-
TextHider.prototype.textExpandHandler = function () {
|
|
2125
|
-
this.opened = !this.opened;
|
|
2126
|
-
};
|
|
2127
|
-
TextHider.prototype.render = function () {
|
|
2128
|
-
return (h(Host, null, h("div", { class: "root" }, h("div", { class: {
|
|
2129
|
-
text: true,
|
|
2130
|
-
m_opened: this.opened,
|
|
2131
|
-
} }, h("slot", null)), h("div", { class: "action" }, h("peculiar-button", { onClick: this.textExpand.emit, class: {
|
|
2132
|
-
button_action: true,
|
|
2133
|
-
m_opened: this.opened,
|
|
2134
|
-
}, fill: this.opened ? 'fill' : 'stroke' }, h("svg", { viewBox: "0 0 7 5", xmlns: "http://www.w3.org/2000/svg", class: "expand_icon" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "currentColor", d: "M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z" })))))));
|
|
2135
|
-
};
|
|
2136
|
-
return TextHider;
|
|
2137
|
-
}());
|
|
2138
|
-
TextHider.style = textHiderCss;
|
|
2139
|
-
var typographyCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block}.typography{font-family:\"Open Sans\", \"Arial\", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);font-weight:400;margin:0;padding:0;display:block}.typography_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.typography_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.typography_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.typography_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.typography_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.typography_color_dark{color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.typography_color_light{color:white;color:rgba(var(--pv-color-light-rgb), 1)}.typography_color_grey_3{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.typography_color_grey_5{color:#869196;color:rgba(var(--pv-color-grey_5-rgb), 1)}.typography_color_attention{color:#f7a831;color:rgba(var(--pv-color-attention-rgb), 1)}.typography_color_primary{color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1)}.typography_ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.typography_monospace{font-family:monospace}.typography_align_left{text-align:left}.typography_align_center{text-align:center}.typography_align_right{text-align:right}";
|
|
2140
|
-
var PeculiarTypography = /** @class */ (function () {
|
|
2141
|
-
function PeculiarTypography(hostRef) {
|
|
2142
|
-
registerInstance(this, hostRef);
|
|
2143
|
-
/**
|
|
2144
|
-
* Typography type.
|
|
2145
|
-
*/
|
|
2146
|
-
this.type = 'b3';
|
|
2147
|
-
/**
|
|
2148
|
-
* Component color from theme.
|
|
2149
|
-
*/
|
|
2150
|
-
this.color = 'dark';
|
|
2151
|
-
}
|
|
2152
|
-
PeculiarTypography.prototype.render = function () {
|
|
2153
|
-
var _c;
|
|
2154
|
-
var TagType = this.type && this.type.includes('h') ? this.type : 'p';
|
|
2155
|
-
return (h(TagType, { class: (_c = {
|
|
2156
|
-
typography: true
|
|
2157
|
-
},
|
|
2158
|
-
_c["typography_type_" + (this.type || 'b3')] = true,
|
|
2159
|
-
_c["typography_color_" + (this.color || 'dark')] = true,
|
|
2160
|
-
_c["typography_align_" + this.align] = !!this.align,
|
|
2161
|
-
_c.typography_ellipsis = this.ellipsis,
|
|
2162
|
-
_c.typography_monospace = this.monospace,
|
|
2163
|
-
_c) }, h("slot", null)));
|
|
2164
|
-
};
|
|
2165
|
-
return PeculiarTypography;
|
|
2166
|
-
}());
|
|
2167
|
-
PeculiarTypography.style = typographyCss;
|
|
2168
|
-
export { AttributeCertificateViewer as peculiar_attribute_certificate_viewer, Button as peculiar_button, ButtonSplit as peculiar_button_split, CertificateDecoder as peculiar_certificate_decoder, CertificateViewer as peculiar_certificate_viewer, CsrViewer as peculiar_csr_viewer, Link as peculiar_link, TextHider as peculiar_text_hider, PeculiarTypography as peculiar_typography };
|