@peculiar/certificates-viewer 4.7.0 → 4.7.1-alpha.4
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/attribute-certificate-viewer.js +4 -2
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/attribute.js +1 -1
- package/components/certificate-viewer.js +3 -2
- package/components/certificate-viewer.js.map +1 -1
- package/components/crl-viewer.js +4 -2
- package/components/crl-viewer.js.map +1 -1
- package/components/csr-viewer.js +1 -1
- package/components/download.js +1674 -45
- package/components/download.js.map +1 -1
- package/components/index2.js +3 -2
- package/components/index2.js.map +1 -1
- package/components/issuer_name.js +1 -1
- package/components/miscellaneous.js +4 -79
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +32 -16
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificates-viewer.js +1 -1
- package/components/peculiar-ssh-certificate-viewer.d.ts +11 -0
- package/components/peculiar-ssh-certificate-viewer.js +12 -0
- package/components/peculiar-ssh-certificate-viewer.js.map +1 -0
- package/components/peculiar-text-hider.js +1 -32
- package/components/peculiar-text-hider.js.map +1 -1
- package/components/pkcs10_certificate_request.js +2 -1
- package/components/pkcs10_certificate_request.js.map +1 -1
- package/components/row.js +87 -0
- package/components/row.js.map +1 -0
- package/components/ssh-certificate-viewer.js +210 -0
- package/components/ssh-certificate-viewer.js.map +1 -0
- package/components/subject_name.js +2 -2
- package/components/text-hider.js +40 -0
- package/components/text-hider.js.map +1 -0
- package/components/utils.js +39 -0
- package/components/utils.js.map +1 -0
- package/dist/cjs/extension-DTtJlxk8.js +110 -0
- package/dist/cjs/{extension-CGZpfI3W.js.map → extension-DTtJlxk8.js.map} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{miscellaneous-D_RAtkZz.js → miscellaneous-DCeacaAw.js} +147 -147
- package/dist/cjs/{miscellaneous-D_RAtkZz.js.map → miscellaneous-DCeacaAw.js.map} +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.cjs.js.map +1 -0
- package/dist/cjs/{peculiar-attribute-certificate-viewer_4.cjs.entry.js → peculiar-attribute-certificate-viewer_5.cjs.entry.js} +215 -45
- package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -21
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +23 -23
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar.cjs.js +1 -1
- package/dist/cjs/pkcs10_certificate_request-DE-0eDXE.js +146 -0
- package/dist/cjs/{pkcs10_certificate_request-BQkkkT42.js.map → pkcs10_certificate_request-DE-0eDXE.js.map} +1 -1
- package/dist/cjs/{certification_request-DISQwgjn.js → ssh_certificate-D2q_p49O.js} +1676 -16
- package/dist/cjs/ssh_certificate-D2q_p49O.js.map +1 -0
- package/dist/cjs/{x509_certificate-DGRpZGA2.js → x509_certificate-Cto1q-eu.js} +29 -29
- package/dist/cjs/{x509_certificate-DGRpZGA2.js.map → x509_certificate-Cto1q-eu.js.map} +1 -1
- package/dist/cjs/{x509_crl-DMvJk_81.js → x509_crl-CgixMZrh.js} +32 -32
- package/dist/cjs/{x509_crl-DMvJk_81.js.map → x509_crl-CgixMZrh.js.map} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +10 -6
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +29 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js +23 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js +26 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js +26 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +194 -0
- package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -0
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/index.js.map +1 -1
- package/dist/collection/crypto/ssh_certificate.js +74 -0
- package/dist/collection/crypto/ssh_certificate.js.map +1 -0
- package/dist/collection/locales/en.json +6 -1
- package/dist/collection/utils/download.js +5 -0
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/esm/{extension-CUOKUt7o.js → extension-DmlhftES.js} +3 -3
- package/dist/{esm-es5/extension-CUOKUt7o.js.map → esm/extension-DmlhftES.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +4 -4
- package/dist/esm/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
- package/dist/esm/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +185 -16
- package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-decoder.entry.js +14 -10
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm/peculiar.js +1 -1
- package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +3 -3
- package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
- package/dist/esm/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +1676 -17
- package/dist/esm/ssh_certificate-PCn0WXhQ.js.map +1 -0
- package/dist/esm/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
- package/dist/esm/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
- package/dist/esm/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +5 -5
- package/dist/esm/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
- package/dist/esm-es5/{extension-CUOKUt7o.js → extension-DmlhftES.js} +2 -2
- package/dist/{esm/extension-CUOKUt7o.js.map → esm-es5/extension-DmlhftES.js.map} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +2 -2
- package/dist/esm-es5/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
- package/dist/esm-es5/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +31 -3
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar.js +1 -1
- package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +2 -2
- package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
- package/dist/esm-es5/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +8 -8
- package/dist/esm-es5/ssh_certificate-PCn0WXhQ.js.map +1 -0
- package/dist/esm-es5/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
- package/dist/esm-es5/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
- package/dist/esm-es5/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +2 -2
- package/dist/esm-es5/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/locales/en.json +6 -1
- package/dist/peculiar/{p-17ebc78c.system.entry.js → p-24861cf6.system.entry.js} +2 -2
- package/dist/peculiar/{p-a193f8fd.system.entry.js → p-46c17c8d.system.entry.js} +2 -2
- package/dist/peculiar/{p-a4e74904.entry.js → p-71cb31c6.entry.js} +47 -19
- package/dist/peculiar/p-71cb31c6.entry.js.map +1 -0
- package/dist/peculiar/{p-4cc72a56.entry.js → p-71eab586.entry.js} +2 -2
- package/dist/peculiar/p-7273601a.entry.js +5 -0
- package/dist/peculiar/p-7273601a.entry.js.map +1 -0
- package/dist/peculiar/p-83bfd8e5.system.entry.js +5 -0
- package/dist/peculiar/p-83bfd8e5.system.entry.js.map +1 -0
- package/dist/peculiar/{p-e3967e76.entry.js → p-98219569.entry.js} +2 -2
- package/dist/peculiar/p-9MJeDspO.system.js.map +1 -0
- package/dist/peculiar/p-AjXipXSl.system.js +12 -0
- package/dist/peculiar/{p-CgCUixvk.system.js.map → p-AjXipXSl.system.js.map} +1 -1
- package/dist/peculiar/{p-CEzxVCEh.system.js → p-B2FH4Pv2.system.js} +2 -2
- package/dist/peculiar/{p-CEzxVCEh.system.js.map → p-B2FH4Pv2.system.js.map} +1 -1
- package/dist/peculiar/{p-DcTXA-2R.system.js → p-B5GO6_Ut.system.js} +18 -18
- package/dist/peculiar/{p-DcTXA-2R.system.js.map → p-B5GO6_Ut.system.js.map} +1 -1
- package/dist/peculiar/{p-Bsy7Sqzl.system.js.map → p-B82-c-xr.system.js.map} +1 -1
- package/dist/peculiar/p-BGASC3UX.system.js +1 -1
- package/dist/peculiar/p-BHpSDBz_.system.js.map +1 -0
- package/dist/peculiar/p-BwlcJAh0.js +12 -0
- package/dist/peculiar/{p-CZuaTO2G.js.map → p-BwlcJAh0.js.map} +1 -1
- package/dist/peculiar/{p-D8TC0Na9.system.js.map → p-CSz5liuX.system.js.map} +1 -1
- package/dist/peculiar/{p-tl0v45Y7.js → p-CstRxc9v.js} +2 -2
- package/dist/peculiar/{p-tl0v45Y7.js.map → p-CstRxc9v.js.map} +1 -1
- package/dist/peculiar/p-DMDALRLP.system.js +135 -0
- package/dist/peculiar/p-DMDALRLP.system.js.map +1 -0
- package/dist/peculiar/{p-DTz3NA_M.system.js → p-DPbpwYQ8.system.js} +3 -3
- package/dist/peculiar/{p-DTz3NA_M.system.js.map → p-DPbpwYQ8.system.js.map} +1 -1
- package/dist/peculiar/{p-CoPYW15U.js → p-Db41gPxb.js} +4 -4
- package/dist/peculiar/{p-CoPYW15U.js.map → p-Db41gPxb.js.map} +1 -1
- package/dist/peculiar/{p-DKooqn40.js → p-DnOLjFJP.js} +39 -39
- package/dist/peculiar/{p-DKooqn40.js.map → p-DnOLjFJP.js.map} +1 -1
- package/dist/peculiar/{p-CSS3OhZq.js → p-PCn0WXhQ.js} +13 -13
- package/dist/peculiar/p-PCn0WXhQ.js.map +1 -0
- package/dist/peculiar/{p-7fTYvx_V.system.js → p-SjVQtfgD.system.js} +5 -5
- package/dist/peculiar/{p-7fTYvx_V.system.js.map → p-SjVQtfgD.system.js.map} +1 -1
- package/dist/peculiar/{p-e7c60082.system.entry.js → p-cc01a2da.system.entry.js} +47 -19
- package/dist/peculiar/p-cc01a2da.system.entry.js.map +1 -0
- package/dist/peculiar/{p-BTn-wukS.system.js → p-dOkqMp-O.system.js} +2 -2
- package/dist/peculiar/p-dOkqMp-O.system.js.map +1 -0
- package/dist/peculiar/{p-BG_D4qzJ.js → p-h7XP7otl.js} +3 -3
- package/dist/peculiar/{p-BG_D4qzJ.js.map → p-h7XP7otl.js.map} +1 -1
- package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.esm.js.map +1 -0
- package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +4 -4
- package/dist/types/components/ssh-certificate-viewer/-components/basic_information.d.ts +21 -0
- package/dist/types/components/ssh-certificate-viewer/-components/miscellaneous.d.ts +14 -0
- package/dist/types/components/ssh-certificate-viewer/-components/public_key.d.ts +14 -0
- package/dist/types/components/ssh-certificate-viewer/-components/signature_key.d.ts +14 -0
- package/dist/types/components/ssh-certificate-viewer/ssh-certificate-viewer.d.ts +43 -0
- package/dist/types/components.d.ts +43 -0
- package/dist/types/crypto/index.d.ts +1 -0
- package/dist/types/crypto/ssh_certificate.d.ts +30 -0
- package/dist/types/utils/download.d.ts +3 -0
- package/dist/types/utils/l10n.d.ts +5 -0
- package/hydrate/index.js +1869 -27
- package/hydrate/index.mjs +1869 -27
- package/package.json +3 -2
- package/dist/cjs/certification_request-DISQwgjn.js.map +0 -1
- package/dist/cjs/extension-CGZpfI3W.js +0 -110
- package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +0 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +0 -1
- package/dist/cjs/pkcs10_certificate_request-BQkkkT42.js +0 -146
- package/dist/esm/certification_request-CSS3OhZq.js.map +0 -1
- package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
- package/dist/esm-es5/certification_request-CSS3OhZq.js.map +0 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
- package/dist/peculiar/p-BTn-wukS.system.js.map +0 -1
- package/dist/peculiar/p-CSS3OhZq.js.map +0 -1
- package/dist/peculiar/p-CZuaTO2G.js +0 -12
- package/dist/peculiar/p-CgCUixvk.system.js +0 -12
- package/dist/peculiar/p-DLsQGkmT.system.js.map +0 -1
- package/dist/peculiar/p-D_WeukQa.system.js +0 -135
- package/dist/peculiar/p-D_WeukQa.system.js.map +0 -1
- package/dist/peculiar/p-a4e74904.entry.js.map +0 -1
- package/dist/peculiar/p-ce006f1c.system.entry.js +0 -5
- package/dist/peculiar/p-ce006f1c.system.entry.js.map +0 -1
- package/dist/peculiar/p-e7c60082.system.entry.js.map +0 -1
- package/dist/peculiar/p-f465afe6.entry.js +0 -5
- package/dist/peculiar/p-f465afe6.entry.js.map +0 -1
- package/dist/peculiar/p-tBL0ekYY.system.js.map +0 -1
- package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +0 -1
- /package/dist/peculiar/{p-17ebc78c.system.entry.js.map → p-24861cf6.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-a193f8fd.system.entry.js.map → p-46c17c8d.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-4cc72a56.entry.js.map → p-71eab586.entry.js.map} +0 -0
- /package/dist/peculiar/{p-e3967e76.entry.js.map → p-98219569.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BasicAttribute","props","children","attribute","h","RowValue","name","value","getStringByOID","asn","type","colSpan","class","NamePart","map","relativeDistinguishedName","attributeTypeAndValue","OIDs","toString","NameAttribute","ActivityDescriptionAttribute","camelCaseToWords","TableRowTable","GeneralNamePart","generalName","codeAuthority","getDNSNameLink","getIPAddressLink","codeId","shortName","shortDescription","WebGdprAttribute","assessmentAuthority","assessmentLocation","assessmentRef","dataStorageTerritory","description","InsuranceValueAttribute","base","degree","location","TypeRelationshipAttribute","Object","keys","keyName","toNumber","l10n","getString","getValueRank","ratio","ValuationRankingAttribute","values","AsStringAttribute","monospace","UnstructuredNameAttribute","utf8String","ChallengePasswordAttribute","ExtensionRequestAttribute","extensions","e","Extension","AsnConvert","serialize","Extensions","getLEILink","PrivateKeyPossessionStatementAttribute","certificateRaw","cert","Convert","ToHex","signer","serialNumber","issuer","certificate","ToBase64","Attributes","attributes","length","RowTitle","Name","ExtensionRequest","ActivityDescription","WebGDPR","InsuranceValue","TypeRelationship","ValuationRanking","UnstructuredName","ChallengePassword","PrivateKeyPossessionStatement","_a","console","error","RevokedCertificates","revokedCertificates","userCertificate","dateShort","revocationDate","getTime","crlEntryExtensions","extension","CRLReason","extnID","toJSON","reason","InvalidityDate","CertificateIssuer","gn","extnValue","Holder","holder","baseCertificateID","objectDigestInfo","item","serial","digestAlgorithm","algorithm","objectDigest","digestedObjectType","Issuer","certificateViewerCss","AttributeCertificateViewer","constructor","hostRef","this","mobileMediaQueryString","mobileScreenView","isDecodeInProcess","getAuthKeyIdParentLink","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","handleMediaQueryChange","event","matches","componentWillLoad","decodeCertificate","mobileMediaQuery","window","matchMedia","addEventListener","bind","disconnectedCallback","removeEventListener","X509AttributeCertificate","certificateDecoded","parseExtensions","parseAttributes","getThumbprint","certificateDecodeError","watchCertificateAndDecode","newValue","oldValue","renderErrorState","Typography","renderEmptyState","render","Host","String","BasicInformation","assign","Signature","signature","Thumbprints","thumbprints","download","Miscellaneous","certificateChainViewerCss","CertificateChainViewer","selectedCertificateIndex","certificates","role","Array","from","index","onClick","commonName","CrlViewer","X509Crl","getIssuerDnLink","issuerDnLink","IssuerName","CsrViewer","Pkcs10CertificateRequest","SubjectName","subject","PublicKey","publicKey","SshBasicInformation","validity","notBefore","notAfter","keyId","principals","criticalOptions","undefined","join","SshPublicKey","key","thumbprint","collapse","SshSignatureKey","SshMiscellaneous","Button","startIcon","DownloadIcon","downloadAsSSH","SshCertificateViewer","SshCertificate","parsePublicKey","parseSignatureKey","signatureKey"],"sources":["src/components/certificate-details-parts/attributes/basic_attribute.tsx","src/components/certificate-details-parts/attributes/name_part.tsx","src/components/certificate-details-parts/attributes/name_attribute.tsx","src/components/certificate-details-parts/attributes/activity_description_attribute.tsx","src/components/certificate-details-parts/attributes/web_gdpr_attribute.tsx","src/components/certificate-details-parts/attributes/insurance_value_attribute.tsx","src/components/certificate-details-parts/attributes/type_relationship_attribute.tsx","src/components/certificate-details-parts/attributes/valuation_ranking_attribute.tsx","src/components/certificate-details-parts/attributes/as_string_attribute.tsx","src/components/certificate-details-parts/attributes/unstructured_name_attribute.tsx","src/components/certificate-details-parts/attributes/challenge_password_attribute.tsx","src/components/certificate-details-parts/attributes/extension_request_attribute.tsx","src/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.tsx","src/components/certificate-details-parts/attributes/index.tsx","src/components/certificate-details-parts/revoked_certificates.tsx","src/components/certificate-details-parts/holder.tsx","src/components/certificate-details-parts/issuer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-attribute-certificate-viewer&encapsulation=shadow","src/components/attribute-certificate-viewer/attribute-certificate-viewer.tsx","src/components/certificate-chain-viewer/certificate-chain-viewer.scss?tag=peculiar-certificate-chain-viewer&encapsulation=shadow","src/components/certificate-chain-viewer/certificate-chain-viewer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-crl-viewer&encapsulation=shadow","src/components/crl-viewer/crl-viewer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-csr-viewer&encapsulation=shadow","src/components/csr-viewer/csr-viewer.tsx","src/components/ssh-certificate-viewer/-components/basic_information.tsx","src/components/ssh-certificate-viewer/-components/public_key.tsx","src/components/ssh-certificate-viewer/-components/signature_key.tsx","src/components/ssh-certificate-viewer/-components/miscellaneous.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-ssh-certificate-viewer&encapsulation=shadow","src/components/ssh-certificate-viewer/ssh-certificate-viewer.tsx"],"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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { getStringByOID } from '../../../utils';\nimport { RowValue } from '../row';\n\ninterface IBasicAttributeProps {\n attribute: Attribute<TAttributeValue>;\n}\n\nexport const BasicAttribute: FunctionalComponent<IBasicAttributeProps> = (props, children) => {\n const { attribute } = props;\n\n return ([\n <RowValue\n name=\"Name\"\n value={getStringByOID(attribute.asn.type)}\n />,\n children,\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\n ]);\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\nimport { OIDs } from '../../../constants/oids';\nimport { RowValue } from '../row';\n\ninterface INamePartProps {\n name: Name;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const NamePart: FunctionalComponent<INamePartProps> = (props): any[] => {\n const { name } = props;\n\n if (!name) {\n return null;\n }\n\n return name.map((relativeDistinguishedName) => (\n relativeDistinguishedName.map((attributeTypeAndValue) => (\n <RowValue\n name={OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type}\n value={attributeTypeAndValue.value.toString()}\n />\n ))\n ));\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface INameAttributeProps {\n attribute: Attribute<Name>;\n}\n\nexport const NameAttribute:\nFunctionalComponent<INameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <NamePart\n name={attribute.value}\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ActivityDescription } from '@peculiar/asn1-ntqwac';\nimport { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IActivityDescriptionAttributeProps {\n attribute: Attribute<ActivityDescription>;\n}\n\nexport const ActivityDescriptionAttribute:\nFunctionalComponent<IActivityDescriptionAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('codeAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('codeId')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeId}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('shortName')}\n value={attribute.value.shortName}\n />\n <RowValue\n name={camelCaseToWords('shortDescription')}\n value={attribute.value.shortDescription}\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { WebGDPR } from '@peculiar/asn1-ntqwac';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IWebGdprAttributeProps {\n attribute: Attribute<WebGDPR>;\n}\n\nexport const WebGdprAttribute:\nFunctionalComponent<IWebGdprAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('assessmentAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentLocation')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentLocation}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentRef')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentRef}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('dataStorageTerritory')}\n value={attribute.value.dataStorageTerritory}\n />\n <RowValue\n name={camelCaseToWords('description')}\n value={attribute.value.description}\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { InsuranceValue } from '@peculiar/asn1-ntqwac';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IInsuranceValueAttributeProps {\n attribute: Attribute<InsuranceValue>;\n}\n\nexport const InsuranceValueAttribute:\nFunctionalComponent<IInsuranceValueAttributeProps> = (props) => {\n const { attribute } = props;\n const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={value}\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { TypeRelationship } from '@peculiar/asn1-ntqwac';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { l10n } from '../../../utils';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface ITypeRelationshipAttributeProps {\n attribute: Attribute<TypeRelationship>;\n}\n\nexport const TypeRelationshipAttribute:\nFunctionalComponent<ITypeRelationshipAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n {Object.keys(attribute.value).map((keyName) => (\n <RowValue\n name={keyName}\n value={attribute.value[keyName].toNumber() ? l10n.getString('yes') : l10n.getString('no')}\n />\n ))}\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ValuationRanking } from '@peculiar/asn1-ntqwac';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IValuationRankingAttributeProps {\n attribute: Attribute<ValuationRanking>;\n}\n\nconst getValueRank = (value: number): string => {\n let ratio = 1;\n\n if (value / 100 > 1) {\n ratio = 100;\n } else if (value / 10 > 1) {\n ratio = 10;\n }\n\n return `${value}/${5 * ratio}`;\n};\n\nexport const ValuationRankingAttribute:\nFunctionalComponent<IValuationRankingAttributeProps> = (props) => {\n const { attribute } = props;\n const values = Object.keys(attribute.value).map((keyName) => ([\n getValueRank(attribute.value[keyName]),\n <br />,\n ]));\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={values as unknown as string[]}\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IAsStringAttributeProps {\n attribute: Attribute<string>;\n}\n\nexport const AsStringAttribute:\nFunctionalComponent<IAsStringAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value}\n monospace\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { UnstructuredName } from '@peculiar/asn1-pkcs9';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IUnstructuredNameAttributeProps {\n attribute: Attribute<UnstructuredName>;\n}\n\nexport const UnstructuredNameAttribute:\nFunctionalComponent<IUnstructuredNameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.utf8String}\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ChallengePassword } from '@peculiar/asn1-pkcs9';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IChallengePasswordAttributeProps {\n attribute: Attribute<ChallengePassword>;\n}\n\nexport const ChallengePasswordAttribute:\nFunctionalComponent<IChallengePasswordAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.toString()}\n />\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { ExtensionRequest } from '@peculiar/asn1-pkcs9';\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { Extension, TExtensionValue } from '../../../crypto/extension';\nimport { Attribute } from '../../../crypto/attribute';\nimport { Extensions } from '../../certificate-details-parts';\nimport { TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IExtensionRequestAttributeProps {\n attribute: Attribute<ExtensionRequest>;\n}\n\nexport const ExtensionRequestAttribute:\nFunctionalComponent<IExtensionRequestAttributeProps> = (props) => {\n const { attribute } = props;\n let extensions: Extension<TExtensionValue>[];\n\n if (attribute.value) {\n extensions = attribute.value.map((e) => new Extension(AsnConvert.serialize(e)));\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <TableRowTable>\n <Extensions\n extensions={extensions}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n getLEILink={() => ''}\n />\n </TableRowTable>\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { PrivateKeyPossessionStatement } from '@peculiar/asn1-private-key-stmt';\nimport { Convert } from 'pvtsutils';\nimport { Attribute } from '../../../crypto/attribute';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface IPrivateKeyPossessionStatementAttributeProps {\n attribute: Attribute<PrivateKeyPossessionStatement>;\n}\n\nexport const PrivateKeyPossessionStatementAttribute:\nFunctionalComponent<IPrivateKeyPossessionStatementAttributeProps> = (props) => {\n const { attribute } = props;\n const certificateRaw = attribute.value.cert\n ? AsnConvert.serialize(attribute.value.cert)\n : null;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Serial Number\"\n value={Convert.ToHex(attribute.value.signer.serialNumber)}\n monospace\n />\n <RowValue\n name=\"Issuer\"\n value=\"\"\n />\n <TableRowTable>\n <NamePart\n name={attribute.value.signer.issuer}\n />\n </TableRowTable>\n {certificateRaw && [\n <RowValue\n name=\"Certificate\"\n value=\"\"\n />,\n <TableRowTable>\n <peculiar-certificate-viewer\n certificate={Convert.ToBase64(certificateRaw)}\n />\n </TableRowTable>,\n ]}\n </BasicAttribute>\n );\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { Name } from '@peculiar/asn1-x509';\nimport {\n TypeRelationship,\n ActivityDescription,\n WebGDPR,\n InsuranceValue,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n UnstructuredName,\n ChallengePassword,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { PrivateKeyPossessionStatement } from '@peculiar/asn1-private-key-stmt';\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { RowTitle } from '../row';\nimport { NameAttribute } from './name_attribute';\nimport { ActivityDescriptionAttribute } from './activity_description_attribute';\nimport { WebGdprAttribute } from './web_gdpr_attribute';\nimport { InsuranceValueAttribute } from './insurance_value_attribute';\nimport { TypeRelationshipAttribute } from './type_relationship_attribute';\nimport { ValuationRankingAttribute } from './valuation_ranking_attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { AsStringAttribute } from './as_string_attribute';\nimport { UnstructuredNameAttribute } from './unstructured_name_attribute';\nimport { ChallengePasswordAttribute } from './challenge_password_attribute';\nimport { ExtensionRequestAttribute } from './extension_request_attribute';\nimport { PrivateKeyPossessionStatementAttribute } from './private_key_possession_statement_attribute';\n\ninterface IAttributesPtops extends\n IGeneralNameOptions,\n ILeiOptions,\n IAuthorityKeyIdentifierOptions,\n ISubjectKeyIdentifierOptions {\n attributes: Attribute<TAttributeValue>[];\n}\n\nexport const Attributes: FunctionalComponent<IAttributesPtops> = (props) => {\n const { attributes } = props;\n\n if (!attributes || !attributes.length) {\n return null;\n }\n\n return ([\n <RowTitle\n value=\"Attributes\"\n />,\n attributes.map((attribute) => {\n try {\n if (attribute.value instanceof Name) {\n return (\n <NameAttribute\n attribute={attribute as unknown as Attribute<Name>}\n />\n );\n }\n\n if (attribute.value instanceof ExtensionRequest) {\n return (\n <ExtensionRequestAttribute\n attribute={attribute as unknown as Attribute<ExtensionRequest>}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as unknown as Attribute<ActivityDescription>}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as unknown as Attribute<WebGDPR>}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as unknown as Attribute<InsuranceValue>}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as unknown as Attribute<TypeRelationship>}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as unknown as Attribute<ValuationRanking>}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as unknown as Attribute<UnstructuredName>}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as unknown as Attribute<ChallengePassword>}\n />\n );\n }\n\n if (attribute.value instanceof PrivateKeyPossessionStatement) {\n return (\n <PrivateKeyPossessionStatementAttribute\n attribute={attribute as unknown as Attribute<PrivateKeyPossessionStatement>}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as unknown as Attribute<string>}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch {\n console.error('Error render attribute:', attribute.asn.type);\n\n return null;\n }\n }),\n ]);\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport {\n CRLReason, InvalidityDate, CertificateIssuer,\n} from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport {\n dateShort, l10n, getStringByOID,\n} from '../../utils';\nimport { IRevokedCertificate } from '../../crypto';\nimport { GeneralNamePart } from './extensions/general_name_part';\nimport {\n RowTitle, RowValue, TableRowTable,\n} from './row';\n\ninterface IRevokedCertificatesProps extends IGeneralNameOptions {\n revokedCertificates: IRevokedCertificate[];\n}\n\nexport const RevokedCertificates: FunctionalComponent<IRevokedCertificatesProps> = (props) => {\n const {\n revokedCertificates,\n getDNSNameLink,\n getIPAddressLink,\n } = props;\n\n if (!revokedCertificates || !revokedCertificates.length) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('revokedCertificates')}\n />,\n revokedCertificates.map((certificate) => ([\n <RowValue\n name={l10n.getString('serialNumber')}\n value={Convert.ToHex(certificate.userCertificate)}\n monospace\n />,\n <RowValue\n name={l10n.getString('revocationDate')}\n value={dateShort(certificate.revocationDate.getTime())}\n />,\n (certificate.crlEntryExtensions && certificate.crlEntryExtensions.length && ([\n <RowValue\n name={`${l10n.getString('crlEntryExtensions')}:`}\n value=\"\"\n />,\n <TableRowTable>\n {\n certificate.crlEntryExtensions.map((extension) => {\n if (extension.value instanceof CRLReason) {\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={extension.value.toJSON() || extension.value.reason}\n />\n );\n }\n\n if (extension.value instanceof InvalidityDate) {\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={extension.value.value.getTime()}\n />\n );\n }\n\n if (extension.value instanceof CertificateIssuer && extension.value.length) {\n return ([\n <RowValue\n name={`${getStringByOID(extension.asn.extnID)}:`}\n value=\"\"\n />,\n extension.value.map((gn) => (\n <TableRowTable>\n <GeneralNamePart\n generalName={gn}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n />\n </TableRowTable>\n )),\n ]);\n }\n\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={Convert.ToHex(extension.asn.extnValue)}\n monospace\n />\n );\n })\n }\n </TableRowTable>,\n ])),\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\n ])),\n ];\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { Convert } from 'pvtsutils';\nimport type { X509AttributeCertificate } from '../../crypto';\nimport { l10n, getStringByOID } from '../../utils';\nimport {\n RowTitle, RowValue, TableRowTable,\n} from './row';\nimport { GeneralNamePart } from './extensions/general_name_part';\n\ninterface IHolderProps {\n holder: X509AttributeCertificate['holder'];\n}\n\nexport const Holder: FunctionalComponent<IHolderProps> = (props) => {\n const { holder } = props;\n\n if (!holder) {\n return null;\n }\n\n const { baseCertificateID, objectDigestInfo } = holder;\n\n return [\n <RowTitle\n value={l10n.getString('holder')}\n />,\n baseCertificateID && ([\n baseCertificateID.issuer.map((item) => (\n <GeneralNamePart\n generalName={item}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n )),\n <tr>\n <td />\n <td />\n </tr>,\n <RowValue\n name={l10n.getString('serialNumber')}\n value={Convert.ToHex(baseCertificateID.serial)}\n monospace\n />,\n <tr>\n <td />\n <td />\n </tr>,\n ]),\n objectDigestInfo && ([\n <RowValue\n name={l10n.getString('digestInfo')}\n value=\"\"\n />,\n <TableRowTable>\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(objectDigestInfo.digestAlgorithm.algorithm)}\n />\n <RowValue\n name={l10n.getString('value')}\n value={Convert.ToHex(objectDigestInfo.objectDigest)}\n monospace\n />\n <RowValue\n name={l10n.getString('type')}\n value={objectDigestInfo.digestedObjectType}\n />\n </TableRowTable>,\n ]),\n ];\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { X509AttributeCertificate } from '../../crypto';\nimport { l10n } from '../../utils';\nimport { RowTitle } from './row';\nimport { GeneralNamePart } from './extensions/general_name_part';\n\ninterface IIssuerProps {\n issuer: X509AttributeCertificate['issuer'];\n}\n\nexport const Issuer: FunctionalComponent<IIssuerProps> = (props) => {\n const { issuer } = props;\n\n if (!issuer) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('issuer')}\n />,\n issuer.map((item) => (\n <GeneralNamePart\n generalName={item}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n )),\n ];\n};\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr:last-child {\n .divider {\n display: none;\n }\n }\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\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 {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\nimport { X509AttributeCertificate } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n Attributes,\n Holder,\n Issuer,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TAttributeCertificateProp = string | X509AttributeCertificate;\n\n@Component({\n tag: 'peculiar-attribute-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class AttributeCertificateViewer {\n private certificateDecoded: X509AttributeCertificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificate: TAttributeCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TAttributeCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509AttributeCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509AttributeCertificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n this.certificateDecoded.parseAttributes();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: TAttributeCertificateProp,\n oldValue: TAttributeCertificateProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof X509AttributeCertificate\n && oldValue instanceof X509AttributeCertificate\n ) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this attribute certificate.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no attribute certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <Issuer\n issuer={this.certificateDecoded.issuer}\n />\n\n <Holder\n holder={this.certificateDecoded.holder}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n","@import '../../css/base.scss';\n@import '../certificate-viewer/certificate-viewer.scss';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.tabs {\n white-space: nowrap;\n overflow-x: auto;\n border-bottom: 1px solid var(--pv-color-gray-4);\n padding: 0 var(--pv-size-base-4);\n margin-bottom: var(--pv-size-base-6);\n}\n\n.tab {\n font-family: inherit;\n outline: none;\n cursor: pointer;\n box-sizing: border-box;\n border: none;\n border-bottom: 3px solid transparent;\n min-height: var(--pv-size-base-12);\n height: 100%;\n padding: 0 var(--pv-size-base-3);\n background-color: transparent;\n transition: background-color 200ms, color 200ms, border-color 200ms;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n font-weight: var(--pv-text-s2-weight);\n font-size: var(--pv-text-s2-size);\n line-height: var(--pv-text-s2-height);\n letter-spacing: var(--pv-text-s2-spacing);\n color: var(--pv-color-gray-10);\n\n &:hover {\n background-color: var(--pv-color-secondary-tint-5);\n }\n\n &[aria-selected=\"true\"] {\n color: var(--pv-color-black);\n border-color: var(--pv-color-secondary);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n","/**\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 {\n Component,\n h,\n Prop,\n State,\n Host,\n} from '@stencil/core';\nimport { X509Certificates } from '../../crypto';\nimport { Typography } from '../typography';\nimport { Miscellaneous } from '../certificate-details-parts';\n\n@Component({\n tag: 'peculiar-certificate-chain-viewer',\n styleUrl: 'certificate-chain-viewer.scss',\n shadow: true,\n})\nexport class CertificateChainViewer {\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificates: X509Certificates;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n @State() selectedCertificateIndex = 0;\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificates available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (!this.certificates) {\n return this.renderEmptyState();\n }\n\n return (\n <Host>\n <div\n role=\"tablist\"\n class=\"tabs\"\n >\n {Array.from(this.certificates).map((certificate, index) => (\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab\"\n aria-selected={index === this.selectedCertificateIndex ? 'true' : 'false'}\n onClick={() => {\n this.selectedCertificateIndex = index;\n }}\n >\n {certificate.commonName}\n </button>\n ))}\n </div>\n {Array.from(this.certificates).map((certificate, index) => {\n if (index === this.selectedCertificateIndex) {\n return (\n <peculiar-certificate-viewer\n certificate={certificate}\n download={false}\n />\n );\n }\n\n return null;\n })}\n\n <table>\n {this.download && (\n <Miscellaneous\n certificate={this.certificates}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr:last-child {\n .divider {\n display: none;\n }\n }\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\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 {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\nimport { X509Crl } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n IssuerName,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n RevokedCertificates,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCrlProp = string | X509Crl;\n\n@Component({\n tag: 'peculiar-crl-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CrlViewer {\n private certificateDecoded: X509Crl;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TCrlProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCrlProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Crl) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Crl(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: TCrlProp,\n oldValue: TCrlProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof X509Crl\n && oldValue instanceof X509Crl\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate revocation list.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate revocation list available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n />\n\n <RevokedCertificates\n revokedCertificates={this.certificateDecoded.revokedCertificates}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr:last-child {\n .divider {\n display: none;\n }\n }\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\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 {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\nimport { Pkcs10CertificateRequest } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCsrProp = string | Pkcs10CertificateRequest;\n\n@Component({\n tag: 'peculiar-csr-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CsrViewer {\n private certificateDecoded: Pkcs10CertificateRequest;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TCsrProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof Pkcs10CertificateRequest) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new Pkcs10CertificateRequest(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseAttributes();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: TCsrProp,\n oldValue: TCsrProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof Pkcs10CertificateRequest\n && oldValue instanceof Pkcs10CertificateRequest\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => value;\n\n private getAuthKeyIdSiblingsLink = (value: string) => value;\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate request.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate request available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { RowTitle, RowValue } from '../../certificate-details-parts/row';\nimport { dateShort, l10n } from '../../../utils';\n\ninterface ISshBasicInformationProps {\n serialNumber: string;\n validity: string;\n notBefore: Date;\n notAfter: Date;\n type: string;\n keyId: string;\n principals: string[];\n extensions: Record<string, string>;\n criticalOptions: Record<string, string>;\n}\n\nexport const SshBasicInformation: FunctionalComponent<ISshBasicInformationProps> = (props) => {\n const {\n serialNumber,\n validity,\n notBefore,\n notAfter,\n type,\n keyId,\n principals,\n extensions,\n criticalOptions,\n } = props;\n\n return [\n <RowTitle\n value={l10n.getString('basicInformation')}\n />,\n <RowValue\n name={l10n.getString('type')}\n value={type}\n />,\n <RowValue\n name={l10n.getString('serialNumber')}\n value={serialNumber}\n monospace\n />,\n <RowValue\n name={l10n.getString('validity')}\n value={validity}\n />,\n <RowValue\n name={l10n.getString('issued')}\n value={notBefore ? dateShort(notBefore) : undefined}\n />,\n <RowValue\n name={l10n.getString('expired')}\n value={notAfter ? dateShort(notAfter) : undefined}\n />,\n <RowValue\n name={l10n.getString('keyId')}\n value={keyId}\n />,\n <RowValue\n name={l10n.getString('principals')}\n value={principals.join(', ') || '(none)'}\n />,\n <RowValue\n name={l10n.getString('criticalOptions')}\n value={Object.keys(criticalOptions).join(', ') || '(none)'}\n />,\n <RowValue\n name={l10n.getString('extensions')}\n value={Object.keys(extensions).join(', ') || '(none)'}\n />,\n ];\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshPublicKeyProps {\n key: SshCertificate['publicKey'];\n}\n\nexport const SshPublicKey: FunctionalComponent<ISshPublicKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('publicKeyInfo')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\n />,\n ];\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshSignatureKeyProps {\n key: SshCertificate['signatureKey'];\n}\n\nexport const SshSignatureKey: FunctionalComponent<ISshSignatureKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('signingCA')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\n />,\n ];\n};\n","/**\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 { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n } from '../../../utils';\nimport { Button } from '../../button';\nimport { DownloadIcon } from '../../icons';\nimport { RowTitle } from '../../certificate-details-parts/row';\n\ninterface ISshMiscellaneousProps {\n certificate: SshCertificate;\n}\n\nexport const SshMiscellaneous: FunctionalComponent<ISshMiscellaneousProps> = (props) => {\n const { certificate } = props;\n\n return [\n <RowTitle\n value={l10n.getString('miscellaneous')}\n />,\n <tr>\n <td>\n <Button\n startIcon={<DownloadIcon />}\n onClick={() => certificate.downloadAsSSH()}\n >\n {l10n.getString('download.ssh')}\n </Button>\n </td>\n </tr>,\n ];\n};\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr:last-child {\n .divider {\n display: none;\n }\n }\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\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 {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\nimport { SshCertificate } from '../../crypto';\nimport { Typography } from '../typography';\nimport { SshBasicInformation } from './-components/basic_information';\nimport { SshPublicKey } from './-components/public_key';\nimport { SshSignatureKey } from './-components/signature_key';\nimport { SshMiscellaneous } from './-components/miscellaneous';\n\nexport type TSshCertificateProp = string | SshCertificate;\n\n@Component({\n tag: 'peculiar-ssh-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class SshCertificateViewer {\n private certificateDecoded: SshCertificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TSshCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TSshCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof SshCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new SshCertificate(certificate);\n } else {\n return;\n }\n\n // this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.parsePublicKey();\n await this.certificateDecoded.parseSignatureKey();\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: TSshCertificateProp, oldValue: TSshCertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof SshCertificate && oldValue instanceof SshCertificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <SshBasicInformation\n {...this.certificateDecoded}\n />\n\n <SshPublicKey\n key={this.certificateDecoded.publicKey}\n />\n\n <SshSignatureKey\n key={this.certificateDecoded.signatureKey}\n />\n\n {this.download && (\n <SshMiscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAiBO,MAAMA,EAA4D,CAACC,EAAOC,KAC/E,MAAMC,UAAEA,GAAcF,EAEtB,OACEG,EAACC,EACC,CAAAC,KAAK,OACLC,MAAOC,EAAeL,EAAUM,IAAIC,QAEtCR,EACAE,EAAA,UACEA,EAAA,MAAIO,QAAS,EAAGC,MAAM,WACpBR,EAAA,eAGL;;;;;;;GCbI,MAAMS,EAAiDZ,IAC5D,MAAMK,KAAEA,GAASL,EAEjB,IAAKK,EAAM,CACT,OAAO,I,CAGT,OAAOA,EAAKQ,KAAKC,GACfA,EAA0BD,KAAKE,GAC7BZ,EAACC,EACC,CAAAC,KAAMW,EAAKD,EAAsBN,OAASM,EAAsBN,KAChEH,MAAOS,EAAsBT,MAAMW,gBAGvC;;;;;;;GCdG,MAAMC,EAC+BlB,IAC1C,MAAME,UAAEA,GAAcF,EAEtB,OACEG,EAACJ,EACC,CAAAG,UAAWA,GAEXC,EAACS,EACC,CAAAP,KAAMH,EAAUI,QAEH;;;;;;;GCTd,MAAMa,EAC8CnB,IACzD,MAAME,UAAEA,GAAcF,EAEtB,OACEG,EAACJ,EACC,CAAAG,UAAWA,GAEXC,EAACC,EAAQ,CACPC,KAAMe,EAAiB,iBACvBd,MAAM,KAERH,EAACkB,EAAa,KACZlB,EAACmB,EACC,CAAAC,YAAarB,EAAUI,MAAMkB,cAC7BC,eAAgB,IAAM,GACtBC,iBAAkB,IAAM,MA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9BD,QAAQC,MAAM,2BAA4BA,E,CAG5CgC,KAAKG,kBAAoB,K,CAO3B,yBAAA4B,CAA0BC,EAA+BC,GACvD,UAAWD,IAAa,iBAAmBC,IAAa,SAAU,CAChE,GAAID,IAAaC,EAAU,CACzBjC,KAAKiB,kBAAkBe,E,CAGzB,M,CAGF,GAAIA,aAAoByD,GAAkBxD,aAAoBwD,EAAgB,CAC5E,GAAIzD,EAASpF,eAAiBqF,EAASrF,aAAc,CACnDoD,KAAKiB,kBAAkBe,E,GAKrB,gBAAAE,GACN,OACEzJ,EAAA,OAAKQ,MAAM,kBACTR,EAAC0J,EAAU,sD,CAOT,gBAAAC,GACN,OACE3J,EAAA,OAAKQ,MAAM,kBACTR,EAAC0J,EAAU,2C,CAOjB,MAAAE,GACE,GAAIrC,KAAK8B,uBAAwB,CAC/B,OAAO9B,KAAKkC,kB,CAGd,IAAKlC,KAAK0B,mBAAoB,CAC5B,OAAO1B,KAAKoC,kB,CAGd,OACE3J,EAAC6J,EAAI,2BACsBC,OAAOvC,KAAKE,mBAErCzH,EAAA,aACEA,EAAC4L,GAAmBtJ,OAAA0H,OAAA,GACdzC,KAAK0B,qBAGXjJ,EAACqM,GAAY,CACXC,IAAK/E,KAAK0B,mBAAmB0C,YAG/B3L,EAACyM,GAAe,CACdH,IAAK/E,KAAK0B,mBAAmBkE,eAG9B5F,KAAK8C,UACJrK,EAAC0M,GACC,CAAArI,YAAakD,KAAK0B,sB","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,r as e,c as a,H as r}from"./p-CwgZaF40.js";import{X as o}from"./p-
|
|
4
|
+
import{h as t,r as e,c as a,H as r}from"./p-CwgZaF40.js";import{X as o}from"./p-h7XP7otl.js";import{Z as s,_ as i,$ as c}from"./p-PCn0WXhQ.js";import{T as n,B as l}from"./p-CutTi-2B.js";import{D as p,L as v,C as d}from"./p-DanjeXNk.js";import{D as h}from"./p-JyD6URnB.js";import{a as b,A as g}from"./p-ZT6tVIen.js";import"./p-BwlcJAh0.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -9,4 +9,4 @@ import{h as t,r as e,c as a,H as r}from"./p-CwgZaF40.js";import{X as o}from"./p-
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/const u=e=>{const{certificate:a,showIssuer:r}=e;const o=(e,a)=>t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},e)),t("td",null,t(n,{variant:"b2",color:"black"},a)));return t("table",null,t("tbody",null,o(s.getString("subjectName"),a.subjectToString()),r&&o(s.getString("issuerName"),a.issuerToString()),o(s.getString("serialNumber"),a.serialNumber),o(s.getString("version"),a.version),o(s.getString("validity"),a.validity),o(s.getString("issued"),i(a.notBefore)),o(s.getString("expired"),i(a.notAfter))))};const f="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative}.search_section{padding:var(--pv-size-base-4);border-bottom:1px solid var(--pv-color-gray-4)}.input_search{height:var(--pv-size-base-8);width:100%;outline:none;background-color:var(--pv-color-gray-1);padding:0 var(--pv-size-base-2);border:1px solid var(--pv-color-gray-7);border-radius:4px;-webkit-transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s}.input_search::-webkit-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-moz-placeholder{color:var(--pv-color-gray-9)}.input_search:-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::placeholder{color:var(--pv-color-gray-9)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table td,table th{border-bottom:1px solid var(--pv-color-gray-4);vertical-align:top;text-align:left}table td:first-child,table th:first-child{padding-right:0;width:var(--pv-size-base-10)}table td:last-child,table th:last-child{padding-left:0;width:var(--pv-size-base-10)}table th{padding:var(--pv-size-base-2) var(--pv-size-base-4)}table th.col_action{padding:0}table td{padding:var(--pv-size-base-4)}table tr.m_expanded{background:var(--pv-color-gray-1)}table tr.m_expanded>td{border-bottom:none}table tr.expanded_summary{background:var(--pv-color-gray-1)}table tr.expanded_summary table{table-layout:initial}table tr.expanded_summary table td{border-bottom:none;padding:var(--pv-size-base-2)}table tr.expanded_summary table td:first-child{width:200px}table tr.expanded_summary table td:last-child{width:auto}.button_table_cell{margin-top:-3px}.status_wrapper{text-align:center;height:var(--pv-size-base-16);vertical-align:middle}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal_backdrop{background:var(--pv-color-black);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0;opacity:0.5}.modal_container{background:var(--pv-color-white);width:100%;display:-ms-flexbox;display:flex;max-height:calc(100% - 60px);-ms-flex-direction:column;flex-direction:column;margin:var(--pv-size-base-6);position:relative;outline:none;-webkit-box-shadow:var(--pv-shadow-dark-hight);box-shadow:var(--pv-shadow-dark-hight);overflow:hidden;border:0px;padding:0px;max-width:640px;border-radius:4px}.modal_header{padding:var(--pv-size-base-3) var(--pv-size-base-4);display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:var(--pv-size-base-2);border-bottom:1px solid var(--pv-color-gray-5)}.modal_content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tbody,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block;width:100% !important;padding:0;border:none}:host([data-mobile-screen-view=true]) thead{display:none}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table .expanded_summary{padding:0}:host([data-mobile-screen-view=true]) table .certificate_row{border-bottom:1px solid var(--pv-color-gray-5);padding:var(--pv-size-base-2) var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table .certificate_row_actions{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table .certificate_row_actions td{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;gap:var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) .button_table_cell{margin-top:0}";const y=class{constructor(t){e(this,t);this.detailsOpen=a(this,"detailsOpen");this.detailsClose=a(this,"detailsClose");this.isHasRoots=false;this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.search="";this.certificatesDecoded=[];this.isDecodeInProcess=true;this.handleClickDetails=t=>{this.certificateSelectedForDetails=t;this.detailsOpen.emit(t)};this.handleModalClose=()=>{this.certificateSelectedForDetails=undefined;this.detailsClose.emit()};this.handleSearch=t=>{const e=t.target;this.search=e.value.trim()}}handleMediaQueryChange(t){this.mobileScreenView=t.matches}componentWillLoad(){this.certificatesDecodeAndSet();{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}}disconnectedCallback(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))}watchCertificates(t,e){if(JSON.stringify(t)!==JSON.stringify(e)){this.certificatesDecodeAndSet()}}async certificatesDecodeAndSet(){let t=false;if(!Array.isArray(this.certificates)){return}const e=[];for(const a of this.certificates){try{const r=new o(a.value);await r.getThumbprint("SHA-1");e.push({body:r,tests:a.tests,name:a.name});if(!t&&r.isRoot){t=true}}catch(t){console.error("Error certificate parse:",t)}}this.isHasRoots=t;this.isDecodeInProcess=false;this.certificatesDecoded=e}getCertificateName(t){if(typeof t.name==="function"){return t.name(t.body)}return t.name||t.body.commonName}handleClickDownloadAsPem(t){t.body.downloadAsPEM(this.getCertificateName(t))}handleClickDownloadAsDer(t){t.body.downloadAsDER(this.getCertificateName(t))}handleClickRow(t){const e=this.expandedRow===t;this.expandedRow=e?undefined:t}getMaxColSpanValue(){let t=5;if(!this.isHasRoots){t+=1}return t}renderCertificateButtonActions(e){var a,r,o;const i=e.tests&&(e.tests.expired||e.tests.revoked||e.tests.valid);return t("peculiar-button-menu",{class:"button_table_cell",groups:[{title:s.getString("previewCertificate"),options:[{text:s.getString("viewDetails"),startIcon:t(p,null),onClick:()=>this.handleClickDetails(e.body)}]},{title:s.getString("downloadOptions"),options:[{text:s.getString("download.pem"),startIcon:t(h,null),onClick:()=>this.handleClickDownloadAsPem(e)},{text:s.getString("download.der"),startIcon:t(h,null),onClick:()=>this.handleClickDownloadAsDer(e)}]},...i?[{title:s.getString("testURLs"),options:[...((a=e.tests)===null||a===void 0?void 0:a.valid)?[{text:s.getString("valid"),href:e.tests.valid,startIcon:t(v,null)}]:[],...((r=e.tests)===null||r===void 0?void 0:r.revoked)?[{text:s.getString("revoked"),href:e.tests.revoked,startIcon:t(v,null)}]:[],...((o=e.tests)===null||o===void 0?void 0:o.expired)?[{text:s.getString("expired"),href:e.tests.expired,startIcon:t(v,null)}]:[]]}]:[]]})}renderExpandedRow(e){const a=this.getMaxColSpanValue()-2;return t("tr",{class:"expanded_summary"},t("td",null),t("td",{colSpan:a},t(u,{certificate:e,showIssuer:!e.isRoot})),t("td",null))}renderCertificatesRows(){const e=this.highlightWithSearch?this.search:"";const a=[];this.certificatesDecoded.forEach(((r,o)=>{const i=o===this.expandedRow;const p=c[r.body.signature.algorithm]||r.body.signature.algorithm;if(this.filterWithSearch&&this.search){const t=[p,r.body.issuerCommonName,this.getCertificateName(r),r.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(t.indexOf(this.search.toLowerCase())===-1){return}}if(this.mobileScreenView){a.push([t("tr",{class:{certificate_row:true,m_expanded:i},key:r.body.thumbprints["SHA-1"]},t("td",null,t("table",null,t("tbody",null,!this.isHasRoots&&t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("issuer"))),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},r.body.issuerCommonName)))),t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("name"))),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},this.getCertificateName(r))))),t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("publicKey"))),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},p)))),t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("fingerprint")," (SHA-1)")),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},r.body.thumbprints["SHA-1"])))),i&&this.renderExpandedRow(r.body),t("tr",{class:"certificate_row_actions"},t("td",null,this.renderCertificateButtonActions(r),t(l,{startIcon:i?t(b,null):t(g,null),onClick:this.handleClickRow.bind(this,o)})))))))]);return}a.push([t("tr",{class:{m_expanded:i},key:r.body.thumbprints["SHA-1"]},t("td",null,t(l,{startIcon:i?t(b,null):t(g,null),class:"button_table_cell",onClick:this.handleClickRow.bind(this,o)})),!this.isHasRoots&&t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},r.body.issuerCommonName))),t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},this.getCertificateName(r)))),t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},p))),t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},r.body.thumbprints["SHA-1"]))),t("td",null,this.renderCertificateButtonActions(r))),i&&this.renderExpandedRow(r.body)])}));return a}renderCertificateDetailsModal(){if(!this.certificateSelectedForDetails){return null}return t("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},t("div",{class:"modal_backdrop","aria-hidden":"true",onClick:this.handleModalClose}),t("div",{class:"modal_container",role:"dialog",part:"presentation_container"},t("header",{class:"modal_header"},t(n,{variant:"h4"},s.getString("certificateDetails")),t(l,{startIcon:t(d,null),onClick:this.handleModalClose})),t("div",{class:"modal_content"},t("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails,mobileMediaQueryString:this.mobileMediaQueryString}))))}renderSearch(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return t("div",{class:"search_section"},t("input",{type:"search",value:"",class:"input_search t-b3 c-black",disabled:!this.certificatesDecoded.length,placeholder:"Search",onInput:this.handleSearch}))}renderEmptyState(){const e=this.getMaxColSpanValue();return t("tr",null,t("td",{class:"status_wrapper",colSpan:e},t(n,{variant:"b1"},"There are no certificates available.")))}renderEmptySearchState(){const e=this.getMaxColSpanValue();return t("tr",null,t("td",{class:"status_wrapper",colSpan:e},t(n,{variant:"b1"},"No results found for “",this.search,"“")))}renderLoadingState(){return t("div",{class:"loading_container"},t("peculiar-circular-progress",null))}renderTableBody(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}const t=this.renderCertificatesRows();if(this.search&&!t.length){return this.renderEmptySearchState()}return t}render(){return t(r,{key:"894edb33a53c1128d812c2fd7a5b230a4b13493c","data-mobile-screen-view":String(this.mobileScreenView)},this.renderSearch(),t("table",{key:"998d37ab98be6743f1564fafb4ce9fc70b79e358"},!this.mobileScreenView&&t("thead",{key:"4728e09450b6285cbc2f69cf0a0e06135910558f"},t("tr",{key:"70bf5be60e50b9d7109e27128b661044778e0ded"},t("th",{key:"cf0fef5df1b42d0bce49d3bf0af2d91b82de6d05"}),!this.isHasRoots&&t("th",{key:"59f00d345883dfb3c81a97278583821543ce6808",class:"col_issuer"},t(n,{key:"54ce8fba1ab5355ac1f82ccc3aa62945351a3632",variant:"s2"},s.getString("issuer"))),t("th",{key:"9aea7911edafca1482f31e2ca3316d2cde40fd78",class:"col_name"},t(n,{key:"2a0145b0cc56543ed4b5170a8773c3c43e5e64f9",variant:"s2"},s.getString("name"))),t("th",{key:"9eab414d9b1558d6a5b9938f55165aeca5baa54e",class:"col_public_key"},t(n,{key:"cbdcb1013bbf12ac88e63ca2d268c55854803297",variant:"s2"},s.getString("publicKey"))),t("th",{key:"06adb89146693583a0dad86644b2c8b399e25c0e",class:"col_fingerprint"},t(n,{key:"eca0440721f16953219f014edb8d3742f312f704",variant:"s2"},s.getString("fingerprint")," (SHA-1)")),t("th",{key:"56b7fdf83f5c45cf524a8cce81dbca584b9b5fa8"}))),t("tbody",{key:"01ccda1abfa846a8b0cdc00588b106398358ed88"},this.renderTableBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};y.style=f;export{y as peculiar_certificates_viewer};
|
|
12
|
-
//# sourceMappingURL=p-
|
|
12
|
+
//# sourceMappingURL=p-71eab586.entry.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as e,h as r,H as a}from"./p-CwgZaF40.js";import{a as o}from"./p-F2F0McJX.js";import{P as s,b as c,bh as i,bi as n,a0 as v,bj as p,bk as l,e as h,C as d,bl as b,D as g,bm as f}from"./p-PCn0WXhQ.js";import{X as y}from"./p-h7XP7otl.js";import{X as w,a as x}from"./p-CstRxc9v.js";import{P as u}from"./p-Db41gPxb.js";import{T as m,B as z}from"./p-CutTi-2B.js";import"./p-BwlcJAh0.js";const k="1.2.840.113549.1.7.1";const C="1.2.840.113549.1.7.2";class j extends Array{constructor(t){super();const e=s.isPem(t)?s.decode(t).map((t=>c.Convert.ToBase64Url(t))):t.split(",");if(e.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(const t of e){this.push(new y(t))}}get commonName(){return Array.from(this).map((t=>t.commonName)).join("_")}get raw(){const t=new i;t.version=1;t.encapContentInfo.eContentType=k;t.encapContentInfo.eContent=new n({single:new v});t.certificates=new p(Array.from(this).map((t=>new l({certificate:h.parse(t.raw,d)}))));const e=new b({contentType:C,content:h.serialize(t)});return h.serialize(e)}toString(t="pem"){switch(t){case"pem":return Array.from(this).map((t=>t.toString("pem"))).join("\n");case"base64url":return Array.from(this).map((t=>t.toString("base64url"))).join(",");default:return Array.from(this).map((t=>t.toString("base64"))).join(",")}}downloadAsPEM(t){g.cert.asPEM(this.toString("pem"),t||this.commonName)}downloadAsDER(t){g.cert.asDER(this.raw,t||this.commonName)}}const A="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%}.textarea{min-height:300px;width:100%;border-radius:4px;border:1px solid var(--pv-color-gray-5);padding:14px;font-family:monospace;resize:vertical}.controls{margin-top:var(--pv-size-base-2);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2);margin-bottom:var(--pv-size-base-12)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";const P=class{constructor(r){t(this,r);this.successParse=e(this,"successParse");this.clearCertificate=e(this,"clearCertificate");this.handleClickDecode=()=>{const{value:t}=this.inputPaste;if(t){this.decode(t)}};this.handleClickClear=()=>{this.clearValue()};this.handleChangeInputFile=async t=>{const e=t.target;if(e.files){const t=await o(e.files[0]);if(typeof t.value==="string"){this.decode(t.value)}e.value=""}};this.handleChangeExample=t=>{if(t.target.value){this.decode(t.target.value)}else{this.clearValue()}};this.handleDropFile=async t=>{t.stopPropagation();t.preventDefault();const e=t.dataTransfer;if(e.files){const t=await o(e.files[0]);if(typeof t.value==="string"){this.decode(t.value)}}}}componentDidLoad(){if(this.certificateToDecode){setTimeout((()=>this.decode(this.certificateToDecode)),100)}}clearValue(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()}async setValue(t){this.certificateDecoded=t;this.inputPaste.value=await t.toString("pem");this.successParse.emit(await t.toString("base64url"))}async decode(t){new Promise((e=>{e(new j(t))})).catch((()=>new y(t))).catch((()=>new w(t))).catch((()=>new u(t))).catch((()=>new x(t))).catch((()=>new f(t))).then((t=>this.setValue(t))).catch((e=>{console.log(e);alert(`Error decoding certificate:\n"${t}"\n\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.`)}))}renderCertificate(){if(this.certificateDecoded instanceof j){return r("peculiar-certificate-chain-viewer",{certificates:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof y){return r("peculiar-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof w){return r("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof u){return r("peculiar-csr-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof x){return r("peculiar-crl-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof f){return r("peculiar-ssh-certificate-viewer",{certificate:this.certificateDecoded,download:true})}return null}render(){var t;return r(a,{key:"9067f2d7f33a40b3ad0ba03c7338a6f800100dab"},r("textarea",{key:"9e8962631c259fd5e144a1397d8591dde46d032f",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:t=>{this.inputPaste=t},onDrop:this.handleDropFile}),r("div",{key:"9be2b1e6c9b3de94c9d5e1e6cf31d9fb487960d8",class:"controls"},r("div",{key:"3959b89ab5c5654a3c10a1166743c056c0340e2e",class:"control_row"},r(m,{key:"3c03f42d14ff5a485264523bab40765bb4f89a8f",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),r("input",{key:"3c8682f5de0b0e2f84e37a8a05882ebcf331daef",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl,.cert",value:"",onChange:this.handleChangeInputFile})),((t=this.certificateExamples)===null||t===void 0?void 0:t.length)&&r("div",{key:"7c38788ccf4b038126ddf6909ec1d3de76325660",class:"control_row"},r(m,{key:"c1c13aaad3d1df51465c6c51ee24f45313de8f1c",variant:"b3",color:"secondary-tint-2"},"Load examples:"),r("select",{key:"811c4440269bb0a0a55f488e10dfa12093b18d7b",onChange:this.handleChangeExample},r("option",{key:"d2e30396fe3a59d5c46c83c6cd1e5b5a58f15f73",value:""},"None"),this.certificateExamples.map((t=>r("option",{value:t.value},t.title))))),r("div",{key:"58daae2b9d8e2dd4c698ec9ad6e7f0d8b2500883",class:"control_row"},r(z,{key:"d7f813370ace60deaad975622cc26b9a497ce9d2",onClick:this.handleClickDecode},"Decode"),r(z,{key:"ec2fbeb6283ffd17c7328ee78c9464926b0bbb6b",onClick:this.handleClickClear},"Clear"))),this.renderCertificate())}};P.style=A;export{P as peculiar_certificate_decoder};
|
|
5
|
+
//# sourceMappingURL=p-7273601a.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["id_data","id_signedData","X509Certificates","Array","constructor","raw","super","rawItems","PemConverter","isPem","decode","map","value","Convert","ToBase64Url","split","length","Error","item","this","push","X509Certificate","commonName","from","o","join","signedData","SignedData","version","encapContentInfo","eContentType","eContent","EncapsulatedContent","single","OctetString","certificates","CertificateSet","CertificateChoices","certificate","AsnConvert","parse","Certificate","cms","ContentInfo","contentType","content","serialize","toString","format","downloadAsPEM","name","Download","cert","asPEM","downloadAsDER","asDER","certificateDecoderCss","CertificateDecoder","hostRef","handleClickDecode","inputPaste","handleClickClear","clearValue","handleChangeInputFile","async","event","element","target","files","file","readAsBinaryString","handleChangeExample","handleDropFile","stopPropagation","preventDefault","dataTransfer","componentDidLoad","certificateToDecode","setTimeout","certificateDecoded","clearCertificate","emit","setValue","successParse","Promise","resolve","catch","X509AttributeCertificate","Pkcs10CertificateRequest","X509Crl","SshCertificate","then","res","error","console","log","alert","renderCertificate","h","download","render","Host","key","placeholder","class","ref","el","onDrop","Typography","variant","color","type","accept","onChange","_a","certificateExamples","example","title","Button","onClick"],"sources":["../../node_modules/.pnpm/@peculiar+asn1-cms@2.4.0/node_modules/@peculiar/asn1-cms/build/es2015/object_identifiers.js","src/crypto/x509_certificates.ts","src/components/certificate-decoder/certificate-decoder.scss?tag=peculiar-certificate-decoder&encapsulation=shadow","src/components/certificate-decoder/certificate-decoder.tsx"],"sourcesContent":["export const id_ct_contentInfo = \"1.2.840.113549.1.9.16.1.6\";\nexport const id_data = \"1.2.840.113549.1.7.1\";\nexport const id_signedData = \"1.2.840.113549.1.7.2\";\nexport const id_envelopedData = \"1.2.840.113549.1.7.3\";\nexport const id_digestedData = \"1.2.840.113549.1.7.5\";\nexport const id_encryptedData = \"1.2.840.113549.1.7.6\";\nexport const id_authData = \"1.2.840.113549.1.9.16.1.2\";\n","import { Convert } from 'pvtsutils';\nimport {\n SignedData,\n id_data,\n EncapsulatedContent,\n CertificateSet,\n CertificateChoices,\n ContentInfo,\n id_signedData,\n} from '@peculiar/asn1-cms';\nimport { Certificate } from '@peculiar/asn1-x509';\nimport { AsnConvert, OctetString } from '@peculiar/asn1-schema';\nimport { Download } from '../utils';\nimport { PemConverter } from './pem_converter';\nimport { X509Certificate } from './x509_certificate';\n\nexport class X509Certificates extends Array<X509Certificate> {\n constructor(raw: string) {\n super();\n\n const rawItems = PemConverter.isPem(raw)\n ? PemConverter.decode(raw).map((value) => Convert.ToBase64Url(value))\n : raw.split(',');\n\n if (rawItems.length < 2) {\n throw new Error('Unable to parse string. The array of elements is less than 2');\n }\n\n for (const item of rawItems) {\n this.push(new X509Certificate(item));\n }\n }\n\n public get commonName(): string {\n return Array.from(this)\n .map((o) => o.commonName)\n .join('_');\n }\n\n public get raw(): ArrayBuffer {\n const signedData = new SignedData();\n\n signedData.version = 1;\n signedData.encapContentInfo.eContentType = id_data;\n signedData.encapContentInfo.eContent = new EncapsulatedContent({ single: new OctetString() });\n signedData.certificates = new CertificateSet(\n Array.from(this)\n .map((o) => new CertificateChoices({ certificate: AsnConvert.parse(o.raw, Certificate) })),\n );\n\n const cms = new ContentInfo({\n contentType: id_signedData,\n content: AsnConvert.serialize(signedData),\n });\n\n return AsnConvert.serialize(cms);\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return Array.from(this)\n .map((o) => o.toString('pem'))\n .join('\\n');\n case 'base64url':\n return Array.from(this)\n .map((o) => o.toString('base64url'))\n .join(',');\n default:\n return Array.from(this)\n .map((o) => o.toString('base64'))\n .join(',');\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.cert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.cert.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.textarea {\n min-height: 300px;\n width: 100%;\n border-radius: 4px;\n border: 1px solid var(--pv-color-gray-5);;\n padding: 14px;\n font-family: monospace;\n resize: vertical;\n}\n\n.controls {\n margin-top: var(--pv-size-base-2);\n display: flex;\n flex-direction: column;\n gap: var(--pv-size-base-2);\n margin-bottom: var(--pv-size-base-12);\n}\n\n.control_row {\n display: flex;\n align-items: center;\n gap: var(--pv-size-base);\n}\n","/**\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 {\n Component,\n Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n Pkcs10CertificateRequest,\n X509Crl,\n X509Certificates,\n SshCertificate,\n} from '../../crypto';\nimport { Button } from '../button';\nimport { Typography } from '../typography';\n\n@Component({\n tag: 'peculiar-certificate-decoder',\n styleUrl: 'certificate-decoder.scss',\n shadow: true,\n})\nexport class CertificateDecoder {\n private inputPaste?: HTMLTextAreaElement;\n\n /**\n * The example certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateExamples?: {\n title: string;\n value: string;\n }[];\n\n /**\n * The default certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateToDecode?: string;\n\n @State() certificateDecoded: X509Certificates\n | X509Certificate\n | X509AttributeCertificate\n | Pkcs10CertificateRequest\n | X509Crl\n | SshCertificate;\n\n /**\n * Emitted when the certificate has been successfully parsed.\n */\n @Event() successParse!: EventEmitter<string>;\n\n /**\n * Emitted when the certificate has been removed.\n */\n @Event() clearCertificate!: EventEmitter<void>;\n\n componentDidLoad() {\n if (this.certificateToDecode) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.certificateToDecode), 100);\n }\n }\n\n private handleClickDecode = () => {\n const { value } = this.inputPaste;\n\n if (value) {\n this.decode(value);\n }\n };\n\n private handleClickClear = () => {\n this.clearValue();\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private handleChangeInputFile = async (event: any) => {\n const element = event.target;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n\n element.value = '';\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private handleChangeExample = (event: any) => {\n if (event.target.value) {\n this.decode(event.target.value);\n } else {\n this.clearValue();\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private handleDropFile = async (event: any) => {\n event.stopPropagation();\n event.preventDefault();\n\n const element = event.dataTransfer;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n }\n };\n\n clearValue() {\n this.inputPaste.value = '';\n this.certificateDecoded = null;\n this.clearCertificate.emit();\n }\n\n async setValue(value: typeof this.certificateDecoded) {\n this.certificateDecoded = value;\n\n this.inputPaste.value = await value.toString('pem');\n this.successParse.emit(await value.toString('base64url'));\n }\n\n async decode(value: string) {\n new Promise<X509Certificates>((resolve) => {\n resolve(new X509Certificates(value));\n })\n .catch(() => new X509Certificate(value))\n .catch(() => new X509AttributeCertificate(value))\n .catch(() => new Pkcs10CertificateRequest(value))\n .catch(() => new X509Crl(value))\n .catch(() => new SshCertificate(value))\n .then((res: typeof this.certificateDecoded) => this.setValue(res))\n .catch((error) => {\n console.log(error);\n\n alert(`Error decoding certificate:\\n\"${value}\"\\n\\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.`);\n });\n }\n\n renderCertificate() {\n if (this.certificateDecoded instanceof X509Certificates) {\n return (\n <peculiar-certificate-chain-viewer\n certificates={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Certificate) {\n return (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509AttributeCertificate) {\n return (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof Pkcs10CertificateRequest) {\n return (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Crl) {\n return (\n <peculiar-crl-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof SshCertificate) {\n return (\n <peculiar-ssh-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n return null;\n }\n\n render() {\n return (\n <Host>\n <textarea\n placeholder=\"Certificate DER or PEM\"\n class=\"textarea t-b2 c-black\"\n ref={(el) => { this.inputPaste = el; }}\n onDrop={this.handleDropFile}\n />\n <div class=\"controls\">\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Drag or load file:\n </Typography>\n <input\n type=\"file\"\n accept=\"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl,.cert\"\n value=\"\"\n onChange={this.handleChangeInputFile}\n />\n </div>\n {this.certificateExamples?.length && (\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Load examples:\n </Typography>\n <select onChange={this.handleChangeExample}>\n <option value=\"\">None</option>\n {this.certificateExamples.map((example) => (\n <option value={example.value}>\n {example.title}\n </option>\n ))}\n </select>\n </div>\n )}\n <div class=\"control_row\">\n <Button\n onClick={this.handleClickDecode}\n >\n Decode\n </Button>\n <Button\n onClick={this.handleClickClear}\n >\n Clear\n </Button>\n </div>\n </div>\n {this.renderCertificate()}\n </Host>\n );\n }\n}\n"],"mappings":";;;2YACO,MAAMA,EAAU,uBAChB,MAAMC,EAAgB,uBCcvB,MAAOC,UAAyBC,MACpC,WAAAC,CAAYC,GACVC,QAEA,MAAMC,EAAWC,EAAaC,MAAMJ,GAChCG,EAAaE,OAAOL,GAAKM,KAAKC,GAAUC,UAAQC,YAAYF,KAC5DP,EAAIU,MAAM,KAEd,GAAIR,EAASS,OAAS,EAAG,CACvB,MAAM,IAAIC,MAAM,+D,CAGlB,IAAK,MAAMC,KAAQX,EAAU,CAC3BY,KAAKC,KAAK,IAAIC,EAAgBH,G,EAIlC,cAAWI,GACT,OAAOnB,MAAMoB,KAAKJ,MACfR,KAAKa,GAAMA,EAAEF,aACbG,KAAK,I,CAGV,OAAWpB,GACT,MAAMqB,EAAa,IAAIC,EAEvBD,EAAWE,QAAU,EACrBF,EAAWG,iBAAiBC,aAAe9B,EAC3C0B,EAAWG,iBAAiBE,SAAW,IAAIC,EAAoB,CAAEC,OAAQ,IAAIC,IAC7ER,EAAWS,aAAe,IAAIC,EAC5BjC,MAAMoB,KAAKJ,MACRR,KAAKa,GAAM,IAAIa,EAAmB,CAAEC,YAAaC,EAAWC,MAAMhB,EAAEnB,IAAKoC,QAG9E,MAAMC,EAAM,IAAIC,EAAY,CAC1BC,YAAa3C,EACb4C,QAASN,EAAWO,UAAUpB,KAGhC,OAAOa,EAAWO,UAAUJ,E,CA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&this.__extends||function(){var t=function(e,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return t(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();var __awaiter=this&&this.__awaiter||function(t,e,r,o){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function c(t){try{s(o.next(t))}catch(t){n(t)}}function i(t){try{s(o["throw"](t))}catch(t){n(t)}}function s(t){t.done?r(t.value):a(t.value).then(c,i)}s((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,a,n,c;return c={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function i(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(c&&(c=0,i[0]&&(r=0)),r)try{if(o=1,a&&(n=i[0]&2?a["return"]:i[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;if(a=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;a=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){r.label=i[1];break}if(i[0]===6&&r.label<n[1]){r.label=n[1];n=i;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(i);break}if(n[2])r.ops.pop();r.trys.pop();continue}i=e.call(t,r)}catch(t){i=[6,t];a=0}finally{o=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
|
|
2
|
+
/*!
|
|
3
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
+
*/System.register(["./p-DKl0YViA.system.js","./p-D2QB-8Q6.system.js","./p-DMDALRLP.system.js","./p-DPbpwYQ8.system.js","./p-B2FH4Pv2.system.js","./p-SjVQtfgD.system.js","./p-B4PdAFCr.system.js","./p-AjXipXSl.system.js"],(function(t){"use strict";var e,r,o,a,n,c,i,s,v,p,l,h,u,f,d,b,g,y,w,x,m,z,k;return{setters:[function(t){e=t.r;r=t.c;o=t.h;a=t.H},function(t){n=t.a},function(t){c=t.P;i=t.b;s=t.bh;v=t.bi;p=t.a0;l=t.bj;h=t.bk;u=t.e;f=t.C;d=t.bl;b=t.D;g=t.bm},function(t){y=t.X},function(t){w=t.X;x=t.a},function(t){m=t.P},function(t){z=t.T;k=t.B},null],execute:function(){var _="1.2.840.113549.1.7.1";var j="1.2.840.113549.1.7.2";var C=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;var o=c.isPem(e)?c.decode(e).map((function(t){return i.Convert.ToBase64Url(t)})):e.split(",");if(o.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(var a=0,n=o;a<n.length;a++){var s=n[a];r.push(new y(s))}return r}Object.defineProperty(e.prototype,"commonName",{get:function(){return Array.from(this).map((function(t){return t.commonName})).join("_")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"raw",{get:function(){var t=new s;t.version=1;t.encapContentInfo.eContentType=_;t.encapContentInfo.eContent=new v({single:new p});t.certificates=new l(Array.from(this).map((function(t){return new h({certificate:u.parse(t.raw,f)})})));var e=new d({contentType:j,content:u.serialize(t)});return u.serialize(e)},enumerable:false,configurable:true});e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return Array.from(this).map((function(t){return t.toString("pem")})).join("\n");case"base64url":return Array.from(this).map((function(t){return t.toString("base64url")})).join(",");default:return Array.from(this).map((function(t){return t.toString("base64")})).join(",")}};e.prototype.downloadAsPEM=function(t){b.cert.asPEM(this.toString("pem"),t||this.commonName)};e.prototype.downloadAsDER=function(t){b.cert.asDER(this.raw,t||this.commonName)};return e}(Array);var A="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%}.textarea{min-height:300px;width:100%;border-radius:4px;border:1px solid var(--pv-color-gray-5);padding:14px;font-family:monospace;resize:vertical}.controls{margin-top:var(--pv-size-base-2);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2);margin-bottom:var(--pv-size-base-12)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";var D=t("peculiar_certificate_decoder",function(){function t(t){var o=this;e(this,t);this.successParse=r(this,"successParse");this.clearCertificate=r(this,"clearCertificate");this.handleClickDecode=function(){var t=o.inputPaste.value;if(t){o.decode(t)}};this.handleClickClear=function(){o.clearValue()};this.handleChangeInputFile=function(t){return __awaiter(o,void 0,void 0,(function(){var e,r;return __generator(this,(function(o){switch(o.label){case 0:e=t.target;if(!e.files)return[3,2];return[4,n(e.files[0])];case 1:r=o.sent();if(typeof r.value==="string"){this.decode(r.value)}e.value="";o.label=2;case 2:return[2]}}))}))};this.handleChangeExample=function(t){if(t.target.value){o.decode(t.target.value)}else{o.clearValue()}};this.handleDropFile=function(t){return __awaiter(o,void 0,void 0,(function(){var e,r;return __generator(this,(function(o){switch(o.label){case 0:t.stopPropagation();t.preventDefault();e=t.dataTransfer;if(!e.files)return[3,2];return[4,n(e.files[0])];case 1:r=o.sent();if(typeof r.value==="string"){this.decode(r.value)}o.label=2;case 2:return[2]}}))}))}}t.prototype.componentDidLoad=function(){var t=this;if(this.certificateToDecode){setTimeout((function(){return t.decode(t.certificateToDecode)}),100)}};t.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()};t.prototype.setValue=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,o;return __generator(this,(function(a){switch(a.label){case 0:this.certificateDecoded=t;e=this.inputPaste;return[4,t.toString("pem")];case 1:e.value=a.sent();o=(r=this.successParse).emit;return[4,t.toString("base64url")];case 2:o.apply(r,[a.sent()]);return[2]}}))}))};t.prototype.decode=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(r){new Promise((function(e){e(new C(t))})).catch((function(){return new y(t)})).catch((function(){return new w(t)})).catch((function(){return new m(t)})).catch((function(){return new x(t)})).catch((function(){return new g(t)})).then((function(t){return e.setValue(t)})).catch((function(e){console.log(e);alert('Error decoding certificate:\n"'.concat(t,'"\n\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.'))}));return[2]}))}))};t.prototype.renderCertificate=function(){if(this.certificateDecoded instanceof C){return o("peculiar-certificate-chain-viewer",{certificates:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof y){return o("peculiar-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof w){return o("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof m){return o("peculiar-csr-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof x){return o("peculiar-crl-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof g){return o("peculiar-ssh-certificate-viewer",{certificate:this.certificateDecoded,download:true})}return null};t.prototype.render=function(){var t=this;var e;return o(a,{key:"9067f2d7f33a40b3ad0ba03c7338a6f800100dab"},o("textarea",{key:"9e8962631c259fd5e144a1397d8591dde46d032f",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:function(e){t.inputPaste=e},onDrop:this.handleDropFile}),o("div",{key:"9be2b1e6c9b3de94c9d5e1e6cf31d9fb487960d8",class:"controls"},o("div",{key:"3959b89ab5c5654a3c10a1166743c056c0340e2e",class:"control_row"},o(z,{key:"3c03f42d14ff5a485264523bab40765bb4f89a8f",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),o("input",{key:"3c8682f5de0b0e2f84e37a8a05882ebcf331daef",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl,.cert",value:"",onChange:this.handleChangeInputFile})),((e=this.certificateExamples)===null||e===void 0?void 0:e.length)&&o("div",{key:"7c38788ccf4b038126ddf6909ec1d3de76325660",class:"control_row"},o(z,{key:"c1c13aaad3d1df51465c6c51ee24f45313de8f1c",variant:"b3",color:"secondary-tint-2"},"Load examples:"),o("select",{key:"811c4440269bb0a0a55f488e10dfa12093b18d7b",onChange:this.handleChangeExample},o("option",{key:"d2e30396fe3a59d5c46c83c6cd1e5b5a58f15f73",value:""},"None"),this.certificateExamples.map((function(t){return o("option",{value:t.value},t.title)})))),o("div",{key:"58daae2b9d8e2dd4c698ec9ad6e7f0d8b2500883",class:"control_row"},o(k,{key:"d7f813370ace60deaad975622cc26b9a497ce9d2",onClick:this.handleClickDecode},"Decode"),o(k,{key:"ec2fbeb6283ffd17c7328ee78c9464926b0bbb6b",onClick:this.handleClickClear},"Clear"))),this.renderCertificate())};return t}());D.style=A}}}));
|
|
5
|
+
//# sourceMappingURL=p-83bfd8e5.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["id_data","id_signedData","X509Certificates","_super","__extends","raw","_this","call","this","rawItems","PemConverter","isPem","decode","map","value","Convert","ToBase64Url","split","length","Error","_i","rawItems_1","item","push","X509Certificate","Object","defineProperty","prototype","Array","from","o","commonName","join","signedData","SignedData","version","encapContentInfo","eContentType","eContent","EncapsulatedContent","single","OctetString","certificates","CertificateSet","CertificateChoices","certificate","AsnConvert","parse","Certificate","cms","ContentInfo","contentType","content","serialize","toString","format","downloadAsPEM","name","Download","cert","asPEM","downloadAsDER","asDER","certificateDecoderCss","CertificateDecoder","exports","class_1","hostRef","handleClickDecode","inputPaste","handleClickClear","clearValue","handleChangeInputFile","event","__awaiter","element","target","files","readAsBinaryString","file","_b","sent","handleChangeExample","handleDropFile","stopPropagation","preventDefault","dataTransfer","componentDidLoad","certificateToDecode","setTimeout","certificateDecoded","clearCertificate","emit","setValue","_e","_d","_c","successParse","apply","Promise","resolve","catch","X509AttributeCertificate","Pkcs10CertificateRequest","X509Crl","SshCertificate","then","res","error","console","log","alert","concat","renderCertificate","h","download","render","Host","key","placeholder","class","ref","el","onDrop","Typography","variant","color","type","accept","onChange","_a","certificateExamples","example","title","Button","onClick"],"sources":["../../node_modules/.pnpm/@peculiar+asn1-cms@2.4.0/node_modules/@peculiar/asn1-cms/build/es2015/object_identifiers.js","src/crypto/x509_certificates.ts","src/components/certificate-decoder/certificate-decoder.scss?tag=peculiar-certificate-decoder&encapsulation=shadow","src/components/certificate-decoder/certificate-decoder.tsx"],"sourcesContent":["export const id_ct_contentInfo = \"1.2.840.113549.1.9.16.1.6\";\nexport const id_data = \"1.2.840.113549.1.7.1\";\nexport const id_signedData = \"1.2.840.113549.1.7.2\";\nexport const id_envelopedData = \"1.2.840.113549.1.7.3\";\nexport const id_digestedData = \"1.2.840.113549.1.7.5\";\nexport const id_encryptedData = \"1.2.840.113549.1.7.6\";\nexport const id_authData = \"1.2.840.113549.1.9.16.1.2\";\n","import { Convert } from 'pvtsutils';\nimport {\n SignedData,\n id_data,\n EncapsulatedContent,\n CertificateSet,\n CertificateChoices,\n ContentInfo,\n id_signedData,\n} from '@peculiar/asn1-cms';\nimport { Certificate } from '@peculiar/asn1-x509';\nimport { AsnConvert, OctetString } from '@peculiar/asn1-schema';\nimport { Download } from '../utils';\nimport { PemConverter } from './pem_converter';\nimport { X509Certificate } from './x509_certificate';\n\nexport class X509Certificates extends Array<X509Certificate> {\n constructor(raw: string) {\n super();\n\n const rawItems = PemConverter.isPem(raw)\n ? PemConverter.decode(raw).map((value) => Convert.ToBase64Url(value))\n : raw.split(',');\n\n if (rawItems.length < 2) {\n throw new Error('Unable to parse string. The array of elements is less than 2');\n }\n\n for (const item of rawItems) {\n this.push(new X509Certificate(item));\n }\n }\n\n public get commonName(): string {\n return Array.from(this)\n .map((o) => o.commonName)\n .join('_');\n }\n\n public get raw(): ArrayBuffer {\n const signedData = new SignedData();\n\n signedData.version = 1;\n signedData.encapContentInfo.eContentType = id_data;\n signedData.encapContentInfo.eContent = new EncapsulatedContent({ single: new OctetString() });\n signedData.certificates = new CertificateSet(\n Array.from(this)\n .map((o) => new CertificateChoices({ certificate: AsnConvert.parse(o.raw, Certificate) })),\n );\n\n const cms = new ContentInfo({\n contentType: id_signedData,\n content: AsnConvert.serialize(signedData),\n });\n\n return AsnConvert.serialize(cms);\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return Array.from(this)\n .map((o) => o.toString('pem'))\n .join('\\n');\n case 'base64url':\n return Array.from(this)\n .map((o) => o.toString('base64url'))\n .join(',');\n default:\n return Array.from(this)\n .map((o) => o.toString('base64'))\n .join(',');\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.cert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.cert.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.textarea {\n min-height: 300px;\n width: 100%;\n border-radius: 4px;\n border: 1px solid var(--pv-color-gray-5);;\n padding: 14px;\n font-family: monospace;\n resize: vertical;\n}\n\n.controls {\n margin-top: var(--pv-size-base-2);\n display: flex;\n flex-direction: column;\n gap: var(--pv-size-base-2);\n margin-bottom: var(--pv-size-base-12);\n}\n\n.control_row {\n display: flex;\n align-items: center;\n gap: var(--pv-size-base);\n}\n","/**\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 {\n Component,\n Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n Pkcs10CertificateRequest,\n X509Crl,\n X509Certificates,\n SshCertificate,\n} from '../../crypto';\nimport { Button } from '../button';\nimport { Typography } from '../typography';\n\n@Component({\n tag: 'peculiar-certificate-decoder',\n styleUrl: 'certificate-decoder.scss',\n shadow: true,\n})\nexport class CertificateDecoder {\n private inputPaste?: HTMLTextAreaElement;\n\n /**\n * The example certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateExamples?: {\n title: string;\n value: string;\n }[];\n\n /**\n * The default certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateToDecode?: string;\n\n @State() certificateDecoded: X509Certificates\n | X509Certificate\n | X509AttributeCertificate\n | Pkcs10CertificateRequest\n | X509Crl\n | SshCertificate;\n\n /**\n * Emitted when the certificate has been successfully parsed.\n */\n @Event() successParse!: EventEmitter<string>;\n\n /**\n * Emitted when the certificate has been removed.\n */\n @Event() clearCertificate!: EventEmitter<void>;\n\n componentDidLoad() {\n if (this.certificateToDecode) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.certificateToDecode), 100);\n }\n }\n\n private handleClickDecode = () => {\n const { value } = this.inputPaste;\n\n if (value) {\n this.decode(value);\n }\n };\n\n private handleClickClear = () => {\n this.clearValue();\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private handleChangeInputFile = async (event: any) => {\n const element = event.target;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n\n element.value = '';\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private handleChangeExample = (event: any) => {\n if (event.target.value) {\n this.decode(event.target.value);\n } else {\n this.clearValue();\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private handleDropFile = async (event: any) => {\n event.stopPropagation();\n event.preventDefault();\n\n const element = event.dataTransfer;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n }\n };\n\n clearValue() {\n this.inputPaste.value = '';\n this.certificateDecoded = null;\n this.clearCertificate.emit();\n }\n\n async setValue(value: typeof this.certificateDecoded) {\n this.certificateDecoded = value;\n\n this.inputPaste.value = await value.toString('pem');\n this.successParse.emit(await value.toString('base64url'));\n }\n\n async decode(value: string) {\n new Promise<X509Certificates>((resolve) => {\n resolve(new X509Certificates(value));\n })\n .catch(() => new X509Certificate(value))\n .catch(() => new X509AttributeCertificate(value))\n .catch(() => new Pkcs10CertificateRequest(value))\n .catch(() => new X509Crl(value))\n .catch(() => new SshCertificate(value))\n .then((res: typeof this.certificateDecoded) => this.setValue(res))\n .catch((error) => {\n console.log(error);\n\n alert(`Error decoding certificate:\\n\"${value}\"\\n\\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.`);\n });\n }\n\n renderCertificate() {\n if (this.certificateDecoded instanceof X509Certificates) {\n return (\n <peculiar-certificate-chain-viewer\n certificates={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Certificate) {\n return (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509AttributeCertificate) {\n return (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof Pkcs10CertificateRequest) {\n return (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Crl) {\n return (\n <peculiar-crl-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof SshCertificate) {\n return (\n <peculiar-ssh-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n return null;\n }\n\n render() {\n return (\n <Host>\n <textarea\n placeholder=\"Certificate DER or PEM\"\n class=\"textarea t-b2 c-black\"\n ref={(el) => { this.inputPaste = el; }}\n onDrop={this.handleDropFile}\n />\n <div class=\"controls\">\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Drag or load file:\n </Typography>\n <input\n type=\"file\"\n accept=\"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl,.cert\"\n value=\"\"\n onChange={this.handleChangeInputFile}\n />\n </div>\n {this.certificateExamples?.length && (\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Load examples:\n </Typography>\n <select onChange={this.handleChangeExample}>\n <option value=\"\">None</option>\n {this.certificateExamples.map((example) => (\n <option value={example.value}>\n {example.title}\n </option>\n ))}\n </select>\n </div>\n )}\n <div class=\"control_row\">\n <Button\n onClick={this.handleClickDecode}\n >\n Decode\n </Button>\n <Button\n onClick={this.handleClickClear}\n >\n Clear\n </Button>\n </div>\n </div>\n {this.renderCertificate()}\n </Host>\n );\n }\n}\n"],"mappings":";;;8jBACO,IAAMA,EAAU,uBAChB,IAAMC,EAAgB,uBCcvB,IAAAC,EAAA,SAAAC,GAAgCC,UAAAF,EAAAC,GACpC,SAAAD,EAAYG,GACV,IAAAC,EAAAH,EAAKI,KAAAC,OAAEA,KAEP,IAAMC,EAAWC,EAAaC,MAAMN,GAChCK,EAAaE,OAAOP,GAAKQ,KAAI,SAACC,GAAUC,iBAAQC,YAAYF,EAApBC,IACxCV,EAAIY,MAAM,KAEd,GAAIR,EAASS,OAAS,EAAG,CACvB,MAAM,IAAIC,MAAM,+D,CAGlB,IAAmB,IAAAC,EAAA,EAAAC,EAAAZ,EAAAW,EAAAC,EAAAH,OAAAE,IAAU,CAAxB,IAAME,EAAID,EAAAD,GACbd,EAAKiB,KAAK,IAAIC,EAAgBF,G,UAIlCG,OAAAC,eAAWxB,EAAAyB,UAAA,aAAU,C,IAArB,WACE,OAAOC,MAAMC,KAAKr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|
|
4
|
-
import{r as t,h as e,H as r}from"./p-CwgZaF40.js";import{X as a}from"./p-BG_D4qzJ.js";import"./p-CSS3OhZq.js";import{B as o,S as s,I as i,P as c,a as n,T as v,E as p,g as l,b as h,c as d,M as g}from"./p-DKooqn40.js";import{T as b}from"./p-CutTi-2B.js";import"./p-CZuaTO2G.js";import"./p-DMZr5ztF.js";import"./p-JyD6URnB.js";const y="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";const w=class{constructor(e){t(this,e);this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=t=>{var e;return(e=this.authKeyIdParentLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=t=>{var e;return(e=this.authKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=t=>{var e;return(e=this.subjectKeyIdChildrenLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=t=>{var e;return(e=this.subjectKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)}}handleMediaQueryChange(t){this.mobileScreenView=t.matches}componentWillLoad(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}}disconnectedCallback(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))}async decodeCertificate(t){this.isDecodeInProcess=true;try{if(t instanceof a){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new a(t)}else{return}this.certificateDecoded.parseExtensions();await this.certificateDecoded.getThumbprint("SHA-1");await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t;console.error("Error certificate parse:",t)}this.isDecodeInProcess=false}watchCertificateAndDecode(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof a&&e instanceof a){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return e("div",{class:"status_wrapper"},e(b,null,"There was an error decoding this certificate."))}renderEmptyState(){return e("div",{class:"status_wrapper"},e(b,null,"There is no certificate available."))}render(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return e(r,{"data-mobile-screen-view":String(this.mobileScreenView)},e("table",null,e(o,Object.assign({},this.certificateDecoded)),e(s,{name:this.certificateDecoded.subject}),e(i,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),e(c,{publicKey:this.certificateDecoded.publicKey}),e(n,{signature:this.certificateDecoded.signature}),e(v,{thumbprints:this.certificateDecoded.thumbprints}),e(p,{extensions:this.certificateDecoded.extensions,getLEILink:d,getDNSNameLink:h,getIPAddressLink:l,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&e(g,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};w.style=y;export{w as peculiar_certificate_viewer};
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as e,H as r}from"./p-CwgZaF40.js";import{X as a}from"./p-h7XP7otl.js";import"./p-PCn0WXhQ.js";import{B as o,S as s,I as i,P as c,a as n,T as v,E as p,g as l,b as h,c as d,M as g}from"./p-DnOLjFJP.js";import{T as b}from"./p-CutTi-2B.js";import"./p-BwlcJAh0.js";import"./p-DMZr5ztF.js";import"./p-JyD6URnB.js";const y="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";const w=class{constructor(e){t(this,e);this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=t=>{var e;return(e=this.authKeyIdParentLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=t=>{var e;return(e=this.authKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=t=>{var e;return(e=this.subjectKeyIdChildrenLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=t=>{var e;return(e=this.subjectKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)}}handleMediaQueryChange(t){this.mobileScreenView=t.matches}componentWillLoad(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}}disconnectedCallback(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))}async decodeCertificate(t){this.isDecodeInProcess=true;try{if(t instanceof a){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new a(t)}else{return}this.certificateDecoded.parseExtensions();await this.certificateDecoded.getThumbprint("SHA-1");await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t;console.error("Error certificate parse:",t)}this.isDecodeInProcess=false}watchCertificateAndDecode(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof a&&e instanceof a){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return e("div",{class:"status_wrapper"},e(b,null,"There was an error decoding this certificate."))}renderEmptyState(){return e("div",{class:"status_wrapper"},e(b,null,"There is no certificate available."))}render(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return e(r,{"data-mobile-screen-view":String(this.mobileScreenView)},e("table",null,e(o,Object.assign({},this.certificateDecoded)),e(s,{name:this.certificateDecoded.subject}),e(i,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),e(c,{publicKey:this.certificateDecoded.publicKey}),e(n,{signature:this.certificateDecoded.signature}),e(v,{thumbprints:this.certificateDecoded.thumbprints}),e(p,{extensions:this.certificateDecoded.extensions,getLEILink:d,getDNSNameLink:h,getIPAddressLink:l,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&e(g,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};w.style=y;export{w as peculiar_certificate_viewer};
|
|
5
|
+
//# sourceMappingURL=p-98219569.entry.js.map
|