@peculiar/certificates-viewer 2.0.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/_commonjsHelpers-cb1f949a.js +23 -0
- package/dist/cjs/{download-cd98aa01.js → certification_request-96951e7b.js} +2880 -3313
- package/dist/cjs/{dom-760f300f.js → dom-f57e260e.js} +4 -1
- package/dist/cjs/download-5e7d5455.js +438 -0
- package/dist/cjs/{index-2973f90a.js → index-064e95c7.js} +287 -634
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/{l10n-e971a5ac.js → l10n-2e7def18.js} +72 -90
- package/dist/cjs/loader.cjs.js +12 -3
- package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +1426 -1391
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +66 -62
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +222 -217
- package/dist/cjs/peculiar.cjs.js +70 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +220 -205
- package/dist/collection/components/attribute-certificate-viewer/holder.js +27 -24
- package/dist/collection/components/attribute-certificate-viewer/issuer.js +11 -8
- package/dist/collection/components/button/button.css +2 -7
- package/dist/collection/components/button/button.js +125 -122
- package/dist/collection/components/button-split/button-split.js +103 -100
- package/dist/collection/components/certificate-decoder/certificate-decoder.css +1 -3
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +158 -155
- package/dist/collection/components/certificate-summary/certificate-summary.js +75 -72
- package/dist/collection/components/certificate-viewer/attributes/activity_description_attribute.js +11 -8
- package/dist/collection/components/certificate-viewer/attributes/as_string_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/basic_attribute.js +11 -8
- package/dist/collection/components/certificate-viewer/attributes/challenge_password_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/index.js +45 -42
- package/dist/collection/components/certificate-viewer/attributes/insurance_value_attribute.js +7 -4
- package/dist/collection/components/certificate-viewer/attributes/name_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/name_part.js +8 -5
- package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +5 -2
- package/dist/collection/components/certificate-viewer/attributes/unstructured_name_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/valuation_ranking_attribute.js +18 -15
- package/dist/collection/components/certificate-viewer/attributes/web_gdpr_attribute.js +13 -10
- package/dist/collection/components/certificate-viewer/basic_information.js +13 -10
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +255 -240
- package/dist/collection/components/certificate-viewer/extensions/archive_rev_info_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/as_string_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/attribute_value.js +4 -1
- package/dist/collection/components/certificate-viewer/extensions/authority_key_identifier_extension.js +18 -15
- package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +12 -9
- package/dist/collection/components/certificate-viewer/extensions/biometric_syntax_extension.js +12 -9
- package/dist/collection/components/certificate-viewer/extensions/ca_version_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/certificate_policies_extension.js +28 -25
- package/dist/collection/components/certificate-viewer/extensions/certificate_template_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/certificate_transparency_extension.js +13 -10
- package/dist/collection/components/certificate-viewer/extensions/crl_distribution_points_extension.js +11 -8
- package/dist/collection/components/certificate-viewer/extensions/crl_reason_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/enroll_cert_type_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/entrust_version_info_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/extended_key_usage_extension.js +5 -2
- package/dist/collection/components/certificate-viewer/extensions/general_name_part.js +55 -52
- package/dist/collection/components/certificate-viewer/extensions/index.js +112 -109
- package/dist/collection/components/certificate-viewer/extensions/info_access_syntax_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/key_usage_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/lei_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/lei_role_extennsion.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/logotype_extension.js +49 -46
- package/dist/collection/components/certificate-viewer/extensions/name_constraints_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/netscape_cert_type_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/netscape_comment_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/policy_constraints_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/policy_mappings_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/private_key_usage_period_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/qc_statements_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/subject_alternative_name_extension.js +5 -2
- package/dist/collection/components/certificate-viewer/extensions/subject_directory_attributes_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/subject_key_identifier_extension.js +18 -15
- package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/tn_auth_list_extension.js +10 -7
- package/dist/collection/components/certificate-viewer/get_string_by_oid.js +8 -5
- package/dist/collection/components/certificate-viewer/issuer_name.js +9 -6
- package/dist/collection/components/certificate-viewer/miscellaneous.js +29 -26
- package/dist/collection/components/certificate-viewer/public_key.js +31 -28
- package/dist/collection/components/certificate-viewer/row.js +35 -32
- package/dist/collection/components/certificate-viewer/signature.js +12 -9
- package/dist/collection/components/certificate-viewer/subject_name.js +8 -5
- package/dist/collection/components/certificate-viewer/thumbprints.js +15 -12
- package/dist/collection/components/certificates-viewer/certificates-viewer.css +1 -19
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +384 -381
- package/dist/collection/components/circular-progress/circular-progress.css +2 -24
- package/dist/collection/components/circular-progress/circular-progress.js +73 -70
- package/dist/collection/components/csr-viewer/csr-viewer.js +197 -188
- package/dist/collection/components/highlight-words/highlight-words.js +56 -53
- package/dist/collection/components/link/link.css +1 -3
- package/dist/collection/components/link/link.js +60 -57
- package/dist/collection/components/text-hider/text-hider.js +75 -72
- package/dist/collection/components/typography/typography.css +1 -3
- package/dist/collection/components/typography/typography.js +126 -123
- package/dist/collection/constants/logs.js +79 -76
- package/dist/collection/constants/oids.js +2301 -2298
- package/dist/collection/crypto/asn_data.js +33 -32
- package/dist/collection/crypto/attribute.js +52 -49
- package/dist/collection/crypto/csr.js +64 -61
- package/dist/collection/crypto/extension.js +126 -123
- package/dist/collection/crypto/index.js +3 -0
- package/dist/collection/crypto/name.js +33 -32
- package/dist/collection/crypto/provider.js +28 -25
- package/dist/collection/crypto/utils.js +24 -21
- package/dist/collection/crypto/x509_attribute_certificate.js +61 -58
- package/dist/collection/crypto/x509_certificate.js +107 -104
- package/dist/collection/index.js +5 -1
- package/dist/collection/utils/date_formatter.js +19 -16
- package/dist/collection/utils/download.js +18 -15
- package/dist/collection/utils/download_from_buffer.js +30 -25
- package/dist/collection/utils/history.js +5 -2
- package/dist/collection/utils/index.js +3 -0
- package/dist/collection/utils/is_link.js +4 -1
- package/dist/collection/utils/l10n.js +28 -25
- package/dist/collection/utils/parse_hash.js +16 -13
- package/dist/collection/utils/query_stringify.js +12 -9
- package/dist/collection/utils/read_file.js +43 -40
- package/dist/collection/utils/third_party_links.js +3 -0
- package/dist/collection/utils/validator.js +15 -12
- package/dist/esm/_commonjsHelpers-bfbd2ad8.js +20 -0
- package/dist/esm/{download-1ff0a3be.js → certification_request-48e8b956.js} +2898 -3328
- package/dist/esm/{dom-91ed8d21.js → dom-f1b08a97.js} +4 -1
- package/dist/esm/download-cf68ac2c.js +434 -0
- package/dist/esm/{index-5ef692cc.js → index-bbd484d9.js} +278 -624
- package/dist/esm/index.js +5 -0
- package/dist/esm/{l10n-c8cf6930.js → l10n-ead9928b.js} +71 -86
- package/dist/esm/{loader.mjs → loader.js} +11 -2
- package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +1425 -1390
- package/dist/esm/peculiar-certificate-summary_3.entry.js +66 -62
- package/dist/esm/peculiar-certificates-viewer.entry.js +222 -217
- package/dist/esm/peculiar.js +73 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/index.js +2 -2
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -1
- package/dist/peculiar/index.esm.js +4 -0
- package/dist/peculiar/p-452d69af.entry.js +113 -0
- package/dist/peculiar/p-886e9c53.js +87 -0
- package/dist/peculiar/p-9ae6b1f8.entry.js +4 -0
- package/dist/peculiar/{p-3d1015c2.js → p-9f4ee110.js} +5 -2
- package/dist/peculiar/p-c774ec0b.js +18 -0
- package/dist/peculiar/p-d09b762f.js +33 -0
- package/dist/peculiar/p-d0b55fbb.js +4 -0
- package/dist/peculiar/p-e5f99586.entry.js +4 -0
- package/dist/peculiar/p-f7683ba5.js +5 -0
- package/dist/peculiar/peculiar.esm.js +4 -1
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +56 -56
- package/dist/types/components/attribute-certificate-viewer/holder.d.ts +1 -1
- package/dist/types/components/attribute-certificate-viewer/issuer.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +17 -17
- package/dist/types/components/button-split/button-split.d.ts +10 -10
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +16 -16
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -4
- package/dist/types/components/certificate-viewer/attributes/activity_description_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/as_string_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/basic_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/challenge_password_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/index.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/insurance_value_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/name_part.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/type_relationship_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/unstructured_name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/valuation_ranking_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/web_gdpr_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/basic_information.d.ts +6 -6
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +66 -66
- package/dist/types/components/certificate-viewer/extensions/archive_rev_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/as_string_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/authority_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/basic_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/basic_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/biometric_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/ca_version_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_policies_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_template_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_transparency_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/crl_distribution_points_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/crl_reason_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/enroll_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/entrust_version_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/extended_key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/general_name_part.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/index.d.ts +2 -2
- package/dist/types/components/certificate-viewer/extensions/info_access_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/lei_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/lei_role_extennsion.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/logotype_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/name_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/netscape_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/netscape_comment_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/policy_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/policy_mappings_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/private_key_usage_period_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/qc_statements_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_alternative_name_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_directory_attributes_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/timestamp_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/tn_auth_list_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/issuer_name.d.ts +2 -2
- package/dist/types/components/certificate-viewer/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-viewer/public_key.d.ts +1 -1
- package/dist/types/components/certificate-viewer/row.d.ts +7 -7
- package/dist/types/components/certificate-viewer/signature.d.ts +1 -1
- package/dist/types/components/certificate-viewer/subject_name.d.ts +1 -1
- package/dist/types/components/certificate-viewer/thumbprints.d.ts +1 -1
- package/dist/types/components/certificate-viewer/types.d.ts +26 -0
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +64 -64
- package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +45 -45
- package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
- package/dist/types/components/link/link.d.ts +6 -6
- package/dist/types/components/text-hider/text-hider.d.ts +4 -4
- package/dist/types/components/typography/typography.d.ts +18 -18
- package/dist/types/components.d.ts +11 -3
- package/dist/types/constants/logs.d.ts +76 -76
- package/dist/types/constants/oids.d.ts +2293 -2293
- package/dist/types/crypto/asn_data.d.ts +6 -6
- package/dist/types/crypto/attribute.d.ts +3 -3
- package/dist/types/crypto/csr.d.ts +19 -19
- package/dist/types/crypto/extension.d.ts +3 -3
- package/dist/types/crypto/name.d.ts +7 -7
- package/dist/types/crypto/provider.d.ts +15 -15
- package/dist/types/crypto/x509_attribute_certificate.d.ts +22 -22
- package/dist/types/crypto/x509_certificate.d.ts +28 -28
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interface.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +230 -217
- package/dist/types/utils/download.d.ts +8 -8
- package/dist/types/utils/download_from_buffer.d.ts +3 -3
- package/dist/types/utils/l10n.d.ts +43 -43
- package/dist/types/utils/read_file.d.ts +7 -7
- package/loader/cdn.js +3 -1
- package/loader/index.cjs.js +3 -1
- package/loader/index.d.ts +0 -1
- package/loader/index.es2017.js +5 -0
- package/loader/{index.mjs → index.js} +4 -2
- package/loader/package.json +4 -5
- package/package.json +14 -15
- package/dist/cjs/css-shim-1b988199.js +0 -6
- package/dist/cjs/patch-15ea31af.js +0 -112
- package/dist/cjs/shadow-css-376763e9.js +0 -385
- package/dist/esm/css-shim-5ce2b5c4.js +0 -4
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/patch-f8a17185.js +0 -109
- package/dist/esm/peculiar.mjs +0 -6
- package/dist/esm/shadow-css-95922619.js +0 -383
- package/dist/esm-es5/css-shim-5ce2b5c4.js +0 -122
- package/dist/esm-es5/dom-91ed8d21.js +0 -468
- package/dist/esm-es5/download-1ff0a3be.js +0 -12692
- package/dist/esm-es5/index-5ef692cc.js +0 -1839
- package/dist/esm-es5/index.mjs +0 -0
- package/dist/esm-es5/l10n-c8cf6930.js +0 -758
- package/dist/esm-es5/loader.mjs +0 -10
- package/dist/esm-es5/patch-f8a17185.js +0 -106
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_9.entry.js +0 -2168
- package/dist/esm-es5/peculiar-certificate-summary_3.entry.js +0 -83
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +0 -290
- package/dist/esm-es5/peculiar.mjs +0 -5
- package/dist/esm-es5/shadow-css-95922619.js +0 -408
- package/dist/index.mjs +0 -1
- package/dist/peculiar/p-0ad0b6e8.js +0 -1
- package/dist/peculiar/p-198d9121.js +0 -1
- package/dist/peculiar/p-294c4ef9.entry.js +0 -1
- package/dist/peculiar/p-3d339152.system.entry.js +0 -1
- package/dist/peculiar/p-4b7cd42f.js +0 -12
- package/dist/peculiar/p-50ea2036.system.js +0 -1
- package/dist/peculiar/p-557d912f.system.js +0 -1
- package/dist/peculiar/p-75076c56.system.js +0 -21
- package/dist/peculiar/p-84e8326d.entry.js +0 -110
- package/dist/peculiar/p-94f96303.system.js +0 -100
- package/dist/peculiar/p-983b5210.system.entry.js +0 -1
- package/dist/peculiar/p-9f815f76.system.js +0 -1
- package/dist/peculiar/p-aa0a9b36.system.js +0 -1
- package/dist/peculiar/p-bd1f9066.system.js +0 -36
- package/dist/peculiar/p-bd949790.js +0 -1
- package/dist/peculiar/p-cf1841f8.js +0 -30
- package/dist/peculiar/p-dbdd61e7.entry.js +0 -1
- package/dist/peculiar/p-dc6b70b2.js +0 -100
- package/dist/peculiar/p-fb53799e.system.js +0 -1
- package/dist/peculiar/p-fc92385a.system.entry.js +0 -457
- package/dist/peculiar/p-fdad110e.system.js +0 -13
- package/dist/peculiar/peculiar.js +0 -132
- package/dist/peculiar.js +0 -30
- package/loader/index.es2017.mjs +0 -3
- package/loader/node-main.js +0 -3
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,7 +12,7 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { RowValue } from '../row';
|
|
10
13
|
import { BasicExtension } from './basic_extension';
|
|
11
14
|
export const KeyUsageExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const { extension } = props;
|
|
16
|
+
return (h(BasicExtension, { extension: extension },
|
|
17
|
+
h(RowValue, { name: "Usage", value: extension.value.toJSON().join(', ') })));
|
|
15
18
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,7 +12,7 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { RowValue } from '../row';
|
|
10
13
|
import { BasicExtension } from './basic_extension';
|
|
11
14
|
export const LeiExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const { extension, getLEILink } = props;
|
|
16
|
+
return (h(BasicExtension, { extension: extension },
|
|
17
|
+
h(RowValue, { name: "Identifier", value: extension.value.text, href: getLEILink(extension.value.text) })));
|
|
15
18
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,7 +12,7 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { RowValue } from '../row';
|
|
10
13
|
import { BasicExtension } from './basic_extension';
|
|
11
14
|
export const LeiRoleExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const { extension } = props;
|
|
16
|
+
return (h(BasicExtension, { extension: extension },
|
|
17
|
+
h(RowValue, { name: "Role", value: extension.value.text })));
|
|
15
18
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -11,50 +14,50 @@ import { RowValue } from '../row';
|
|
|
11
14
|
import { getStringByOID } from '../get_string_by_oid';
|
|
12
15
|
import { BasicExtension } from './basic_extension';
|
|
13
16
|
export const LogotypeExtension = (props) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
17
|
+
const { extension } = props;
|
|
18
|
+
const renderImage = (image) => {
|
|
19
|
+
if (!image) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return image.map((img) => {
|
|
23
|
+
const { imageDetails } = img;
|
|
24
|
+
return [
|
|
25
|
+
h(RowValue, { name: "Image Type", value: imageDetails.mediaType }),
|
|
26
|
+
h(RowValue, { name: "Image Hash", value: Convert.ToHex(imageDetails.logotypeHash[0].hashValue), monospace: true }),
|
|
27
|
+
h(RowValue, { name: "Image URL", value: imageDetails.logotypeURI[0], monospace: true, collapse: true }),
|
|
28
|
+
h(RowValue, { name: "Image Hash Algorithm", value: getStringByOID(imageDetails.logotypeHash[0].hashAlg.algorithm) }),
|
|
29
|
+
];
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const renderAudio = (audio) => {
|
|
33
|
+
if (!audio) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return audio.map((aud) => {
|
|
37
|
+
const { audioDetails } = aud;
|
|
38
|
+
return [
|
|
39
|
+
h(RowValue, { name: "Audio Type", value: audioDetails.mediaType }),
|
|
40
|
+
h(RowValue, { name: "Audio Hash", value: Convert.ToHex(audioDetails.logotypeHash[0].hashValue), monospace: true }),
|
|
41
|
+
h(RowValue, { name: "Audio URL", value: audioDetails.logotypeURI[0], monospace: true, collapse: true }),
|
|
42
|
+
h(RowValue, { name: "Audio Hash Algorithm", value: getStringByOID(audioDetails.logotypeHash[0].hashAlg.algorithm) }),
|
|
43
|
+
];
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const renderLogo = (title, info) => {
|
|
47
|
+
if (!info || !info.direct) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
const { image, audio } = info.direct;
|
|
51
|
+
return [
|
|
52
|
+
h(RowValue, { name: "Type", value: title }),
|
|
53
|
+
renderImage(image),
|
|
54
|
+
renderAudio(audio),
|
|
55
|
+
h("tr", null,
|
|
56
|
+
h("td", null),
|
|
57
|
+
h("td", null)),
|
|
58
|
+
];
|
|
59
|
+
};
|
|
60
|
+
return (h(BasicExtension, { extension: extension },
|
|
61
|
+
renderLogo('Subject', extension.value.subjectLogo),
|
|
62
|
+
renderLogo('Issuer', extension.value.issuerLogo)));
|
|
60
63
|
};
|
package/dist/collection/components/certificate-viewer/extensions/name_constraints_extension.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,9 +12,9 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { BasicExtension } from './basic_extension';
|
|
10
13
|
import { GeneralNamePart } from './general_name_part';
|
|
11
14
|
export const NameConstraintsExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const { extension } = props;
|
|
17
|
+
return (h(BasicExtension, { extension: extension }, (_a = extension.value.excludedSubtrees) === null || _a === void 0 ? void 0 :
|
|
18
|
+
_a.map((generalSubtree) => (h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props)))), (_b = extension.value.permittedSubtrees) === null || _b === void 0 ? void 0 :
|
|
19
|
+
_b.map((generalSubtree) => (h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props))))));
|
|
17
20
|
};
|
package/dist/collection/components/certificate-viewer/extensions/netscape_cert_type_extension.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,7 +12,7 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { RowValue } from '../row';
|
|
10
13
|
import { BasicExtension } from './basic_extension';
|
|
11
14
|
export const NetscapeCertTypeExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const { extension } = props;
|
|
16
|
+
return (h(BasicExtension, { extension: extension },
|
|
17
|
+
h(RowValue, { name: "Type", value: extension.value.toJSON().join(', ') })));
|
|
15
18
|
};
|
package/dist/collection/components/certificate-viewer/extensions/netscape_comment_extension.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,7 +12,7 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { RowValue } from '../row';
|
|
10
13
|
import { BasicExtension } from './basic_extension';
|
|
11
14
|
export const NetscapeCommentExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const { extension } = props;
|
|
16
|
+
return (h(BasicExtension, { extension: extension },
|
|
17
|
+
h(RowValue, { name: "Comment", value: extension.value.value })));
|
|
15
18
|
};
|
package/dist/collection/components/certificate-viewer/extensions/policy_constraints_extension.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -10,8 +13,8 @@ import { AsnIntegerArrayBufferConverter } from '@peculiar/asn1-schema';
|
|
|
10
13
|
import { RowValue } from '../row';
|
|
11
14
|
import { BasicExtension } from './basic_extension';
|
|
12
15
|
export const PolicyConstraintsExtension = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const { extension } = props;
|
|
17
|
+
return (h(BasicExtension, { extension: extension },
|
|
18
|
+
extension.value.requireExplicitPolicy && (h(RowValue, { name: "Require Explicit Policy", value: AsnIntegerArrayBufferConverter.toASN(extension.value.requireExplicitPolicy).valueBlock.toString() })),
|
|
19
|
+
extension.value.inhibitPolicyMapping && (h(RowValue, { name: "Inhibit Policy Mapping", value: AsnIntegerArrayBufferConverter.toASN(extension.value.inhibitPolicyMapping).valueBlock.toString() }))));
|
|
17
20
|
};
|
package/dist/collection/components/certificate-viewer/extensions/policy_mappings_extension.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -10,10 +13,10 @@ import { RowValue } from '../row';
|
|
|
10
13
|
import { getStringByOID } from '../get_string_by_oid';
|
|
11
14
|
import { BasicExtension } from './basic_extension';
|
|
12
15
|
export const PolicyMappingsExtension = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const { extension } = props;
|
|
17
|
+
return (h(BasicExtension, { extension: extension }, extension.value.map((policy, arrayIndex) => ([
|
|
18
|
+
h(RowValue, { name: `Policy #${arrayIndex + 1}`, value: "" }),
|
|
19
|
+
h(RowValue, { name: "Issuer Domain", value: getStringByOID(policy.issuerDomainPolicy) }),
|
|
20
|
+
h(RowValue, { name: "Subject Domain", value: getStringByOID(policy.subjectDomainPolicy) }),
|
|
21
|
+
]))));
|
|
19
22
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -10,8 +13,8 @@ import { RowValue } from '../row';
|
|
|
10
13
|
import { dateShort } from '../../../utils';
|
|
11
14
|
import { BasicExtension } from './basic_extension';
|
|
12
15
|
export const PrivateKeyUsagePeriodExtension = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const { extension } = props;
|
|
17
|
+
return (h(BasicExtension, { extension: extension },
|
|
18
|
+
h(RowValue, { name: "Not Before", value: dateShort(extension.value.notBefore) }),
|
|
19
|
+
h(RowValue, { name: "Not After", value: dateShort(extension.value.notAfter) })));
|
|
17
20
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -11,10 +14,10 @@ import { RowValue } from '../row';
|
|
|
11
14
|
import { getStringByOID } from '../get_string_by_oid';
|
|
12
15
|
import { BasicExtension } from './basic_extension';
|
|
13
16
|
export const QCStatementsExtension = (props) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const { extension } = props;
|
|
18
|
+
return (h(BasicExtension, { extension: extension }, extension.value.map((statement, arrayIndex) => ([
|
|
19
|
+
h(RowValue, { name: `Statement #${arrayIndex + 1}`, value: "" }),
|
|
20
|
+
h(RowValue, { name: "ID", value: getStringByOID(statement.statementId) }),
|
|
21
|
+
h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ? Convert.ToHex(statement.statementInfo) : null, monospace: true }),
|
|
22
|
+
]))));
|
|
20
23
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,6 +12,6 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { BasicExtension } from './basic_extension';
|
|
10
13
|
import { GeneralNamePart } from './general_name_part';
|
|
11
14
|
export const SubjectAlternativeNameExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
const { extension } = props;
|
|
16
|
+
return (h(BasicExtension, { extension: extension }, extension.value.map((gn) => (h(GeneralNamePart, Object.assign({ generalName: gn }, props))))));
|
|
14
17
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -11,10 +14,10 @@ import { getStringByOID } from '../get_string_by_oid';
|
|
|
11
14
|
import { BasicExtension } from './basic_extension';
|
|
12
15
|
import { getAttributeValue } from './attribute_value';
|
|
13
16
|
export const SubjectDirectoryAttributesExtension = (props) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const { extension } = props;
|
|
18
|
+
return (h(BasicExtension, { extension: extension }, extension.value.map((attribute, arrayIndex) => ([
|
|
19
|
+
h(RowValue, { name: `Attribute #${arrayIndex + 1}`, value: "" }),
|
|
20
|
+
h(RowValue, { name: "Type", value: getStringByOID(attribute.type) }),
|
|
21
|
+
h(RowValue, { name: "Value", value: getAttributeValue(attribute) }),
|
|
22
|
+
]))));
|
|
20
23
|
};
|
package/dist/collection/components/certificate-viewer/extensions/subject_key_identifier_extension.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -10,19 +13,19 @@ import { Convert } from 'pvtsutils';
|
|
|
10
13
|
import { RowValue } from '../row';
|
|
11
14
|
import { BasicExtension } from './basic_extension';
|
|
12
15
|
export const SubjectKeyIdentifierExtension = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const { extension, getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink } = props;
|
|
17
|
+
const keyId = Convert.ToHex(extension.value.buffer);
|
|
18
|
+
const childrenLink = getSubjectKeyIdChildrenLink(keyId);
|
|
19
|
+
const siblingsLink = getSubjectKeyIdSiblingsLink(keyId);
|
|
20
|
+
return (h(BasicExtension, { extension: extension },
|
|
21
|
+
h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
|
|
22
|
+
childrenLink && (h("span", null,
|
|
23
|
+
"\u00A0[",
|
|
24
|
+
h("peculiar-link", { href: childrenLink }, "children"),
|
|
25
|
+
"]")),
|
|
26
|
+
siblingsLink && (h("span", null,
|
|
27
|
+
"\u00A0[",
|
|
28
|
+
h("peculiar-link", { href: siblingsLink }, "siblings"),
|
|
29
|
+
"]")),
|
|
30
|
+
] })));
|
|
28
31
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -10,9 +13,9 @@ import { RowValue } from '../row';
|
|
|
10
13
|
import { BasicExtension } from './basic_extension';
|
|
11
14
|
import { GeneralNamePart } from './general_name_part';
|
|
12
15
|
export const TimestampExtension = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const { extension } = props;
|
|
17
|
+
return (h(BasicExtension, { extension: extension },
|
|
18
|
+
h(RowValue, { name: "Version", value: extension.value.version }),
|
|
19
|
+
h(GeneralNamePart, Object.assign({ generalName: extension.value.location }, props)),
|
|
20
|
+
h(RowValue, { name: "Requires Auth", value: extension.value.requiresAuth ? 'YES' : 'NO' })));
|
|
18
21
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,11 +12,11 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { RowValue } from '../row';
|
|
10
13
|
import { BasicExtension } from './basic_extension';
|
|
11
14
|
export const TNAuthListExtension = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const { extension } = props;
|
|
16
|
+
return (h(BasicExtension, { extension: extension }, extension.value.map((entry, arrayIndex) => ([
|
|
17
|
+
h(RowValue, { name: `Entry #${arrayIndex + 1}`, value: "" }),
|
|
18
|
+
h(RowValue, { name: "SPC", value: entry.spc }),
|
|
19
|
+
h(RowValue, { name: "Range", value: entry.range ? `start=${entry.range.start} count==${entry.range.count}` : null }),
|
|
20
|
+
h(RowValue, { name: "One", value: entry.one }),
|
|
21
|
+
]))));
|
|
19
22
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -7,9 +10,9 @@
|
|
|
7
10
|
*/
|
|
8
11
|
import { OIDs } from '../../constants/oids';
|
|
9
12
|
export function getStringByOID(value) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const oid = OIDs[value];
|
|
14
|
+
if (oid) {
|
|
15
|
+
return `${oid} (${value})`;
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
15
18
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,10 +12,10 @@ import { h } from '@stencil/core';
|
|
|
9
12
|
import { l10n } from '../../utils';
|
|
10
13
|
import { RowTitle, RowValue } from './row';
|
|
11
14
|
export const IssuerName = (props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const { name, issuerDnLink } = props;
|
|
16
|
+
const title = l10n.getString('issuerName');
|
|
17
|
+
return [
|
|
18
|
+
h(RowTitle, { value: issuerDnLink ? (h("peculiar-link", { href: issuerDnLink, type: "h6" }, title)) : title }),
|
|
19
|
+
name.map((n) => (h(RowValue, { name: n.name || n.type, value: n.value }))),
|
|
20
|
+
];
|
|
18
21
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -11,34 +14,34 @@ import { l10n } from '../../utils';
|
|
|
11
14
|
import { Download } from '../../utils/download';
|
|
12
15
|
import { RowTitle } from './row';
|
|
13
16
|
function downloadCertificateAsPem(certificate) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
if (certificate instanceof CSR) {
|
|
18
|
+
Download.pkcs10.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
Download.x509.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
|
|
22
|
+
}
|
|
20
23
|
}
|
|
21
24
|
function downloadCertificateAsDer(certificate) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
if (certificate instanceof CSR) {
|
|
26
|
+
Download.pkcs10.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
Download.x509.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
|
|
30
|
+
}
|
|
28
31
|
}
|
|
29
32
|
export const Miscellaneous = (props) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
const { certificate } = props;
|
|
34
|
+
return [
|
|
35
|
+
h(RowTitle, { value: l10n.getString('miscellaneous') }),
|
|
36
|
+
h("tr", null,
|
|
37
|
+
h("td", { class: "vertical_align_middle" },
|
|
38
|
+
h("peculiar-typography", { color: "grey_5" },
|
|
39
|
+
l10n.getString('download'),
|
|
40
|
+
":")),
|
|
41
|
+
h("td", null,
|
|
42
|
+
h("peculiar-button-split", { onClick: downloadCertificateAsPem.bind(this, certificate), actions: [{
|
|
43
|
+
text: l10n.getString('download.der'),
|
|
44
|
+
onClick: downloadCertificateAsDer.bind(this, certificate),
|
|
45
|
+
}] }, l10n.getString('download.pem')))),
|
|
46
|
+
];
|
|
44
47
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @license
|
|
3
6
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -11,37 +14,37 @@ import { l10n } from '../../utils';
|
|
|
11
14
|
import { getStringByOID } from './get_string_by_oid';
|
|
12
15
|
import { RowTitle, RowValue } from './row';
|
|
13
16
|
function getPublicKeyModulus(publicKey) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
return length * 8;
|
|
17
|
+
var _a;
|
|
18
|
+
if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['modulus']) {
|
|
19
|
+
let length = publicKey.params['modulus'].byteLength;
|
|
20
|
+
if (length % 2) {
|
|
21
|
+
length -= 1;
|
|
21
22
|
}
|
|
22
|
-
return
|
|
23
|
+
return length * 8;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
23
26
|
}
|
|
24
27
|
function getPublicKeyExponent(publicKey) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
var _a;
|
|
29
|
+
if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['publicExponent']) {
|
|
30
|
+
return publicKey.params['publicExponent'].byteLength === 3
|
|
31
|
+
? 65537
|
|
32
|
+
: 3;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
32
35
|
}
|
|
33
36
|
export const PublicKey = (props) => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
var _a;
|
|
38
|
+
const { publicKey } = props;
|
|
39
|
+
if (!publicKey) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return [
|
|
43
|
+
h(RowTitle, { value: l10n.getString('publicKeyInfo') }),
|
|
44
|
+
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(publicKey.algorithm) }),
|
|
45
|
+
h(RowValue, { name: l10n.getString('namedCurve'), value: getStringByOID((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['namedCurve']) }),
|
|
46
|
+
h(RowValue, { name: l10n.getString('exponent'), value: getPublicKeyExponent(publicKey) }),
|
|
47
|
+
h(RowValue, { name: l10n.getString('modulus'), value: getPublicKeyModulus(publicKey) }),
|
|
48
|
+
h(RowValue, { name: l10n.getString('value'), value: Convert.ToHex(publicKey.value), monospace: true, collapse: true }),
|
|
49
|
+
];
|
|
47
50
|
};
|