@peculiar/certificates-viewer 4.1.0 → 4.2.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/components/actions.js +3 -3
- package/components/actions.js.map +1 -1
- package/components/arrow_top.js +6 -6
- package/components/arrow_top.js.map +1 -1
- package/components/attribute-certificate-viewer.js +222 -220
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/button-menu.js +36 -35
- package/components/button-menu.js.map +1 -1
- package/components/button.js +42 -42
- package/components/button.js.map +1 -1
- package/components/certificate-viewer.js +250 -249
- package/components/certificate-viewer.js.map +1 -1
- package/components/circular-progress.js +34 -33
- package/components/circular-progress.js.map +1 -1
- package/components/crl-viewer.js +214 -213
- package/components/crl-viewer.js.map +1 -1
- package/components/cross.js +9 -9
- package/components/cross.js.map +1 -1
- package/components/csr-viewer.js +200 -202
- package/components/csr-viewer.js.map +1 -1
- package/components/download.js +56 -56
- package/components/download.js.map +1 -1
- package/components/highlight-words.js +45 -44
- package/components/highlight-words.js.map +1 -1
- package/components/index2.js +146 -156
- package/components/index2.js.map +1 -1
- package/components/issuer_name.js +6 -6
- package/components/issuer_name.js.map +1 -1
- package/components/miscellaneous.js +4049 -4037
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-attribute-certificate-viewer.d.ts +2 -2
- package/components/peculiar-button-menu.d.ts +2 -2
- package/components/peculiar-certificate-decoder.d.ts +2 -2
- package/components/peculiar-certificate-decoder.js +183 -182
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificate-viewer.d.ts +2 -2
- package/components/peculiar-certificates-viewer.d.ts +2 -2
- package/components/peculiar-certificates-viewer.js +297 -296
- package/components/peculiar-certificates-viewer.js.map +1 -1
- package/components/peculiar-circular-progress.d.ts +2 -2
- package/components/peculiar-crl-viewer.d.ts +2 -2
- package/components/peculiar-csr-viewer.d.ts +2 -2
- package/components/peculiar-highlight-words.d.ts +2 -2
- package/components/peculiar-text-hider.d.ts +2 -2
- package/components/peculiar-text-hider.js +23 -22
- package/components/peculiar-text-hider.js.map +1 -1
- package/components/subject_name.js +35 -35
- package/components/subject_name.js.map +1 -1
- package/dist/cjs/actions-789906f5.js +23 -0
- package/dist/cjs/{actions-19013d4a.js.map → actions-789906f5.js.map} +1 -1
- package/dist/cjs/app-globals-c20ffa41.js +10 -0
- package/dist/cjs/app-globals-c20ffa41.js.map +1 -0
- package/dist/cjs/arrow_top-76e4261e.js +37 -0
- package/dist/cjs/{arrow_top-834fb7ec.js.map → arrow_top-76e4261e.js.map} +1 -1
- package/dist/cjs/button-87086210.js +77 -0
- package/dist/cjs/{button-14e2b73f.js.map → button-87086210.js.map} +1 -1
- package/dist/cjs/{certification_request-bf416170.js → certification_request-b0d72620.js} +3326 -3331
- package/dist/cjs/certification_request-b0d72620.js.map +1 -0
- package/dist/cjs/crl-812dd7a1.js +312 -0
- package/dist/cjs/crl-812dd7a1.js.map +1 -0
- package/dist/cjs/cross-bd099933.js +51 -0
- package/dist/cjs/{cross-9872c473.js.map → cross-bd099933.js.map} +1 -1
- package/dist/cjs/{download-0fa5b33c.js → download-6f550549.js} +50 -50
- package/dist/cjs/download-6f550549.js.map +1 -0
- package/dist/cjs/download-820d66ba.js +23 -0
- package/dist/cjs/{download-254ddc57.js.map → download-820d66ba.js.map} +1 -1
- package/dist/cjs/{index-efd561e9.js → index-e2ae280a.js} +398 -145
- package/dist/cjs/index-e2ae280a.js.map +1 -0
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/link-a3d3799d.js +25 -0
- package/dist/cjs/{link-6aea0be4.js.map → link-a3d3799d.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +4 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/miscellaneous-dcb93a5b.js +1419 -0
- package/dist/cjs/miscellaneous-dcb93a5b.js.map +1 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +481 -480
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +72 -69
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +151 -150
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +107 -106
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +258 -257
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-text-hider.cjs.entry.js +12 -11
- package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar.cjs.js +5 -3
- package/dist/cjs/peculiar.cjs.js.map +1 -1
- package/dist/cjs/x509_certificate-ebf4cbd4.js +160 -0
- package/dist/cjs/x509_certificate-ebf4cbd4.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +259 -259
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -1
- package/dist/collection/components/button/button.js +9 -9
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/button-menu/button-menu.js +60 -60
- package/dist/collection/components/button-menu/button-menu.js.map +1 -1
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +211 -211
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +4 -3
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +6 -6
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/index.js +42 -42
- package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +3 -3
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +14 -14
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +4 -3
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/basic_information.js +12 -12
- package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +8 -8
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +7 -7
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +3 -3
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js +19 -0
- package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +23 -23
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +8 -8
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +52 -52
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/index.js +123 -118
- package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +4 -4
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js +58 -58
- package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +42 -42
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +29 -29
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +8 -8
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +6 -8
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/holder.js +19 -21
- package/dist/collection/components/certificate-details-parts/holder.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/issuer.js +8 -8
- package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -6
- package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/miscellaneous.js +6 -6
- package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/public_key.js +29 -29
- package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js +30 -30
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/row.js +26 -26
- package/dist/collection/components/certificate-details-parts/row.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/signature.js +13 -13
- package/dist/collection/components/certificate-details-parts/signature.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/subject_name.js +5 -5
- package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/thumbprints.js +12 -12
- package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -1
- package/dist/collection/components/certificate-summary/certificate-summary.js +3 -3
- package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -1
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +278 -278
- package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -1
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +374 -374
- package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
- package/dist/collection/components/circular-progress/circular-progress.js +67 -67
- package/dist/collection/components/circular-progress/circular-progress.js.map +1 -1
- package/dist/collection/components/crl-viewer/crl-viewer.js +229 -229
- package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
- package/dist/collection/components/csr-viewer/csr-viewer.js +211 -219
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
- package/dist/collection/components/highlight-words/highlight-words.js +60 -60
- package/dist/collection/components/highlight-words/highlight-words.js.map +1 -1
- package/dist/collection/components/icons/actions.js +2 -2
- package/dist/collection/components/icons/actions.js.map +1 -1
- package/dist/collection/components/icons/arrow_bottom.js +2 -2
- package/dist/collection/components/icons/arrow_bottom.js.map +1 -1
- package/dist/collection/components/icons/arrow_top.js +2 -2
- package/dist/collection/components/icons/arrow_top.js.map +1 -1
- package/dist/collection/components/icons/cross.js +2 -2
- package/dist/collection/components/icons/cross.js.map +1 -1
- package/dist/collection/components/icons/details.js +2 -2
- package/dist/collection/components/icons/details.js.map +1 -1
- package/dist/collection/components/icons/download.js +2 -2
- package/dist/collection/components/icons/download.js.map +1 -1
- package/dist/collection/components/icons/link.js +2 -2
- package/dist/collection/components/icons/link.js.map +1 -1
- package/dist/collection/components/link/link.js +4 -4
- package/dist/collection/components/link/link.js.map +1 -1
- package/dist/collection/components/text-hider/text-hider.js +23 -23
- package/dist/collection/components/text-hider/text-hider.js.map +1 -1
- package/dist/collection/components/typography/typography.js +32 -32
- package/dist/collection/components/typography/typography.js.map +1 -1
- package/dist/collection/constants/logs.js +77 -76
- package/dist/collection/constants/logs.js.map +1 -1
- package/dist/collection/constants/oids.js +2334 -2314
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/asn_data.js +31 -31
- package/dist/collection/crypto/asn_data.js.map +1 -1
- package/dist/collection/crypto/attribute.js +35 -51
- package/dist/collection/crypto/attribute.js.map +1 -1
- package/dist/collection/crypto/crl.js +66 -66
- package/dist/collection/crypto/crl.js.map +1 -1
- package/dist/collection/crypto/csr.js +76 -69
- package/dist/collection/crypto/csr.js.map +1 -1
- package/dist/collection/crypto/extension.js +64 -135
- package/dist/collection/crypto/extension.js.map +1 -1
- package/dist/collection/crypto/extensions/cabforganization_identifier.js +54 -0
- package/dist/collection/crypto/extensions/cabforganization_identifier.js.map +1 -0
- package/dist/collection/crypto/extensions/index.js +5 -0
- package/dist/collection/crypto/extensions/index.js.map +1 -0
- package/dist/collection/crypto/name.js +31 -31
- package/dist/collection/crypto/name.js.map +1 -1
- package/dist/collection/crypto/provider.js +26 -26
- package/dist/collection/crypto/provider.js.map +1 -1
- package/dist/collection/crypto/utils.js +23 -23
- package/dist/collection/crypto/utils.js.map +1 -1
- package/dist/collection/crypto/x509_attribute_certificate.js +66 -66
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
- package/dist/collection/crypto/x509_certificate.js +139 -139
- package/dist/collection/crypto/x509_certificate.js.map +1 -1
- package/dist/collection/utils/camel_case_to_words.js +2 -2
- package/dist/collection/utils/camel_case_to_words.js.map +1 -1
- package/dist/collection/utils/date_formatter.js +6 -6
- package/dist/collection/utils/date_formatter.js.map +1 -1
- package/dist/collection/utils/download.js +24 -24
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/collection/utils/download_from_buffer.js +25 -25
- package/dist/collection/utils/download_from_buffer.js.map +1 -1
- package/dist/collection/utils/get_string_by_oid.js +5 -5
- package/dist/collection/utils/get_string_by_oid.js.map +1 -1
- package/dist/collection/utils/is_link.js +1 -1
- package/dist/collection/utils/is_link.js.map +1 -1
- package/dist/collection/utils/l10n.js +25 -25
- package/dist/collection/utils/l10n.js.map +1 -1
- package/dist/collection/utils/read_file.js +40 -40
- package/dist/collection/utils/read_file.js.map +1 -1
- package/dist/collection/utils/validator.js +13 -13
- package/dist/collection/utils/validator.js.map +1 -1
- package/dist/esm/actions-aebcbc9d.js +21 -0
- package/dist/esm/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +1 -1
- package/dist/esm/app-globals-5e9b67e0.js +8 -0
- package/dist/esm/app-globals-5e9b67e0.js.map +1 -0
- package/dist/esm/arrow_top-aee1ee02.js +34 -0
- package/dist/esm/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +1 -1
- package/dist/esm/button-a2fabf9a.js +74 -0
- package/dist/esm/{button-35146bdd.js.map → button-a2fabf9a.js.map} +1 -1
- package/dist/esm/{certification_request-c9dc8e9c.js → certification_request-2c054ece.js} +3325 -3331
- package/dist/esm/certification_request-2c054ece.js.map +1 -0
- package/dist/esm/crl-a7318483.js +308 -0
- package/dist/esm/crl-a7318483.js.map +1 -0
- package/dist/esm/cross-1377606f.js +47 -0
- package/dist/esm/{cross-9ec9a759.js.map → cross-1377606f.js.map} +1 -1
- package/dist/esm/download-14dc1047.js +21 -0
- package/dist/esm/{download-0cc3077a.js.map → download-14dc1047.js.map} +1 -1
- package/dist/esm/{download-aacb6eff.js → download-8c128e2e.js} +50 -50
- package/dist/esm/download-8c128e2e.js.map +1 -0
- package/dist/esm/{index-4079bbb5.js → index-ae188432.js} +398 -145
- package/dist/esm/index-ae188432.js.map +1 -0
- package/dist/esm/index.js +8 -8
- package/dist/esm/link-7e4e9060.js +23 -0
- package/dist/esm/{link-ad24c3be.js.map → link-7e4e9060.js.map} +1 -1
- package/dist/esm/loader.js +5 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/miscellaneous-0e98b5bc.js +1401 -0
- package/dist/esm/miscellaneous-0e98b5bc.js.map +1 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +481 -480
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm/peculiar-button-menu_3.entry.js +72 -69
- package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-decoder.entry.js +151 -150
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +107 -106
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +258 -257
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-text-hider.entry.js +12 -11
- package/dist/esm/peculiar-text-hider.entry.js.map +1 -1
- package/dist/esm/peculiar.js +6 -4
- package/dist/esm/peculiar.js.map +1 -1
- package/dist/esm/x509_certificate-ad568d3a.js +158 -0
- package/dist/esm/x509_certificate-ad568d3a.js.map +1 -0
- package/dist/esm-es5/{actions-8d745b2a.js → actions-aebcbc9d.js} +2 -2
- package/dist/esm-es5/app-globals-5e9b67e0.js +5 -0
- package/dist/esm-es5/app-globals-5e9b67e0.js.map +1 -0
- package/dist/esm-es5/{arrow_top-fc298828.js → arrow_top-aee1ee02.js} +2 -2
- package/dist/esm-es5/button-a2fabf9a.js +19 -0
- package/dist/esm-es5/certification_request-2c054ece.js +97 -0
- package/dist/esm-es5/certification_request-2c054ece.js.map +1 -0
- package/dist/esm-es5/crl-a7318483.js +33 -0
- package/dist/esm-es5/crl-a7318483.js.map +1 -0
- package/dist/esm-es5/{cross-9ec9a759.js → cross-1377606f.js} +2 -2
- package/dist/esm-es5/{download-0cc3077a.js → download-14dc1047.js} +2 -2
- package/dist/esm-es5/{download-aacb6eff.js → download-8c128e2e.js} +3 -3
- package/dist/esm-es5/{download-aacb6eff.js.map → download-8c128e2e.js.map} +1 -1
- package/dist/esm-es5/index-ae188432.js +6 -0
- package/dist/esm-es5/index-ae188432.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{link-ad24c3be.js → link-7e4e9060.js} +3 -3
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/miscellaneous-0e98b5bc.js +369 -0
- package/dist/esm-es5/miscellaneous-0e98b5bc.js.map +1 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +17 -17
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
- package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +3 -3
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
- package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -1
- package/dist/esm-es5/peculiar.js +2 -2
- package/dist/esm-es5/peculiar.js.map +1 -1
- package/dist/esm-es5/x509_certificate-ad568d3a.js +12 -0
- package/dist/esm-es5/{x509_certificate-8cf268d1.js.map → x509_certificate-ad568d3a.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/{p-5e49b881.system.entry.js → p-00302a20.system.entry.js} +3 -3
- package/dist/peculiar/p-00302a20.system.entry.js.map +1 -0
- package/dist/peculiar/p-0dbc8238.system.js +13 -0
- package/dist/peculiar/{p-cfca7dae.system.js.map → p-0dbc8238.system.js.map} +1 -1
- package/dist/peculiar/{p-1ef997ee.js → p-1302bd67.js} +11 -11
- package/dist/peculiar/p-1302bd67.js.map +1 -0
- package/dist/peculiar/{p-59e5ac12.js → p-1f766dd5.js} +1 -1
- package/dist/peculiar/p-243244af.system.js +13 -0
- package/dist/peculiar/{p-0fc2e2b4.js → p-27ca6743.js} +2 -2
- package/dist/peculiar/p-3cb79cd9.js +6 -0
- package/dist/peculiar/p-3cb79cd9.js.map +1 -0
- package/dist/peculiar/{p-72f53d81.js → p-3d44cbd2.js} +3 -3
- package/dist/peculiar/p-3f9af5f5.system.js +97 -0
- package/dist/peculiar/p-3f9af5f5.system.js.map +1 -0
- package/dist/peculiar/{p-0bd7c6bc.system.entry.js → p-496449cf.system.entry.js} +10 -10
- package/dist/peculiar/p-496449cf.system.entry.js.map +1 -0
- package/dist/peculiar/p-4bc5ddbe.js +19 -0
- package/dist/peculiar/{p-025b3cfb.entry.js → p-54b37ef9.entry.js} +2 -2
- package/dist/peculiar/p-54b37ef9.entry.js.map +1 -0
- package/dist/peculiar/p-5a662d6f.system.js +13 -0
- package/dist/peculiar/{p-e5b18cd1.entry.js → p-5c6f9a14.entry.js} +3 -3
- package/dist/peculiar/p-5c6f9a14.entry.js.map +1 -0
- package/dist/peculiar/p-5cf4562f.system.entry.js +111 -0
- package/dist/peculiar/p-5cf4562f.system.entry.js.map +1 -0
- package/dist/peculiar/{p-2f48fe70.entry.js → p-5f3b0fc7.entry.js} +3 -3
- package/dist/peculiar/p-5f3b0fc7.entry.js.map +1 -0
- package/dist/peculiar/{p-24050d82.system.entry.js → p-6680f277.system.entry.js} +10 -10
- package/dist/peculiar/p-6680f277.system.entry.js.map +1 -0
- package/dist/peculiar/p-713563fb.entry.js +5 -0
- package/dist/peculiar/p-713563fb.entry.js.map +1 -0
- package/dist/peculiar/{p-ca02a823.js → p-75166532.js} +60 -53
- package/dist/peculiar/p-75166532.js.map +1 -0
- package/dist/peculiar/p-821bdcdc.system.js +6 -0
- package/dist/peculiar/p-821bdcdc.system.js.map +1 -0
- package/dist/peculiar/p-8393399a.system.js +5 -0
- package/dist/peculiar/p-8393399a.system.js.map +1 -0
- package/dist/peculiar/p-8bbee8f4.system.js +13 -0
- package/dist/peculiar/p-924790f5.js +33 -0
- package/dist/peculiar/p-924790f5.js.map +1 -0
- package/dist/peculiar/p-9712b827.system.js +20 -0
- package/dist/peculiar/{p-2fcad8cb.system.js.map → p-9712b827.system.js.map} +1 -1
- package/dist/peculiar/{p-370cee20.js → p-99efefea.js} +2 -2
- package/dist/peculiar/{p-1ceb0fe3.js → p-a9487007.js} +2 -2
- package/dist/peculiar/{p-17e3c47b.js → p-ae91d778.js} +2 -2
- package/dist/peculiar/p-afbd1c8e.entry.js +5 -0
- package/dist/peculiar/p-afbd1c8e.entry.js.map +1 -0
- package/dist/peculiar/p-b2890eb8.system.js +5 -0
- package/dist/peculiar/p-b5389885.system.entry.js +5 -0
- package/dist/peculiar/p-b5389885.system.entry.js.map +1 -0
- package/dist/peculiar/p-c156b495.system.js +33 -0
- package/dist/peculiar/p-c156b495.system.js.map +1 -0
- package/dist/peculiar/p-c23fd001.entry.js +110 -0
- package/dist/peculiar/p-c23fd001.entry.js.map +1 -0
- package/dist/peculiar/p-c241e4ba.system.js +20 -0
- package/dist/peculiar/{p-c99507d4.system.js.map → p-c241e4ba.system.js.map} +1 -1
- package/dist/peculiar/p-c2995a63.system.js +5 -0
- package/dist/peculiar/p-c2995a63.system.js.map +1 -0
- package/dist/peculiar/p-dac867e8.js +5 -0
- package/dist/peculiar/p-dac867e8.js.map +1 -0
- package/dist/peculiar/p-dde511c8.system.js +43 -0
- package/dist/{cjs/download-0fa5b33c.js.map → peculiar/p-dde511c8.system.js.map} +1 -1
- package/dist/peculiar/p-e4ad4f13.system.entry.js +5 -0
- package/dist/peculiar/p-e4ad4f13.system.entry.js.map +1 -0
- package/dist/peculiar/p-e6a6e602.js +12 -0
- package/dist/peculiar/p-eea904d7.system.js +27 -0
- package/dist/peculiar/{p-ddae2f8e.system.js.map → p-eea904d7.system.js.map} +1 -1
- package/dist/peculiar/p-ff3ced3c.system.js +369 -0
- package/dist/peculiar/p-ff3ced3c.system.js.map +1 -0
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/peculiar/peculiar.esm.js.map +1 -1
- package/dist/peculiar/peculiar.js +15 -15
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +68 -68
- package/dist/types/components/button/button.d.ts +4 -4
- package/dist/types/components/button-menu/button-menu.d.ts +7 -7
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +31 -31
- package/dist/types/components/certificate-details-parts/attributes/activity_description_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/as_string_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/basic_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/challenge_password_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/index.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/insurance_value_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/name_part.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/type_relationship_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/unstructured_name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/valuation_ranking_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/web_gdpr_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/basic_information.d.ts +8 -8
- package/dist/types/components/certificate-details-parts/extensions/archive_rev_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/as_string_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/authority_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/basic_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/basic_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/biometric_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/ca_version_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/cabforganization_identifier_extension.d.ts +15 -0
- package/dist/types/components/certificate-details-parts/extensions/certificate_policies_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/certificate_template_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/certificate_transparency_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/crl_distribution_points_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/crl_number_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/crl_reason_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/enroll_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/entrust_version_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/extended_key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/general_name_part.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/index.d.ts +2 -2
- package/dist/types/components/certificate-details-parts/extensions/info_access_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/issuing_distribution_point_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/key_description_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/lei_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/lei_role_extennsion.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/logotype_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/name_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/netscape_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/netscape_comment_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/policy_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/policy_mappings_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/private_key_usage_period_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/qc_statements_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/subject_alternative_name_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/subject_directory_attributes_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/subject_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/timestamp_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/tn_auth_list_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/holder.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/issuer.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/issuer_name.d.ts +2 -2
- package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/public_key.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/revoked_certificates.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/row.d.ts +7 -7
- package/dist/types/components/certificate-details-parts/signature.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/subject_name.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/thumbprints.d.ts +1 -1
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +2 -2
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +74 -74
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +75 -75
- package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +56 -56
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +52 -53
- package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
- package/dist/types/components/icons/actions.d.ts +1 -1
- package/dist/types/components/icons/arrow_bottom.d.ts +1 -1
- package/dist/types/components/icons/arrow_top.d.ts +1 -1
- package/dist/types/components/icons/cross.d.ts +1 -1
- package/dist/types/components/icons/details.d.ts +1 -1
- package/dist/types/components/icons/download.d.ts +1 -1
- package/dist/types/components/icons/link.d.ts +1 -1
- package/dist/types/components/link/link.d.ts +2 -2
- package/dist/types/components/text-hider/text-hider.d.ts +2 -2
- package/dist/types/components/typography/typography.d.ts +4 -4
- package/dist/types/components.d.ts +24 -0
- package/dist/types/constants/logs.d.ts +77 -76
- package/dist/types/constants/oids.d.ts +2326 -2307
- package/dist/types/crypto/asn_data.d.ts +6 -6
- package/dist/types/crypto/attribute.d.ts +21 -6
- package/dist/types/crypto/crl.d.ts +23 -23
- package/dist/types/crypto/csr.d.ts +23 -21
- package/dist/types/crypto/extension.d.ts +52 -5
- package/dist/types/crypto/extensions/cabforganization_identifier.d.ts +23 -0
- package/dist/types/crypto/extensions/index.d.ts +1 -0
- 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 +24 -24
- package/dist/types/crypto/x509_certificate.d.ts +33 -33
- package/dist/types/stencil-public-runtime.d.ts +29 -0
- package/dist/types/utils/download.d.ts +16 -16
- package/dist/types/utils/l10n.d.ts +56 -56
- package/dist/types/utils/read_file.d.ts +7 -7
- package/hydrate/index.d.ts +2 -2
- package/hydrate/index.js +12072 -10170
- package/package.json +21 -13
- package/dist/cjs/actions-19013d4a.js +0 -23
- package/dist/cjs/arrow_top-834fb7ec.js +0 -37
- package/dist/cjs/button-14e2b73f.js +0 -77
- package/dist/cjs/certification_request-bf416170.js.map +0 -1
- package/dist/cjs/crl-d9591b95.js +0 -322
- package/dist/cjs/crl-d9591b95.js.map +0 -1
- package/dist/cjs/cross-9872c473.js +0 -51
- package/dist/cjs/download-254ddc57.js +0 -23
- package/dist/cjs/index-efd561e9.js.map +0 -1
- package/dist/cjs/link-6aea0be4.js +0 -25
- package/dist/cjs/miscellaneous-6e800553.js +0 -1400
- package/dist/cjs/miscellaneous-6e800553.js.map +0 -1
- package/dist/cjs/x509_certificate-53feebd3.js +0 -160
- package/dist/cjs/x509_certificate-53feebd3.js.map +0 -1
- package/dist/esm/actions-8d745b2a.js +0 -21
- package/dist/esm/arrow_top-fc298828.js +0 -34
- package/dist/esm/button-35146bdd.js +0 -74
- package/dist/esm/certification_request-c9dc8e9c.js.map +0 -1
- package/dist/esm/crl-70e85374.js +0 -318
- package/dist/esm/crl-70e85374.js.map +0 -1
- package/dist/esm/cross-9ec9a759.js +0 -47
- package/dist/esm/download-0cc3077a.js +0 -21
- package/dist/esm/download-aacb6eff.js.map +0 -1
- package/dist/esm/index-4079bbb5.js.map +0 -1
- package/dist/esm/link-ad24c3be.js +0 -23
- package/dist/esm/miscellaneous-0763f98e.js +0 -1383
- package/dist/esm/miscellaneous-0763f98e.js.map +0 -1
- package/dist/esm/x509_certificate-8cf268d1.js +0 -158
- package/dist/esm/x509_certificate-8cf268d1.js.map +0 -1
- package/dist/esm-es5/button-35146bdd.js +0 -19
- package/dist/esm-es5/certification_request-c9dc8e9c.js +0 -97
- package/dist/esm-es5/certification_request-c9dc8e9c.js.map +0 -1
- package/dist/esm-es5/crl-70e85374.js +0 -33
- package/dist/esm-es5/crl-70e85374.js.map +0 -1
- package/dist/esm-es5/index-4079bbb5.js +0 -6
- package/dist/esm-es5/index-4079bbb5.js.map +0 -1
- package/dist/esm-es5/miscellaneous-0763f98e.js +0 -362
- package/dist/esm-es5/miscellaneous-0763f98e.js.map +0 -1
- package/dist/esm-es5/x509_certificate-8cf268d1.js +0 -12
- package/dist/peculiar/p-025b3cfb.entry.js.map +0 -1
- package/dist/peculiar/p-0b356bb5.js +0 -6
- package/dist/peculiar/p-0b356bb5.js.map +0 -1
- package/dist/peculiar/p-0bd7c6bc.system.entry.js.map +0 -1
- package/dist/peculiar/p-10d2d400.system.js +0 -34
- package/dist/peculiar/p-10d2d400.system.js.map +0 -1
- package/dist/peculiar/p-14f281b0.system.js +0 -43
- package/dist/peculiar/p-14f281b0.system.js.map +0 -1
- package/dist/peculiar/p-15cb92b5.system.js +0 -97
- package/dist/peculiar/p-15cb92b5.system.js.map +0 -1
- package/dist/peculiar/p-1ef997ee.js.map +0 -1
- package/dist/peculiar/p-24050d82.system.entry.js.map +0 -1
- package/dist/peculiar/p-2f48fe70.entry.js.map +0 -1
- package/dist/peculiar/p-2fcad8cb.system.js +0 -20
- package/dist/peculiar/p-31b60224.system.js +0 -362
- package/dist/peculiar/p-31b60224.system.js.map +0 -1
- package/dist/peculiar/p-33196289.entry.js +0 -5
- package/dist/peculiar/p-33196289.entry.js.map +0 -1
- package/dist/peculiar/p-4ab9673f.system.entry.js +0 -111
- package/dist/peculiar/p-4ab9673f.system.entry.js.map +0 -1
- package/dist/peculiar/p-5151cb6f.system.entry.js +0 -5
- package/dist/peculiar/p-5151cb6f.system.entry.js.map +0 -1
- package/dist/peculiar/p-53784f15.system.entry.js +0 -5
- package/dist/peculiar/p-53784f15.system.entry.js.map +0 -1
- package/dist/peculiar/p-542412ae.js +0 -33
- package/dist/peculiar/p-542412ae.js.map +0 -1
- package/dist/peculiar/p-5aabeba7.system.js +0 -6
- package/dist/peculiar/p-5aabeba7.system.js.map +0 -1
- package/dist/peculiar/p-5ab007e9.entry.js +0 -5
- package/dist/peculiar/p-5ab007e9.entry.js.map +0 -1
- package/dist/peculiar/p-5e49b881.system.entry.js.map +0 -1
- package/dist/peculiar/p-6cb88fd6.system.js +0 -13
- package/dist/peculiar/p-7f9beaa8.js +0 -19
- package/dist/peculiar/p-80832207.system.js +0 -5
- package/dist/peculiar/p-80832207.system.js.map +0 -1
- package/dist/peculiar/p-94a453d7.js +0 -12
- package/dist/peculiar/p-9c91dd68.entry.js +0 -110
- package/dist/peculiar/p-9c91dd68.entry.js.map +0 -1
- package/dist/peculiar/p-a3eeb94b.system.js +0 -5
- package/dist/peculiar/p-b313be9e.system.js +0 -13
- package/dist/peculiar/p-c99507d4.system.js +0 -20
- package/dist/peculiar/p-ca02a823.js.map +0 -1
- package/dist/peculiar/p-cfca7dae.system.js +0 -13
- package/dist/peculiar/p-ddae2f8e.system.js +0 -27
- package/dist/peculiar/p-e5b18cd1.entry.js.map +0 -1
- package/dist/peculiar/p-e6a3b4d4.system.js +0 -13
- /package/dist/esm-es5/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +0 -0
- /package/dist/esm-es5/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +0 -0
- /package/dist/esm-es5/{button-35146bdd.js.map → button-a2fabf9a.js.map} +0 -0
- /package/dist/esm-es5/{cross-9ec9a759.js.map → cross-1377606f.js.map} +0 -0
- /package/dist/esm-es5/{download-0cc3077a.js.map → download-14dc1047.js.map} +0 -0
- /package/dist/esm-es5/{link-ad24c3be.js.map → link-7e4e9060.js.map} +0 -0
- /package/dist/peculiar/{p-59e5ac12.js.map → p-1f766dd5.js.map} +0 -0
- /package/dist/peculiar/{p-6cb88fd6.system.js.map → p-243244af.system.js.map} +0 -0
- /package/dist/peculiar/{p-0fc2e2b4.js.map → p-27ca6743.js.map} +0 -0
- /package/dist/peculiar/{p-72f53d81.js.map → p-3d44cbd2.js.map} +0 -0
- /package/dist/peculiar/{p-7f9beaa8.js.map → p-4bc5ddbe.js.map} +0 -0
- /package/dist/peculiar/{p-b313be9e.system.js.map → p-5a662d6f.system.js.map} +0 -0
- /package/dist/peculiar/{p-e6a3b4d4.system.js.map → p-8bbee8f4.system.js.map} +0 -0
- /package/dist/peculiar/{p-370cee20.js.map → p-99efefea.js.map} +0 -0
- /package/dist/peculiar/{p-1ceb0fe3.js.map → p-a9487007.js.map} +0 -0
- /package/dist/peculiar/{p-17e3c47b.js.map → p-ae91d778.js.map} +0 -0
- /package/dist/peculiar/{p-a3eeb94b.system.js.map → p-b2890eb8.system.js.map} +0 -0
- /package/dist/peculiar/{p-94a453d7.js.map → p-e6a6e602.js.map} +0 -0
|
@@ -9,46 +9,46 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
11
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (kind === "m")
|
|
13
|
+
throw new TypeError("Private method is not writable");
|
|
14
|
+
if (kind === "a" && !f)
|
|
15
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
16
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
17
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
18
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
19
19
|
};
|
|
20
20
|
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
if (kind === "a" && !f)
|
|
22
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
23
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
24
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
25
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
26
26
|
};
|
|
27
27
|
var _AsnData_asn, _AsnData_raw;
|
|
28
28
|
import { AsnConvert } from "@peculiar/asn1-schema";
|
|
29
29
|
import { BufferSourceConverter } from "pvtsutils";
|
|
30
30
|
export class AsnData {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
constructor(...args) {
|
|
32
|
+
_AsnData_asn.set(this, void 0);
|
|
33
|
+
_AsnData_raw.set(this, void 0);
|
|
34
|
+
if (args.length === 1) {
|
|
35
|
+
// asn
|
|
36
|
+
// eslint-disable-next-line prefer-destructuring
|
|
37
|
+
__classPrivateFieldSet(this, _AsnData_asn, args[0], "f");
|
|
38
|
+
__classPrivateFieldSet(this, _AsnData_raw, AsnConvert.serialize(__classPrivateFieldGet(this, _AsnData_asn, "f")), "f");
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// raw, type
|
|
42
|
+
__classPrivateFieldSet(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
|
|
43
|
+
__classPrivateFieldSet(this, _AsnData_raw, BufferSourceConverter.toArrayBuffer(args[0]), "f");
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
get asn() {
|
|
47
|
+
return __classPrivateFieldGet(this, _AsnData_asn, "f");
|
|
48
|
+
}
|
|
49
|
+
get raw() {
|
|
50
|
+
return __classPrivateFieldGet(this, _AsnData_raw, "f");
|
|
44
51
|
}
|
|
45
|
-
}
|
|
46
|
-
get asn() {
|
|
47
|
-
return __classPrivateFieldGet(this, _AsnData_asn, "f");
|
|
48
|
-
}
|
|
49
|
-
get raw() {
|
|
50
|
-
return __classPrivateFieldGet(this, _AsnData_raw, "f");
|
|
51
|
-
}
|
|
52
52
|
}
|
|
53
53
|
_AsnData_asn = new WeakMap(), _AsnData_raw = new WeakMap();
|
|
54
54
|
//# sourceMappingURL=asn_data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asn_data.js","sourceRoot":"","sources":["../../src/crypto/asn_data.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,OAAO,OAAO;
|
|
1
|
+
{"version":3,"file":"asn_data.js","sourceRoot":"","sources":["../../src/crypto/asn_data.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,OAAO,OAAO;IAOlB,YAAmB,GAAG,IAAW;QANjC,+BAAQ;QAER,+BAAkB;QAKhB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM;YACN,gDAAgD;YAChD,uBAAA,IAAI,gBAAQ,IAAI,CAAC,CAAC,CAAC,MAAA,CAAC;YACpB,uBAAA,IAAI,gBAAQ,UAAU,CAAC,SAAS,CAAC,uBAAA,IAAI,oBAAK,CAAC,MAAA,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,YAAY;YACZ,uBAAA,IAAI,gBAAQ,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAA,CAAC;YAC/C,uBAAA,IAAI,gBAAQ,qBAAqB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAA,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,IAAI,GAAG;QACL,OAAO,uBAAA,IAAI,oBAAK,CAAC;IACnB,CAAC;IAED,IAAI,GAAG;QACL,OAAO,uBAAA,IAAI,oBAAK,CAAC;IACnB,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { BufferSourceConverter } from 'pvtsutils';\n\nexport class AsnData<T> {\n #asn: T;\n\n #raw: ArrayBuffer;\n\n public constructor(raw: BufferSource, type: { new(): T; });\n\n public constructor(...args: any[]) {\n if (args.length === 1) {\n // asn\n // eslint-disable-next-line prefer-destructuring\n this.#asn = args[0];\n this.#raw = AsnConvert.serialize(this.#asn);\n } else {\n // raw, type\n this.#asn = AsnConvert.parse(args[0], args[1]);\n this.#raw = BufferSourceConverter.toArrayBuffer(args[0]);\n }\n }\n\n get asn() {\n return this.#asn;\n }\n\n get raw() {\n return this.#raw;\n }\n}\n"]}
|
|
@@ -9,62 +9,46 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
11
|
import { Convert } from "pvtsutils";
|
|
12
|
-
import { AsnParser
|
|
12
|
+
import { AsnParser } from "@peculiar/asn1-schema";
|
|
13
13
|
import { Attribute as AsnAttribute } from "@peculiar/asn1-x509";
|
|
14
14
|
import { id_DomainNameBeneficiary, DomainNameBeneficiary, id_DomainNameLegalRepresentative, DomainNameLegalRepresentative, id_DomainNameOwner, DomainNameOwner, id_DomainNameTechnicalOperator, DomainNameTechnicalOperator, id_TypeRelationship, TypeRelationship, id_ActivityDescription, ActivityDescription, id_WebGDPR, WebGDPR, id_InsuranceValue, InsuranceValue, id_ValuationRanking, ValuationRanking, } from "@peculiar/asn1-ntqwac";
|
|
15
15
|
import { id_pkcs9_at_extensionRequest, ExtensionRequest, id_pkcs9_at_challengePassword, ChallengePassword, id_pkcs9_at_unstructuredName, UnstructuredName, } from "@peculiar/asn1-pkcs9";
|
|
16
|
-
import { Extension } from "./extension";
|
|
17
16
|
import { AsnData } from "./asn_data";
|
|
17
|
+
const attributesParsers = {
|
|
18
|
+
[id_DomainNameBeneficiary]: DomainNameBeneficiary,
|
|
19
|
+
[id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,
|
|
20
|
+
[id_DomainNameOwner]: DomainNameOwner,
|
|
21
|
+
[id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,
|
|
22
|
+
[id_TypeRelationship]: TypeRelationship,
|
|
23
|
+
[id_ActivityDescription]: ActivityDescription,
|
|
24
|
+
[id_WebGDPR]: WebGDPR,
|
|
25
|
+
[id_InsuranceValue]: InsuranceValue,
|
|
26
|
+
[id_ValuationRanking]: ValuationRanking,
|
|
27
|
+
[id_pkcs9_at_challengePassword]: ChallengePassword,
|
|
28
|
+
[id_pkcs9_at_unstructuredName]: UnstructuredName,
|
|
29
|
+
[id_pkcs9_at_extensionRequest]: ExtensionRequest,
|
|
30
|
+
};
|
|
18
31
|
export class Attribute extends AsnData {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.value = AsnParser.parse(asnExtnValue, TypeRelationship);
|
|
40
|
-
break;
|
|
41
|
-
case id_ActivityDescription:
|
|
42
|
-
this.value = AsnParser.parse(asnExtnValue, ActivityDescription);
|
|
43
|
-
break;
|
|
44
|
-
case id_WebGDPR:
|
|
45
|
-
this.value = AsnParser.parse(asnExtnValue, WebGDPR);
|
|
46
|
-
break;
|
|
47
|
-
case id_InsuranceValue:
|
|
48
|
-
this.value = AsnParser.parse(asnExtnValue, InsuranceValue);
|
|
49
|
-
break;
|
|
50
|
-
case id_ValuationRanking:
|
|
51
|
-
this.value = AsnParser.parse(asnExtnValue, ValuationRanking);
|
|
52
|
-
break;
|
|
53
|
-
case id_pkcs9_at_challengePassword:
|
|
54
|
-
this.value = AsnParser.parse(asnExtnValue, ChallengePassword);
|
|
55
|
-
break;
|
|
56
|
-
case id_pkcs9_at_unstructuredName:
|
|
57
|
-
this.value = AsnParser.parse(asnExtnValue, UnstructuredName);
|
|
58
|
-
break;
|
|
59
|
-
case id_pkcs9_at_extensionRequest: {
|
|
60
|
-
const extensionRequest = AsnParser.parse(asnExtnValue, ExtensionRequest);
|
|
61
|
-
this.value = extensionRequest
|
|
62
|
-
.map((e) => new Extension(AsnConvert.serialize(e)));
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
default:
|
|
66
|
-
this.value = Convert.ToHex(asnExtnValue);
|
|
32
|
+
getAsnExtnValue() {
|
|
33
|
+
return this.asn.values[0];
|
|
34
|
+
}
|
|
35
|
+
constructor(raw) {
|
|
36
|
+
super(raw, AsnAttribute);
|
|
37
|
+
const asnExtnValue = this.getAsnExtnValue();
|
|
38
|
+
try {
|
|
39
|
+
const target = attributesParsers[this.asn.type];
|
|
40
|
+
if (target) {
|
|
41
|
+
this.value = AsnParser.parse(asnExtnValue, target);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
console.warn(`Didn't detect parser for "${this.asn.type}" attribute.`);
|
|
45
|
+
this.value = Convert.ToHex(asnExtnValue);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
console.error(`Error parse "${this.asn.type}" attribute:`, error.message);
|
|
50
|
+
this.value = Convert.ToHex(asnExtnValue);
|
|
51
|
+
}
|
|
67
52
|
}
|
|
68
|
-
}
|
|
69
53
|
}
|
|
70
54
|
//# sourceMappingURL=attribute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.js","sourceRoot":"","sources":["../../src/crypto/attribute.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"attribute.js","sourceRoot":"","sources":["../../src/crypto/attribute.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EAErB,gCAAgC,EAChC,6BAA6B,EAE7B,kBAAkB,EAClB,eAAe,EAEf,8BAA8B,EAC9B,2BAA2B,EAE3B,mBAAmB,EACnB,gBAAgB,EAEhB,sBAAsB,EACtB,mBAAmB,EAEnB,UAAU,EACV,OAAO,EAEP,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4BAA4B,EAC5B,gBAAgB,EAEhB,6BAA6B,EAC7B,iBAAiB,EAEjB,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,iBAAiB,GAAG;IACxB,CAAC,wBAAwB,CAAC,EAAE,qBAAqB;IACjD,CAAC,gCAAgC,CAAC,EAAE,6BAA6B;IACjE,CAAC,kBAAkB,CAAC,EAAE,eAAe;IACrC,CAAC,8BAA8B,CAAC,EAAE,2BAA2B;IAC7D,CAAC,mBAAmB,CAAC,EAAE,gBAAgB;IACvC,CAAC,sBAAsB,CAAC,EAAE,mBAAmB;IAC7C,CAAC,UAAU,CAAC,EAAE,OAAO;IACrB,CAAC,iBAAiB,CAAC,EAAE,cAAc;IACnC,CAAC,mBAAmB,CAAC,EAAE,gBAAgB;IACvC,CAAC,6BAA6B,CAAC,EAAE,iBAAiB;IAClD,CAAC,4BAA4B,CAAC,EAAE,gBAAgB;IAChD,CAAC,4BAA4B,CAAC,EAAE,gBAAgB;CACjD,CAAC;AAKF,MAAM,OAAO,SAAqC,SAAQ,OAAqB;IAGrE,eAAe;QACrB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED,YAAY,GAAiB;QAC3B,KAAK,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QAEzB,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAE5C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAEhD,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAI,YAAY,EAAE,MAAM,CAAC,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CAAC,6BAA6B,IAAI,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,CAAC;gBAEvE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAM,CAAC;YAChD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAAC,GAAG,CAAC,IAAI,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YAE1E,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAM,CAAC;QAChD,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\n\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n"]}
|
|
@@ -17,76 +17,76 @@ import { AsnData } from "./asn_data";
|
|
|
17
17
|
import { Name } from "./name";
|
|
18
18
|
import { certificateRawToBuffer, hexFormat, base64Format, getCertificateThumbprint, } from "./utils";
|
|
19
19
|
export class CRL extends AsnData {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
async getThumbprint(algorithm = 'SHA-1') {
|
|
40
|
-
try {
|
|
41
|
-
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
42
|
-
if (thumbprint) {
|
|
43
|
-
this.thumbprints[algorithm] = Convert.ToHex(thumbprint);
|
|
44
|
-
}
|
|
20
|
+
constructor(raw) {
|
|
21
|
+
super(certificateRawToBuffer(raw), CertificateList);
|
|
22
|
+
this.thumbprints = {};
|
|
23
|
+
this.type = 'X.509 Certificate Revocation List';
|
|
24
|
+
const { tbsCertList } = this.asn;
|
|
25
|
+
this.issuer = new Name(tbsCertList.issuer).toJSON();
|
|
26
|
+
this.version = tbsCertList.version + 1;
|
|
27
|
+
this.lastUpdate = tbsCertList.thisUpdate.getTime();
|
|
28
|
+
this.nextUpdate = tbsCertList.nextUpdate.getTime();
|
|
29
|
+
this.revokedCertificates = (tbsCertList.revokedCertificates || [])
|
|
30
|
+
.map((revokedCertificate) => {
|
|
31
|
+
var _a;
|
|
32
|
+
return ({
|
|
33
|
+
revocationDate: revokedCertificate.revocationDate,
|
|
34
|
+
userCertificate: revokedCertificate.userCertificate,
|
|
35
|
+
crlEntryExtensions: (_a = revokedCertificate.crlEntryExtensions) === null || _a === void 0 ? void 0 : _a.map((e) => new Extension(AsnConvert.serialize(e))),
|
|
36
|
+
});
|
|
37
|
+
});
|
|
45
38
|
}
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
async getThumbprint(algorithm = 'SHA-1') {
|
|
40
|
+
try {
|
|
41
|
+
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
42
|
+
if (thumbprint) {
|
|
43
|
+
this.thumbprints[algorithm] = Convert.ToHex(thumbprint);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.error('Error thumbprint get:', error);
|
|
48
|
+
}
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
get commonName() {
|
|
58
|
-
if (!this.issuer) {
|
|
59
|
-
return '';
|
|
50
|
+
get signature() {
|
|
51
|
+
const { signature, signatureAlgorithm } = this.asn;
|
|
52
|
+
return {
|
|
53
|
+
value: signature,
|
|
54
|
+
algorithm: signatureAlgorithm.algorithm,
|
|
55
|
+
};
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
get commonName() {
|
|
58
|
+
if (!this.issuer) {
|
|
59
|
+
return '';
|
|
60
|
+
}
|
|
61
|
+
for (let i = 0; i < this.issuer.length; i += 1) {
|
|
62
|
+
const name = this.issuer[i];
|
|
63
|
+
if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {
|
|
64
|
+
return name.value;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return '';
|
|
66
68
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
parseExtensions() {
|
|
70
|
+
const { tbsCertList } = this.asn;
|
|
71
|
+
if (tbsCertList.crlExtensions) {
|
|
72
|
+
this.extensions = tbsCertList.crlExtensions
|
|
73
|
+
.map((e) => new Extension(AsnConvert.serialize(e)));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exportAsBase64() {
|
|
77
|
+
return Convert.ToBase64(this.raw);
|
|
78
|
+
}
|
|
79
|
+
exportAsHexFormatted() {
|
|
80
|
+
return hexFormat(Convert.ToHex(this.raw));
|
|
81
|
+
}
|
|
82
|
+
exportAsPemFormatted() {
|
|
83
|
+
return `-----BEGIN X509 CRL-----\n${base64Format(this.exportAsBase64())}\n-----END X509 CRL-----`;
|
|
84
|
+
}
|
|
85
|
+
downloadAsPEM(name) {
|
|
86
|
+
Download.crl.asPEM(this.exportAsPemFormatted(), name || this.commonName);
|
|
87
|
+
}
|
|
88
|
+
downloadAsDER(name) {
|
|
89
|
+
Download.crl.asDER(this.exportAsHexFormatted(), name || this.commonName);
|
|
74
90
|
}
|
|
75
|
-
}
|
|
76
|
-
exportAsBase64() {
|
|
77
|
-
return Convert.ToBase64(this.raw);
|
|
78
|
-
}
|
|
79
|
-
exportAsHexFormatted() {
|
|
80
|
-
return hexFormat(Convert.ToHex(this.raw));
|
|
81
|
-
}
|
|
82
|
-
exportAsPemFormatted() {
|
|
83
|
-
return `-----BEGIN X509 CRL-----\n${base64Format(this.exportAsBase64())}\n-----END X509 CRL-----`;
|
|
84
|
-
}
|
|
85
|
-
downloadAsPEM(name) {
|
|
86
|
-
Download.crl.asPEM(this.exportAsPemFormatted(), name || this.commonName);
|
|
87
|
-
}
|
|
88
|
-
downloadAsDER(name) {
|
|
89
|
-
Download.crl.asDER(this.exportAsHexFormatted(), name || this.commonName);
|
|
90
|
-
}
|
|
91
91
|
}
|
|
92
92
|
//# sourceMappingURL=crl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crl.js","sourceRoot":"","sources":["../../src/crypto/crl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAQ,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAajB,MAAM,OAAO,GAAI,SAAQ,OAAwB;
|
|
1
|
+
{"version":3,"file":"crl.js","sourceRoot":"","sources":["../../src/crypto/crl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAQ,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAajB,MAAM,OAAO,GAAI,SAAQ,OAAwB;IAiB/C,YAAY,GAAW;QACrB,KAAK,CAAC,sBA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AC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;IAEM,oBAAoB;QACzB,OAAO,6BAA6B,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,0BAA0B,CAAC;IACpG,CAAC;IAEM,aAAa,CAAC,IAAa;QAChC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB,CAAC;IACJ,CAAC;IAEM,aAAa,CAAC,IAAa;QAChC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class CRL extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'X.509 Certificate Revocation List';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN X509 CRL-----\\n${base64Format(this.exportAsBase64())}\\n-----END X509 CRL-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"]}
|
|
@@ -12,88 +12,95 @@ import { AsnConvert } from "@peculiar/asn1-schema";
|
|
|
12
12
|
import { ECParameters, id_ecPublicKey } from "@peculiar/asn1-ecc";
|
|
13
13
|
import { id_rsaEncryption, RSAPublicKey } from "@peculiar/asn1-rsa";
|
|
14
14
|
import { CertificationRequest } from "@peculiar/asn1-csr";
|
|
15
|
+
import { id_pkcs9_at_extensionRequest, } from "@peculiar/asn1-pkcs9";
|
|
15
16
|
import { Convert } from "pvtsutils";
|
|
16
17
|
import { Download } from "../utils";
|
|
17
18
|
import { AsnData } from "./asn_data";
|
|
18
19
|
import { Name } from "./name";
|
|
19
20
|
import { Attribute } from "./attribute";
|
|
21
|
+
import { Extension } from "./extension";
|
|
20
22
|
import { certificateRawToBuffer, hexFormat, base64Format, getCertificateThumbprint, } from "./utils";
|
|
21
23
|
export class CSR extends AsnData {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
get publicKey() {
|
|
31
|
-
const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;
|
|
32
|
-
let params;
|
|
33
|
-
if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {
|
|
34
|
-
params = AsnConvert.parse(algorithm.parameters, ECParameters);
|
|
24
|
+
constructor(raw) {
|
|
25
|
+
super(certificateRawToBuffer(raw), CertificationRequest);
|
|
26
|
+
this.thumbprints = {};
|
|
27
|
+
this.type = 'PKCS#10 Certificate Request';
|
|
28
|
+
const { certificationRequestInfo } = this.asn;
|
|
29
|
+
this.subject = new Name(certificationRequestInfo.subject).toJSON();
|
|
30
|
+
this.version = certificationRequestInfo.version;
|
|
35
31
|
}
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
get publicKey() {
|
|
33
|
+
const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;
|
|
34
|
+
let params;
|
|
35
|
+
if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {
|
|
36
|
+
params = AsnConvert.parse(algorithm.parameters, ECParameters);
|
|
37
|
+
}
|
|
38
|
+
if (algorithm.algorithm === id_rsaEncryption) {
|
|
39
|
+
params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);
|
|
40
|
+
}
|
|
41
|
+
const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);
|
|
42
|
+
return {
|
|
43
|
+
params,
|
|
44
|
+
value: spki,
|
|
45
|
+
algorithm: algorithm.algorithm,
|
|
46
|
+
};
|
|
38
47
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
get signature() {
|
|
47
|
-
const { signature, signatureAlgorithm } = this.asn;
|
|
48
|
-
return {
|
|
49
|
-
value: signature,
|
|
50
|
-
algorithm: signatureAlgorithm.algorithm,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
get commonName() {
|
|
54
|
-
if (!this.subject) {
|
|
55
|
-
return '';
|
|
48
|
+
get signature() {
|
|
49
|
+
const { signature, signatureAlgorithm } = this.asn;
|
|
50
|
+
return {
|
|
51
|
+
value: signature,
|
|
52
|
+
algorithm: signatureAlgorithm.algorithm,
|
|
53
|
+
};
|
|
56
54
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
get commonName() {
|
|
56
|
+
if (!this.subject) {
|
|
57
|
+
return '';
|
|
58
|
+
}
|
|
59
|
+
for (let i = 0; i < this.subject.length; i += 1) {
|
|
60
|
+
const name = this.subject[i];
|
|
61
|
+
if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {
|
|
62
|
+
return name.value;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return '';
|
|
62
66
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
async getThumbprint(algorithm = 'SHA-1') {
|
|
68
|
+
try {
|
|
69
|
+
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
70
|
+
if (thumbprint) {
|
|
71
|
+
this.thumbprints[algorithm] = Convert.ToHex(thumbprint);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.error('Error thumbprint get:', error);
|
|
76
|
+
}
|
|
71
77
|
}
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
parseAttributes() {
|
|
79
|
+
const { certificationRequestInfo } = this.asn;
|
|
80
|
+
if (certificationRequestInfo.attributes) {
|
|
81
|
+
this.attributes = certificationRequestInfo.attributes
|
|
82
|
+
.map((e) => new Attribute(AsnConvert.serialize(e)));
|
|
83
|
+
const extensionRequestAttribute = this.attributes.find((attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest);
|
|
84
|
+
if (extensionRequestAttribute) {
|
|
85
|
+
this.extensions = extensionRequestAttribute.value
|
|
86
|
+
.map((e) => new Extension(AsnConvert.serialize(e)));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
74
89
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
exportAsBase64() {
|
|
91
|
+
return Convert.ToBase64(this.raw);
|
|
92
|
+
}
|
|
93
|
+
exportAsHexFormatted() {
|
|
94
|
+
return hexFormat(Convert.ToHex(this.raw));
|
|
95
|
+
}
|
|
96
|
+
exportAsPemFormatted() {
|
|
97
|
+
return `-----BEGIN CERTIFICATE REQUEST-----\n${base64Format(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`;
|
|
98
|
+
}
|
|
99
|
+
downloadAsPEM(name) {
|
|
100
|
+
Download.csr.asPEM(this.exportAsPemFormatted(), name || this.commonName);
|
|
101
|
+
}
|
|
102
|
+
downloadAsDER(name) {
|
|
103
|
+
Download.csr.asDER(this.exportAsHexFormatted(), name || this.commonName);
|
|
81
104
|
}
|
|
82
|
-
}
|
|
83
|
-
exportAsBase64() {
|
|
84
|
-
return Convert.ToBase64(this.raw);
|
|
85
|
-
}
|
|
86
|
-
exportAsHexFormatted() {
|
|
87
|
-
return hexFormat(Convert.ToHex(this.raw));
|
|
88
|
-
}
|
|
89
|
-
exportAsPemFormatted() {
|
|
90
|
-
return `-----BEGIN CERTIFICATE REQUEST-----\n${base64Format(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`;
|
|
91
|
-
}
|
|
92
|
-
downloadAsPEM(name) {
|
|
93
|
-
Download.csr.asPEM(this.exportAsPemFormatted(), name || this.commonName);
|
|
94
|
-
}
|
|
95
|
-
downloadAsDER(name) {
|
|
96
|
-
Download.csr.asDER(this.exportAsHexFormatted(), name || this.commonName);
|
|
97
|
-
}
|
|
98
105
|
}
|
|
99
106
|
//# sourceMappingURL=csr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csr.js","sourceRoot":"","sources":["../../src/crypto/csr.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,O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,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;IACH,CAAC;IAEM,cAAc;QACnB,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAEM,oBAAoB;QACzB,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;IAEM,oBAAoB;QACzB,OAAO,wCAAwC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,qCAAqC,CAAC;IAC1H,CAAC;IAEM,aAAa,CAAC,IAAa;QAChC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB,CAAC;IACJ,CAAC;IAEM,aAAa,CAAC,IAAa;QAChC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { Extension, TExtensionValue } from './extension';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class CSR extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public extensions: Extension<TExtensionValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'PKCS#10 Certificate Request';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n\n const extensionRequestAttribute = this.attributes.find(\n (attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest,\n ) as Attribute<ExtensionRequest>;\n\n if (extensionRequestAttribute) {\n this.extensions = extensionRequestAttribute.value\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN CERTIFICATE REQUEST-----\\n${base64Format(this.exportAsBase64())}\\n-----END CERTIFICATE REQUEST-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"]}
|