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