@peculiar/certificates-viewer 4.7.0 → 4.7.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attribute-certificate-viewer.js +4 -2
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/attribute.js +1 -1
- package/components/certificate-viewer.js +3 -2
- package/components/certificate-viewer.js.map +1 -1
- package/components/crl-viewer.js +4 -2
- package/components/crl-viewer.js.map +1 -1
- package/components/csr-viewer.js +1 -1
- package/components/download.js +1674 -45
- package/components/download.js.map +1 -1
- package/components/index2.js +3 -2
- package/components/index2.js.map +1 -1
- package/components/issuer_name.js +1 -1
- package/components/miscellaneous.js +4 -79
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +32 -16
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificates-viewer.js +1 -1
- package/components/peculiar-ssh-certificate-viewer.d.ts +11 -0
- package/components/peculiar-ssh-certificate-viewer.js +12 -0
- package/components/peculiar-ssh-certificate-viewer.js.map +1 -0
- package/components/peculiar-text-hider.js +1 -32
- package/components/peculiar-text-hider.js.map +1 -1
- package/components/pkcs10_certificate_request.js +2 -1
- package/components/pkcs10_certificate_request.js.map +1 -1
- package/components/row.js +87 -0
- package/components/row.js.map +1 -0
- package/components/ssh-certificate-viewer.js +210 -0
- package/components/ssh-certificate-viewer.js.map +1 -0
- package/components/subject_name.js +2 -2
- package/components/text-hider.js +40 -0
- package/components/text-hider.js.map +1 -0
- package/components/utils.js +39 -0
- package/components/utils.js.map +1 -0
- package/dist/cjs/extension-DTtJlxk8.js +110 -0
- package/dist/cjs/{extension-CGZpfI3W.js.map → extension-DTtJlxk8.js.map} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{miscellaneous-D_RAtkZz.js → miscellaneous-DCeacaAw.js} +147 -147
- package/dist/cjs/{miscellaneous-D_RAtkZz.js.map → miscellaneous-DCeacaAw.js.map} +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.cjs.js.map +1 -0
- package/dist/cjs/{peculiar-attribute-certificate-viewer_4.cjs.entry.js → peculiar-attribute-certificate-viewer_5.cjs.entry.js} +215 -45
- package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -21
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +23 -23
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar.cjs.js +1 -1
- package/dist/cjs/pkcs10_certificate_request-DE-0eDXE.js +146 -0
- package/dist/cjs/{pkcs10_certificate_request-BQkkkT42.js.map → pkcs10_certificate_request-DE-0eDXE.js.map} +1 -1
- package/dist/cjs/{certification_request-DISQwgjn.js → ssh_certificate-D2q_p49O.js} +1676 -16
- package/dist/cjs/ssh_certificate-D2q_p49O.js.map +1 -0
- package/dist/cjs/{x509_certificate-DGRpZGA2.js → x509_certificate-Cto1q-eu.js} +29 -29
- package/dist/cjs/{x509_certificate-DGRpZGA2.js.map → x509_certificate-Cto1q-eu.js.map} +1 -1
- package/dist/cjs/{x509_crl-DMvJk_81.js → x509_crl-CgixMZrh.js} +32 -32
- package/dist/cjs/{x509_crl-DMvJk_81.js.map → x509_crl-CgixMZrh.js.map} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +10 -6
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +29 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js +23 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js +26 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js +26 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +194 -0
- package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -0
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/index.js.map +1 -1
- package/dist/collection/crypto/ssh_certificate.js +74 -0
- package/dist/collection/crypto/ssh_certificate.js.map +1 -0
- package/dist/collection/locales/en.json +6 -1
- package/dist/collection/utils/download.js +5 -0
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/esm/{extension-CUOKUt7o.js → extension-DmlhftES.js} +3 -3
- package/dist/{esm-es5/extension-CUOKUt7o.js.map → esm/extension-DmlhftES.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +4 -4
- package/dist/esm/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
- package/dist/esm/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +185 -16
- package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-decoder.entry.js +14 -10
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm/peculiar.js +1 -1
- package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +3 -3
- package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
- package/dist/esm/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +1676 -17
- package/dist/esm/ssh_certificate-PCn0WXhQ.js.map +1 -0
- package/dist/esm/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
- package/dist/esm/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
- package/dist/esm/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +5 -5
- package/dist/esm/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
- package/dist/esm-es5/{extension-CUOKUt7o.js → extension-DmlhftES.js} +2 -2
- package/dist/{esm/extension-CUOKUt7o.js.map → esm-es5/extension-DmlhftES.js.map} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +2 -2
- package/dist/esm-es5/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
- package/dist/esm-es5/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +31 -3
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar.js +1 -1
- package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +2 -2
- package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
- package/dist/esm-es5/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +8 -8
- package/dist/esm-es5/ssh_certificate-PCn0WXhQ.js.map +1 -0
- package/dist/esm-es5/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
- package/dist/esm-es5/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
- package/dist/esm-es5/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +2 -2
- package/dist/esm-es5/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/locales/en.json +6 -1
- package/dist/peculiar/{p-17ebc78c.system.entry.js → p-24861cf6.system.entry.js} +2 -2
- package/dist/peculiar/{p-a193f8fd.system.entry.js → p-46c17c8d.system.entry.js} +2 -2
- package/dist/peculiar/{p-a4e74904.entry.js → p-71cb31c6.entry.js} +47 -19
- package/dist/peculiar/p-71cb31c6.entry.js.map +1 -0
- package/dist/peculiar/{p-4cc72a56.entry.js → p-71eab586.entry.js} +2 -2
- package/dist/peculiar/p-7273601a.entry.js +5 -0
- package/dist/peculiar/p-7273601a.entry.js.map +1 -0
- package/dist/peculiar/p-83bfd8e5.system.entry.js +5 -0
- package/dist/peculiar/p-83bfd8e5.system.entry.js.map +1 -0
- package/dist/peculiar/{p-e3967e76.entry.js → p-98219569.entry.js} +2 -2
- package/dist/peculiar/p-9MJeDspO.system.js.map +1 -0
- package/dist/peculiar/p-AjXipXSl.system.js +12 -0
- package/dist/peculiar/{p-CgCUixvk.system.js.map → p-AjXipXSl.system.js.map} +1 -1
- package/dist/peculiar/{p-CEzxVCEh.system.js → p-B2FH4Pv2.system.js} +2 -2
- package/dist/peculiar/{p-CEzxVCEh.system.js.map → p-B2FH4Pv2.system.js.map} +1 -1
- package/dist/peculiar/{p-DcTXA-2R.system.js → p-B5GO6_Ut.system.js} +18 -18
- package/dist/peculiar/{p-DcTXA-2R.system.js.map → p-B5GO6_Ut.system.js.map} +1 -1
- package/dist/peculiar/{p-Bsy7Sqzl.system.js.map → p-B82-c-xr.system.js.map} +1 -1
- package/dist/peculiar/p-BGASC3UX.system.js +1 -1
- package/dist/peculiar/p-BHpSDBz_.system.js.map +1 -0
- package/dist/peculiar/p-BwlcJAh0.js +12 -0
- package/dist/peculiar/{p-CZuaTO2G.js.map → p-BwlcJAh0.js.map} +1 -1
- package/dist/peculiar/{p-D8TC0Na9.system.js.map → p-CSz5liuX.system.js.map} +1 -1
- package/dist/peculiar/{p-tl0v45Y7.js → p-CstRxc9v.js} +2 -2
- package/dist/peculiar/{p-tl0v45Y7.js.map → p-CstRxc9v.js.map} +1 -1
- package/dist/peculiar/p-DMDALRLP.system.js +135 -0
- package/dist/peculiar/p-DMDALRLP.system.js.map +1 -0
- package/dist/peculiar/{p-DTz3NA_M.system.js → p-DPbpwYQ8.system.js} +3 -3
- package/dist/peculiar/{p-DTz3NA_M.system.js.map → p-DPbpwYQ8.system.js.map} +1 -1
- package/dist/peculiar/{p-CoPYW15U.js → p-Db41gPxb.js} +4 -4
- package/dist/peculiar/{p-CoPYW15U.js.map → p-Db41gPxb.js.map} +1 -1
- package/dist/peculiar/{p-DKooqn40.js → p-DnOLjFJP.js} +39 -39
- package/dist/peculiar/{p-DKooqn40.js.map → p-DnOLjFJP.js.map} +1 -1
- package/dist/peculiar/{p-CSS3OhZq.js → p-PCn0WXhQ.js} +13 -13
- package/dist/peculiar/p-PCn0WXhQ.js.map +1 -0
- package/dist/peculiar/{p-7fTYvx_V.system.js → p-SjVQtfgD.system.js} +5 -5
- package/dist/peculiar/{p-7fTYvx_V.system.js.map → p-SjVQtfgD.system.js.map} +1 -1
- package/dist/peculiar/{p-e7c60082.system.entry.js → p-cc01a2da.system.entry.js} +47 -19
- package/dist/peculiar/p-cc01a2da.system.entry.js.map +1 -0
- package/dist/peculiar/{p-BTn-wukS.system.js → p-dOkqMp-O.system.js} +2 -2
- package/dist/peculiar/p-dOkqMp-O.system.js.map +1 -0
- package/dist/peculiar/{p-BG_D4qzJ.js → p-h7XP7otl.js} +3 -3
- package/dist/peculiar/{p-BG_D4qzJ.js.map → p-h7XP7otl.js.map} +1 -1
- package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.esm.js.map +1 -0
- package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +4 -4
- package/dist/types/components/ssh-certificate-viewer/-components/basic_information.d.ts +21 -0
- package/dist/types/components/ssh-certificate-viewer/-components/miscellaneous.d.ts +14 -0
- package/dist/types/components/ssh-certificate-viewer/-components/public_key.d.ts +14 -0
- package/dist/types/components/ssh-certificate-viewer/-components/signature_key.d.ts +14 -0
- package/dist/types/components/ssh-certificate-viewer/ssh-certificate-viewer.d.ts +43 -0
- package/dist/types/components.d.ts +43 -0
- package/dist/types/crypto/index.d.ts +1 -0
- package/dist/types/crypto/ssh_certificate.d.ts +30 -0
- package/dist/types/utils/download.d.ts +3 -0
- package/dist/types/utils/l10n.d.ts +5 -0
- package/hydrate/index.js +1869 -27
- package/hydrate/index.mjs +1869 -27
- package/package.json +3 -2
- package/dist/cjs/certification_request-DISQwgjn.js.map +0 -1
- package/dist/cjs/extension-CGZpfI3W.js +0 -110
- package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +0 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +0 -1
- package/dist/cjs/pkcs10_certificate_request-BQkkkT42.js +0 -146
- package/dist/esm/certification_request-CSS3OhZq.js.map +0 -1
- package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
- package/dist/esm-es5/certification_request-CSS3OhZq.js.map +0 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
- package/dist/peculiar/p-BTn-wukS.system.js.map +0 -1
- package/dist/peculiar/p-CSS3OhZq.js.map +0 -1
- package/dist/peculiar/p-CZuaTO2G.js +0 -12
- package/dist/peculiar/p-CgCUixvk.system.js +0 -12
- package/dist/peculiar/p-DLsQGkmT.system.js.map +0 -1
- package/dist/peculiar/p-D_WeukQa.system.js +0 -135
- package/dist/peculiar/p-D_WeukQa.system.js.map +0 -1
- package/dist/peculiar/p-a4e74904.entry.js.map +0 -1
- package/dist/peculiar/p-ce006f1c.system.entry.js +0 -5
- package/dist/peculiar/p-ce006f1c.system.entry.js.map +0 -1
- package/dist/peculiar/p-e7c60082.system.entry.js.map +0 -1
- package/dist/peculiar/p-f465afe6.entry.js +0 -5
- package/dist/peculiar/p-f465afe6.entry.js.map +0 -1
- package/dist/peculiar/p-tBL0ekYY.system.js.map +0 -1
- package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +0 -1
- /package/dist/peculiar/{p-17ebc78c.system.entry.js.map → p-24861cf6.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-a193f8fd.system.entry.js.map → p-46c17c8d.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-4cc72a56.entry.js.map → p-71eab586.entry.js.map} +0 -0
- /package/dist/peculiar/{p-e3967e76.entry.js.map → p-98219569.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"miscellaneous.js","sourceRoot":"","sources":["../../../../src/components/ssh-certificate-viewer/-components/miscellaneous.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAM/D,MAAM,CAAC,MAAM,gBAAgB,GAAgD,CAAC,KAAK,EAAE,EAAE;IACrF,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE9B,OAAO;QACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,GACtC;QACF;YACE;gBACE,EAAC,MAAM,IACL,SAAS,EAAE,EAAC,YAAY,OAAG,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,EAAE,IAEzC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CACxB,CACN,CACF;KACN,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n } from '../../../utils';\nimport { Button } from '../../button';\nimport { DownloadIcon } from '../../icons';\nimport { RowTitle } from '../../certificate-details-parts/row';\n\ninterface ISshMiscellaneousProps {\n certificate: SshCertificate;\n}\n\nexport const SshMiscellaneous: FunctionalComponent<ISshMiscellaneousProps> = (props) => {\n const { certificate } = props;\n\n return [\n <RowTitle\n value={l10n.getString('miscellaneous')}\n />,\n <tr>\n <td>\n <Button\n startIcon={<DownloadIcon />}\n onClick={() => certificate.downloadAsSSH()}\n >\n {l10n.getString('download.ssh')}\n </Button>\n </td>\n </tr>,\n ];\n};\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { l10n, getStringByOID } from "../../../utils";
|
|
13
|
+
import { RowTitle, RowValue, } from "../../certificate-details-parts/row";
|
|
14
|
+
export const SshPublicKey = (props) => {
|
|
15
|
+
const { key } = props;
|
|
16
|
+
if (!key) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return [
|
|
20
|
+
h(RowTitle, { value: l10n.getString('publicKeyInfo') }),
|
|
21
|
+
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
|
|
22
|
+
h(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
|
|
23
|
+
h(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
|
|
24
|
+
];
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=public_key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public_key.js","sourceRoot":"","sources":["../../../../src/components/ssh-certificate-viewer/-components/public_key.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,QAAQ,GACT,MAAM,qCAAqC,CAAC;AAM7C,MAAM,CAAC,MAAM,YAAY,GAA4C,CAAC,KAAK,EAAE,EAAE;IAC7E,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAEtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,GACtC;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EACjC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,GACpC;QACF,EAAC,QAAQ,IACP,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAE,GAAG,CAAC,UAAU,EACrB,SAAS,SACT;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,SAAS,QACT,QAAQ,SACR;KACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshPublicKeyProps {\n key: SshCertificate['publicKey'];\n}\n\nexport const SshPublicKey: FunctionalComponent<ISshPublicKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('publicKeyInfo')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\n />,\n ];\n};\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { l10n, getStringByOID } from "../../../utils";
|
|
13
|
+
import { RowTitle, RowValue, } from "../../certificate-details-parts/row";
|
|
14
|
+
export const SshSignatureKey = (props) => {
|
|
15
|
+
const { key } = props;
|
|
16
|
+
if (!key) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return [
|
|
20
|
+
h(RowTitle, { value: l10n.getString('signingCA') }),
|
|
21
|
+
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
|
|
22
|
+
h(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
|
|
23
|
+
h(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
|
|
24
|
+
];
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=signature_key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature_key.js","sourceRoot":"","sources":["../../../../src/components/ssh-certificate-viewer/-components/signature_key.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,QAAQ,GACT,MAAM,qCAAqC,CAAC;AAM7C,MAAM,CAAC,MAAM,eAAe,GAA+C,CAAC,KAAK,EAAE,EAAE;IACnF,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAEtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,GAClC;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EACjC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,GACpC;QACF,EAAC,QAAQ,IACP,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAE,GAAG,CAAC,UAAU,EACrB,SAAS,SACT;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,SAAS,QACT,QAAQ,SACR;KACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshSignatureKeyProps {\n key: SshCertificate['signatureKey'];\n}\n\nexport const SshSignatureKey: FunctionalComponent<ISshSignatureKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('signingCA')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\n />,\n ];\n};\n"]}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
import { h, Host, Build, } from "@stencil/core";
|
|
12
|
+
import { SshCertificate } from "../../crypto";
|
|
13
|
+
import { Typography } from "../typography";
|
|
14
|
+
import { SshBasicInformation } from "./-components/basic_information";
|
|
15
|
+
import { SshPublicKey } from "./-components/public_key";
|
|
16
|
+
import { SshSignatureKey } from "./-components/signature_key";
|
|
17
|
+
import { SshMiscellaneous } from "./-components/miscellaneous";
|
|
18
|
+
export class SshCertificateViewer {
|
|
19
|
+
constructor() {
|
|
20
|
+
/**
|
|
21
|
+
* Mobile media query string to control screen view change.
|
|
22
|
+
* <br />
|
|
23
|
+
* **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.
|
|
24
|
+
* @example
|
|
25
|
+
* (max-width: 900px)
|
|
26
|
+
*/
|
|
27
|
+
this.mobileMediaQueryString = '(max-width: 900px)';
|
|
28
|
+
this.mobileScreenView = false;
|
|
29
|
+
this.isDecodeInProcess = true;
|
|
30
|
+
}
|
|
31
|
+
handleMediaQueryChange(event) {
|
|
32
|
+
this.mobileScreenView = event.matches;
|
|
33
|
+
}
|
|
34
|
+
componentWillLoad() {
|
|
35
|
+
this.decodeCertificate(this.certificate);
|
|
36
|
+
if (Build.isBrowser) {
|
|
37
|
+
this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);
|
|
38
|
+
this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));
|
|
39
|
+
this.mobileScreenView = this.mobileMediaQuery.matches;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));
|
|
44
|
+
}
|
|
45
|
+
async decodeCertificate(certificate) {
|
|
46
|
+
this.isDecodeInProcess = true;
|
|
47
|
+
try {
|
|
48
|
+
if (certificate instanceof SshCertificate) {
|
|
49
|
+
this.certificateDecoded = certificate;
|
|
50
|
+
}
|
|
51
|
+
else if (typeof certificate === 'string') {
|
|
52
|
+
this.certificateDecoded = new SshCertificate(certificate);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// this.certificateDecoded.parseExtensions();
|
|
58
|
+
await this.certificateDecoded.parsePublicKey();
|
|
59
|
+
await this.certificateDecoded.parseSignatureKey();
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
this.certificateDecodeError = error;
|
|
63
|
+
console.error('Error certificate parse:', error);
|
|
64
|
+
}
|
|
65
|
+
this.isDecodeInProcess = false;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Rerun decodeCertificate if previuos value not equal current value
|
|
69
|
+
*/
|
|
70
|
+
watchCertificateAndDecode(newValue, oldValue) {
|
|
71
|
+
if (typeof newValue === 'string' && typeof oldValue === 'string') {
|
|
72
|
+
if (newValue !== oldValue) {
|
|
73
|
+
this.decodeCertificate(newValue);
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (newValue instanceof SshCertificate && oldValue instanceof SshCertificate) {
|
|
78
|
+
if (newValue.serialNumber !== oldValue.serialNumber) {
|
|
79
|
+
this.decodeCertificate(newValue);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
renderErrorState() {
|
|
84
|
+
return (h("div", { class: "status_wrapper" }, h(Typography, null, "There was an error decoding this certificate.")));
|
|
85
|
+
}
|
|
86
|
+
renderEmptyState() {
|
|
87
|
+
return (h("div", { class: "status_wrapper" }, h(Typography, null, "There is no certificate available.")));
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
if (this.certificateDecodeError) {
|
|
91
|
+
return this.renderErrorState();
|
|
92
|
+
}
|
|
93
|
+
if (!this.certificateDecoded) {
|
|
94
|
+
return this.renderEmptyState();
|
|
95
|
+
}
|
|
96
|
+
return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, h("table", null, h(SshBasicInformation, Object.assign({}, this.certificateDecoded)), h(SshPublicKey, { key: this.certificateDecoded.publicKey }), h(SshSignatureKey, { key: this.certificateDecoded.signatureKey }), this.download && (h(SshMiscellaneous, { certificate: this.certificateDecoded })))));
|
|
97
|
+
}
|
|
98
|
+
static get is() { return "peculiar-ssh-certificate-viewer"; }
|
|
99
|
+
static get encapsulation() { return "shadow"; }
|
|
100
|
+
static get originalStyleUrls() {
|
|
101
|
+
return {
|
|
102
|
+
"$": ["../certificate-viewer/certificate-viewer.scss"]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
static get styleUrls() {
|
|
106
|
+
return {
|
|
107
|
+
"$": ["../certificate-viewer/certificate-viewer.css"]
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
static get properties() {
|
|
111
|
+
return {
|
|
112
|
+
"certificate": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"attribute": "certificate",
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "TSshCertificateProp",
|
|
118
|
+
"resolved": "SshCertificate | string",
|
|
119
|
+
"references": {
|
|
120
|
+
"TSshCertificateProp": {
|
|
121
|
+
"location": "local",
|
|
122
|
+
"path": "/Users/donskov/Documents/work/pv/pv-certificates-viewer/packages/webcomponents/src/components/ssh-certificate-viewer/ssh-certificate-viewer.tsx",
|
|
123
|
+
"id": "src/components/ssh-certificate-viewer/ssh-certificate-viewer.tsx::TSshCertificateProp"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "The certificate value for decode and show details. Use PEM or DER."
|
|
132
|
+
},
|
|
133
|
+
"getter": false,
|
|
134
|
+
"setter": false,
|
|
135
|
+
"reflect": true
|
|
136
|
+
},
|
|
137
|
+
"download": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"attribute": "download",
|
|
140
|
+
"mutable": false,
|
|
141
|
+
"complexType": {
|
|
142
|
+
"original": "boolean",
|
|
143
|
+
"resolved": "boolean",
|
|
144
|
+
"references": {}
|
|
145
|
+
},
|
|
146
|
+
"required": false,
|
|
147
|
+
"optional": true,
|
|
148
|
+
"docs": {
|
|
149
|
+
"tags": [],
|
|
150
|
+
"text": "If `true` - component will show split-button to download certificate as PEM or DER."
|
|
151
|
+
},
|
|
152
|
+
"getter": false,
|
|
153
|
+
"setter": false,
|
|
154
|
+
"reflect": true
|
|
155
|
+
},
|
|
156
|
+
"mobileMediaQueryString": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"attribute": "mobile-media-query-string",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "string",
|
|
162
|
+
"resolved": "string",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": true,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [{
|
|
169
|
+
"name": "example",
|
|
170
|
+
"text": " (max-width: 900px)"
|
|
171
|
+
}],
|
|
172
|
+
"text": "Mobile media query string to control screen view change.\n<br />\n**NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia."
|
|
173
|
+
},
|
|
174
|
+
"getter": false,
|
|
175
|
+
"setter": false,
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"defaultValue": "'(max-width: 900px)'"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
static get states() {
|
|
182
|
+
return {
|
|
183
|
+
"mobileScreenView": {},
|
|
184
|
+
"isDecodeInProcess": {}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
static get watchers() {
|
|
188
|
+
return [{
|
|
189
|
+
"propName": "certificate",
|
|
190
|
+
"methodName": "watchCertificateAndDecode"
|
|
191
|
+
}];
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=ssh-certificate-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssh-certificate-viewer.js","sourceRoot":"","sources":["../../../src/components/ssh-certificate-viewer/ssh-certificate-viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,SAAS,EACT,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAS/D,MAAM,OAAO,oBAAoB;IALjC;QAsBE;;;;;;WAMG;QACuB,2BAAsB,GAAY,oBAAoB,CAAC;QAExE,qBAAgB,GAAG,KAAK,CAAC;QAEzB,sBAAiB,GAAG,I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BAAkB,EAC3B;gBAEF,EAAC,YAAY,IACX,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,GACtC;gBAEF,EAAC,eAAe,IACd,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,YAAY,GACzC;gBAED,IAAI,CAAC,QAAQ,IAAI,CAChB,EAAC,gBAAgB,IACf,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC,CACH,CACK,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\nimport { SshCertificate } from '../../crypto';\nimport { Typography } from '../typography';\nimport { SshBasicInformation } from './-components/basic_information';\nimport { SshPublicKey } from './-components/public_key';\nimport { SshSignatureKey } from './-components/signature_key';\nimport { SshMiscellaneous } from './-components/miscellaneous';\n\nexport type TSshCertificateProp = string | SshCertificate;\n\n@Component({\n tag: 'peculiar-ssh-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class SshCertificateViewer {\n private certificateDecoded: SshCertificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TSshCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TSshCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof SshCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new SshCertificate(certificate);\n } else {\n return;\n }\n\n // this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.parsePublicKey();\n await this.certificateDecoded.parseSignatureKey();\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: TSshCertificateProp, oldValue: TSshCertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof SshCertificate && oldValue instanceof SshCertificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <SshBasicInformation\n {...this.certificateDecoded}\n />\n\n <SshPublicKey\n key={this.certificateDecoded.publicKey}\n />\n\n <SshSignatureKey\n key={this.certificateDecoded.signatureKey}\n />\n\n {this.download && (\n <SshMiscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './x509_certificate';\nexport * from './x509_attribute_certificate';\nexport * from './pkcs10_certificate_request';\nexport * from './x509_crl';\nexport * from './x509_certificates';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './x509_certificate';\nexport * from './x509_attribute_certificate';\nexport * from './pkcs10_certificate_request';\nexport * from './x509_crl';\nexport * from './x509_certificates';\nexport * from './ssh_certificate';\n"]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
5
|
+
if (kind === "m")
|
|
6
|
+
throw new TypeError("Private method is not writable");
|
|
7
|
+
if (kind === "a" && !f)
|
|
8
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
10
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14
|
+
if (kind === "a" && !f)
|
|
15
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
16
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
17
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
18
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
19
|
+
};
|
|
20
|
+
var _SshCertificate_cert;
|
|
21
|
+
import { SshCertificate as SshCertificateType, parseCertificate } from "@peculiar/ssh";
|
|
22
|
+
import { Convert } from "pvtsutils";
|
|
23
|
+
import { dateDiff, Download } from "../utils";
|
|
24
|
+
export class SshCertificate {
|
|
25
|
+
constructor(raw) {
|
|
26
|
+
_SshCertificate_cert.set(this, void 0);
|
|
27
|
+
const blob = parseCertificate(raw.trim());
|
|
28
|
+
// @ts-expect-error - SshCertificateType is not a constructor
|
|
29
|
+
__classPrivateFieldSet(this, _SshCertificate_cert, new SshCertificateType(blob), "f");
|
|
30
|
+
this.notBefore = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validAfter;
|
|
31
|
+
this.notAfter = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validBefore;
|
|
32
|
+
this.validity = dateDiff(this.notBefore, this.notAfter);
|
|
33
|
+
this.type = [__classPrivateFieldGet(this, _SshCertificate_cert, "f").blob.type, __classPrivateFieldGet(this, _SshCertificate_cert, "f").certType, __classPrivateFieldGet(this, _SshCertificate_cert, "f").type].join(' ');
|
|
34
|
+
this.serialNumber = __classPrivateFieldGet(this, _SshCertificate_cert, "f").serial.toString();
|
|
35
|
+
this.keyId = __classPrivateFieldGet(this, _SshCertificate_cert, "f").keyId;
|
|
36
|
+
this.principals = __classPrivateFieldGet(this, _SshCertificate_cert, "f").principals;
|
|
37
|
+
this.extensions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").extensions;
|
|
38
|
+
this.criticalOptions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").criticalOptions;
|
|
39
|
+
}
|
|
40
|
+
async parseSignatureKey() {
|
|
41
|
+
const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toWebCrypto();
|
|
42
|
+
const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.getBlob();
|
|
43
|
+
const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.thumbprint('sha256');
|
|
44
|
+
this.signatureKey = {
|
|
45
|
+
algorithm: key.algorithm.name,
|
|
46
|
+
type: blob.type,
|
|
47
|
+
value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toSSH(),
|
|
48
|
+
thumbprint: Convert.ToBase64(thumbprint),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
async parsePublicKey() {
|
|
52
|
+
const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toWebCrypto();
|
|
53
|
+
const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.getBlob();
|
|
54
|
+
const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.thumbprint('sha256');
|
|
55
|
+
this.publicKey = {
|
|
56
|
+
algorithm: key.algorithm.name,
|
|
57
|
+
type: blob.type,
|
|
58
|
+
value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toSSH(),
|
|
59
|
+
thumbprint: Convert.ToBase64(thumbprint),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
63
|
+
async toString(_format = 'pem') {
|
|
64
|
+
return __classPrivateFieldGet(this, _SshCertificate_cert, "f").toSSH();
|
|
65
|
+
}
|
|
66
|
+
get commonName() {
|
|
67
|
+
return __classPrivateFieldGet(this, _SshCertificate_cert, "f").principals.join('_') || __classPrivateFieldGet(this, _SshCertificate_cert, "f").keyId || __classPrivateFieldGet(this, _SshCertificate_cert, "f").certType;
|
|
68
|
+
}
|
|
69
|
+
async downloadAsSSH(name) {
|
|
70
|
+
Download.certSSH.asSSH(await this.toString(), name || this.commonName);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
_SshCertificate_cert = new WeakMap();
|
|
74
|
+
//# sourceMappingURL=ssh_certificate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssh_certificate.js","sourceRoot":"","sources":["../../src/crypto/ssh_certificate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,OAAO,cAAc;IAmCzB,YAAY,GAAW;QAFvB,uCAA0B;QAGxB,MAAM,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QAE1C,6DAA6D;QAC7D,uBAAA,IAAI,wBAAS,IAAI,kBAAkB,CAAC,IAAI,CAAuB,MAAA,CAAC;QAEhE,IAAI,CAAC,SAAS,GAAG,uBAAA,IAAI,4BAAM,CAAC,UAAU,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,uBAAA,IAAI,4BAAM,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,GAAG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AAM,IAAI,GAAG,uBAAA,IAAI,4BAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QAC5C,MAAM,UAAU,GAAG,MAAM,uBAAA,IAAI,4BAAM,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAEnE,IAAI,CAAC,SAAS,GAAG;YACf,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,MAAM,uBAAA,IAAI,4BAAM,CAAC,SAAS,CAAC,KAAK,EAAE;YACzC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;SACzC,CAAC;IACJ,CAAC;IAED,6DAA6D;IACtD,KAAK,CAAC,QAAQ,CAAC,UAA0C,KAAK;QACnE,OAAO,uBAAA,IAAI,4BAAM,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,uBAAA,IAAI,4BAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,uBAAA,IAAI,4BAAM,CAAC,KAAK,IAAI,uBAAA,IAAI,4BAAM,CAAC,QAAQ,CAAC;IACpF,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,IAAa;QACtC,QAAQ,CAAC,OAAO,CAAC,KAAK,CACpB,MAAM,IAAI,CAAC,QAAQ,EAAE,EACrB,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { SshCertificate as SshCertificateType, parseCertificate } from '@peculiar/ssh';\nimport { Convert } from 'pvtsutils';\nimport { dateDiff, Download } from '../utils';\n\nexport class SshCertificate {\n public readonly serialNumber: string;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public readonly type: string;\n\n public readonly keyId: string;\n\n public readonly principals: string[];\n\n public readonly extensions: Record<string, string>;\n\n public readonly criticalOptions: Record<string, string>;\n\n public signatureKey: {\n algorithm: string;\n type: string;\n value: string;\n thumbprint: string;\n };\n\n public publicKey: {\n algorithm: string;\n type: string;\n value: string;\n thumbprint: string;\n };\n\n #cert: SshCertificateType;\n\n constructor(raw: string) {\n const blob = parseCertificate(raw.trim());\n\n // @ts-expect-error - SshCertificateType is not a constructor\n this.#cert = new SshCertificateType(blob) as SshCertificateType;\n\n this.notBefore = this.#cert.validAfter;\n this.notAfter = this.#cert.validBefore;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.type = [this.#cert.blob.type, this.#cert.certType, this.#cert.type].join(' ');\n this.serialNumber = this.#cert.serial.toString();\n this.keyId = this.#cert.keyId;\n this.principals = this.#cert.principals;\n this.extensions = this.#cert.extensions;\n this.criticalOptions = this.#cert.criticalOptions;\n }\n\n public async parseSignatureKey() {\n const key = await this.#cert.signatureKey.toWebCrypto();\n const blob = this.#cert.signatureKey.getBlob();\n const thumbprint = await this.#cert.signatureKey.thumbprint('sha256');\n\n this.signatureKey = {\n algorithm: key.algorithm.name,\n type: blob.type,\n value: await this.#cert.signatureKey.toSSH(),\n thumbprint: Convert.ToBase64(thumbprint),\n };\n }\n\n public async parsePublicKey() {\n const key = await this.#cert.publicKey.toWebCrypto();\n const blob = this.#cert.publicKey.getBlob();\n const thumbprint = await this.#cert.publicKey.thumbprint('sha256');\n\n this.publicKey = {\n algorithm: key.algorithm.name,\n type: blob.type,\n value: await this.#cert.publicKey.toSSH(),\n thumbprint: Convert.ToBase64(thumbprint),\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public async toString(_format: 'pem' | 'base64' | 'base64url' = 'pem') {\n return this.#cert.toSSH();\n }\n\n public get commonName(): string {\n return this.#cert.principals.join('_') || this.#cert.keyId || this.#cert.certType;\n }\n\n public async downloadAsSSH(name?: string) {\n Download.certSSH.asSSH(\n await this.toString(),\n name || this.commonName,\n );\n }\n}\n"]}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"download": "Download",
|
|
10
10
|
"download.pem": "Download PEM",
|
|
11
11
|
"download.der": "Download DER",
|
|
12
|
+
"download.ssh": "Download SSH",
|
|
12
13
|
"serialNumber": "Serial Number",
|
|
13
14
|
"version": "Version",
|
|
14
15
|
"validity": "Validity",
|
|
@@ -45,5 +46,9 @@
|
|
|
45
46
|
"crlEntryExtensions": "CRL Entry Extensions",
|
|
46
47
|
"previewCertificate": "Preview certificate",
|
|
47
48
|
"viewDetails": "View details",
|
|
48
|
-
"downloadOptions": "Download options"
|
|
49
|
+
"downloadOptions": "Download options",
|
|
50
|
+
"keyId": "Key ID",
|
|
51
|
+
"principals": "Principals",
|
|
52
|
+
"criticalOptions": "Critical Options",
|
|
53
|
+
"signingCA": "Signing CA"
|
|
49
54
|
}
|
|
@@ -45,4 +45,9 @@ Download.crl = {
|
|
|
45
45
|
downloadFromBuffer(raw, name, 'crl', 'application/pkix-crl');
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
|
+
Download.certSSH = {
|
|
49
|
+
asSSH: (value, name) => {
|
|
50
|
+
downloadFromBuffer(Convert.FromString(value), name, 'cert', 'application/ssh-cert');
|
|
51
|
+
},
|
|
52
|
+
};
|
|
48
53
|
//# sourceMappingURL=download.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../src/utils/download.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,kEAAkE;AAClE,MAAM,OAAO,QAAQ;;AACL,aAAI,GAAG;IACnB,KAAK,EAAE,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE;QACnC,kBAAkB,CAChB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAED,KAAK,EAAE,CAAC,GAAgB,EAAE,IAAY,EAAE,EAAE;QACxC,kBAAkB,CAChB,GAAG,EACH,IAAI,EACJ,KAAK,EACL,uBAAuB,CACxB,CAAC;IACJ,CAAC;CACF,CAAC;AAEY,iBAAQ,GAAG;IACvB,KAAK,EAAE,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE;QACnC,kBAAkB,CAChB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,4BAA4B,CAC7B,CAAC;IACJ,CAAC;IAED,KAAK,EAAE,CAAC,GAAgB,EAAE,IAAY,EAAE,EAAE;QACxC,kBAAkB,CAChB,GAAG,EACH,IAAI,EACJ,KAAK,EACL,4BAA4B,CAC7B,CAAC;IACJ,CAAC;CACF,CAAC;AAEY,YAAG,GAAG;IAClB,KAAK,EAAE,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE;QACnC,kBAAkB,CAChB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAED,KAAK,EAAE,CAAC,GAAgB,EAAE,IAAY,EAAE,EAAE;QACxC,kBAAkB,CAChB,GAAG,EACH,IAAI,EACJ,KAAK,EACL,oBAAoB,CACrB,CAAC;IACJ,CAAC;CACF,CAAC;AAEY,YAAG,GAAG;IAClB,KAAK,EAAE,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE;QACnC,kBAAkB,CAChB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,sBAAsB,CACvB,CAAC;IACJ,CAAC;IAED,KAAK,EAAE,CAAC,GAAgB,EAAE,IAAY,EAAE,EAAE;QACxC,kBAAkB,CAChB,GAAG,EACH,IAAI,EACJ,KAAK,EACL,sBAAsB,CACvB,CAAC;IACJ,CAAC;CACF,CAAC","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 { downloadFromBuffer } from './download_from_buffer';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class Download {\n public static cert = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'cer',\n 'application/pkix-cert',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'cer',\n 'application/pkix-cert',\n );\n },\n };\n\n public static attrCert = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'cer',\n 'application/pkix-attr-cert',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'cer',\n 'application/pkix-attr-cert',\n );\n },\n };\n\n public static csr = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'csr',\n 'application/pkcs10',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'csr',\n 'application/pkcs10',\n );\n },\n };\n\n public static crl = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'crl',\n 'application/pkix-crl',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'crl',\n 'application/pkix-crl',\n );\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../src/utils/download.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,kEAAkE;AAClE,MAAM,OAAO,QAAQ;;AACL,aAAI,GAAG;IACnB,KAAK,EAAE,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE;QACnC,kBAAkB,CAChB,OAAO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BAAsB,CACvB,CAAC;IACJ,CAAC;CACF,CAAC;AAEY,gBAAO,GAAG;IACtB,KAAK,EAAE,CAAC,KAAa,EAAE,IAAY,EAAE,EAAE;QACrC,kBAAkB,CAChB,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EACzB,IAAI,EACJ,MAAM,EACN,sBAAsB,CACvB,CAAC;IACJ,CAAC;CACF,CAAC","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 { downloadFromBuffer } from './download_from_buffer';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class Download {\n public static cert = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'cer',\n 'application/pkix-cert',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'cer',\n 'application/pkix-cert',\n );\n },\n };\n\n public static attrCert = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'cer',\n 'application/pkix-attr-cert',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'cer',\n 'application/pkix-attr-cert',\n );\n },\n };\n\n public static csr = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'csr',\n 'application/pkcs10',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'csr',\n 'application/pkcs10',\n );\n },\n };\n\n public static crl = {\n asPEM: (pem: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(pem),\n name,\n 'crl',\n 'application/pkix-crl',\n );\n },\n\n asDER: (raw: ArrayBuffer, name: string) => {\n downloadFromBuffer(\n raw,\n name,\n 'crl',\n 'application/pkix-crl',\n );\n },\n };\n\n public static certSSH = {\n asSSH: (value: string, name: string) => {\n downloadFromBuffer(\n Convert.FromString(value),\n name,\n 'cert',\n 'application/ssh-cert',\n );\n },\n };\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { a0 as OctetString, a1 as ByteStream, a2 as SignedCertificateTimestamp, A as AsnData, a3 as Extension$1, q as AsnParser, a4 as CabforganizationIdentifier, a5 as NonStandardKeyDescription, a6 as BaseCRLNumber, a7 as CRLNumber, a8 as SubjectInfoAccessSyntax, a9 as TNAuthorizationList, aa as LogotypeExtn, ab as BiometricSyntax, ac as EntrustVersionInfo, ad as PrivateKeyUsagePeriod, ae as ArchiveRevInfo, af as Timestamp, ag as LeiRole, ah as LeiChoice, ai as CaVersion, aj as NetscapeCertType, ak as NetscapeComment, al as EnrollCertTypeChoice, am as CertificateTemplate, an as QCStatements, ao as SubjectKeyIdentifier, ap as SubjectDirectoryAttributes, aq as SubjectAlternativeName, ar as PolicyMappings, as as PolicyConstraints, at as NameConstraints, au as KeyUsage, av as IssueAlternativeName, aw as InvalidityDate, ax as InhibitAnyPolicy, ay as ExtendedKeyUsage, az as CRLReason, aA as IssuingDistributionPoint, aB as CRLDistributionPoints, aC as CertificatePolicies, aD as CertificateIssuer, aE as BasicConstraints, aF as AuthorityKeyIdentifier, aG as AuthorityInfoAccessSyntax, b as buildExports, aH as id_cabforganizationIdentifier, aI as id_ce_keyDescription, aJ as id_ce_deltaCRLIndicator, aK as id_ce_cRLNumber, aL as id_pe_subjectInfoAccess, aM as id_pe_TNAuthList, aN as id_pe_biometricInfo, aO as id_entrust_entrustVersInfo, aP as id_ce_privateKeyUsagePeriod, aQ as id_adbe_archiveRevInfo, aR as id_adbe_timestamp, aS as id_role, aT as id_lei, aU as id_caVersion, aV as id_netscapeCertType, aW as id_netscapeComment, aX as id_enrollCertType, aY as id_certificateTemplate, aZ as id_pe_qcStatements, a_ as id_ce_subjectKeyIdentifier, a$ as id_ce_subjectDirectoryAttributes, b0 as id_ce_subjectAltName, b1 as id_ce_policyMappings, b2 as id_ce_policyConstraints, b3 as id_ce_nameConstraints, b4 as id_ce_keyUsage, b5 as id_ce_issuerAltName, b6 as id_ce_invalidityDate, b7 as id_ce_inhibitAnyPolicy, b8 as id_ce_extKeyUsage, b9 as id_ce_cRLReasons, ba as id_ce_issuingDistributionPoint, bb as id_ce_cRLDistributionPoints, bc as id_ce_certificatePolicies, bd as id_ce_certificateIssuer, be as id_ce_basicConstraints, bf as id_ce_authorityKeyIdentifier, bg as id_pe_authorityInfoAccess } from './
|
|
4
|
+
import { a0 as OctetString, a1 as ByteStream, a2 as SignedCertificateTimestamp, A as AsnData, a3 as Extension$1, q as AsnParser, a4 as CabforganizationIdentifier, a5 as NonStandardKeyDescription, a6 as BaseCRLNumber, a7 as CRLNumber, a8 as SubjectInfoAccessSyntax, a9 as TNAuthorizationList, aa as LogotypeExtn, ab as BiometricSyntax, ac as EntrustVersionInfo, ad as PrivateKeyUsagePeriod, ae as ArchiveRevInfo, af as Timestamp, ag as LeiRole, ah as LeiChoice, ai as CaVersion, aj as NetscapeCertType, ak as NetscapeComment, al as EnrollCertTypeChoice, am as CertificateTemplate, an as QCStatements, ao as SubjectKeyIdentifier, ap as SubjectDirectoryAttributes, aq as SubjectAlternativeName, ar as PolicyMappings, as as PolicyConstraints, at as NameConstraints, au as KeyUsage, av as IssueAlternativeName, aw as InvalidityDate, ax as InhibitAnyPolicy, ay as ExtendedKeyUsage, az as CRLReason, aA as IssuingDistributionPoint, aB as CRLDistributionPoints, aC as CertificatePolicies, aD as CertificateIssuer, aE as BasicConstraints, aF as AuthorityKeyIdentifier, aG as AuthorityInfoAccessSyntax, b as buildExports, aH as id_cabforganizationIdentifier, aI as id_ce_keyDescription, aJ as id_ce_deltaCRLIndicator, aK as id_ce_cRLNumber, aL as id_pe_subjectInfoAccess, aM as id_pe_TNAuthList, aN as id_pe_biometricInfo, aO as id_entrust_entrustVersInfo, aP as id_ce_privateKeyUsagePeriod, aQ as id_adbe_archiveRevInfo, aR as id_adbe_timestamp, aS as id_role, aT as id_lei, aU as id_caVersion, aV as id_netscapeCertType, aW as id_netscapeComment, aX as id_enrollCertType, aY as id_certificateTemplate, aZ as id_pe_qcStatements, a_ as id_ce_subjectKeyIdentifier, a$ as id_ce_subjectDirectoryAttributes, b0 as id_ce_subjectAltName, b1 as id_ce_policyMappings, b2 as id_ce_policyConstraints, b3 as id_ce_nameConstraints, b4 as id_ce_keyUsage, b5 as id_ce_issuerAltName, b6 as id_ce_invalidityDate, b7 as id_ce_inhibitAnyPolicy, b8 as id_ce_extKeyUsage, b9 as id_ce_cRLReasons, ba as id_ce_issuingDistributionPoint, bb as id_ce_cRLDistributionPoints, bc as id_ce_certificatePolicies, bd as id_ce_certificateIssuer, be as id_ce_basicConstraints, bf as id_ce_authorityKeyIdentifier, bg as id_pe_authorityInfoAccess } from './ssh_certificate-PCn0WXhQ.js';
|
|
5
5
|
|
|
6
6
|
const id_certificateTransparency = "1.3.6.1.4.1.11129.2.4.2";
|
|
7
7
|
class CertificateTransparency extends OctetString {
|
|
@@ -102,6 +102,6 @@ class Extension extends AsnData {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
export { CertificateTransparency as C, Extension as E };
|
|
105
|
-
//# sourceMappingURL=extension-
|
|
105
|
+
//# sourceMappingURL=extension-DmlhftES.js.map
|
|
106
106
|
|
|
107
|
-
//# sourceMappingURL=extension-
|
|
107
|
+
//# sourceMappingURL=extension-DmlhftES.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-
|
|
1
|
+
{"version":3,"file":"extension-DmlhftES.js","sources":["../../node_modules/.pnpm/@peculiar+asn1-cert-transparency@2.4.0/node_modules/@peculiar/asn1-cert-transparency/build/es2015/cert_transparency.js","../../node_modules/.pnpm/@peculiar+asn1-x509-logotype@2.4.0/node_modules/@peculiar/asn1-x509-logotype/build/es2015/object_identifiers.js","src/crypto/extension.ts"],"sourcesContent":["import { OctetString } from \"@peculiar/asn1-schema\";\nimport { SignedCertificateTimestamp } from \"./timestamp\";\nimport { ByteStream } from \"./byte_stream\";\nexport const id_certificateTransparency = \"1.3.6.1.4.1.11129.2.4.2\";\nexport class CertificateTransparency extends OctetString {\n constructor() {\n super(...arguments);\n this.items = [];\n }\n fromASN(asn) {\n super.fromASN(asn);\n const stream = new ByteStream(this.buffer);\n const len = stream.readNumber(2);\n this.items = [];\n while (stream.position < len) {\n this.items.push(new SignedCertificateTimestamp(stream));\n }\n return this;\n }\n toJSON() {\n return this.items.map((o) => o.toJSON());\n }\n}\n","import { id_pkix } from \"@peculiar/asn1-x509\";\nexport const id_pe_logotype = \"1.3.6.1.5.5.7.1.12\";\nexport const id_logo = `${id_pkix}.20`;\nexport const id_logo_loyalty = `${id_logo}.1`;\nexport const id_logo_background = `${id_logo}.2`;\nexport const id_logo_certImage = `${id_logo}.3`;\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 { Convert } from 'pvtsutils';\nimport {\n Extension as AsnExtension,\n\n id_pe_authorityInfoAccess,\n AuthorityInfoAccessSyntax,\n\n id_ce_authorityKeyIdentifier,\n AuthorityKeyIdentifier,\n\n id_ce_basicConstraints,\n BasicConstraints,\n\n id_ce_certificateIssuer,\n CertificateIssuer,\n\n id_ce_certificatePolicies,\n CertificatePolicies,\n\n id_ce_cRLDistributionPoints,\n CRLDistributionPoints,\n\n id_ce_issuingDistributionPoint,\n IssuingDistributionPoint,\n\n id_ce_cRLReasons,\n CRLReason,\n\n id_ce_extKeyUsage,\n ExtendedKeyUsage,\n\n id_ce_inhibitAnyPolicy,\n InhibitAnyPolicy,\n\n id_ce_invalidityDate,\n InvalidityDate,\n\n id_ce_issuerAltName,\n IssueAlternativeName,\n\n id_ce_keyUsage,\n KeyUsage,\n\n id_ce_nameConstraints,\n NameConstraints,\n\n id_ce_policyConstraints,\n PolicyConstraints,\n\n id_ce_policyMappings,\n PolicyMappings,\n\n id_ce_subjectAltName,\n SubjectAlternativeName,\n\n id_ce_subjectDirectoryAttributes,\n SubjectDirectoryAttributes,\n\n id_ce_subjectKeyIdentifier,\n SubjectKeyIdentifier,\n\n id_ce_privateKeyUsagePeriod,\n PrivateKeyUsagePeriod,\n\n id_entrust_entrustVersInfo,\n EntrustVersionInfo,\n\n id_pe_subjectInfoAccess,\n SubjectInfoAccessSyntax,\n\n id_ce_cRLNumber,\n CRLNumber,\n\n id_ce_deltaCRLIndicator,\n BaseCRLNumber,\n} from '@peculiar/asn1-x509';\nimport {\n id_pe_qcStatements,\n QCStatements,\n\n id_pe_biometricInfo,\n BiometricSyntax,\n} from '@peculiar/asn1-x509-qualified';\nimport {\n id_certificateTemplate,\n CertificateTemplate,\n\n id_enrollCertType,\n EnrollCertTypeChoice,\n\n id_caVersion,\n CaVersion,\n} from '@peculiar/asn1-x509-microsoft';\nimport {\n id_netscapeComment,\n NetscapeComment,\n\n id_netscapeCertType,\n NetscapeCertType,\n} from '@peculiar/asn1-x509-netscape';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport {\n id_lei,\n LeiChoice,\n\n id_role,\n LeiRole,\n} from '@peculiar/asn1-lei';\nimport {\n id_certificateTransparency,\n CertificateTransparency,\n} from '@peculiar/asn1-cert-transparency';\nimport {\n id_adbe_timestamp,\n Timestamp,\n\n id_adbe_archiveRevInfo,\n ArchiveRevInfo,\n} from '@peculiar/asn1-adobe-acrobat';\nimport {\n id_pe_logotype,\n LogotypeExtn,\n} from '@peculiar/asn1-x509-logotype';\nimport {\n id_pe_TNAuthList,\n TNAuthorizationList,\n} from '@peculiar/asn1-rfc8226';\nimport {\n id_ce_keyDescription,\n NonStandardKeyDescription,\n} from '@peculiar/asn1-android';\nimport {\n id_cabforganizationIdentifier,\n CabforganizationIdentifier,\n} from './extensions';\nimport { AsnData } from './asn_data';\n\nconst extensionParsers = {\n [id_pe_authorityInfoAccess]: AuthorityInfoAccessSyntax,\n [id_ce_authorityKeyIdentifier]: AuthorityKeyIdentifier,\n [id_ce_basicConstraints]: BasicConstraints,\n [id_ce_certificateIssuer]: CertificateIssuer,\n [id_ce_certificatePolicies]: CertificatePolicies,\n [id_ce_cRLDistributionPoints]: CRLDistributionPoints,\n '2.5.29.46': CRLDistributionPoints,\n [id_ce_issuingDistributionPoint]: IssuingDistributionPoint,\n [id_ce_cRLReasons]: CRLReason,\n [id_ce_extKeyUsage]: ExtendedKeyUsage,\n [id_ce_inhibitAnyPolicy]: InhibitAnyPolicy,\n [id_ce_invalidityDate]: InvalidityDate,\n [id_ce_issuerAltName]: IssueAlternativeName,\n [id_ce_keyUsage]: KeyUsage,\n [id_ce_nameConstraints]: NameConstraints,\n [id_ce_policyConstraints]: PolicyConstraints,\n [id_ce_policyMappings]: PolicyMappings,\n [id_ce_subjectAltName]: SubjectAlternativeName,\n [id_ce_subjectDirectoryAttributes]: SubjectDirectoryAttributes,\n [id_ce_subjectKeyIdentifier]: SubjectKeyIdentifier,\n [id_pe_qcStatements]: QCStatements,\n [id_certificateTemplate]: CertificateTemplate,\n [id_enrollCertType]: EnrollCertTypeChoice,\n [id_netscapeComment]: NetscapeComment,\n [id_netscapeCertType]: NetscapeCertType,\n [id_caVersion]: CaVersion,\n [id_certificateTransparency]: CertificateTransparency,\n [id_lei]: LeiChoice,\n [id_role]: LeiRole,\n [id_adbe_timestamp]: Timestamp,\n [id_adbe_archiveRevInfo]: ArchiveRevInfo,\n [id_ce_privateKeyUsagePeriod]: PrivateKeyUsagePeriod,\n [id_entrust_entrustVersInfo]: EntrustVersionInfo,\n '2.16.724.1.2.2.4.1': BiometricSyntax,\n [id_pe_biometricInfo]: BiometricSyntax,\n [id_pe_logotype]: LogotypeExtn,\n [id_pe_TNAuthList]: TNAuthorizationList,\n [id_pe_subjectInfoAccess]: SubjectInfoAccessSyntax,\n [id_ce_cRLNumber]: CRLNumber,\n [id_ce_deltaCRLIndicator]: BaseCRLNumber,\n [id_ce_keyDescription]: NonStandardKeyDescription,\n [id_cabforganizationIdentifier]: CabforganizationIdentifier,\n};\n\ntype TExtensionKeys = keyof typeof extensionParsers;\n\nexport type TExtensionValue = InstanceType<typeof extensionParsers[TExtensionKeys]> | string;\n\nexport class Extension<T extends TExtensionValue> extends AsnData<AsnExtension> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.extnValue.buffer;\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnExtension);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = extensionParsers[this.asn.extnID];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.extnID}\" extension.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.extnID}\" extension:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n"],"names":["AsnExtension","Convert"],"mappings":";;;;;AAGO,MAAM,0BAA0B,GAAG,yBAAyB;AAC5D,MAAM,uBAAuB,SAAS,WAAW,CAAC;AACzD,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC;AAC3B,QAAQ,IAAI,CAAC,KAAK,GAAG,EAAE;AACvB;AACA,IAAI,OAAO,CAAC,GAAG,EAAE;AACjB,QAAQ,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAC1B,QAAQ,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;AAClD,QAAQ,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AACxC,QAAQ,IAAI,CAAC,KAAK,GAAG,EAAE;AACvB,QAAQ,OAAO,MAAM,CAAC,QAAQ,GAAG,GAAG,EAAE;AACtC,YAAY,IAAI,CAAC,KAAK,CAAC,IA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I,CAAC,GAAG,CAAC,MAAM,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC;YAE3E,IAAI,CAAC,KAAK,GAAGA,oBAAO,CAAC,KAAK,CAAC,YAAY,CAAM;;;AAGlD;;;;","x_google_ignoreList":[0,1]}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
export { D as Download, d as downloadFromBuffer } from './
|
|
4
|
+
export { D as Download, d as downloadFromBuffer } from './ssh_certificate-PCn0WXhQ.js';
|
|
5
5
|
export { r as readAsArrayBuffer, a as readAsBinaryString, b as readAsDataUrl, c as readAsText } from './read_file-F2F0McJX.js';
|
|
6
|
-
export { P as Pkcs10CertificateRequest } from './pkcs10_certificate_request-
|
|
6
|
+
export { P as Pkcs10CertificateRequest } from './pkcs10_certificate_request-B5C1NYFc.js';
|
|
7
7
|
export { B as Button, T as Typography } from './button-Bbh7MwG6.js';
|
|
8
8
|
export { L as Link } from './link-CGURvKy1.js';
|
|
9
9
|
export { C as CrossIcon, D as DetailsIcon, L as LinkIcon } from './cross-G84H_-QL.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -7,7 +7,7 @@ export { s as setNonce } from './index-CwgZaF40.js';
|
|
|
7
7
|
const defineCustomElements = async (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
9
9
|
await globalScripts();
|
|
10
|
-
return bootstrapLazy([["peculiar-text-hider",[[262,"peculiar-text-hider",{"opened":[32]}]]],["peculiar-certificate-viewer",[[257,"peculiar-certificate-viewer",{"certificate":[513],"download":[516],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}]]],["peculiar-attribute-certificate-
|
|
10
|
+
return bootstrapLazy([["peculiar-text-hider",[[262,"peculiar-text-hider",{"opened":[32]}]]],["peculiar-certificate-viewer",[[257,"peculiar-certificate-viewer",{"certificate":[513],"download":[516],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}]]],["peculiar-attribute-certificate-viewer_5",[[257,"peculiar-certificate-chain-viewer",{"certificates":[16],"download":[516],"selectedCertificateIndex":[32]}],[257,"peculiar-ssh-certificate-viewer",{"certificate":[513],"download":[516],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}],[257,"peculiar-attribute-certificate-viewer",{"certificate":[1],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}],[257,"peculiar-crl-viewer",{"certificate":[513],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}],[257,"peculiar-csr-viewer",{"certificate":[513],"download":[4],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}]]],["peculiar-certificate-decoder",[[257,"peculiar-certificate-decoder",{"certificateExamples":[16,"certificate-examples"],"certificateToDecode":[1,"certificate-to-decode"],"certificateDecoded":[32]}]]],["peculiar-button-menu_3",[[258,"peculiar-button-menu",{"groups":[16],"open":[32]}],[257,"peculiar-circular-progress",{"size":[2],"width":[2]}],[257,"peculiar-highlight-words",{"search":[1]}]]],["peculiar-certificates-viewer",[[257,"peculiar-certificates-viewer",{"certificates":[16],"filterWithSearch":[4,"filter-with-search"],"highlightWithSearch":[4,"highlight-with-search"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"search":[32],"certificatesDecoded":[32],"expandedRow":[32],"certificateSelectedForDetails":[32],"isDecodeInProcess":[32]},null,{"certificates":["watchCertificates"]}]]]], options);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { defineCustomElements };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { h } from './index-CwgZaF40.js';
|
|
5
|
-
import { $ as OIDs, Z as l10n, _ as dateShort, b as buildExports,
|
|
5
|
+
import { $ as OIDs, Z as l10n, _ as dateShort, b as buildExports, bn as Name$1, bo as OtherName, q as AsnParser, bp as DisplayText, bq as UserNotice, br as EDIPartyName, bs as __decorate, bt as AsnProp, bu as AsnPropTypes, bv as AsnType, bw as AsnTypeTypes, bx as AsnArray, by as id_qcs_pkixQCSyntax_v2, bz as SemanticsInformation, bA as AsnIntegerArrayBufferConverter, bB as AttestationApplicationId, bC as RootOfTrust, bD as IntegerSet, au as KeyUsage, aE as BasicConstraints, ay as ExtendedKeyUsage, ao as SubjectKeyIdentifier, aF as AuthorityKeyIdentifier, aB as CRLDistributionPoints, aG as AuthorityInfoAccessSyntax, a8 as SubjectInfoAccessSyntax, aq as SubjectAlternativeName, aC as CertificatePolicies, at as NameConstraints, am as CertificateTemplate, al as EnrollCertTypeChoice, ai as CaVersion, an as QCStatements, ak as NetscapeComment, aj as NetscapeCertType, ag as LeiRole, ah as LeiChoice, af as Timestamp, ae as ArchiveRevInfo, az as CRLReason, ap as SubjectDirectoryAttributes, ad as PrivateKeyUsagePeriod, ac as EntrustVersionInfo, ab as BiometricSyntax, aa as LogotypeExtn, a9 as TNAuthorizationList, as as PolicyConstraints, ar as PolicyMappings, a7 as CRLNumber, aA as IssuingDistributionPoint, a5 as NonStandardKeyDescription, a4 as CabforganizationIdentifier } from './ssh_certificate-PCn0WXhQ.js';
|
|
6
6
|
import { L as Link } from './link-CGURvKy1.js';
|
|
7
|
-
import { C as CertificateTransparency } from './extension-
|
|
7
|
+
import { C as CertificateTransparency } from './extension-DmlhftES.js';
|
|
8
8
|
import { T as Typography, B as Button } from './button-Bbh7MwG6.js';
|
|
9
9
|
import { D as DownloadIcon } from './download-ykcxSgxU.js';
|
|
10
10
|
|
|
@@ -1398,6 +1398,6 @@ const Miscellaneous = (props) => {
|
|
|
1398
1398
|
};
|
|
1399
1399
|
|
|
1400
1400
|
export { BasicInformation as B, Extensions as E, GeneralNamePart as G, IssuerName as I, Miscellaneous as M, PublicKey as P, RowValue as R, SubjectName as S, Thumbprints as T, Signature as a, getDNSNameLink as b, getLEILink as c, getStringByOID as d, camelCaseToWords as e, TableRowTable as f, getIPAddressLink as g, RowTitle as h };
|
|
1401
|
-
//# sourceMappingURL=miscellaneous-
|
|
1401
|
+
//# sourceMappingURL=miscellaneous-BTlqwN5_.js.map
|
|
1402
1402
|
|
|
1403
|
-
//# sourceMappingURL=miscellaneous-
|
|
1403
|
+
//# sourceMappingURL=miscellaneous-BTlqwN5_.js.map
|