@peculiar/certificates-viewer 4.9.1 → 4.9.2
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 +1 -1
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/certificate-chain-viewer.js +1 -1
- package/components/certificate-viewer.js +1 -1
- package/components/certificate-viewer.js.map +1 -1
- package/components/circular-progress.js +2 -2
- package/components/crl-viewer.js +2 -2
- package/components/crl-viewer.js.map +1 -1
- package/components/csr-viewer.js +1 -1
- package/components/csr-viewer.js.map +1 -1
- package/components/download.js +83 -12
- package/components/download.js.map +1 -1
- package/components/highlight-words.js +1 -1
- package/components/miscellaneous.js +17 -1
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +51 -53
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificates-viewer.js +1 -1
- package/components/ssh-certificate-viewer.js +2 -2
- package/components/ssh-certificate-viewer.js.map +1 -1
- package/components/text-hider.js +1 -1
- package/dist/cjs/{extension-BDpdRJkE.js → extension-Ba-KQhu5.js} +4 -3
- package/dist/cjs/extension-Ba-KQhu5.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{miscellaneous-DmTT_MGG.js → miscellaneous-CtuYfnBB.js} +19 -4
- package/dist/cjs/miscellaneous-CtuYfnBB.js.map +1 -0
- 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 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js +10 -10
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +3 -3
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +54 -55
- package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +5 -5
- package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -3
- package/dist/cjs/peculiar-text-hider.cjs.entry.js +1 -1
- package/dist/cjs/peculiar.cjs.js +1 -1
- package/dist/cjs/{pkcs10_certificate_request-DZLiHGCV.js → pkcs10_certificate_request-BDLZWqTP.js} +3 -3
- package/dist/cjs/{pkcs10_certificate_request-DZLiHGCV.js.map → pkcs10_certificate_request-BDLZWqTP.js.map} +1 -1
- package/dist/cjs/{ssh_certificate-Bh14rhzR.js → ssh_certificate-Gu4FwsRk.js} +86 -13
- package/dist/cjs/ssh_certificate-Gu4FwsRk.js.map +1 -0
- package/dist/cjs/{x509_certificate-p8RMn7Hw.js → x509_certificate-BSOf2t9Y.js} +4 -4
- package/dist/cjs/{x509_certificate-p8RMn7Hw.js.map → x509_certificate-BSOf2t9Y.js.map} +1 -1
- package/dist/cjs/{x509_crl-tjmX6l3R.js → x509_crl-BgUtqkpv.js} +5 -5
- package/dist/cjs/{x509_crl-tjmX6l3R.js.map → x509_crl-BgUtqkpv.js.map} +1 -1
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +1 -1
- package/dist/collection/components/button-menu/button-menu.js +1 -1
- package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.css +3 -3
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +53 -63
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/apple_developer_id_date_extension.js +19 -0
- package/dist/collection/components/certificate-details-parts/extensions/apple_developer_id_date_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/index.js +5 -1
- package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -1
- package/dist/collection/components/certificate-viewer/certificate-viewer.css +3 -3
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +1 -1
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +1 -1
- package/dist/collection/components/circular-progress/circular-progress.js +2 -2
- package/dist/collection/components/crl-viewer/crl-viewer.js +1 -1
- package/dist/collection/components/csr-viewer/csr-viewer.js +1 -1
- package/dist/collection/components/highlight-words/highlight-words.js +1 -1
- package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +1 -1
- package/dist/collection/components/text-hider/text-hider.js +1 -1
- package/dist/collection/constants/oids.js +27 -6
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/extension.js +2 -1
- package/dist/collection/crypto/extension.js.map +1 -1
- package/dist/collection/crypto/extensions/apple_developer_id_date.js +53 -0
- package/dist/collection/crypto/extensions/apple_developer_id_date.js.map +1 -0
- package/dist/collection/crypto/extensions/index.js +1 -0
- package/dist/collection/crypto/extensions/index.js.map +1 -1
- package/dist/collection/www-copy/favicon.svg +1 -0
- package/dist/collection/www-copy/index.js +5 -10
- package/dist/esm/{extension-xW03sQxn.js → extension-8GydD2wh.js} +4 -3
- package/dist/esm/extension-8GydD2wh.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{miscellaneous-D-Qxv14j.js → miscellaneous-Bxm6kKwP.js} +19 -4
- package/dist/esm/miscellaneous-Bxm6kKwP.js.map +1 -0
- 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 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js +10 -10
- package/dist/esm/peculiar-button-menu_3.entry.js +3 -3
- package/dist/esm/peculiar-certificate-decoder.entry.js +54 -55
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +5 -5
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm/peculiar-text-hider.entry.js +1 -1
- package/dist/esm/peculiar.js +1 -1
- package/dist/esm/{pkcs10_certificate_request-Crr9FABo.js → pkcs10_certificate_request-B_lMfAi8.js} +3 -3
- package/dist/esm/{pkcs10_certificate_request-Crr9FABo.js.map → pkcs10_certificate_request-B_lMfAi8.js.map} +1 -1
- package/dist/esm/{ssh_certificate-CmOVFH_Z.js → ssh_certificate-Del2D5s9.js} +85 -14
- package/dist/esm/ssh_certificate-Del2D5s9.js.map +1 -0
- package/dist/esm/{x509_certificate-C2EVTspY.js → x509_certificate-DRGTrdPm.js} +4 -4
- package/dist/{esm-es5/x509_certificate-C2EVTspY.js.map → esm/x509_certificate-DRGTrdPm.js.map} +1 -1
- package/dist/esm/{x509_crl-Bdnys_YT.js → x509_crl-rO-rdi1G.js} +5 -5
- package/dist/{esm-es5/x509_crl-Bdnys_YT.js.map → esm/x509_crl-rO-rdi1G.js.map} +1 -1
- package/dist/esm-es5/extension-8GydD2wh.js +12 -0
- package/dist/esm-es5/extension-8GydD2wh.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{miscellaneous-D-Qxv14j.js → miscellaneous-Bxm6kKwP.js} +10 -3
- package/dist/esm-es5/miscellaneous-Bxm6kKwP.js.map +1 -0
- 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 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js +3 -3
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +2 -2
- 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-certificate-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
- package/dist/esm-es5/peculiar.js +1 -1
- package/dist/esm-es5/{pkcs10_certificate_request-Crr9FABo.js → pkcs10_certificate_request-B_lMfAi8.js} +2 -2
- package/dist/esm-es5/{pkcs10_certificate_request-Crr9FABo.js.map → pkcs10_certificate_request-B_lMfAi8.js.map} +1 -1
- package/dist/esm-es5/{ssh_certificate-CmOVFH_Z.js → ssh_certificate-Del2D5s9.js} +5 -5
- package/dist/esm-es5/ssh_certificate-Del2D5s9.js.map +1 -0
- package/dist/esm-es5/{x509_certificate-C2EVTspY.js → x509_certificate-DRGTrdPm.js} +2 -2
- package/dist/{esm/x509_certificate-C2EVTspY.js.map → esm-es5/x509_certificate-DRGTrdPm.js.map} +1 -1
- package/dist/esm-es5/{x509_crl-Bdnys_YT.js → x509_crl-rO-rdi1G.js} +2 -2
- package/dist/{esm/x509_crl-Bdnys_YT.js.map → esm-es5/x509_crl-rO-rdi1G.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/p-1fb833f3.entry.js +5 -0
- package/dist/peculiar/{p-3424de20.system.entry.js → p-64cc6da1.system.entry.js} +2 -2
- package/dist/peculiar/{p-007b79ff.entry.js → p-76472b19.entry.js} +2 -2
- package/dist/peculiar/{p-0ef9c56c.entry.js → p-7b83898f.entry.js} +21 -21
- package/dist/peculiar/{p-0ef9c56c.entry.js.map → p-7b83898f.entry.js.map} +1 -1
- package/dist/peculiar/{p-f7ee4d56.entry.js → p-7c5aa1f5.entry.js} +2 -2
- package/dist/peculiar/{p-f7ee4d56.entry.js.map → p-7c5aa1f5.entry.js.map} +1 -1
- package/dist/peculiar/p-8d36d2f8.system.entry.js +5 -0
- package/dist/peculiar/p-8d36d2f8.system.entry.js.map +1 -0
- package/dist/peculiar/{p-3a493e87.entry.js → p-95f81b6d.entry.js} +2 -2
- package/dist/peculiar/p-9ab5fa9f.entry.js +5 -0
- package/dist/peculiar/p-9ab5fa9f.entry.js.map +1 -0
- package/dist/peculiar/{p-DberG072.system.js → p-B5d7q9FD.system.js} +4 -4
- package/dist/peculiar/{p-DberG072.system.js.map → p-B5d7q9FD.system.js.map} +1 -1
- package/dist/peculiar/{p-B7cL9SBA.js → p-BAnW9WLg.js} +4 -4
- package/dist/peculiar/{p-B7cL9SBA.js.map → p-BAnW9WLg.js.map} +1 -1
- package/dist/peculiar/p-BKLsbktK.system.js +135 -0
- package/dist/peculiar/p-BKLsbktK.system.js.map +1 -0
- package/dist/peculiar/{p-vXPL1mjI.system.js.map → p-BQoMhw1w.system.js.map} +1 -1
- package/dist/peculiar/{p-1yfbC8AM.js → p-Ba1oqaJ3.js} +61 -54
- package/dist/peculiar/p-Ba1oqaJ3.js.map +1 -0
- package/dist/peculiar/{p-CGipIfjs.system.js → p-BakSwSe7.system.js} +2 -2
- package/dist/peculiar/{p-CGipIfjs.system.js.map → p-BakSwSe7.system.js.map} +1 -1
- package/dist/peculiar/{p-Bwp7g8Ef.system.js.map → p-Blt9UUmt.system.js.map} +1 -1
- package/dist/peculiar/{p-w85NrMQC.system.js.map → p-BpRY-zq0.system.js.map} +1 -1
- package/dist/peculiar/p-CDZsc_KS.system.js.map +1 -0
- package/dist/peculiar/{p-B4vvBwd6.js → p-CH0mNFdH.js} +3 -3
- package/dist/peculiar/{p-B4vvBwd6.js.map → p-CH0mNFdH.js.map} +1 -1
- package/dist/peculiar/{p-Bfl7RVFY.system.js → p-CTj-Drej.system.js} +4 -4
- package/dist/peculiar/{p-Bfl7RVFY.system.js.map → p-CTj-Drej.system.js.map} +1 -1
- package/dist/peculiar/{p-BvX2AYI4.system.js.map → p-CgXNYogJ.system.js.map} +1 -1
- package/dist/peculiar/p-Cp20xosi.js +12 -0
- package/dist/peculiar/p-Cp20xosi.js.map +1 -0
- package/dist/peculiar/{p-Cq11_gqW.system.js → p-DPnMJlS4.system.js} +2 -2
- package/dist/peculiar/p-DPnMJlS4.system.js.map +1 -0
- package/dist/peculiar/{p-tkt_tT15.system.js → p-DcqxnCVz.system.js} +61 -54
- package/dist/peculiar/p-DcqxnCVz.system.js.map +1 -0
- package/dist/peculiar/{p-CmOVFH_Z.js → p-Del2D5s9.js} +8 -8
- package/dist/peculiar/p-Del2D5s9.js.map +1 -0
- package/dist/peculiar/{p-BxiR02Uf.js → p-DrLCyy39.js} +4 -4
- package/dist/peculiar/{p-BxiR02Uf.js.map → p-DrLCyy39.js.map} +1 -1
- package/dist/peculiar/{p-7HEye5oH.system.js.map → p-MyCIZClD.system.js.map} +1 -1
- package/dist/peculiar/p-b8bb96f4.system.entry.js +5 -0
- package/dist/peculiar/{p-c17b79cf.system.entry.js → p-d2b87ce5.system.entry.js} +2 -2
- package/dist/peculiar/{p-b955360e.system.entry.js → p-da018463.system.entry.js} +18 -18
- package/dist/peculiar/p-da018463.system.entry.js.map +1 -0
- package/dist/peculiar/{p-4ff3d82a.system.entry.js → p-f30eb78c.system.entry.js} +2 -2
- package/dist/peculiar/p-f30eb78c.system.entry.js.map +1 -0
- package/dist/peculiar/p-hEr9Uo3G.system.js +1 -1
- package/dist/peculiar/p-itJt0J5g.system.js +12 -0
- package/dist/peculiar/p-itJt0J5g.system.js.map +1 -0
- 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 -1
- package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +8 -10
- package/dist/types/components/certificate-details-parts/extensions/apple_developer_id_date_extension.d.ts +15 -0
- package/dist/types/components.d.ts +6 -6
- package/dist/types/constants/oids.d.ts +23 -2
- package/dist/types/crypto/extension.d.ts +2 -1
- package/dist/types/crypto/extensions/apple_developer_id_date.d.ts +19 -0
- package/dist/types/crypto/extensions/index.d.ts +1 -0
- package/hydrate/index.js +158 -71
- package/hydrate/index.mjs +158 -71
- package/package.json +31 -30
- package/dist/cjs/extension-BDpdRJkE.js.map +0 -1
- package/dist/cjs/miscellaneous-DmTT_MGG.js.map +0 -1
- package/dist/cjs/ssh_certificate-Bh14rhzR.js.map +0 -1
- package/dist/collection/components/certificate-decoder/certificate-decoder.css +0 -475
- package/dist/esm/extension-xW03sQxn.js.map +0 -1
- package/dist/esm/miscellaneous-D-Qxv14j.js.map +0 -1
- package/dist/esm/ssh_certificate-CmOVFH_Z.js.map +0 -1
- package/dist/esm-es5/extension-xW03sQxn.js +0 -12
- package/dist/esm-es5/extension-xW03sQxn.js.map +0 -1
- package/dist/esm-es5/miscellaneous-D-Qxv14j.js.map +0 -1
- package/dist/esm-es5/ssh_certificate-CmOVFH_Z.js.map +0 -1
- package/dist/peculiar/p-1yfbC8AM.js.map +0 -1
- package/dist/peculiar/p-342e499f.system.entry.js +0 -5
- package/dist/peculiar/p-4ff3d82a.system.entry.js.map +0 -1
- package/dist/peculiar/p-64517c6e.system.entry.js +0 -5
- package/dist/peculiar/p-64517c6e.system.entry.js.map +0 -1
- package/dist/peculiar/p-7777c7dc.entry.js +0 -5
- package/dist/peculiar/p-7777c7dc.entry.js.map +0 -1
- package/dist/peculiar/p-CLcRtCZ9.system.js +0 -135
- package/dist/peculiar/p-CLcRtCZ9.system.js.map +0 -1
- package/dist/peculiar/p-Ckf8xErP.system.js +0 -12
- package/dist/peculiar/p-Ckf8xErP.system.js.map +0 -1
- package/dist/peculiar/p-CmOVFH_Z.js.map +0 -1
- package/dist/peculiar/p-Cq11_gqW.system.js.map +0 -1
- package/dist/peculiar/p-DXA1451q.js +0 -12
- package/dist/peculiar/p-DXA1451q.js.map +0 -1
- package/dist/peculiar/p-Drk9aw2j.system.js.map +0 -1
- package/dist/peculiar/p-b955360e.system.entry.js.map +0 -1
- package/dist/peculiar/p-ce08fab1.entry.js +0 -5
- package/dist/peculiar/p-tkt_tT15.system.js.map +0 -1
- /package/dist/peculiar/{p-ce08fab1.entry.js.map → p-1fb833f3.entry.js.map} +0 -0
- /package/dist/peculiar/{p-3424de20.system.entry.js.map → p-64cc6da1.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-007b79ff.entry.js.map → p-76472b19.entry.js.map} +0 -0
- /package/dist/peculiar/{p-3a493e87.entry.js.map → p-95f81b6d.entry.js.map} +0 -0
- /package/dist/peculiar/{p-342e499f.system.entry.js.map → p-b8bb96f4.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-c17b79cf.system.entry.js.map → p-d2b87ce5.system.entry.js.map} +0 -0
|
@@ -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-Dpo1Lsuj.js";import{X as o}from"./p-
|
|
4
|
+
import{h as t,r as e,c as a,H as r}from"./p-Dpo1Lsuj.js";import{X as o}from"./p-CH0mNFdH.js";import{a4 as s,a5 as i,a6 as c}from"./p-Del2D5s9.js";import{T as n,B as l}from"./p-GTlYmF1j.js";import{D as p,L as v,C as d}from"./p-BqjR5Yyc.js";import{D as h}from"./p-DzEcDVLW.js";import{a as b,A as g}from"./p-BUdiU0IO.js";import"./p-Cp20xosi.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-Dpo1Lsuj.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:calc(var(--pv-size-base) * 6);min-width:calc(var(--pv-size-base) * 6);padding:0 calc(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:calc(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:calc(var(--pv-size-base) * 4);border-bottom:1px solid var(--pv-color-gray-4)}.input_search{height:calc(var(--pv-size-base) * 8);width:100%;outline:none;background-color:var(--pv-color-gray-1);padding:0 calc(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:calc(var(--pv-size-base) * 10)}table td:last-child,table th:last-child{padding-left:0;width:calc(var(--pv-size-base) * 10)}table th{padding:calc(var(--pv-size-base) * 2) calc(var(--pv-size-base) * 4)}table th.col_action{padding:0}table td{padding:calc(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:calc(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:calc(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:calc(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:calc(var(--pv-size-base) * 3) calc(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:calc(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:calc(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:calc(var(--pv-size-base) * 2) calc(var(--pv-size-base) * 4)}:host([data-mobile-screen-view=true]) table .certificate_row_actions{padding-top:calc(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:calc(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-7c5aa1f5.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["h","registerInstance","createEvent","Host","X509Certificate","l10n","dateShort","OIDs","Typography","Button","DetailsIcon","LinkIcon","CrossIcon","DownloadIcon","ArrowTopIcon","ArrowBottomIcon","CertificateSummary","props","certificate","showIssuer","renderRow","name","value","variant","color","getString","subjectToString","issuerToString","serialNumber","version","validity","notBefore","notAfter","certificatesViewerCss","CertificatesViewer","constructor","hostRef","this","detailsOpen","detailsClose","isHasRoots","certificates","filterWithSearch","highlightWithSearch","mobileMediaQueryString","mobileScreenView","search","certificatesDecoded","isDecodeInProcess","handleClickDetails","certificateSelectedForDetails","emit","handleModalClose","undefined","handleSearch","event","target","trim","handleMediaQueryChange","matches","componentWillLoad","certificatesDecodeAndSet","mobileMediaQuery","window","matchMedia","addEventListener","bind","disconnectedCallback","removeEventListener","watchCertificates","newValue","oldValue","JSON","stringify","hasRoots","Array","isArray","data","decoded","getThumbprint","push","body","tests","isRoot","error","console","getCertificateName","commonName","handleClickDownloadAsPem","downloadAsPEM","handleClickDownloadAsDer","downloadAsDER","handleClickRow","index","isExpandedRowClicked","expandedRow","getMaxColSpanValue","colSpan","renderCertificateButtonActions","_a","_b","_c","isHasTestURLs","expired","revoked","valid","class","groups","title","options","text","startIcon","onClick","href","renderExpandedRow","renderCertificatesRows","searchHighlight","content","forEach","isExpandedRow","publicKeyValue","signature","algorithm","certificateStringForSearch","issuerCommonName","thumbprints","join","toLowerCase","indexOf","certificate_row","m_expanded","key","renderCertificateDetailsModal","role","part","renderSearch","type","disabled","length","placeholder","onInput","renderEmptyState","renderEmptySearchState","renderLoadingState","renderTableBody","certificatesRows","render","String","watchers","style"],"sources":["0"],"mappings":";;;YAGSA,OAAQC,OAAuBC,OAAkBC,MAAY,8BACxDC,MAAuB,8BACvBC,OAAWC,OAAgBC,MAAY,8BACvCC,OAAiBC,MAAc,8BAC/BC,OAAkBC,OAAeC,MAAiB,8BAClDC,MAAoB,8BACpBC,OAAmBC,MAAuB,wBACjD;;;;;;;GASP,MAAMC,EAAsBC,IACxB,MAAMC,YAAEA,EAAWC,WAAEA,GAAgBF,EACrC,MAAMG,EAAY,CAACC,EAAMC,IAAWtB,EAAE,KAAM,KAAMA,EAAE,KAAM,KAAMA,EAAEQ,EAAY,CAAEe,QAAS,KAAMC,MAAO,UAAYH,IAAQrB,EAAE,KAAM,KAAMA,EAAEQ,EAAY,CAAEe,QAAS,KAAMC,MAAO,SAAWF,KACzL,OAAQtB,EAAE,QAAS,KAAMA,EAAE,QAAS,KAAMoB,EAAUf,EAAKoB,UAAU,eAAgBP,EAAYQ,mBAAoBP,GAAcC,EAAUf,EAAKoB,UAAU,cAAeP,EAAYS,kBAAmBP,EAAUf,EAAKoB,UAAU,gBAAiBP,EAAYU,cAAeR,EAAUf,EAAKoB,UAAU,WAAYP,EAAYW,SAAUT,EAAUf,EAAKoB,UAAU,YAAaP,EAAYY,UAAWV,EAAUf,EAAKoB,UAAU,UAAWnB,EAAUY,EAAYa,YAAaX,EAAUf,EAAKoB,UAAU,WAAYnB,EAAUY,EAAYc,YAAa,EAGxhB,MAAMC,EAAwB,mrXAE9B,MAAMC,EAAqB,MACvB,WAAAC,CAAYC,GACRnC,EAAiBoC,KAAMD,GACvBC,KAAKC,YAAcpC,EAAYmC,KAAM,eACrCA,KAAKE,aAAerC,EAAYmC,KAAM,gBACtCA,KAAKG,WAAa,MAWlBH,KAAKI,aAAe,GAIpBJ,KAAKK,iBA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BzB,EAAE,KAAM,CAAEmI,IAAK,+CAAkDnI,EAAE,QAAS,CAAEmI,IAAK,4CAA8C9F,KAAK2G,oBAAqB3G,KAAK+F,gCAAiC/F,KAAKW,mBAAqBX,KAAK0G,qBACn8C,CACA,mBAAWK,GAAa,MAAO,CAC3B3G,aAAgB,CAAC,qBAClB,GAEPP,EAAmBmH,MAAQpH,SAElBC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["h","registerInstance","createEvent","Host","X509Certificate","l10n","dateShort","OIDs","Typography","Button","DetailsIcon","LinkIcon","CrossIcon","DownloadIcon","ArrowTopIcon","ArrowBottomIcon","CertificateSummary","props","certificate","showIssuer","renderRow","name","value","variant","color","getString","subjectToString","issuerToString","serialNumber","version","validity","notBefore","notAfter","certificatesViewerCss","CertificatesViewer","constructor","hostRef","this","detailsOpen","detailsClose","isHasRoots","certificates","filterWithSearch","highlightWithSearch","mobileMediaQueryString","mobileScreenView","search","certificatesDecoded","isDecodeInProcess","handleClickDetails","certificateSelectedForDetails","emit","handleModalClose","undefined","handleSearch","event","target","trim","handleMediaQueryChange","matches","componentWillLoad","certificatesDecodeAndSet","mobileMediaQuery","window","matchMedia","addEventListener","bind","disconnectedCallback","removeEventListener","watchCertificates","newValue","oldValue","JSON","stringify","hasRoots","Array","isArray","data","decoded","getThumbprint","push","body","tests","isRoot","error","console","getCertificateName","commonName","handleClickDownloadAsPem","downloadAsPEM","handleClickDownloadAsDer","downloadAsDER","handleClickRow","index","isExpandedRowClicked","expandedRow","getMaxColSpanValue","colSpan","renderCertificateButtonActions","_a","_b","_c","isHasTestURLs","expired","revoked","valid","class","groups","title","options","text","startIcon","onClick","href","renderExpandedRow","renderCertificatesRows","searchHighlight","content","forEach","isExpandedRow","publicKeyValue","signature","algorithm","certificateStringForSearch","issuerCommonName","thumbprints","join","toLowerCase","indexOf","certificate_row","m_expanded","key","renderCertificateDetailsModal","role","part","renderSearch","type","disabled","length","placeholder","onInput","renderEmptyState","renderEmptySearchState","renderLo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KAAK+F,gCAAiC/F,KAAKW,mBAAqBX,KAAK0G,qBACn8C,CACA,mBAAWK,GAAa,MAAO,CAC3B3G,aAAgB,CAAC,qBAClB,GAEPP,EAAmBmH,MAAQpH,SAElBC","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function c(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):i(e.value).then(o,c)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=c(0),o["throw"]=c(1),o["return"]=c(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return s([e,t])}}function s(c){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(r=0)),r)try{if(n=1,i&&(a=c[0]&2?i["return"]:c[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;if(i=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;i=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1];a=c;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=t.call(e,r)}catch(e){c=[6,e];i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
|
|
2
|
+
/*!
|
|
3
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
+
*/System.register(["./p-CCyzZ5j5.system.js","./p-D2QB-8Q6.system.js","./p-BKLsbktK.system.js","./p-CTj-Drej.system.js","./p-BakSwSe7.system.js","./p-B5d7q9FD.system.js","./p-itJt0J5g.system.js"],(function(e){"use strict";var t,r,n,i,a,o,c,s,u,f,d,l,b,h,p,y,w,v,g,x,m;return{setters:[function(e){t=e.r;r=e.c;n=e.h;i=e.H},function(e){a=e.a},function(e){o=e.P;c=e.b;s=e.Z;u=e._;f=e.$;d=e.a0;l=e.a1;b=e.e;h=e.C;p=e.a2;y=e.D;w=e.a3},function(e){v=e.X},function(e){g=e.X;x=e.a},function(e){m=e.P},null],execute:function(){var k="1.2.840.113549.1.7.1";var _="1.2.840.113549.1.7.2";var j=function(e){__extends(t,e);function t(t){var r=e.call(this)||this;var n=o.isPem(t)?o.decode(t).map((function(e){return c.Convert.ToBase64Url(e)})):t.split(",");if(n.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(var i=0,a=n;i<a.length;i++){var s=a[i];r.push(new v(s))}return r}Object.defineProperty(t.prototype,"commonName",{get:function(){return Array.from(this).map((function(e){return e.commonName})).join("_")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"raw",{get:function(){var e=new s;e.version=1;e.encapContentInfo.eContentType=k;e.encapContentInfo.eContent=new u({single:new f});e.certificates=new d(Array.from(this).map((function(e){return new l({certificate:b.parse(e.raw,h)})})));var t=new p({contentType:_,content:b.serialize(e)});return b.serialize(t)},enumerable:false,configurable:true});t.prototype.toString=function(e){if(e===void 0){e="pem"}switch(e){case"pem":return Array.from(this).map((function(e){return e.toString("pem")})).join("\n");case"base64url":return Array.from(this).map((function(e){return e.toString("base64url")})).join(",");default:return Array.from(this).map((function(e){return e.toString("base64")})).join(",")}};t.prototype.downloadAsPEM=function(e){y.cert.asPEM(this.toString("pem"),e||this.commonName)};t.prototype.downloadAsDER=function(e){y.cert.asDER(this.raw,e||this.commonName)};return t}(Array);var C=e("peculiar_certificate_decoder",function(){function e(e){var n=this;t(this,e);this.successParse=r(this,"successParse");this.clearCertificate=r(this,"clearCertificate");this.handleClickDecode=function(){var e=n.inputPaste.value;if(e)n.decode(e)};this.handleClickClear=function(){n.clearValue()};this.handleChangeInputFile=function(e){return __awaiter(n,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(i){switch(i.label){case 0:r=e.target;if(!((t=r.files)===null||t===void 0?void 0:t.length))return[3,2];return[4,a(r.files[0])];case 1:n=i.sent();if(typeof n.value==="string")this.decode(n.value);r.value="";i.label=2;case 2:return[2]}}))}))};this.handleChangeExample=function(e){var t=e.target.value;if(t)n.decode(t);else n.clearValue()};this.handleDrop=function(e){return __awaiter(n,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(i){switch(i.label){case 0:e.stopPropagation();e.preventDefault();r=(t=e.dataTransfer)===null||t===void 0?void 0:t.files;if(!(r===null||r===void 0?void 0:r.length))return[3,2];return[4,a(r[0])];case 1:n=i.sent();if(typeof n.value==="string")this.decode(n.value);i.label=2;case 2:return[2]}}))}))}}e.prototype.componentDidLoad=function(){var e=this;if(this.certificateToDecode){setTimeout((function(){return e.decode(e.certificateToDecode)}),100)}};e.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()};e.prototype.setValue=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(i){switch(i.label){case 0:this.certificateDecoded=e;t=this.inputPaste;return[4,e.toString("pem")];case 1:t.value=i.sent();n=(r=this.successParse).emit;return[4,e.toString("base64url")];case 2:n.apply(r,[i.sent()]);return[2]}}))}))};e.prototype.decode=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){new Promise((function(t){return t(new j(e))})).catch((function(){return new v(e)})).catch((function(){return new g(e)})).catch((function(){return new m(e)})).catch((function(){return new x(e)})).catch((function(){return new w(e)})).then((function(e){return t.setValue(e)})).catch((function(e){console.error(e);alert("Error decoding certificate.\n\nSupported formats: X.509 Certificate, Attribute Certificate, PKCS#10 CSR, CRL, SSH Certificate.")}));return[2]}))}))};e.prototype.renderDecodedComponent=function(){var e=this.certificateDecoded;if(e instanceof j){return n("peculiar-certificate-chain-viewer",{certificates:e,download:true})}if(e instanceof v){return n("peculiar-certificate-viewer",{certificate:e,download:true})}if(e instanceof g){return n("peculiar-attribute-certificate-viewer",{certificate:e,download:true})}if(e instanceof m){return n("peculiar-csr-viewer",{certificate:e,download:true})}if(e instanceof x){return n("peculiar-crl-viewer",{certificate:e,download:true})}if(e instanceof w){return n("peculiar-ssh-certificate-viewer",{certificate:e,download:true})}return null};e.prototype.render=function(){var e=this;var t,r,a;var o=!!this.certificateDecoded;return n(i,{key:"b10a85e97ef69c8a604bbd25505f7479b6653fd5",class:"relative grid h-full min-h-0 w-full grid-cols-1 overflow-hidden bg-gray-100 font-sans min-[821px]:grid-cols-2 max-[820px]:h-auto"},n("div",{key:"a1c72b0fe3f7d9fcba8c99e70d03941402dd63e9",class:"pointer-events-none absolute inset-y-0 left-1/2 hidden w-px -translate-x-1/2 bg-gray-200 min-[821px]:block","aria-hidden":"true"}),n("div",{key:"1132570fba04a4fd2d7d987aa4e4125293647831",class:"flex min-h-0 flex-col overflow-hidden bg-white max-[820px]:min-h-64 max-[820px]:border-b max-[820px]:border-gray-200"},n("div",{key:"68777e441ca9dc8436aaa740568591bd32fbd1c1",class:"flex shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-gray-100 px-4 py-2"},n("span",{key:"73c91874a01ffd1e71730fa6baa6fc39dfdbad48",class:"flex items-center gap-1.5 font-mono text-xs uppercase tracking-widest text-gray-500"},n("svg",{key:"b941fb650a45a4bf343cc78fc8d67be95a953db8",width:"12",height:"12",class:"shrink-0 text-blue-600 opacity-80",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},n("path",{key:"aedddea976fb561a484c2215554d0c51955230e7","stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})),"Encoded Input"),n("div",{key:"9de9c3455df6a6d8f3508c9a2281d7de3a777b60",class:"flex shrink-0 items-center gap-1"},n("label",{key:"86c37fb19f443162ae90c0d5c5e606c4b2277a2c",class:"inline-flex cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-md border border-gray-300 bg-white px-2.5 py-1 font-mono text-xs tracking-wide text-gray-700 transition-all duration-150 hover:opacity-80 disabled:pointer-events-none disabled:cursor-default disabled:opacity-40",title:"Load from file"},n("svg",{key:"1361245e162d9c6489d8c56f5e96ea2c86911586",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},n("path",{key:"d5695c059e93ef1c678e4aa399073bf8b3b7a0d0","stroke-linecap":"round","stroke-linejoin":"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})),"Upload",n("input",{key:"2433c5574069a6af91817e665aa4a1cbf8714202",type:"file",accept:".pem,.crt,.cer,.der,.csr,.req,.crl,.pub,application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl",class:"hidden",onChange:this.handleChangeInputFile})),n("button",{key:"1d01d274731fd905d2486cb032134d273e158c09",type:"button",class:"inline-flex cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-md border border-gray-300 bg-white px-2.5 py-1 font-mono text-xs tracking-wide text-gray-700 transition-all duration-150 hover:opacity-80 disabled:pointer-events-none disabled:cursor-default disabled:opacity-40",disabled:!o&&!((t=this.inputPaste)===null||t===void 0?void 0:t.value),onClick:this.handleClickClear},"Clear"),n("button",{key:"2a61f7389e33af5d8d40f37dfb7d64e4fe35fd11",type:"button",class:"inline-flex cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-md bg-blue-600 px-2.5 py-1 font-mono text-xs tracking-wide text-white transition-all duration-150 hover:opacity-80 disabled:pointer-events-none disabled:cursor-default disabled:opacity-40",disabled:!o&&!((r=this.inputPaste)===null||r===void 0?void 0:r.value),onClick:this.handleClickDecode},"Decode →"))),n("textarea",{key:"5cbe9f954a48172b6864caa79e03bdb6f6013d2e",class:"min-h-0 w-full flex-1 resize-none border-0 bg-gray-100 px-4 py-4 font-mono text-xs leading-snug tracking-wide text-blue-800 caret-blue-600 outline-none transition-colors duration-150 placeholder:italic placeholder:text-gray-400 focus:bg-white",placeholder:"Paste a PEM or Base64 DER certificate here,\nor drag & drop a .pem / .crt file…\n\n-----BEGIN CERTIFICATE-----\nMIIFaz…\n-----END CERTIFICATE-----",ref:function(t){e.inputPaste=t},onDrop:this.handleDrop})),n("div",{key:"36eaa346ed4141aeb99edf33c246b9de9f7b9c84",class:"flex min-h-0 flex-col overflow-hidden bg-white"},n("div",{key:"a813ddd50b1c9a6a9a058151b4c20d40a8cced7f",class:"flex shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-gray-100 px-4 py-2"},n("span",{key:"fc0af480d3429cc2f962d978d016cbe0e7ec3908",class:"flex items-center gap-1.5 font-mono text-xs uppercase tracking-widest text-gray-500"},n("svg",{key:"499d2bdf5850dde73561d92d7dada39aedf105a4",width:"12",height:"12",class:"shrink-0 text-blue-600 opacity-80",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},n("path",{key:"2fce5fabcdb01f44a67f2a6d137c1af93ef249c7","stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})),"Decoded Output"),((a=this.certificateExamples)===null||a===void 0?void 0:a.length)>0&&n("div",{key:"bfc616a607db1a50924941f4fa0c66d43da22bfd",class:"relative max-w-xs shrink"},n("select",{key:"e4c9df4dade5107f303212a73a187d45db9499e5",class:"w-full max-w-xs cursor-pointer appearance-none rounded-md border border-gray-300 bg-white py-1 pl-2 pr-8 font-mono text-xs text-gray-700 transition-colors hover:border-blue-600 focus:border-blue-600 focus:outline-none",onChange:this.handleChangeExample},n("option",{key:"4a67fce0e2e1a2a7d4c54049eaa399205bc2e3bf",value:""},"Load example…"),this.certificateExamples.map((function(e){return n("option",{value:e.value},e.title)}))),n("svg",{key:"676e9637a861bbf70c8c9959b6405a7aec1a6956",class:"pointer-events-none absolute right-2 top-1/2 size-2.5 -translate-y-1/2 text-gray-500",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 10 6","aria-hidden":"true"},n("path",{key:"b25127cda325d4efef2254310ac78a27d2af7f38","stroke-linecap":"round","stroke-linejoin":"round",d:"M1 1l4 4 4-4"})))),n("div",{key:"b803678828c280c0463ccb1080ac67a5634c29af",class:"min-h-0 flex-1 overflow-y-auto bg-white [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:rounded-md [&::-webkit-scrollbar-thumb]:bg-gray-300 hover:[&::-webkit-scrollbar-thumb]:bg-gray-400"},!o?this.renderPlaceholder():this.renderDecodedComponent())))};e.prototype.renderPlaceholder=function(){return n("div",{class:"flex h-full flex-col items-center justify-center gap-3 p-10"},n("div",{class:"flex size-12 items-center justify-center rounded-full border border-gray-200 bg-gray-100 text-gray-400"},n("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"},n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}))),n("p",{class:"text-center font-mono text-xs leading-relaxed text-gray-400"},"Paste a certificate on the left",n("br",null),"and click"," ",n("strong",{class:"font-semibold text-blue-600"},"Decode")," ","— or load an example."))};return e}())}}}));
|
|
5
|
+
//# sourceMappingURL=p-8d36d2f8.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["System","register","exports","registerInstance","createEvent","h","Host","readAsBinaryString","PemConverter","buildExports","SignedData","EncapsulatedContent","OctetString","CertificateSet","CertificateChoices","AsnConvert","Certificate","ContentInfo","Download","SshCertificate","X509Certificate","X509AttributeCertificate","X509Crl","Pkcs10CertificateRequest","setters","module","r","c","H","a","P","b","Z","_","$","a0","a1","e","C","a2","D","a3","X","execute","id_data","id_signedData","X509Certificates","_super","__extends","raw","_this","call","this","rawItems","isPem","decode","map","value","Convert","ToBase64Url","split","length","Error","_i","rawItems_1","item","push","Object","defineProperty","prototype","Array","from","o","commonName","join","signedData","version","encapContentInfo","eContentType","eContent","single","certificates","certificate","parse","cms","contentType","content","serialize","toString","format","downloadAsPEM","name","cert","asPEM","downloadAsDER","asDER","CertificateDecoder","class_1","hostRef","successParse","clearCertificate","handleClickDecode","inputPaste","handleClickClear","clearValue","handleChangeInputFile","event","__awaiter","el","target","_a","files","file","_d","sent","handleChangeExample","val","handleDrop","stopPropagation","preventDefault","dataTransfer","componentDidLoad","certificateToDecode","setTimeout","certificateDecoded","emit","setValue","_g","_f","_e","apply","Promise","resolve","catch","then","res","err","console","error","alert","renderDecodedComponent","download","render","_b","_c","hasDecoded","key","class","width","height","fill","stroke","viewBox","d","title","type","accept","onChange","disabled","onClick","placeholder","ref","onDrop","certificateExamples","ex","renderPlaceholder"],"sources":["module.ts"],"mappings":";;;GAGAA,OAAOC,SAAS,CAAC,yBAA0B,yBAA0B,yBAA0B,yBAA0B,yBAA0B,yBAA0B,2BAA2B,SAAWC,GAC/M,aACA,IAAIC,EAAkBC,EAAaC,EAAGC,EAAMC,EAAoBC,EAAcC,EAAcC,EAAYC,EAAqBC,EAAaC,EAAgBC,EAAoBC,EAAYC,EAAaC,EAAaC,EAAUC,EAAgBC,EAAiBC,EAA0BC,EAASC,EAClS,MAAO,CACHC,QAAS,CAAC,SAAUC,GAChBtB,EAAmBsB,EAAOC,EAC1BtB,EAAcqB,EAAOE,EACrBtB,EAAIoB,EAAOpB,EACXC,EAAOmB,EAAOG,CAClB,EAAG,SAAUH,GACTlB,EAAqBkB,EAAOI,CAChC,EAAG,SAAUJ,GACTjB,EAAeiB,EAAOK,EACtBrB,EAAegB,EAAOM,EACtBrB,EAAae,EAAOO,EACpBrB,EAAsBc,EAAOQ,EAC7BrB,EAAca,EAAOS,EACrBrB,EAAiBY,EAAOU,GACxBrB,EAAqBW,EAAOW,GAC5BrB,EAAaU,EAAOY,EACpBrB,EAAcS,EAAOa,EACrBrB,EAAcQ,EAAOc,GACrBrB,EAAWO,EAAOe,EAClBrB,EAAiBM,EAAOgB,EAC5B,EAAG,SAAUhB,GACTL,EAAkBK,EAAOiB,CAC7B,EAAG,SAAUjB,GACTJ,EAA2BI,EAAOiB,EAClCpB,EAAUG,EAAOI,CACrB,EAAG,SAAUJ,GACTF,EAA2BE,EAAOK,CACtC,EAAG,MACHa,QAAS,WAEL,IAAMC,EAAU,uBAChB,IAAMC,EAAgB,uBAEtB,IAAAC,EAAA,SAAAC,GAA+BC,UAAAF,EAAAC,GAC3B,SAAAD,EAAYG,GACR,IAAAC,EAAAH,EAAKI,KAAAC,OAAEA,KACP,IAAMC,EAAW7C,EAAa8C,MAAML,GAC9BzC,EAAa+C,OAAON,GAAKO,KAAI,SAAC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AO,+BAAiC,UAAW,IAAK,yBACtvB,EACJ,OAAAlD,CAAA,CA5GiE,GA8GpE,EAER","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,H as e,a as r}from"./p-Dpo1Lsuj.js";import{T as a,B as i}from"./p-GTlYmF1j.js";import{A as o}from"./p-JgecEXqD.js";const c='.sc-peculiar-button-menu-h{display:-ms-inline-flexbox;display:inline-flex;position:relative}.is_shown.sc-peculiar-button-menu-h .button_popover.sc-peculiar-button-menu:before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.is_shown.sc-peculiar-button-menu-h .popover.sc-peculiar-button-menu{display:block}.popover.sc-peculiar-button-menu{min-width:200px;position:absolute;top:100%;right:0;border-radius:4px;z-index:1;-webkit-box-shadow:var(--pv-shadow-light-medium);box-shadow:var(--pv-shadow-light-medium);background:var(--pv-color-white);padding:calc(var(--pv-size-base) * 2) 0;margin:var(--pv-size-base) 0;display:none}.button_option.sc-peculiar-button-menu{width:100%;-ms-flex-pack:start;justify-content:flex-start;border-radius:0}.group.sc-peculiar-button-menu:not(:last-child){border-bottom:1px solid var(--pv-color-gray-5);padding-bottom:calc(var(--pv-size-base) * 2);margin-bottom:var(--pv-size-base)}.group_title.sc-peculiar-button-menu{line-height:calc(var(--pv-size-base) * 6);padding:0 calc(var(--pv-size-base) * 2)}';const n=class{constructor(s){t(this,s);this.groups=[];this.open=false;this.handleClick=()=>{this.open=!this.open}}render(){return s(e,{key:"66dd03eaa8d6e1f6dee3d9782390e094c5804b4a",class:{is_shown:this.open}},s(i,{key:"ba4e5601321b4e778937f6386a8a5220e28f5809",class:"button_popover",startIcon:s(o,null),onClick:this.handleClick}),s("div",{key:"ed4d374f4a4982a24665e1cb60eaa57428ba0e4e",role:"dialog",tabIndex:-1,class:"popover","aria-hidden":String(this.open)},this.groups.map((t=>s("div",{class:"group"},s(a,{variant:"c2",color:"gray-9",class:"group_title"},t.title),t.options.map((t=>s(i,{class:"button_option",startIcon:t.startIcon,href:t.href,onClick:s=>{s.stopPropagation();this.handleClick();if(t.onClick){t.onClick(s)}}},t.text))))))))}};n.style=c;const l=":host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:var(--pv-color-secondary)}.circle_progress_backdrop{stroke:var(--pv-color-gray-3)}";const
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as s,H as e,a as r}from"./p-Dpo1Lsuj.js";import{T as a,B as i}from"./p-GTlYmF1j.js";import{A as o}from"./p-JgecEXqD.js";const c='.sc-peculiar-button-menu-h{display:-ms-inline-flexbox;display:inline-flex;position:relative}.is_shown.sc-peculiar-button-menu-h .button_popover.sc-peculiar-button-menu:before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.is_shown.sc-peculiar-button-menu-h .popover.sc-peculiar-button-menu{display:block}.popover.sc-peculiar-button-menu{min-width:200px;position:absolute;top:100%;right:0;border-radius:4px;z-index:1;-webkit-box-shadow:var(--pv-shadow-light-medium);box-shadow:var(--pv-shadow-light-medium);background:var(--pv-color-white);padding:calc(var(--pv-size-base) * 2) 0;margin:var(--pv-size-base) 0;display:none}.button_option.sc-peculiar-button-menu{width:100%;-ms-flex-pack:start;justify-content:flex-start;border-radius:0}.group.sc-peculiar-button-menu:not(:last-child){border-bottom:1px solid var(--pv-color-gray-5);padding-bottom:calc(var(--pv-size-base) * 2);margin-bottom:var(--pv-size-base)}.group_title.sc-peculiar-button-menu{line-height:calc(var(--pv-size-base) * 6);padding:0 calc(var(--pv-size-base) * 2)}';const n=class{constructor(s){t(this,s);this.groups=[];this.open=false;this.handleClick=()=>{this.open=!this.open}}render(){return s(e,{key:"66dd03eaa8d6e1f6dee3d9782390e094c5804b4a",class:{is_shown:this.open}},s(i,{key:"ba4e5601321b4e778937f6386a8a5220e28f5809",class:"button_popover",startIcon:s(o,null),onClick:this.handleClick}),s("div",{key:"ed4d374f4a4982a24665e1cb60eaa57428ba0e4e",role:"dialog",tabIndex:-1,class:"popover","aria-hidden":String(this.open)},this.groups.map((t=>s("div",{class:"group"},s(a,{variant:"c2",color:"gray-9",class:"group_title"},t.title),t.options.map((t=>s(i,{class:"button_option",startIcon:t.startIcon,href:t.href,onClick:s=>{s.stopPropagation();this.handleClick();if(t.onClick){t.onClick(s)}}},t.text))))))))}};n.style=c;const l=":host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:var(--pv-color-secondary)}.circle_progress_backdrop{stroke:var(--pv-color-gray-3)}";const h=class{constructor(s){t(this,s);this.size=24;this.width=4;this.box=50}render(){return s(e,{key:"bed5bbad3a1eae5252882d407889ed29a94de447"},s("div",{key:"bbe6adfa67bbb63841f71e6475400b915b6ade9c",class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},s("svg",{key:"7b2f2709ba3f968be4f44c928c8a8c4c470e7feb",class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},s("circle",{key:"571d816731f10bedadd9cbff9bf1699d58a7369f",class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}),s("circle",{key:"f3fe3fcf920c72a06edf5c8b3b3ba543cc162307",class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}))))}};h.style=l;const d=":host{display:inline}::slotted(mark){background-color:var(--pv-color-attention-tint-4)}";const p=class{constructor(s){t(this,s);this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let s=t;if(this.search){const e=new RegExp(`(${this.search})`,"gi");s=t.replace(e,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=s}resetHighlightSearch(t){const s=new RegExp(`</?${this.tag}>`,"g");return t.replace(s,"")}render(){return s(e,{key:"48783ccbca1f87cfb594a6ff283df6e041f48200"},s("slot",{key:"5fd4f551c3ad27bae4ef226b37c319c2be925f1b"}))}get host(){return r(this)}};p.style=d;export{n as peculiar_button_menu,h as peculiar_circular_progress,p as peculiar_highlight_words};
|
|
5
|
+
//# sourceMappingURL=p-95f81b6d.entry.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as e,c as t,h as a,H as r}from"./p-Dpo1Lsuj.js";import{a as i}from"./p-F2F0McJX.js";import{P as o,b as s,Z as n,_ as c,$ as d,a0 as l,a1 as f,e as p,C as b,a2 as h,D as u,a3 as y}from"./p-Del2D5s9.js";import{X as w}from"./p-CH0mNFdH.js";import{X as x,a as g}from"./p-DrLCyy39.js";import{P as m}from"./p-BAnW9WLg.js";import"./p-Cp20xosi.js";const k="1.2.840.113549.1.7.1";const v="1.2.840.113549.1.7.2";class C extends Array{constructor(e){super();const t=o.isPem(e)?o.decode(e).map((e=>s.Convert.ToBase64Url(e))):e.split(",");if(t.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(const e of t){this.push(new w(e))}}get commonName(){return Array.from(this).map((e=>e.commonName)).join("_")}get raw(){const e=new n;e.version=1;e.encapContentInfo.eContentType=k;e.encapContentInfo.eContent=new c({single:new d});e.certificates=new l(Array.from(this).map((e=>new f({certificate:p.parse(e.raw,b)}))));const t=new h({contentType:v,content:p.serialize(e)});return p.serialize(t)}toString(e="pem"){switch(e){case"pem":return Array.from(this).map((e=>e.toString("pem"))).join("\n");case"base64url":return Array.from(this).map((e=>e.toString("base64url"))).join(",");default:return Array.from(this).map((e=>e.toString("base64"))).join(",")}}downloadAsPEM(e){u.cert.asPEM(this.toString("pem"),e||this.commonName)}downloadAsDER(e){u.cert.asDER(this.raw,e||this.commonName)}}const j=class{constructor(a){e(this,a);this.successParse=t(this,"successParse");this.clearCertificate=t(this,"clearCertificate");this.handleClickDecode=()=>{const{value:e}=this.inputPaste;if(e)this.decode(e)};this.handleClickClear=()=>{this.clearValue()};this.handleChangeInputFile=async e=>{var t;const a=e.target;if((t=a.files)===null||t===void 0?void 0:t.length){const e=await i(a.files[0]);if(typeof e.value==="string")this.decode(e.value);a.value=""}};this.handleChangeExample=e=>{const t=e.target.value;if(t)this.decode(t);else this.clearValue()};this.handleDrop=async e=>{var t;e.stopPropagation();e.preventDefault();const a=(t=e.dataTransfer)===null||t===void 0?void 0:t.files;if(a===null||a===void 0?void 0:a.length){const e=await i(a[0]);if(typeof e.value==="string")this.decode(e.value)}}}componentDidLoad(){if(this.certificateToDecode){setTimeout((()=>this.decode(this.certificateToDecode)),100)}}clearValue(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()}async setValue(e){this.certificateDecoded=e;this.inputPaste.value=await e.toString("pem");this.successParse.emit(await e.toString("base64url"))}async decode(e){new Promise((t=>t(new C(e)))).catch((()=>new w(e))).catch((()=>new x(e))).catch((()=>new m(e))).catch((()=>new g(e))).catch((()=>new y(e))).then((e=>this.setValue(e))).catch((e=>{console.error(e);alert(`Error decoding certificate.\n\nSupported formats: X.509 Certificate, Attribute Certificate, PKCS#10 CSR, CRL, SSH Certificate.`)}))}renderDecodedComponent(){const e=this.certificateDecoded;if(e instanceof C){return a("peculiar-certificate-chain-viewer",{certificates:e,download:true})}if(e instanceof w){return a("peculiar-certificate-viewer",{certificate:e,download:true})}if(e instanceof x){return a("peculiar-attribute-certificate-viewer",{certificate:e,download:true})}if(e instanceof m){return a("peculiar-csr-viewer",{certificate:e,download:true})}if(e instanceof g){return a("peculiar-crl-viewer",{certificate:e,download:true})}if(e instanceof y){return a("peculiar-ssh-certificate-viewer",{certificate:e,download:true})}return null}render(){var e,t,i;const o=!!this.certificateDecoded;return a(r,{key:"b10a85e97ef69c8a604bbd25505f7479b6653fd5",class:"relative grid h-full min-h-0 w-full grid-cols-1 overflow-hidden bg-gray-100 font-sans min-[821px]:grid-cols-2 max-[820px]:h-auto"},a("div",{key:"a1c72b0fe3f7d9fcba8c99e70d03941402dd63e9",class:"pointer-events-none absolute inset-y-0 left-1/2 hidden w-px -translate-x-1/2 bg-gray-200 min-[821px]:block","aria-hidden":"true"}),a("div",{key:"1132570fba04a4fd2d7d987aa4e4125293647831",class:"flex min-h-0 flex-col overflow-hidden bg-white max-[820px]:min-h-64 max-[820px]:border-b max-[820px]:border-gray-200"},a("div",{key:"68777e441ca9dc8436aaa740568591bd32fbd1c1",class:"flex shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-gray-100 px-4 py-2"},a("span",{key:"73c91874a01ffd1e71730fa6baa6fc39dfdbad48",class:"flex items-center gap-1.5 font-mono text-xs uppercase tracking-widest text-gray-500"},a("svg",{key:"b941fb650a45a4bf343cc78fc8d67be95a953db8",width:"12",height:"12",class:"shrink-0 text-blue-600 opacity-80",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},a("path",{key:"aedddea976fb561a484c2215554d0c51955230e7","stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})),"Encoded Input"),a("div",{key:"9de9c3455df6a6d8f3508c9a2281d7de3a777b60",class:"flex shrink-0 items-center gap-1"},a("label",{key:"86c37fb19f443162ae90c0d5c5e606c4b2277a2c",class:"inline-flex cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-md border border-gray-300 bg-white px-2.5 py-1 font-mono text-xs tracking-wide text-gray-700 transition-all duration-150 hover:opacity-80 disabled:pointer-events-none disabled:cursor-default disabled:opacity-40",title:"Load from file"},a("svg",{key:"1361245e162d9c6489d8c56f5e96ea2c86911586",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},a("path",{key:"d5695c059e93ef1c678e4aa399073bf8b3b7a0d0","stroke-linecap":"round","stroke-linejoin":"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})),"Upload",a("input",{key:"2433c5574069a6af91817e665aa4a1cbf8714202",type:"file",accept:".pem,.crt,.cer,.der,.csr,.req,.crl,.pub,application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl",class:"hidden",onChange:this.handleChangeInputFile})),a("button",{key:"1d01d274731fd905d2486cb032134d273e158c09",type:"button",class:"inline-flex cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-md border border-gray-300 bg-white px-2.5 py-1 font-mono text-xs tracking-wide text-gray-700 transition-all duration-150 hover:opacity-80 disabled:pointer-events-none disabled:cursor-default disabled:opacity-40",disabled:!o&&!((e=this.inputPaste)===null||e===void 0?void 0:e.value),onClick:this.handleClickClear},"Clear"),a("button",{key:"2a61f7389e33af5d8d40f37dfb7d64e4fe35fd11",type:"button",class:"inline-flex cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-md bg-blue-600 px-2.5 py-1 font-mono text-xs tracking-wide text-white transition-all duration-150 hover:opacity-80 disabled:pointer-events-none disabled:cursor-default disabled:opacity-40",disabled:!o&&!((t=this.inputPaste)===null||t===void 0?void 0:t.value),onClick:this.handleClickDecode},"Decode →"))),a("textarea",{key:"5cbe9f954a48172b6864caa79e03bdb6f6013d2e",class:"min-h-0 w-full flex-1 resize-none border-0 bg-gray-100 px-4 py-4 font-mono text-xs leading-snug tracking-wide text-blue-800 caret-blue-600 outline-none transition-colors duration-150 placeholder:italic placeholder:text-gray-400 focus:bg-white",placeholder:"Paste a PEM or Base64 DER certificate here,\nor drag & drop a .pem / .crt file…\n\n-----BEGIN CERTIFICATE-----\nMIIFaz…\n-----END CERTIFICATE-----",ref:e=>{this.inputPaste=e},onDrop:this.handleDrop})),a("div",{key:"36eaa346ed4141aeb99edf33c246b9de9f7b9c84",class:"flex min-h-0 flex-col overflow-hidden bg-white"},a("div",{key:"a813ddd50b1c9a6a9a058151b4c20d40a8cced7f",class:"flex shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-gray-100 px-4 py-2"},a("span",{key:"fc0af480d3429cc2f962d978d016cbe0e7ec3908",class:"flex items-center gap-1.5 font-mono text-xs uppercase tracking-widest text-gray-500"},a("svg",{key:"499d2bdf5850dde73561d92d7dada39aedf105a4",width:"12",height:"12",class:"shrink-0 text-blue-600 opacity-80",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},a("path",{key:"2fce5fabcdb01f44a67f2a6d137c1af93ef249c7","stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})),"Decoded Output"),((i=this.certificateExamples)===null||i===void 0?void 0:i.length)>0&&a("div",{key:"bfc616a607db1a50924941f4fa0c66d43da22bfd",class:"relative max-w-xs shrink"},a("select",{key:"e4c9df4dade5107f303212a73a187d45db9499e5",class:"w-full max-w-xs cursor-pointer appearance-none rounded-md border border-gray-300 bg-white py-1 pl-2 pr-8 font-mono text-xs text-gray-700 transition-colors hover:border-blue-600 focus:border-blue-600 focus:outline-none",onChange:this.handleChangeExample},a("option",{key:"4a67fce0e2e1a2a7d4c54049eaa399205bc2e3bf",value:""},"Load example…"),this.certificateExamples.map((e=>a("option",{value:e.value},e.title)))),a("svg",{key:"676e9637a861bbf70c8c9959b6405a7aec1a6956",class:"pointer-events-none absolute right-2 top-1/2 size-2.5 -translate-y-1/2 text-gray-500",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 10 6","aria-hidden":"true"},a("path",{key:"b25127cda325d4efef2254310ac78a27d2af7f38","stroke-linecap":"round","stroke-linejoin":"round",d:"M1 1l4 4 4-4"})))),a("div",{key:"b803678828c280c0463ccb1080ac67a5634c29af",class:"min-h-0 flex-1 overflow-y-auto bg-white [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:rounded-md [&::-webkit-scrollbar-thumb]:bg-gray-300 hover:[&::-webkit-scrollbar-thumb]:bg-gray-400"},!o?this.renderPlaceholder():this.renderDecodedComponent())))}renderPlaceholder(){return a("div",{class:"flex h-full flex-col items-center justify-center gap-3 p-10"},a("div",{class:"flex size-12 items-center justify-center rounded-full border border-gray-200 bg-gray-100 text-gray-400"},a("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"},a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}))),a("p",{class:"text-center font-mono text-xs leading-relaxed text-gray-400"},"Paste a certificate on the left",a("br",null),"and click"," ",a("strong",{class:"font-semibold text-blue-600"},"Decode")," ","— or load an example."))}};export{j as peculiar_certificate_decoder};
|
|
5
|
+
//# sourceMappingURL=p-9ab5fa9f.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["registerInstance","createEvent","h","Host","readAsBinaryString","PemConverter","buildExports","SignedData","EncapsulatedContent","OctetString","CertificateSet","CertificateChoices","AsnConvert","Certificate","ContentInfo","Download","SshCertificate","X509Certificate","X509AttributeCertificate","X509Crl","Pkcs10CertificateRequest","id_data","id_signedData","X509Certificates","Array","constructor","raw","super","rawItems","isPem","decode","map","value","Convert","ToBase64Url","split","length","Error","item","this","push","commonName","from","o","join","signedData","version","encapContentInfo","eContentType","eContent","single","certificates","certificate","parse","cms","contentType","content","serialize","toString","format","downloadAsPEM","name","cert","asPEM","downloadAsDER","asDER","CertificateDecoder","hostRef","successParse","clearCertificate","handleClickDecode","inputPaste","handleClickClear","clearValue","handleChangeInputFile","async","event","_a","el","target","files","file","handleChangeExample","val","handleDrop","stopPropagation","preventDefault","dataTransfer","componentDidLoad","certificateToDecode","setTimeout","certificateDecoded","emit","setValue","Promise","resolve","catch","then","res","err","console","error","alert","renderDecodedComponent","download","render","_b","_c","hasDecoded","key","class","width","height","fill","stroke","viewBox","d","title","type","accept","onChange","disabled","onClick","placeholder","ref","onDrop","certificateExamples","ex","renderPlaceholder"],"sources":["0"],"mappings":";;;YAGcA,OAAuBC,OAAaC,OAAQC,MAAY,8BACxDC,MAA0B,8BAC1BC,OAAmBC,OAAmBC,OAAiBC,OAA0BC,QAAmBC,QAAsBC,OAAyBC,OAAiBC,QAAmBC,OAAkBC,QAAgBC,MAAsB,8BAC/OC,MAAuB,8BACvBC,OAA+BC,MAAe,8BAC9CC,MAAgC,wBACvC,kBAEP,MAAMC,EAAU,uBAChB,MAAMC,EAAgB,uBAEtB,MAAMC,UAAyBC,MAC3B,WAAAC,CAAYC,GACRC,QACA,MAAMC,EAAWvB,EAAawB,MAAMH,GAC9BrB,EAAayB,OAAOJ,GAAKK,KAAKC,GAAU1B,EAAa2B,QAAQC,YAAYF,KACzEN,EAAIS,MAAM,KAChB,GAAIP,EAASQ,OAAS,EAAG,CACrB,MAAM,IAAIC,MAAM,+DACpB,CACA,IAAK,MAAMC,KAAQV,EAAU,CACzBW,KAAKC,KAAK,IAAIvB,EAAgBqB,GAClC,CACJ,CACA,cAAIG,GACA,OAAOjB,MAAMkB,KAAKH,MACbR,KAAKY,GAAMA,EAAEF,aACbG,KAAK,IACd,CACA,OAAIlB,GACA,MAAMmB,EAAa,IAAItC,EACvBsC,EAAWC,QAAU,EACrBD,EAAWE,iBAAiBC,aAAe3B,EAC3CwB,EAAWE,iBAAiBE,SAAW,IAAIzC,EAAoB,CAAE0C,OAAQ,IAAIzC,IAC7EoC,EAAWM,aAAe,IAAIzC,EAAec,MAAMkB,KAAKH,MACnDR,KAAKY,GAAM,IAAIhC,EAAmB,CAAEyC,YAAaxC,EAAWyC,MAAMV,EAAEjB,IAAKb,QAC9E,MAAMyC,EAAM,IAAIxC,EAAY,CACxByC,YAAajC,EACbkC,QAAS5C,EAAW6C,UAAUZ,KAElC,OAAOjC,EAAW6C,UAAUH,EAChC,CACA,QAA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AAE2G,IAAK,2CAA4CC,MAAO,4NAA6NU,SAAUjF,KAAK2C,qBAAuBhF,EAAE,SAAU,CAAE2G,IAAK,2CAA4C7E,MAAO,IAAM,iBAAuBO,KAAKuF,oBAAoB/F,KAAKgG,GAAQ7H,EAAE,SAAU,CAAE8B,MAAO+F,EAAG/F,OAAS+F,EAAGV,UAAWnH,EAAE,MAAO,CAAE2G,IAAK,2CAA4CC,MAAO,uFAAwFG,KAAM,OAAQC,OAAQ,eAAgB,eAAgB,MAAOC,QAAS,WAAY,cAAe,QAAUjH,EAAE,OAAQ,CAAE2G,IAAK,2CAA4C,iBAAkB,QAAS,kBAAmB,QAASO,EAAG,oBAAuBlH,EAAE,MAAO,CAAE2G,IAAK,2CAA4CC,MAAO,kPAAoPF,EACt4MrE,KAAKyF,oBACLzF,KAAKgE,2BACf,CACA,iBAAAyB,GACI,OAAQ9H,EAAE,MAAO,CAAE4G,MAAO,+DAAiE5G,EAAE,MAAO,CAAE4G,MAAO,0GAA4G5G,EAAE,MAAO,CAAE6G,MAAO,KAAMC,OAAQ,KAAMC,KAAM,OAAQC,OAAQ,eAAgB,eAAgB,MAAOC,QAAS,aAAejH,EAAE,OAAQ,CAAE,iBAAkB,QAAS,kBAAmB,QAASkH,EAAG,2HAA6HlH,EAAE,IAAK,CAAE4G,MAAO,+DAAiE,kCAAmC5G,EAAE,KAAM,MAAO,YAAa,IAAKA,EAAE,SAAU,CAAE4G,MAAO,+BAAiC,UAAW,IAAK,yBACtvB,UAGK5C","ignoreList":[]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var __extends=this&&this.__extends||function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))t[r]=n[r]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}();var __awaiter=this&&this.__awaiter||function(t,n,r,e){function i(t){return t instanceof r?t:new r((function(n){n(t)}))}return new(r||(r=Promise))((function(r,u){function o(t){try{a(e.next(t))}catch(t){u(t)}}function c(t){try{a(e["throw"](t))}catch(t){u(t)}}function a(t){t.done?r(t.value):i(t.value).then(o,c)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},e,i,u,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=c(0),o["throw"]=c(1),o["return"]=c(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(n){return a([t,n])}}function a(c){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(r=0)),r)try{if(e=1,i&&(u=c[0]&2?i["return"]:c[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,c[1])).done)return u;if(i=0,u)c=[c[0]&2,u.value];switch(c[0]){case 0:case 1:u=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;i=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!u||c[1]>u[0]&&c[1]<u[3])){r.label=c[1];break}if(c[0]===6&&r.label<u[1]){r.label=u[1];u=c;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(c);break}if(u[2])r.ops.pop();r.trys.pop();continue}c=n.call(t,r)}catch(t){c=[6,t];i=0}finally{e=u=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
-
*/System.register(["./p-
|
|
4
|
+
*/System.register(["./p-BKLsbktK.system.js"],(function(t){"use strict";var n,r,e,i,u,o,c,a,s,f,h,l,v,b,m,y,_,w,p,d,g,j,O,x,S,k,E,C,K,A,P,I,N,T,q,B,D,G,H,L,R;return{setters:[function(t){n=t.A;r=t.p;e=t.q;i=t.r;u=t.s;o=t.U;c=t.t;a=t.V;s=t.I;f=t.W;h=t.u;l=t.T;v=t.v;b=t.w;m=t.x;y=t.y;_=t.b;w=t.z;p=t.B;d=t.F;g=t.G;j=t.H;O=t.J;x=t.K;S=t.L;k=t.M;E=t.O;C=t.Q;K=t.S;A=t.X;P=t.c;I=t.Y;N=t.P;T=t.N;q=t.i;B=t.e;D=t.E;G=t.f;H=t.R;L=t.m;R=t.D}],execute:function(){var z;
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
8
|
*
|
|
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
|
-
*/var
|
|
11
|
+
*/var F=(z={},z[A]=y,z[K]=m,z[C]=b,z[E]=v,z[k]=l,z[S]=h,z[x]=f,z[O]=s,z[j]=a,z[g]=c,z[d]=o,z[p]=u,z[w]=i,z);var J=function(t){__extends(n,t);function n(n){var i=t.call(this,n,r)||this;var u=i.getAsnExtnValue();try{var o=F[i.asn.type];if(o){i.value=e.parse(u,o)}else{console.warn("Didn't detect parser for \"".concat(i.asn.type,'" attribute.'));i.value=_.Convert.ToHex(u)}}catch(t){console.error('Error parse "'.concat(i.asn.type,'" attribute:'),t.message);i.value=_.Convert.ToHex(u)}return i}n.prototype.getAsnExtnValue=function(){return this.asn.values[0]};return n}(n);t("A",J);
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
19
|
-
//# sourceMappingURL=p-
|
|
18
|
+
*/var M=function(t){__extends(n,t);function n(n){var r=t.call(this,P(n),I)||this;r.thumbprints={};r.type="PKCS#10 Certificate Request";r.tag=N.CertificateRequestTag;var e=r.asn.certificationRequestInfo;r.subject=new T(e.subject).toJSON();r.version=e.version;return r}Object.defineProperty(n.prototype,"publicKey",{get:function(){var t=this.asn.certificationRequestInfo.subjectPKInfo,n=t.subjectPublicKey,r=t.algorithm;var e;if(r.algorithm===q&&r.parameters){e=B.parse(r.parameters,D)}if(r.algorithm===G){e=B.parse(n,H)}var i=B.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:e,value:i,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"signature",{get:function(){var t=this.asn,n=t.signature,r=t.signatureAlgorithm;return{value:n,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var t=0;t<this.subject.length;t+=1){var n=this.subject[t];if(n.shortName==="CN"||n.shortName==="E"||n.shortName==="O"){return n.value}}return""},enumerable:false,configurable:true});n.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var n,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,L(t,this.raw)];case 1:n=e.sent();if(n){this.thumbprints[t]=_.Convert.ToHex(n)}return[3,3];case 2:r=e.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};n.prototype.parseAttributes=function(){var t=this.asn.certificationRequestInfo;if(t.attributes){this.attributes=t.attributes.map((function(t){return new J(B.serialize(t))}))}};n.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return N.encode(this.raw,this.tag);case"base64url":return _.Convert.ToBase64Url(this.raw);default:return _.Convert.ToBase64(this.raw)}};n.prototype.downloadAsPEM=function(t){R.csr.asPEM(this.toString("pem"),t||this.commonName)};n.prototype.downloadAsDER=function(t){R.csr.asDER(this.raw,t||this.commonName)};return n}(n);t("P",M)}}}));
|
|
19
|
+
//# sourceMappingURL=p-B5d7q9FD.system.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-DberG072.system.js","sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\nimport {\n id_at_statementOfPossession,\n PrivateKeyPossessionStatement,\n} from '@peculiar/asn1-private-key-stmt';\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n [id_at_statementOfPossession]: PrivateKeyPossessionStatement,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\n\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = PemConverter.CertificateRequestTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["AsnAttribute","Convert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAA;;;;;;YAMG;YAiDH,MAAM,iBAAiB,GAAG;gBACxB,CAAC,wBAAwB,GAAG,qBAAqB;gBACjD,CAAC,gCAAgC,GAAG,6BAA6B;gBACjE,CAAC,kBAAkB,GAAG,eAAe;gBACrC,CAAC,8BAA8B,GAAG,2BAA2B;gBAC7D,CAAC,mBAAmB,GAAG,gBAAgB;gBACvC,CAAC,sBAAsB,GAAG,mBAAmB;gBAC7C,CAAC,UAAU,GAAG,OAAO;gBACrB,CAAC,iBAAiB,GAAG,cAAc;gBACnC,CAAC,mBAAmB,GAAG,gBAAgB;gBACvC,CAAC,6BAA6B,GAAG,iBAAiB;gBAClD,CAAC,4BAA4B,GAAG,gBAAgB;gBAChD,CAAC,4BAA4B,GAAG,gBAAgB;gBAChD,CAAC,2BAA2B,GAAG,6BAA6B;aAC7D;YAMK,MAAO,SAAqC,SAAQ,OAAqB,CAAA;gBAGrE,eAAe,GAAA;oBACrB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;;YAG3B,IAAA,WAAA,CAAY,GAAiB,EAAA;YAC3B,QAAA,KAAK,CAAC,GAAG,EAAEA,WAAY,CAAC;YAExB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE;YAE3C,QAAA,IAAI;wBACF,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;wB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|
1
|
+
{"version":3,"file":"p-B5d7q9FD.system.js","sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\nimport {\n id_at_statementOfPossession,\n PrivateKeyPossessionStatement,\n} from '@peculiar/asn1-private-key-stmt';\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n [id_at_statementOfPossession]: PrivateKeyPossessionStatement,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\n\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = PemConverter.CertificateRequestTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["AsnAttribute","Convert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAA;;;;;;YAMG;YAiDH,MAAM,iBAAiB,GAAG;gBACxB,CAAC,wBAAwB,GAAG,qBAAqB;gBACjD,CAAC,gCAAgC,GAAG,6BAA6B;gBACjE,CAAC,kBAAkB,GAAG,eAAe;gBACrC,CAAC,8BAA8B,GAAG,2BAA2B;gBAC7D,CAAC,mBAAmB,GAAG,gBAAgB;gBACvC,CAAC,sBAAsB,GAAG,mBAAmB;gBAC7C,CAAC,UAAU,GAAG,OAAO;gBACrB,CAAC,iBAAiB,GAAG,cAAc;gBACnC,CAAC,mBAAmB,GAAG,gBAAgB;gBACvC,CAAC,6BAA6B,GAAG,iBAAiB;gBAClD,CAAC,4BAA4B,GAAG,gBAAgB;gBAChD,CAAC,4BAA4B,GAAG,gBAAgB;gBAChD,CAAC,2BAA2B,GAAG,6BAA6B;aAC7D;YAMK,MAAO,SAAqC,SAAQ,OAAqB,CAAA;gBAGrE,eAAe,GAAA;oBACrB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;;YAG3B,IAAA,WAAA,CAAY,GAAiB,EAAA;YAC3B,QAAA,KAAK,CAAC,GAAG,EAAEA,WAAY,CAAC;YAExB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE;YAE3C,QAAA,IAAI;wBACF,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;wBAE/C,IAAI,MAAM,EAAE;4BACV,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAI,Y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 - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{A as s,p as t,q as a,r as e,s as i,U as r,t as n,V as o,I as h,W as c,u,T as l,v as f,w as m,x as p,y as g,b,z as d,B as A,F as w,G as E,H as y,J as x,K as
|
|
4
|
+
import{A as s,p as t,q as a,r as e,s as i,U as r,t as n,V as o,I as h,W as c,u,T as l,v as f,w as m,x as p,y as g,b,z as d,B as A,F as w,G as E,H as y,J as x,K as D,L as P,M as R,O as q,Q as K,S,X as v,c as C,Y as I,P as N,N as j,i as H,e as M,E as O,f as T,R as V,m as $,D as z}from"./p-Del2D5s9.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
8
|
*
|
|
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
|
-
*/const
|
|
11
|
+
*/const B={[v]:g,[S]:p,[K]:m,[q]:f,[R]:l,[P]:u,[D]:c,[x]:h,[y]:o,[E]:n,[w]:r,[A]:i,[d]:e};class F extends s{getAsnExtnValue(){return this.asn.values[0]}constructor(s){super(s,t);const e=this.getAsnExtnValue();try{const s=B[this.asn.type];if(s){this.value=a.parse(e,s)}else{console.warn(`Didn't detect parser for "${this.asn.type}" attribute.`);this.value=b.Convert.ToHex(e)}}catch(s){console.error(`Error parse "${this.asn.type}" attribute:`,s.message);this.value=b.Convert.ToHex(e)}}}
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/class G extends s{constructor(s){super(
|
|
19
|
-
//# sourceMappingURL=p-
|
|
18
|
+
*/class G extends s{constructor(s){super(C(s),I);this.thumbprints={};this.type="PKCS#10 Certificate Request";this.tag=N.CertificateRequestTag;const{certificationRequestInfo:t}=this.asn;this.subject=new j(t.subject).toJSON();this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;if(t.algorithm===H&&t.parameters){a=M.parse(t.parameters,O)}if(t.algorithm===T){a=M.parse(s,V)}const e=M.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:a,value:e,algorithm:t.algorithm}}get signature(){const{signature:s,signatureAlgorithm:t}=this.asn;return{value:s,algorithm:t.algorithm}}get commonName(){if(!this.subject){return""}for(let s=0;s<this.subject.length;s+=1){const t=this.subject[s];if(t.shortName==="CN"||t.shortName==="E"||t.shortName==="O"){return t.value}}return""}async getThumbprint(s="SHA-1"){try{const t=await $(s,this.raw);if(t){this.thumbprints[s]=b.Convert.ToHex(t)}}catch(s){console.error("Error thumbprint get:",s)}}parseAttributes(){const{certificationRequestInfo:s}=this.asn;if(s.attributes){this.attributes=s.attributes.map((s=>new F(M.serialize(s))))}}toString(s="pem"){switch(s){case"pem":return N.encode(this.raw,this.tag);case"base64url":return b.Convert.ToBase64Url(this.raw);default:return b.Convert.ToBase64(this.raw)}}downloadAsPEM(s){z.csr.asPEM(this.toString("pem"),s||this.commonName)}downloadAsDER(s){z.csr.asDER(this.raw,s||this.commonName)}}export{F as A,G as P};
|
|
19
|
+
//# sourceMappingURL=p-BAnW9WLg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-B7cL9SBA.js","sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\nimport {\n id_at_statementOfPossession,\n PrivateKeyPossessionStatement,\n} from '@peculiar/asn1-private-key-stmt';\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n [id_at_statementOfPossession]: PrivateKeyPossessionStatement,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\n\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = PemConverter.CertificateRequestTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["AsnAttribute","Convert"],"mappings":";;;;;AAAA;;;;;;AAMG;AAiDH,MAAM,iBAAiB,GAAG;IACxB,CAAC,wBAAwB,GAAG,qBAAqB;IACjD,CAAC,gCAAgC,GAAG,6BAA6B;IACjE,CAAC,kBAAkB,GAAG,eAAe;IACrC,CAAC,8BAA8B,GAA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CAAC,SAAyC,KAAK,EAAA;QAC5D,QAAQ,MAAM;AACZ,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;AAChD,YAAA,KAAK,WAAW;gBACd,OAAOA,oBAAO,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;AACtC,YAAA;gBACE,OAAOA,oBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;;AAIhC,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpB,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAGI,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,GAAG,EACR,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"p-BAnW9WLg.js","sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\nimport {\n id_at_statementOfPossession,\n PrivateKeyPossessionStatement,\n} from '@peculiar/asn1-private-key-stmt';\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n [id_at_statementOfPossession]: PrivateKeyPossessionStatement,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\n\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = PemConverter.CertificateRequestTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["AsnAttribute","Convert"],"mappings":";;;;;AAAA;;;;;;AAMG;AAiDH,MAAM,iBAAiB,GAAG;IACxB,CAAC,wBAAwB,GAAG,qBAAqB;IACjD,CAAC,gCAAgC,GAAG,6BAA6B;IACjE,CAAC,kBAAkB,GAAG,eAAe;IACrC,CAAC,8BAA8B,GAAG,2BAA2B;IAC7D,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,sBAAsB,GAAG,mBAAmB;IAC7C,CAAC,UAAU,GAAG,OAAO;IACrB,CAAC,iBAAiB,GAAG,cAAc;IACnC,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CA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