@peculiar/certificates-viewer 2.0.1 → 2.0.2-alpha.0
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/esm-es5/_commonjsHelpers-bfbd2ad8.js +4 -0
- package/dist/esm-es5/certification_request-48e8b956.js +89 -0
- package/dist/esm-es5/dom-f1b08a97.js +24 -0
- package/dist/esm-es5/download-cf68ac2c.js +18 -0
- package/dist/esm-es5/index-bbd484d9.js +5 -0
- package/dist/esm-es5/index.js +4 -0
- package/dist/esm-es5/l10n-ead9928b.js +39 -0
- package/dist/esm-es5/loader.js +4 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_9.entry.js +198 -1907
- package/dist/esm-es5/peculiar-certificate-summary_3.entry.js +4 -83
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +4 -290
- package/dist/esm-es5/peculiar.js +4 -0
- 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-047b12d9.system.js +89 -0
- package/dist/peculiar/p-13e9d17d.system.entry.js +460 -0
- package/dist/peculiar/p-29cdd256.system.js +18 -0
- package/dist/peculiar/{p-75076c56.system.js → p-3929074b.system.js} +18 -15
- package/dist/peculiar/p-452d69af.entry.js +113 -0
- package/dist/peculiar/p-4f52a24f.system.js +39 -0
- package/dist/peculiar/p-5f7fbf05.system.entry.js +4 -0
- package/dist/peculiar/p-82033e2e.system.entry.js +4 -0
- package/dist/peculiar/p-886e9c53.js +87 -0
- package/dist/peculiar/p-88fbaf05.system.js +4 -0
- package/dist/peculiar/p-8df391dc.system.js +4 -0
- package/dist/peculiar/p-9837be14.system.js +5 -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-ee0e2707.system.js +4 -0
- package/dist/peculiar/p-f7683ba5.js +5 -0
- package/dist/peculiar/peculiar.esm.js +4 -1
- package/dist/peculiar/peculiar.js +1 -3
- 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 +15 -16
- 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.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-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.js +0 -30
- package/loader/index.es2017.mjs +0 -3
- package/loader/node-main.js +0 -3
|
@@ -1,2168 +1,459 @@
|
|
|
1
|
-
var __extends = (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
};
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]};return e(t,i)};return function(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function a(){this.constructor=t}t.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}();var __awaiter=this&&this.__awaiter||function(e,t,i,a){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a["throw"](e))}catch(e){r(e)}}function c(e){e.done?i(e.value):n(e.value).then(o,s)}c((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,n,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];n=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
|
+
/*!
|
|
3
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
+
*/import{h,r as registerInstance,H as Host,c as createEvent}from"./index-bbd484d9.js";import{A as AsnData,a as Attribute$1,i as id_pkcs9_at_extensionRequest,b as AsnParser,E as ExtensionRequest,c as Extension,d as AsnConvert,e as id_pkcs9_at_unstructuredName,U as UnstructuredName,f as id_pkcs9_at_challengePassword,C as ChallengePassword,g as id_ValuationRanking,V as ValuationRanking,h as id_InsuranceValue,I as InsuranceValue,j as id_WebGDPR,W as WebGDPR,k as id_ActivityDescription,l as ActivityDescription,m as id_TypeRelationship,T as TypeRelationship,n as id_DomainNameTechnicalOperator,D as DomainNameTechnicalOperator,o as id_DomainNameOwner,p as DomainNameOwner,q as id_DomainNameLegalRepresentative,r as DomainNameLegalRepresentative,s as id_DomainNameBeneficiary,t as DomainNameBeneficiary,u as certificateRawToBuffer,v as AttributeCertificate,w as getCertificateThumbprint,x as hexFormat,y as base64Format,z as CertificationRequest,N as Name,B as id_ecPublicKey,F as ECParameters,G as id_rsaEncryption,R as RSAPublicKey,O as OIDs,H as Name$1,J as OtherName,K as DisplayText,L as UserNotice,M as EDIPartyName,P as AsnIntegerArrayBufferConverter,Q as KeyUsage,S as BasicConstraints,X as ExtendedKeyUsage,Y as SubjectKeyIdentifier,Z as AuthorityKeyIdentifier,_ as CRLDistributionPoints,$ as AuthorityInfoAccessSyntax,a0 as SubjectInfoAccessSyntax,a1 as SubjectAlternativeName,a2 as CertificatePolicies,a3 as CertificateTransparency,a4 as NameConstraints,a5 as CertificateTemplate,a6 as EnrollCertTypeChoice,a7 as CaVersion,a8 as QCStatements,a9 as NetscapeComment,aa as NetscapeCertType,ab as LeiRole,ac as LeiChoice,ad as Timestamp,ae as ArchiveRevInfo,af as CRLReason,ag as SubjectDirectoryAttributes,ah as PrivateKeyUsagePeriod,ai as EntrustVersionInfo,aj as BiometricSyntax,ak as LogotypeExtn,al as TNAuthorizationList,am as PolicyConstraints,an as PolicyMappings,ao as isPem,ap as isX509Pem,aq as isPkcs10Pem,ar as isX509AttributePem,as as X509Certificate}from"./certification_request-48e8b956.js";import{b as build,D as Download}from"./download-cf68ac2c.js";import{d as dateDiff,l as l10n,a as dateShort,h as history}from"./l10n-ead9928b.js";import"./_commonjsHelpers-bfbd2ad8.js";
|
|
440
5
|
/**
|
|
441
6
|
* @license
|
|
442
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
443
8
|
*
|
|
444
9
|
* This source code is licensed under the MIT license found in the
|
|
445
10
|
* 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
|
-
};
|
|
11
|
+
*/function readAsBinaryString(e){return new Promise((function(t,i){var a=new FileReader;a.onload=function(){return t({value:a.result,fileName:e.name,fileSize:e.size,sourceMime:e.type})};a.onerror=function(){return i(a.error)};a.readAsBinaryString(e)}))}
|
|
454
12
|
/**
|
|
455
13
|
* @license
|
|
456
14
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
457
15
|
*
|
|
458
16
|
* This source code is licensed under the MIT license found in the
|
|
459
17
|
* 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
|
-
};
|
|
18
|
+
*/var Attribute=function(e){__extends(t,e);function t(t){var i=e.call(this,t,Attribute$1)||this;var a=i.getAsnExtnValue();switch(i.asn.type){case id_DomainNameBeneficiary:i.value=AsnParser.parse(a,DomainNameBeneficiary);break;case id_DomainNameLegalRepresentative:i.value=AsnParser.parse(a,DomainNameLegalRepresentative);break;case id_DomainNameOwner:i.value=AsnParser.parse(a,DomainNameOwner);break;case id_DomainNameTechnicalOperator:i.value=AsnParser.parse(a,DomainNameTechnicalOperator);break;case id_TypeRelationship:i.value=AsnParser.parse(a,TypeRelationship);break;case id_ActivityDescription:i.value=AsnParser.parse(a,ActivityDescription);break;case id_WebGDPR:i.value=AsnParser.parse(a,WebGDPR);break;case id_InsuranceValue:i.value=AsnParser.parse(a,InsuranceValue);break;case id_ValuationRanking:i.value=AsnParser.parse(a,ValuationRanking);break;case id_pkcs9_at_challengePassword:i.value=AsnParser.parse(a,ChallengePassword);break;case id_pkcs9_at_unstructuredName:i.value=AsnParser.parse(a,UnstructuredName);break;case id_pkcs9_at_extensionRequest:{var n=AsnParser.parse(a,ExtensionRequest);i.value=n.map((function(e){return new Extension(AsnConvert.serialize(e))}));break}default:i.value=build.Convert.ToHex(a)}return i}t.prototype.getAsnExtnValue=function(){return this.asn.values[0]};return t}(AsnData);
|
|
465
19
|
/**
|
|
466
20
|
* @license
|
|
467
21
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
468
22
|
*
|
|
469
23
|
* This source code is licensed under the MIT license found in the
|
|
470
24
|
* 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
|
-
};
|
|
25
|
+
*/var X509AttributeCertificate=function(e){__extends(t,e);function t(t){var i=this;var a;i=e.call(this,certificateRawToBuffer(t),AttributeCertificate)||this;i.thumbprints={};i.type="X.509 Attribute Certificate";var n=i.asn.acinfo;i.serialNumber=build.Convert.ToHex(n.serialNumber);i.version=n.version;var r=n.attrCertValidityPeriod.notBeforeTime;if(!r){throw new Error("Cannot get 'notBefore' value")}i.notBefore=r;var o=n.attrCertValidityPeriod.notAfterTime;if(!o){throw new Error("Cannot get 'notAfter' value")}i.notAfter=o;i.validity=dateDiff(i.notBefore,i.notAfter);i.issuer=n.issuer.v1Form||((a=n.issuer.v2Form)===null||a===void 0?void 0:a.issuerName);i.holder=n.holder;return i}Object.defineProperty(t.prototype,"signature",{get:function(){var e=this.asn,t=e.signatureValue,i=e.signatureAlgorithm;return{value:t,algorithm:i.algorithm}},enumerable:false,configurable:true});t.prototype.parseExtensions=function(){var e=this.asn.acinfo;if(e.extensions){this.extensions=e.extensions.map((function(e){return new Extension(AsnConvert.serialize(e))}))}};t.prototype.parseAttributes=function(){var e=this.asn.acinfo;if(e.attributes){this.attributes=e.attributes.map((function(e){return new Attribute(AsnConvert.serialize(e))}))}};t.prototype.getThumbprint=function(e){if(e===void 0){e="SHA-1"}return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);return[4,getCertificateThumbprint(e,this.raw)];case 1:t=a.sent();this.thumbprints[e["name"]||e]=build.Convert.ToHex(t);return[3,3];case 2:i=a.sent();console.error("Error thumbprint get:",i);return[3,3];case 3:return[2]}}))}))};t.prototype.exportAsBase64=function(){return build.Convert.ToBase64(this.raw)};t.prototype.exportAsHexFormatted=function(){return hexFormat(build.Convert.ToHex(this.raw))};t.prototype.exportAsPemFormatted=function(){return"-----BEGIN ATTRIBUTE CERTIFICATE-----\n".concat(base64Format(this.exportAsBase64()),"\n-----END ATTRIBUTE CERTIFICATE-----")};Object.defineProperty(t.prototype,"commonName",{get:function(){return"attribute-certificate-".concat(this.thumbprints["SHA-1"])},enumerable:false,configurable:true});return t}(AsnData);
|
|
530
26
|
/**
|
|
531
27
|
* @license
|
|
532
28
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
533
29
|
*
|
|
534
30
|
* This source code is licensed under the MIT license found in the
|
|
535
31
|
* 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
|
-
};
|
|
32
|
+
*/var CSR=function(e){__extends(t,e);function t(t){var i=e.call(this,certificateRawToBuffer(t),CertificationRequest)||this;i.thumbprints={};i.type="PKCS#10 Certificate Request";var a=i.asn.certificationRequestInfo;i.subject=new Name(a.subject).toJSON();i.version=a.version;return i}Object.defineProperty(t.prototype,"publicKey",{get:function(){var e=this.asn.certificationRequestInfo.subjectPKInfo,t=e.subjectPublicKey,i=e.algorithm;var a;if(i.algorithm===id_ecPublicKey&&i.parameters){a=AsnConvert.parse(i.parameters,ECParameters)}if(i.algorithm===id_rsaEncryption){a=AsnConvert.parse(t,RSAPublicKey)}var n=AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:a,value:n,algorithm:i.algorithm}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"signature",{get:function(){var e=this.asn,t=e.signature,i=e.signatureAlgorithm;return{value:t,algorithm:i.algorithm}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var e=0;e<this.subject.length;e+=1){var t=this.subject[e];if(t.shortName==="CN"||t.shortName==="E"||t.shortName==="O"){return t.value}}return""},enumerable:false,configurable:true});t.prototype.getThumbprint=function(e){if(e===void 0){e="SHA-1"}return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);return[4,getCertificateThumbprint(e,this.raw)];case 1:t=a.sent();this.thumbprints[e["name"]||e]=build.Convert.ToHex(t);return[3,3];case 2:i=a.sent();console.error("Error thumbprint get:",i);return[3,3];case 3:return[2]}}))}))};t.prototype.parseAttributes=function(){var e=this.asn.certificationRequestInfo;if(e.attributes){this.attributes=e.attributes.map((function(e){return new Attribute(AsnConvert.serialize(e))}))}};t.prototype.exportAsBase64=function(){return build.Convert.ToBase64(this.raw)};t.prototype.exportAsHexFormatted=function(){return hexFormat(build.Convert.ToHex(this.raw))};t.prototype.exportAsPemFormatted=function(){return"-----BEGIN CERTIFICATE REQUEST-----\n".concat(base64Format(this.exportAsBase64()),"\n-----END CERTIFICATE REQUEST-----")};return t}(AsnData);
|
|
541
33
|
/**
|
|
542
34
|
* @license
|
|
543
35
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
544
36
|
*
|
|
545
37
|
* This source code is licensed under the MIT license found in the
|
|
546
38
|
* 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
|
-
};
|
|
39
|
+
*/function getStringByOID(e){var t=OIDs[e];if(t){return"".concat(t," (").concat(e,")")}return e}
|
|
552
40
|
/**
|
|
553
41
|
* @license
|
|
554
42
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
555
43
|
*
|
|
556
44
|
* This source code is licensed under the MIT license found in the
|
|
557
45
|
* 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
|
-
};
|
|
46
|
+
*/function isLink(e){return e.indexOf("http")===0}
|
|
564
47
|
/**
|
|
565
48
|
* @license
|
|
566
49
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
567
50
|
*
|
|
568
51
|
* This source code is licensed under the MIT license found in the
|
|
569
52
|
* 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
|
-
};
|
|
53
|
+
*/var RowTitle=function(e){var t=e.value;if(!t){return null}return h("tr",{class:"title"},h("td",{colSpan:2},h("peculiar-typography",{type:"h6"},t)))};var RowValue=function(e){var t=e.name,i=e.value,a=e.monospace,n=e.collapse,r=e.href,o=e.extraValue;if(!t){return null}if(i===undefined||i===null){return null}var s;if(n){s=h("peculiar-text-hider",null,i)}else{s=i}var c=!!i.toString();return h("tr",null,h("td",{colSpan:c?1:2},h("peculiar-typography",{color:"grey_5"},t,c?":":"")),c&&h("td",{class:{monospace:a}},isLink(i.toString())||r?h("peculiar-link",{href:r||i.toString()},i):h("peculiar-typography",{monospace:a},s,o)))};
|
|
575
54
|
/**
|
|
576
55
|
* @license
|
|
577
56
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
578
57
|
*
|
|
579
58
|
* This source code is licensed under the MIT license found in the
|
|
580
59
|
* 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
|
-
};
|
|
60
|
+
*/var Signature=function(e){var t=e.signature;if(!t){return null}return[h(RowTitle,{value:l10n.getString("signature")}),h(RowValue,{name:l10n.getString("algorithm"),value:getStringByOID(t.algorithm)}),h(RowValue,{name:l10n.getString("value"),value:build.Convert.ToHex(t.value),monospace:true,collapse:true})]};
|
|
600
61
|
/**
|
|
601
62
|
* @license
|
|
602
63
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
603
64
|
*
|
|
604
65
|
* This source code is licensed under the MIT license found in the
|
|
605
66
|
* 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
|
-
};
|
|
67
|
+
*/var BasicAttribute=function(e,t){var i=e.attribute;return[h(RowValue,{name:"Name",value:getStringByOID(i.asn.type)}),t,h("tr",null,h("td",{colSpan:2,class:"divider"},h("span",{class:"bg_fill"})))]};
|
|
611
68
|
/**
|
|
612
69
|
* @license
|
|
613
70
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
614
71
|
*
|
|
615
72
|
* This source code is licensed under the MIT license found in the
|
|
616
73
|
* 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
|
-
};
|
|
74
|
+
*/var NamePart=function(e){var t=e.name;if(!t){return null}return t.map((function(e){return e.map((function(e){return h(RowValue,{name:OIDs[e.type]||e.type,value:e.value.toString()})}))}))};
|
|
622
75
|
/**
|
|
623
76
|
* @license
|
|
624
77
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
625
78
|
*
|
|
626
79
|
* This source code is licensed under the MIT license found in the
|
|
627
80
|
* 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
|
-
};
|
|
81
|
+
*/var NameAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(NamePart,{name:t.value}))};
|
|
633
82
|
/**
|
|
634
83
|
* @license
|
|
635
84
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
636
85
|
*
|
|
637
86
|
* This source code is licensed under the MIT license found in the
|
|
638
87
|
* 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
|
-
};
|
|
88
|
+
*/var names={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"};var GeneralNamePart=function(e){var t=e.generalName,i=e.getDNSNameLink,a=e.getIPAddressLink;if(!t){return null}return Object.keys(t).map((function(e){var n=t[e];if(n instanceof Name$1){return[h(RowValue,{name:names[e]||e,value:""}),n.map((function(e){return e.map((function(e){return h(RowValue,{name:OIDs[e.type]||e.type,value:e.value.toString()})}))}))]}if(n instanceof OtherName){try{var r=AsnParser.parse(n.value,DisplayText);return h(RowValue,{name:OIDs[n.typeId]||n.typeId,value:r.toString()})}catch(e){}try{var r=AsnParser.parse(n.value,UserNotice);if(r.explicitText){return h(RowValue,{name:OIDs[n.typeId]||n.typeId,value:r.explicitText.toString()})}}catch(e){}return h(RowValue,{name:OIDs[n.typeId]||n.typeId,value:build.Convert.ToHex(n.value),monospace:true})}if(build.BufferSourceConverter.isBufferSource(n)){return h(RowValue,{name:names[e]||e,value:build.Convert.ToString(n)})}if(n instanceof EDIPartyName){return h(RowValue,{name:names[e]||e,value:build.Convert.ToString(n.partyName)})}if(e==="dNSName"){return h(RowValue,{name:names[e]||e,value:n,href:i(n)})}if(e==="iPAddress"){return h(RowValue,{name:names[e]||e,value:n,href:a(n)})}return h(RowValue,{name:names[e]||e,value:n})}))};
|
|
685
89
|
/**
|
|
686
90
|
* @license
|
|
687
91
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
688
92
|
*
|
|
689
93
|
* This source code is licensed under the MIT license found in the
|
|
690
94
|
* 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
|
-
};
|
|
95
|
+
*/var ActivityDescriptionAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Code Authority",value:""}),h(GeneralNamePart,{generalName:t.value.codeAuthority,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Code Id",value:""}),h(GeneralNamePart,{generalName:t.value.codeId,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Short Name",value:t.value.shortName}),h(RowValue,{name:"Short Description",value:t.value.shortDescription}))};
|
|
706
96
|
/**
|
|
707
97
|
* @license
|
|
708
98
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
709
99
|
*
|
|
710
100
|
* This source code is licensed under the MIT license found in the
|
|
711
101
|
* 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
|
-
};
|
|
102
|
+
*/var WebGdprAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Assessment Authority",value:""}),h(GeneralNamePart,{generalName:t.value.assessmentAuthority,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Assessment Location",value:""}),h(GeneralNamePart,{generalName:t.value.assessmentLocation,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Assessment Ref",value:""}),h(GeneralNamePart,{generalName:t.value.assessmentRef,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Data Storage Territory",value:t.value.dataStorageTerritory}),h(RowValue,{name:"Description",value:t.value.description}))};
|
|
722
103
|
/**
|
|
723
104
|
* @license
|
|
724
105
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
725
106
|
*
|
|
726
107
|
* This source code is licensed under the MIT license found in the
|
|
727
108
|
* 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
|
-
};
|
|
109
|
+
*/var InsuranceValueAttribute=function(e){var t=e.attribute;var i="".concat(t.value.base," * 10^").concat(t.value.degree," ").concat(t.value.location);return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:i}))};
|
|
733
110
|
/**
|
|
734
111
|
* @license
|
|
735
112
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
736
113
|
*
|
|
737
114
|
* This source code is licensed under the MIT license found in the
|
|
738
115
|
* 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
|
-
};
|
|
116
|
+
*/var TypeRelationshipAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},Object.keys(t.value).map((function(e){return h(RowValue,{name:e,value:t.value[e].toNumber()?"YES":"NO"})})))};
|
|
744
117
|
/**
|
|
745
118
|
* @license
|
|
746
119
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
747
120
|
*
|
|
748
121
|
* This source code is licensed under the MIT license found in the
|
|
749
122
|
* 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
|
-
};
|
|
123
|
+
*/var getValueRank=function(e){var t=1;if(e/100>1){t=100}else if(e/10>1){t=10}return"".concat(e,"/").concat(5*t)};var ValuationRankingAttribute=function(e){var t=e.attribute;var i=Object.keys(t.value).map((function(e){return[getValueRank(t.value[e]),h("br",null)]}));return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:i}))};
|
|
755
124
|
/**
|
|
756
125
|
* @license
|
|
757
126
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
758
127
|
*
|
|
759
128
|
* This source code is licensed under the MIT license found in the
|
|
760
129
|
* 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
|
-
};
|
|
130
|
+
*/var AsStringAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:t.value,monospace:true}))};
|
|
772
131
|
/**
|
|
773
132
|
* @license
|
|
774
133
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
775
134
|
*
|
|
776
135
|
* This source code is licensed under the MIT license found in the
|
|
777
136
|
* 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
|
-
};
|
|
137
|
+
*/var UnstructuredNameAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:t.value.utf8String}))};
|
|
789
138
|
/**
|
|
790
139
|
* @license
|
|
791
140
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
792
141
|
*
|
|
793
142
|
* This source code is licensed under the MIT license found in the
|
|
794
143
|
* 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
|
-
};
|
|
144
|
+
*/var ChallengePasswordAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:t.value.toString()}))};
|
|
806
145
|
/**
|
|
807
146
|
* @license
|
|
808
147
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
809
148
|
*
|
|
810
149
|
* This source code is licensed under the MIT license found in the
|
|
811
150
|
* 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
|
-
};
|
|
151
|
+
*/var Attributes=function(e){var t=e.attributes;if(!t||!t.length){return null}return[h(RowTitle,{value:"Attributes"}),t.map((function(e){try{if(e.value instanceof Name$1){return h(NameAttribute,{attribute:e})}if(e.value instanceof ActivityDescription){return h(ActivityDescriptionAttribute,{attribute:e})}if(e.value instanceof WebGDPR){return h(WebGdprAttribute,{attribute:e})}if(e.value instanceof InsuranceValue){return h(InsuranceValueAttribute,{attribute:e})}if(e.value instanceof TypeRelationship){return h(TypeRelationshipAttribute,{attribute:e})}if(e.value instanceof ValuationRanking){return h(ValuationRankingAttribute,{attribute:e})}if(e.value instanceof UnstructuredName){return h(UnstructuredNameAttribute,{attribute:e})}if(e.value instanceof ChallengePassword){return h(ChallengePasswordAttribute,{attribute:e})}if(typeof e.value==="string"){return h(AsStringAttribute,{attribute:e})}return h(BasicAttribute,{attribute:e})}catch(t){console.error("Error render attribute:",e.asn.type);return null}}))]};
|
|
821
152
|
/**
|
|
822
153
|
* @license
|
|
823
154
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
824
155
|
*
|
|
825
156
|
* This source code is licensed under the MIT license found in the
|
|
826
157
|
* 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
|
-
};
|
|
158
|
+
*/var Thumbprints=function(e){var t=e.thumbprints;if(!t){return null}var i=Object.keys(t);if(!i.length){return null}return[h(RowTitle,{value:l10n.getString("fingerprints")}),i.map((function(e){return h(RowValue,{name:e,value:t[e],monospace:true})}))]};
|
|
832
159
|
/**
|
|
833
160
|
* @license
|
|
834
161
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
835
162
|
*
|
|
836
163
|
* This source code is licensed under the MIT license found in the
|
|
837
164
|
* 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
|
-
};
|
|
165
|
+
*/var BasicExtension=function(e,t){var i=e.extension;return[h(RowValue,{name:"Name",value:getStringByOID(i.asn.extnID)}),h(RowValue,{name:"Critical",value:i.asn.critical?"YES":"NO"}),t,h("tr",null,h("td",{colSpan:2,class:"divider"},h("span",{class:"bg_fill"})))]};
|
|
951
166
|
/**
|
|
952
167
|
* @license
|
|
953
168
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
954
169
|
*
|
|
955
170
|
* This source code is licensed under the MIT license found in the
|
|
956
171
|
* 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
|
-
};
|
|
172
|
+
*/var KeyUsageExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Usage",value:t.value.toJSON().join(", ")}))};
|
|
970
173
|
/**
|
|
971
174
|
* @license
|
|
972
175
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
973
176
|
*
|
|
974
177
|
* This source code is licensed under the MIT license found in the
|
|
975
178
|
* 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
|
-
};
|
|
179
|
+
*/var BasicConstraintsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Certificate Authority",value:t.value.cA?"YES":"NO"}),h(RowValue,{name:"Path Length Constraint",value:t.value.pathLenConstraint}))};
|
|
984
180
|
/**
|
|
985
181
|
* @license
|
|
986
182
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
987
183
|
*
|
|
988
184
|
* This source code is licensed under the MIT license found in the
|
|
989
185
|
* 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
|
-
};
|
|
186
|
+
*/var ExtendedKeyUsageExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return h(RowValue,{name:"Purpose #".concat(t+1),value:getStringByOID(e)})})))};
|
|
995
187
|
/**
|
|
996
188
|
* @license
|
|
997
189
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
998
190
|
*
|
|
999
191
|
* This source code is licensed under the MIT license found in the
|
|
1000
192
|
* 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
|
-
};
|
|
193
|
+
*/var SubjectKeyIdentifierExtension=function(e){var t=e.extension,i=e.getSubjectKeyIdChildrenLink,a=e.getSubjectKeyIdSiblingsLink;var n=build.Convert.ToHex(t.value.buffer);var r=i(n);var o=a(n);return h(BasicExtension,{extension:t},h(RowValue,{name:"Key ID",value:n,monospace:true,extraValue:[r&&h("span",null," [",h("peculiar-link",{href:r},"children"),"]"),o&&h("span",null," [",h("peculiar-link",{href:o},"siblings"),"]")]}))};
|
|
1006
194
|
/**
|
|
1007
195
|
* @license
|
|
1008
196
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1009
197
|
*
|
|
1010
198
|
* This source code is licensed under the MIT license found in the
|
|
1011
199
|
* 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
|
-
};
|
|
200
|
+
*/var AuthorityKeyIdentifierExtension=function(e){var t=e.extension,i=e.getAuthKeyIdParentLink,a=e.getAuthKeyIdSiblingsLink;var n=build.Convert.ToHex(t.value.keyIdentifier.buffer);var r=i(n);var o=a(n);return h(BasicExtension,{extension:t},h(RowValue,{name:"Key ID",value:n,monospace:true,extraValue:[r&&h("span",null," [",h("peculiar-link",{href:r},"parents"),"]"),o&&h("span",null," [",h("peculiar-link",{href:o},"siblings"),"]")]}))};
|
|
1018
201
|
/**
|
|
1019
202
|
* @license
|
|
1020
203
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1021
204
|
*
|
|
1022
205
|
* This source code is licensed under the MIT license found in the
|
|
1023
206
|
* 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
|
-
};
|
|
207
|
+
*/var CRLDistributionPointsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(t){var i,a;return[(i=t.distributionPoint)===null||i===void 0?void 0:i.fullName.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t},e))})),(a=t.cRLIssuer)===null||a===void 0?void 0:a.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t},e))}))]})))};
|
|
1033
208
|
/**
|
|
1034
209
|
* @license
|
|
1035
210
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1036
211
|
*
|
|
1037
212
|
* This source code is licensed under the MIT license found in the
|
|
1038
213
|
* 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
|
-
};
|
|
214
|
+
*/var InfoAccessSyntaxExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(t,i){return[h(RowValue,{name:"Description #".concat(i+1),value:""}),h(RowValue,{name:"Method",value:getStringByOID(t.accessMethod)}),h(GeneralNamePart,Object.assign({generalName:t.accessLocation},e))]})))};
|
|
1044
215
|
/**
|
|
1045
216
|
* @license
|
|
1046
217
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1047
218
|
*
|
|
1048
219
|
* This source code is licensed under the MIT license found in the
|
|
1049
220
|
* 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
|
-
};
|
|
221
|
+
*/var SubjectAlternativeNameExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t},e))})))};
|
|
1055
222
|
/**
|
|
1056
223
|
* @license
|
|
1057
224
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1058
225
|
*
|
|
1059
226
|
* This source code is licensed under the MIT license found in the
|
|
1060
227
|
* 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
|
-
};
|
|
228
|
+
*/var CertificatePoliciesExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){var i;return[h(RowValue,{name:"Policy #".concat(t+1),value:""}),h(RowValue,{name:"ID",value:getStringByOID(e.policyIdentifier)}),(i=e.policyQualifiers)===null||i===void 0?void 0:i.map((function(e,i){var a=[h(RowValue,{name:"Qualifier #".concat(t+1,".").concat(i+1),value:""}),h(RowValue,{name:"ID",value:getStringByOID(e.policyQualifierId)})];if(e.policyQualifierId==="1.3.6.1.5.5.7.2.1"){var n=AsnParser.parse(e.qualifier,DisplayText);a.push(h(RowValue,{name:"Value",value:n.toString()}))}if(e.policyQualifierId==="1.3.6.1.5.5.7.2.2"){var n=AsnParser.parse(e.qualifier,UserNotice);if(n.explicitText){a.push(h(RowValue,{name:"Value",value:n.explicitText.toString()}))}}return a}))]})))};
|
|
1066
229
|
/**
|
|
1067
230
|
* @license
|
|
1068
231
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1069
232
|
*
|
|
1070
233
|
* This source code is licensed under the MIT license found in the
|
|
1071
234
|
* 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
|
-
};
|
|
235
|
+
*/var logs={"9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5":"Akamai CT","39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9":"Alpha CT",a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638:"CNNIC CT",cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900:"Certly.IO","1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4":"Cloudflare “Nimbus2017”",db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64:"Cloudflare “Nimbus2018”","747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56":"Cloudflare “Nimbus2019”","5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558":"Cloudflare “Nimbus2020”","4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8":"Cloudflare “Nimbus2021”","41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6":"Cloudflare “Nimbus2022”","7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52":"Cloudflare “Nimbus2023”","6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5":"DigiCert Nessie2018",fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c:"DigiCert Nessie2019",c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565:"DigiCert Nessie2020",eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9:"DigiCert Nessie2021","51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5":"DigiCert Nessie2022",b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a:"DigiCert Nessie2023","5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd":"DigiCert Server","8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f":"DigiCert Server 2",c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360:"DigiCert Yeti2018",e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe:"DigiCert Yeti2019",f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273:"DigiCert Yeti2020","5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca":"DigiCert Yeti2021","2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02":"DigiCert Yeti2022","35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c":"DigiCert Yeti2023","717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668":"GDCA 1","14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a":"GDCA 2",c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa:"GDCA CT #1","924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01":"GDCA CT #2",fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28:"Google “Argon2017”",a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25:"Google “Argon2018”","63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d":"Google “Argon2019”",b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e:"Google “Argon2020”",f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3:"Google “Argon2021”","2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784":"Google “Argon2022”","68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4":"Google “Aviator”",c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6:"Google “Crucible”","1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb":"Google “Daedalus”","293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478":"Google “Icarus”",a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10:"Google “Pilot”",ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb:"Google “Rocketeer”",bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185:"Google “Skydiver”","52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03":"Google “Solera2018”","0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00":"Google “Solera2019”","1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7":"Google “Solera2020”",a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7:"Google “Solera2021”","697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3":"Google “Solera2022”",a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681:"Google “Submariner”",b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77:"Google “Testtube”",b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e:"Google “Xenon2018”","084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0":"Google “Xenon2019”","07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c":"Google “Xenon2020”","7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7":"Google “Xenon2021”","46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47":"Google “Xenon2022”","7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3":"Izenpe","8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566":"Izenpe “Argi”","296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd":"Let“s Encrypt ”Clicky”","537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440":"Nordu “flimsy”",aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd:"Nordu “plausible”",e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273:"PuChuangSiDa CT",cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6:"SHECA CT 1","32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623":"SHECA CT 2",db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98:"Sectigo (Comodo) “Dodo” CT","6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913":"Sectigo (Comodo) “Mammoth” CT","5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c":"Sectigo (Comodo) “Sabre” CT","34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef":"StartCom",ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc:"Symantec",a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2:"Symantec Deneb","15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f":"Symantec “Sirius”",bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5:"Symantec “Vega”",b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b:"Up In The Air “Behind the Sofa”",ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d:"Venafi","03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b":"Venafi Gen2 CT","41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263":"WoSign","63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7":"WoSign 2","9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b":"WoSign CT #1"};
|
|
1077
236
|
/**
|
|
1078
237
|
* @license
|
|
1079
238
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1080
239
|
*
|
|
1081
240
|
* This source code is licensed under the MIT license found in the
|
|
1082
241
|
* 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
|
-
};
|
|
242
|
+
*/var CertificateTransparencyExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.toJSON().map((function(e,t){return[h(RowValue,{name:"SCT #".concat(t+1),value:""}),h(RowValue,{name:"Version",value:e.version+1}),h(RowValue,{name:"Log Operator",value:logs[e.logId]||e.logId}),h(RowValue,{name:"Log Key ID",value:e.logId,monospace:true}),h(RowValue,{name:"Timestamp",value:dateShort(e.timestamp)}),h(RowValue,{name:"Signature Algorithm",value:"".concat(e.hashAlgorithm," ").concat(e.signatureAlgorithm).toUpperCase()}),h(RowValue,{name:"Signature",value:e.signature,monospace:true})]})))};
|
|
1088
243
|
/**
|
|
1089
244
|
* @license
|
|
1090
245
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1091
246
|
*
|
|
1092
247
|
* This source code is licensed under the MIT license found in the
|
|
1093
248
|
* 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
|
-
};
|
|
249
|
+
*/var NameConstraintsExtension=function(e){var t,i;var a=e.extension;return h(BasicExtension,{extension:a},(t=a.value.excludedSubtrees)===null||t===void 0?void 0:t.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t.base},e))})),(i=a.value.permittedSubtrees)===null||i===void 0?void 0:i.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t.base},e))})))};
|
|
1099
250
|
/**
|
|
1100
251
|
* @license
|
|
1101
252
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1102
253
|
*
|
|
1103
254
|
* This source code is licensed under the MIT license found in the
|
|
1104
255
|
* 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
|
-
};
|
|
256
|
+
*/var CertificateTemplateExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Template ID",value:t.value.templateID}),h(RowValue,{name:"Template Major Version",value:t.value.templateMajorVersion}),h(RowValue,{name:"Template Minor Version",value:t.value.templateMinorVersion}))};
|
|
1110
257
|
/**
|
|
1111
258
|
* @license
|
|
1112
259
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1113
260
|
*
|
|
1114
261
|
* This source code is licensed under the MIT license found in the
|
|
1115
262
|
* LICENSE file in the root directory of this source tree.
|
|
1116
|
-
*/
|
|
1117
|
-
function getAttributeValue(attribute) {
|
|
1118
|
-
return build_2.ToString(attribute.values[0]);
|
|
1119
|
-
}
|
|
263
|
+
*/var EnrollCertTypeChoiceExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Name",value:t.value.toString()}))};
|
|
1120
264
|
/**
|
|
1121
265
|
* @license
|
|
1122
266
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1123
267
|
*
|
|
1124
268
|
* This source code is licensed under the MIT license found in the
|
|
1125
269
|
* 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
|
-
};
|
|
270
|
+
*/var CaVersionExtension=function(e){var t=e.extension;var i=t.value.getVersion();return h(BasicExtension,{extension:t},h(RowValue,{name:"Certificate Index",value:i.certificateIndex}),h(RowValue,{name:"Key Index",value:i.keyIndex}))};
|
|
1135
271
|
/**
|
|
1136
272
|
* @license
|
|
1137
273
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1138
274
|
*
|
|
1139
275
|
* This source code is licensed under the MIT license found in the
|
|
1140
276
|
* 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
|
-
};
|
|
277
|
+
*/var QCStatementsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Statement #".concat(t+1),value:""}),h(RowValue,{name:"ID",value:getStringByOID(e.statementId)}),h(RowValue,{name:"Info",value:e.statementInfo.byteLength?build.Convert.ToHex(e.statementInfo):null,monospace:true})]})))};
|
|
1146
278
|
/**
|
|
1147
279
|
* @license
|
|
1148
280
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1149
281
|
*
|
|
1150
282
|
* This source code is licensed under the MIT license found in the
|
|
1151
283
|
* 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
|
-
};
|
|
284
|
+
*/var NetscapeCommentExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Comment",value:t.value.value}))};
|
|
1157
285
|
/**
|
|
1158
286
|
* @license
|
|
1159
287
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1160
288
|
*
|
|
1161
289
|
* This source code is licensed under the MIT license found in the
|
|
1162
290
|
* 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
|
-
};
|
|
291
|
+
*/var NetscapeCertTypeExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Type",value:t.value.toJSON().join(", ")}))};
|
|
1168
292
|
/**
|
|
1169
293
|
* @license
|
|
1170
294
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1171
295
|
*
|
|
1172
296
|
* This source code is licensed under the MIT license found in the
|
|
1173
297
|
* 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
|
-
};
|
|
298
|
+
*/var LeiRoleExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Role",value:t.value.text}))};
|
|
1186
299
|
/**
|
|
1187
300
|
* @license
|
|
1188
301
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
1189
302
|
*
|
|
1190
303
|
* This source code is licensed under the MIT license found in the
|
|
1191
304
|
* 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
|
-
};
|
|
305
|
+
*/var LeiExtension=function(e){var t=e.extension,i=e.getLEILink;return h(BasicExtension,{extension:t},h(RowValue,{name:"Identifier",value:t.value.text,href:i(t.value.text)}))};
|
|
1237
306
|
/**
|
|
1238
307
|
* @license
|
|
1239
308
|
* 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
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
|
|
1271
|
-
var
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
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
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
return (h(EntrustVersionInfoExtension, { extension: extension }));
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
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 };
|
|
309
|
+
*
|
|
310
|
+
* This source code is licensed under the MIT license found in the
|
|
311
|
+
* LICENSE file in the root directory of this source tree.
|
|
312
|
+
*/var TimestampExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Version",value:t.value.version}),h(GeneralNamePart,Object.assign({generalName:t.value.location},e)),h(RowValue,{name:"Requires Auth",value:t.value.requiresAuth?"YES":"NO"}))};
|
|
313
|
+
/**
|
|
314
|
+
* @license
|
|
315
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the MIT license found in the
|
|
318
|
+
* LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/var ArchiveRevInfoExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Version",value:t.value.version}))};
|
|
320
|
+
/**
|
|
321
|
+
* @license
|
|
322
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the MIT license found in the
|
|
325
|
+
* LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/var CRLReasonExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Reason",value:t.value.toJSON()}))};
|
|
327
|
+
/**
|
|
328
|
+
* @license
|
|
329
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the MIT license found in the
|
|
332
|
+
* LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/function getAttributeValue(e){return build.Convert.ToString(e.values[0])}
|
|
334
|
+
/**
|
|
335
|
+
* @license
|
|
336
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the MIT license found in the
|
|
339
|
+
* LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/var SubjectDirectoryAttributesExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Attribute #".concat(t+1),value:""}),h(RowValue,{name:"Type",value:getStringByOID(e.type)}),h(RowValue,{name:"Value",value:getAttributeValue(e)})]})))};
|
|
341
|
+
/**
|
|
342
|
+
* @license
|
|
343
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
344
|
+
*
|
|
345
|
+
* This source code is licensed under the MIT license found in the
|
|
346
|
+
* LICENSE file in the root directory of this source tree.
|
|
347
|
+
*/var AsStringExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Value",value:t.value,monospace:true}))};
|
|
348
|
+
/**
|
|
349
|
+
* @license
|
|
350
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the MIT license found in the
|
|
353
|
+
* LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/var PrivateKeyUsagePeriodExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Not Before",value:dateShort(t.value.notBefore)}),h(RowValue,{name:"Not After",value:dateShort(t.value.notAfter)}))};
|
|
355
|
+
/**
|
|
356
|
+
* @license
|
|
357
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the MIT license found in the
|
|
360
|
+
* LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/var EntrustVersionInfoExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Version",value:t.value.entrustVers}),h(RowValue,{name:"Info Flags",value:t.value.entrustInfoFlags.toJSON().join(", ")}))};
|
|
362
|
+
/**
|
|
363
|
+
* @license
|
|
364
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
365
|
+
*
|
|
366
|
+
* This source code is licensed under the MIT license found in the
|
|
367
|
+
* LICENSE file in the root directory of this source tree.
|
|
368
|
+
*/var BiometricSyntaxExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Biometric #".concat(t+1),value:""}),h(RowValue,{name:"OID",value:getStringByOID(e.typeOfBiometricData.biometricDataOid)}),h(RowValue,{name:"Type",value:e.typeOfBiometricData.predefinedBiometricType}),h(RowValue,{name:"Algorithm",value:getStringByOID(e.hashAlgorithm.algorithm)}),h(RowValue,{name:"Hash",value:build.Convert.ToHex(e.biometricDataHash.buffer),monospace:true}),h(RowValue,{name:"Source Uri",value:e.sourceDataUri})]})))};
|
|
369
|
+
/**
|
|
370
|
+
* @license
|
|
371
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the MIT license found in the
|
|
374
|
+
* LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/var LogotypeExtension=function(e){var t=e.extension;var i=function(e){if(!e){return null}return e.map((function(e){var t=e.imageDetails;return[h(RowValue,{name:"Image Type",value:t.mediaType}),h(RowValue,{name:"Image Hash",value:build.Convert.ToHex(t.logotypeHash[0].hashValue),monospace:true}),h(RowValue,{name:"Image URL",value:t.logotypeURI[0],monospace:true,collapse:true}),h(RowValue,{name:"Image Hash Algorithm",value:getStringByOID(t.logotypeHash[0].hashAlg.algorithm)})]}))};var a=function(e){if(!e){return null}return e.map((function(e){var t=e.audioDetails;return[h(RowValue,{name:"Audio Type",value:t.mediaType}),h(RowValue,{name:"Audio Hash",value:build.Convert.ToHex(t.logotypeHash[0].hashValue),monospace:true}),h(RowValue,{name:"Audio URL",value:t.logotypeURI[0],monospace:true,collapse:true}),h(RowValue,{name:"Audio Hash Algorithm",value:getStringByOID(t.logotypeHash[0].hashAlg.algorithm)})]}))};var n=function(e,t){if(!t||!t.direct){return null}var n=t.direct,r=n.image,o=n.audio;return[h(RowValue,{name:"Type",value:e}),i(r),a(o),h("tr",null,h("td",null),h("td",null))]};return h(BasicExtension,{extension:t},n("Subject",t.value.subjectLogo),n("Issuer",t.value.issuerLogo))};
|
|
376
|
+
/**
|
|
377
|
+
* @license
|
|
378
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
379
|
+
*
|
|
380
|
+
* This source code is licensed under the MIT license found in the
|
|
381
|
+
* LICENSE file in the root directory of this source tree.
|
|
382
|
+
*/var TNAuthListExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Entry #".concat(t+1),value:""}),h(RowValue,{name:"SPC",value:e.spc}),h(RowValue,{name:"Range",value:e.range?"start=".concat(e.range.start," count==").concat(e.range.count):null}),h(RowValue,{name:"One",value:e.one})]})))};
|
|
383
|
+
/**
|
|
384
|
+
* @license
|
|
385
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
386
|
+
*
|
|
387
|
+
* This source code is licensed under the MIT license found in the
|
|
388
|
+
* LICENSE file in the root directory of this source tree.
|
|
389
|
+
*/var PolicyConstraintsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.requireExplicitPolicy&&h(RowValue,{name:"Require Explicit Policy",value:AsnIntegerArrayBufferConverter.toASN(t.value.requireExplicitPolicy).valueBlock.toString()}),t.value.inhibitPolicyMapping&&h(RowValue,{name:"Inhibit Policy Mapping",value:AsnIntegerArrayBufferConverter.toASN(t.value.inhibitPolicyMapping).valueBlock.toString()}))};
|
|
390
|
+
/**
|
|
391
|
+
* @license
|
|
392
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
393
|
+
*
|
|
394
|
+
* This source code is licensed under the MIT license found in the
|
|
395
|
+
* LICENSE file in the root directory of this source tree.
|
|
396
|
+
*/var PolicyMappingsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Policy #".concat(t+1),value:""}),h(RowValue,{name:"Issuer Domain",value:getStringByOID(e.issuerDomainPolicy)}),h(RowValue,{name:"Subject Domain",value:getStringByOID(e.subjectDomainPolicy)})]})))};
|
|
397
|
+
/**
|
|
398
|
+
* @license
|
|
399
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
400
|
+
*
|
|
401
|
+
* This source code is licensed under the MIT license found in the
|
|
402
|
+
* LICENSE file in the root directory of this source tree.
|
|
403
|
+
*/var Extensions=function(e){var t=e.extensions,i=e.title;if(!t||!t.length){return null}return[h(RowTitle,{value:i||"Extensions"}),t.map((function(t){try{if(t.value instanceof KeyUsage){return h(KeyUsageExtension,{extension:t})}if(t.value instanceof BasicConstraints){return h(BasicConstraintsExtension,{extension:t})}if(t.value instanceof ExtendedKeyUsage){return h(ExtendedKeyUsageExtension,{extension:t})}if(t.value instanceof SubjectKeyIdentifier){return h(SubjectKeyIdentifierExtension,Object.assign({extension:t},e))}if(t.value instanceof AuthorityKeyIdentifier){return h(AuthorityKeyIdentifierExtension,Object.assign({extension:t},e))}if(t.value instanceof CRLDistributionPoints){return h(CRLDistributionPointsExtension,Object.assign({extension:t},e))}if(t.value instanceof AuthorityInfoAccessSyntax||t.value instanceof SubjectInfoAccessSyntax){return h(InfoAccessSyntaxExtension,Object.assign({extension:t},e))}if(t.value instanceof SubjectAlternativeName){return h(SubjectAlternativeNameExtension,Object.assign({extension:t},e))}if(t.value instanceof CertificatePolicies){return h(CertificatePoliciesExtension,{extension:t})}if(t.value instanceof CertificateTransparency){return h(CertificateTransparencyExtension,{extension:t})}if(t.value instanceof NameConstraints){return h(NameConstraintsExtension,Object.assign({extension:t},e))}if(t.value instanceof CertificateTemplate){return h(CertificateTemplateExtension,{extension:t})}if(t.value instanceof EnrollCertTypeChoice){return h(EnrollCertTypeChoiceExtension,{extension:t})}if(t.value instanceof CaVersion){return h(CaVersionExtension,{extension:t})}if(t.value instanceof QCStatements){return h(QCStatementsExtension,{extension:t})}if(t.value instanceof NetscapeComment){return h(NetscapeCommentExtension,{extension:t})}if(t.value instanceof NetscapeCertType){return h(NetscapeCertTypeExtension,{extension:t})}if(t.value instanceof LeiRole){return h(LeiRoleExtension,{extension:t})}if(t.value instanceof LeiChoice){return h(LeiExtension,Object.assign({extension:t},e))}if(t.value instanceof Timestamp){return h(TimestampExtension,Object.assign({extension:t},e))}if(t.value instanceof ArchiveRevInfo){return h(ArchiveRevInfoExtension,{extension:t})}if(t.value instanceof CRLReason){return h(CRLReasonExtension,{extension:t})}if(t.value instanceof SubjectDirectoryAttributes){return h(SubjectDirectoryAttributesExtension,{extension:t})}if(t.value instanceof PrivateKeyUsagePeriod){return h(PrivateKeyUsagePeriodExtension,{extension:t})}if(t.value instanceof EntrustVersionInfo){return h(EntrustVersionInfoExtension,{extension:t})}if(t.value instanceof BiometricSyntax){return h(BiometricSyntaxExtension,{extension:t})}if(t.value instanceof LogotypeExtn){return h(LogotypeExtension,{extension:t})}if(t.value instanceof TNAuthorizationList){return h(TNAuthListExtension,{extension:t})}if(t.value instanceof PolicyConstraints){return h(PolicyConstraintsExtension,{extension:t})}if(t.value instanceof PolicyMappings){return h(PolicyMappingsExtension,{extension:t})}if(typeof t.value==="string"){return h(AsStringExtension,{extension:t})}return h(BasicExtension,{extension:t})}catch(e){console.error("Error render extension:",t.asn.extnID);return null}}))]};
|
|
404
|
+
/**
|
|
405
|
+
* @license
|
|
406
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the MIT license found in the
|
|
409
|
+
* LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/var BasicInformation=function(e){var t=e.serialNumber,i=e.version,a=e.validity,n=e.notBefore,r=e.notAfter,o=e.type;return[h(RowTitle,{value:l10n.getString("basicInformation")}),h(RowValue,{name:l10n.getString("type"),value:o}),h(RowValue,{name:l10n.getString("serialNumber"),value:t,monospace:true}),h(RowValue,{name:l10n.getString("version"),value:i}),h(RowValue,{name:l10n.getString("validity"),value:a}),h(RowValue,{name:l10n.getString("issued"),value:n?dateShort(n):undefined}),h(RowValue,{name:l10n.getString("expired"),value:r?dateShort(r):undefined})]};
|
|
411
|
+
/**
|
|
412
|
+
* @license
|
|
413
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
414
|
+
*
|
|
415
|
+
* This source code is licensed under the MIT license found in the
|
|
416
|
+
* LICENSE file in the root directory of this source tree.
|
|
417
|
+
*/function downloadCertificateAsPem(e){if(e instanceof CSR){Download.pkcs10.asPEM(e.exportAsPemFormatted(),e.commonName)}else{Download.x509.asPEM(e.exportAsPemFormatted(),e.commonName)}}function downloadCertificateAsDer(e){if(e instanceof CSR){Download.pkcs10.asDER(e.exportAsHexFormatted(),e.commonName)}else{Download.x509.asDER(e.exportAsHexFormatted(),e.commonName)}}var Miscellaneous=function(e){var t=e.certificate;return[h(RowTitle,{value:l10n.getString("miscellaneous")}),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,t),actions:[{text:l10n.getString("download.der"),onClick:downloadCertificateAsDer.bind(undefined,t)}]},l10n.getString("download.pem"))))]};
|
|
418
|
+
/**
|
|
419
|
+
* @license
|
|
420
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
421
|
+
*
|
|
422
|
+
* This source code is licensed under the MIT license found in the
|
|
423
|
+
* LICENSE file in the root directory of this source tree.
|
|
424
|
+
*/var getLEILink=function(e){return"https://search.gleif.org/#/record/".concat(e)};var getDNSNameLink=function(e){return"https://search.censys.io/search?resource=hosts&q=dns.names%3A".concat(e)};var getIPAddressLink=function(e){return"https://search.censys.io/search?resource=hosts&q=ip%3A".concat(e)};
|
|
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
|
+
*/var Issuer=function(e){var t=e.issuer;if(!t){return null}return[h(RowTitle,{value:l10n.getString("issuer")}),t.map((function(e){return h(GeneralNamePart,{generalName:e,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}})}))]};
|
|
432
|
+
/**
|
|
433
|
+
* @license
|
|
434
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
435
|
+
*
|
|
436
|
+
* This source code is licensed under the MIT license found in the
|
|
437
|
+
* LICENSE file in the root directory of this source tree.
|
|
438
|
+
*/var Holder=function(e){var t=e.holder;if(!t){return null}var i=t.baseCertificateID,a=t.objectDigestInfo;return[h(RowTitle,{value:l10n.getString("holder")}),i&&[i.issuer.map((function(e){return h(GeneralNamePart,{generalName:e,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}})})),h("tr",null,h("td",null),h("td",null)),h(RowValue,{name:l10n.getString("serialNumber"),value:build.Convert.ToHex(i.serial),monospace:true}),h("tr",null,h("td",null),h("td",null))],a&&[h(RowValue,{name:l10n.getString("digestInfo"),value:""}),h(RowValue,{name:l10n.getString("algorithm"),value:getStringByOID(a.digestAlgorithm.algorithm)}),h(RowValue,{name:l10n.getString("value"),value:build.Convert.ToHex(a.objectDigest),monospace:true}),h(RowValue,{name:l10n.getString("type"),value:a.digestedObjectType})]]};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}";var AttributeCertificateViewer=function(){function e(e){var t=this;registerInstance(this,e);this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(e){var i;return(i=t.authKeyIdParentLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var i;return(i=t.authKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getSubjectKeyIdChildrenLink=function(e){var i;return(i=t.subjectKeyIdChildrenLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var i;return(i=t.subjectKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)}}e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate)};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:this.isDecodeInProcess=true;i.label=1;case 1:i.trys.push([1,4,,5]);if(e instanceof X509AttributeCertificate){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new X509AttributeCertificate(e)}else{return[2]}this.certificateDecoded.parseExtensions();this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:i.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:i.sent();return[3,5];case 4:t=i.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof X509AttributeCertificate&&t instanceof X509AttributeCertificate){if(e.serialNumber!==t.serialNumber){this.decodeCertificate(e)}}};e.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this attribute certificate."))};e.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no attribute certificate available."))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}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})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}();AttributeCertificateViewer.style=certificateViewerCss$2;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}';var Button=function(){function e(e){var t=this;registerInstance(this,e);this.fill="stroke";this.handleClick=function(e){if(t.disabled){e.preventDefault();e.stopPropagation();return}if(t.onClick){t.onClick(e)}}}e.prototype.render=function(){var e=!!this.href;var t=e?"a":"button";return h(t,{class:{button:true,button_stroke:this.fill==="stroke",button_fill:this.fill==="fill",button_disabled:this.disabled},disabled:this.disabled,type:!e&&"button",href:e&&this.href,target:e&&this.target?this.target:null,rel:e&&"noreferrer noopener",onClick:this.handleClick,part:"base"},h("span",{part:"label",class:"button_label"},h("slot",null)))};return e}();Button.style=buttonCss;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}';var ButtonSplit=function(){function e(e){var t=this;registerInstance(this,e);this.fill="stroke";this.actions=[];this.open=false;this.onClickSplitButton=function(e){e.stopPropagation();t.open=!t.open}}e.prototype.onClickActiveButton=function(e,t){this.open=false;e(t)};e.prototype.renderActiveSplitState=function(){var e=this;if(!this.open){return null}return h("div",{class:"button_split_container"},this.actions.map((function(t){return h("peculiar-button",{fill:"fill",class:"button_split_action",onClick:e.onClickActiveButton.bind(e,t.onClick)},t.text)})))};e.prototype.render=function(){return h("div",{class:{button_split:true}},h("peculiar-button",{fill:this.fill,onClick:this.onClick},h("slot",null)),h("peculiar-button",{fill:this.fill,onClick:this.onClickSplitButton,class:{button_split_with_icon:true,m_open:this.open}},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())};return e}();ButtonSplit.style=buttonSplitCss;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}";var CertificateDecoder=function(){function e(e){var t=this;registerInstance(this,e);this.onClickDecode=function(){var e=t.inputPaste.value;if(e){t.decode(e)}};this.onClickExample=function(){t.decode(t.certificateExample)};this.onClickClear=function(){t.clearValue()};this.onChangeInputFile=function(e){return __awaiter(t,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:t=e.target;if(!t.files)return[3,2];return[4,readAsBinaryString(t.files[0])];case 1:i=a.sent();if(typeof i.value==="string"){this.decode(i.value)}t.value="";a.label=2;case 2:return[2]}}))}))};this.onDropFile=function(e){return __awaiter(t,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();e.preventDefault();t=e.dataTransfer;if(!t.files)return[3,2];return[4,readAsBinaryString(t.files[0])];case 1:i=a.sent();if(typeof i.value==="string"){this.decode(i.value)}a.label=2;case 2:return[2]}}))}))}}e.prototype.componentDidLoad=function(){var e=this;var t=history.parseHash(window.location.search);if(t.cert){setTimeout((function(){return e.decode(t.cert)}),100)}};e.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;history.replace({search:""})};e.prototype.setValue=function(e){this.certificateDecoded=e;this.inputPaste.value=e.exportAsPemFormatted();history.replace({search:history.queryStringify({cert:e.exportAsBase64()})})};e.prototype.decode=function(e){var t=isPem(e);var i=isX509Pem(e);var a=isPkcs10Pem(e);var n=isX509AttributePem(e);var r;var o;if(t&&!(i||n||a)){this.clearValue();alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.");return}try{if(i){r=new X509Certificate(e)}if(n){r=new X509AttributeCertificate(e)}if(a){r=new CSR(e)}}catch(e){o=e}if(!r){try{r=new X509Certificate(e)}catch(e){o=e}}if(!r){try{r=new X509AttributeCertificate(e)}catch(e){o=e}}if(!r){try{r=new CSR(e)}catch(e){o=e}}if(!r){this.clearValue();console.log(o);alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest.")}else{this.setValue(r)}};e.prototype.render=function(){var e=this;return h(Host,null,h("textarea",{placeholder:"Certificate DER or PEM",class:"textarea",ref:function(t){e.inputPaste=t},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}))};return e}();CertificateDecoder.style=certificateDecoderCss;
|
|
439
|
+
/**
|
|
440
|
+
* @license
|
|
441
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
442
|
+
*
|
|
443
|
+
* This source code is licensed under the MIT license found in the
|
|
444
|
+
* LICENSE file in the root directory of this source tree.
|
|
445
|
+
*/function getPublicKeyModulus(e){var t;if((t=e.params)===null||t===void 0?void 0:t["modulus"]){var i=e.params["modulus"].byteLength;if(i%2){i-=1}return i*8}return null}function getPublicKeyExponent(e){var t;if((t=e.params)===null||t===void 0?void 0:t["publicExponent"]){return e.params["publicExponent"].byteLength===3?65537:3}return null}var PublicKey=function(e){var t;var i=e.publicKey;if(!i){return null}return[h(RowTitle,{value:l10n.getString("publicKeyInfo")}),h(RowValue,{name:l10n.getString("algorithm"),value:getStringByOID(i.algorithm)}),h(RowValue,{name:l10n.getString("namedCurve"),value:getStringByOID((t=i.params)===null||t===void 0?void 0:t["namedCurve"])}),h(RowValue,{name:l10n.getString("exponent"),value:getPublicKeyExponent(i)}),h(RowValue,{name:l10n.getString("modulus"),value:getPublicKeyModulus(i)}),h(RowValue,{name:l10n.getString("value"),value:build.Convert.ToHex(i.value),monospace:true,collapse:true})]};
|
|
446
|
+
/**
|
|
447
|
+
* @license
|
|
448
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
449
|
+
*
|
|
450
|
+
* This source code is licensed under the MIT license found in the
|
|
451
|
+
* LICENSE file in the root directory of this source tree.
|
|
452
|
+
*/var SubjectName=function(e){var t=e.name;return[h(RowTitle,{value:l10n.getString("subjectName")}),t.map((function(e){return h(RowValue,{name:e.name||e.type,value:e.value})}))]};
|
|
453
|
+
/**
|
|
454
|
+
* @license
|
|
455
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
456
|
+
*
|
|
457
|
+
* This source code is licensed under the MIT license found in the
|
|
458
|
+
* LICENSE file in the root directory of this source tree.
|
|
459
|
+
*/var IssuerName=function(e){var t=e.name,i=e.issuerDnLink;var a=l10n.getString("issuerName");return[h(RowTitle,{value:i?h("peculiar-link",{href:i,type:"h6"},a):a}),t.map((function(e){return h(RowValue,{name:e.name||e.type,value:e.value})}))]};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}";var CertificateViewer=function(){function e(e){var t=this;registerInstance(this,e);this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(e){var i;return(i=t.authKeyIdParentLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var i;return(i=t.authKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getSubjectKeyIdChildrenLink=function(e){var i;return(i=t.subjectKeyIdChildrenLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var i;return(i=t.subjectKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)}}e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate)};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:this.isDecodeInProcess=true;i.label=1;case 1:i.trys.push([1,4,,5]);if(e instanceof X509Certificate){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new X509Certificate(e)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:i.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:i.sent();return[3,5];case 4:t=i.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof X509Certificate&&t instanceof X509Certificate){if(e.serialNumber!==t.serialNumber){this.decodeCertificate(e)}}};e.prototype.getIssuerDnLink=function(){return this.issuerDnLink};e.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))};e.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}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})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}();CertificateViewer.style=certificateViewerCss$1;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}";var CsrViewer=function(){function e(e){var t=this;registerInstance(this,e);this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(e){return e};this.getAuthKeyIdSiblingsLink=function(e){return e};this.getSubjectKeyIdChildrenLink=function(e){var i;return(i=t.subjectKeyIdChildrenLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var i;return(i=t.subjectKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)}}e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate)};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:this.isDecodeInProcess=true;i.label=1;case 1:i.trys.push([1,4,,5]);if(e instanceof CSR){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new CSR(e)}else{return[2]}this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:i.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:i.sent();return[3,5];case 4:t=i.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof CSR&&t instanceof CSR){if(e.commonName!==t.commonName){this.decodeCertificate(e)}}};e.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate request."))};e.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate request available."))};e.prototype.getExtensionRequestAttribute=function(){if(!this.certificateDecoded){return undefined}return this.certificateDecoded.attributes.find((function(e){return e.asn.type==="1.2.840.113549.1.9.14"}))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}var e=this.getExtensionRequestAttribute();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:e===null||e===void 0?void 0:e.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})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}();CsrViewer.style=certificateViewerCss;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}';var Link=function(){function e(e){registerInstance(this,e);this.type="b3"}e.prototype.render=function(){var e;return h("a",{href:this.href,target:"_blank",rel:"noreferrer noopener",class:(e={link:true},e["link_type_".concat(this.type||"b3")]=true,e)},h("slot",null))};return e}();Link.style=linkCss;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)}";var TextHider=function(){function e(e){registerInstance(this,e);this.textExpand=createEvent(this,"textExpand",7);this.opened=false}e.prototype.textExpandHandler=function(){this.opened=!this.opened};e.prototype.render=function(){return h(Host,null,h("div",{class:"root"},h("div",{class:{text:true,m_opened:this.opened}},h("slot",null)),h("div",{class:"action"},h("peculiar-button",{onClick:this.textExpand.emit,class:{button_action:true,m_opened:this.opened},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"}))))))};return e}();TextHider.style=textHiderCss;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}';var PeculiarTypography=function(){function e(e){registerInstance(this,e);this.type="b3";this.color="dark"}e.prototype.render=function(){var e;var t=this.type&&this.type.includes("h")?this.type:"p";return h(t,{class:(e={typography:true},e["typography_type_".concat(this.type||"b3")]=true,e["typography_color_".concat(this.color||"dark")]=true,e["typography_align_".concat(this.align)]=!!this.align,e.typography_ellipsis=this.ellipsis,e.typography_monospace=this.monospace,e)},h("slot",null))};return e}();PeculiarTypography.style=typographyCss;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};
|