@peculiar/certificates-viewer 4.6.1 → 4.7.0
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 +2 -2
- package/components/attribute.js +2 -1
- package/components/attribute.js.map +1 -1
- package/components/certificate-viewer.js +2 -2
- package/components/crl-viewer.js +2 -2
- package/components/csr-viewer.js +2 -2
- package/components/csr-viewer.js.map +1 -1
- package/components/download.js +19 -99
- package/components/download.js.map +1 -1
- package/components/index2.js +50 -2
- package/components/index2.js.map +1 -1
- package/components/miscellaneous.js +100 -2
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +1 -1
- package/components/peculiar-certificates-viewer.js +1 -1
- package/components/pkcs10_certificate_request.js +1 -6
- package/components/pkcs10_certificate_request.js.map +1 -1
- package/dist/cjs/{certification_request-CxHe71zR.js → certification_request-DISQwgjn.js} +72 -112
- package/dist/cjs/certification_request-DISQwgjn.js.map +1 -0
- package/dist/cjs/extension-CGZpfI3W.js +110 -0
- package/dist/cjs/extension-CGZpfI3W.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{miscellaneous-DeBEwLDy.js → miscellaneous-D_RAtkZz.js} +78 -77
- package/dist/cjs/{miscellaneous-DeBEwLDy.js.map → miscellaneous-D_RAtkZz.js.map} +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js +54 -5
- package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +5 -4
- 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 -3
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -2
- 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/{pkcs10_certificate_request-CHMDxe2Z.js → pkcs10_certificate_request-BQkkkT42.js} +4 -8
- package/dist/cjs/pkcs10_certificate_request-BQkkkT42.js.map +1 -0
- package/dist/cjs/{x509_certificate-CzplJQ0X.js → x509_certificate-DGRpZGA2.js} +5 -4
- package/dist/cjs/{x509_certificate-CzplJQ0X.js.map → x509_certificate-DGRpZGA2.js.map} +1 -1
- package/dist/cjs/{x509_crl-B7kFbLDV.js → x509_crl-DMvJk_81.js} +8 -7
- package/dist/cjs/{x509_crl-B7kFbLDV.js.map → x509_crl-DMvJk_81.js.map} +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js +25 -0
- package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/index.js +10 -1
- package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js +27 -0
- package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js.map +1 -0
- package/dist/collection/components/csr-viewer/csr-viewer.js +2 -2
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
- package/dist/collection/constants/oids.js +2 -0
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/attribute.js +2 -0
- package/dist/collection/crypto/attribute.js.map +1 -1
- package/dist/collection/crypto/pkcs10_certificate_request.js +0 -7
- package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
- package/dist/esm/{certification_request-PeMaLTUD.js → certification_request-CSS3OhZq.js} +21 -101
- package/dist/esm/certification_request-CSS3OhZq.js.map +1 -0
- package/dist/esm/extension-CUOKUt7o.js +107 -0
- package/dist/esm/extension-CUOKUt7o.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/{miscellaneous-bVeJt-6m.js → miscellaneous-DVlekgVM.js} +4 -3
- package/dist/esm/{miscellaneous-bVeJt-6m.js.map → miscellaneous-DVlekgVM.js.map} +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js +54 -5
- package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-decoder.entry.js +5 -4
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +4 -3
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -2
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm/{pkcs10_certificate_request-CK8FH47X.js → pkcs10_certificate_request-B9Q42jiE.js} +4 -8
- package/dist/esm/pkcs10_certificate_request-B9Q42jiE.js.map +1 -0
- package/dist/esm/{x509_certificate-CEEWtU_T.js → x509_certificate-fWXLCtc8.js} +4 -3
- package/dist/{esm-es5/x509_certificate-CEEWtU_T.js.map → esm/x509_certificate-fWXLCtc8.js.map} +1 -1
- package/dist/esm/{x509_crl-BcZd9KVn.js → x509_crl-Dq33Vv-q.js} +5 -4
- package/dist/{esm-es5/x509_crl-BcZd9KVn.js.map → esm/x509_crl-Dq33Vv-q.js.map} +1 -1
- package/dist/esm-es5/{certification_request-PeMaLTUD.js → certification_request-CSS3OhZq.js} +5 -12
- package/dist/esm-es5/certification_request-CSS3OhZq.js.map +1 -0
- package/dist/esm-es5/extension-CUOKUt7o.js +12 -0
- package/dist/esm-es5/extension-CUOKUt7o.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{miscellaneous-bVeJt-6m.js → miscellaneous-DVlekgVM.js} +2 -2
- package/dist/esm-es5/{miscellaneous-bVeJt-6m.js.map → miscellaneous-DVlekgVM.js.map} +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js +17 -3
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
- 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-certificate-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm-es5/pkcs10_certificate_request-B9Q42jiE.js +19 -0
- package/dist/esm-es5/pkcs10_certificate_request-B9Q42jiE.js.map +1 -0
- package/dist/esm-es5/{x509_certificate-CEEWtU_T.js → x509_certificate-fWXLCtc8.js} +4 -4
- package/dist/{esm/x509_certificate-CEEWtU_T.js.map → esm-es5/x509_certificate-fWXLCtc8.js.map} +1 -1
- package/dist/esm-es5/{x509_crl-BcZd9KVn.js → x509_crl-Dq33Vv-q.js} +2 -2
- package/dist/{esm/x509_crl-BcZd9KVn.js.map → esm-es5/x509_crl-Dq33Vv-q.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/p-17ebc78c.system.entry.js +5 -0
- package/dist/peculiar/{p-14fcbc5c.system.entry.js.map → p-17ebc78c.system.entry.js.map} +1 -1
- package/dist/peculiar/{p-5479a530.entry.js → p-4cc72a56.entry.js} +2 -2
- package/dist/peculiar/p-7fTYvx_V.system.js +19 -0
- package/dist/peculiar/p-7fTYvx_V.system.js.map +1 -0
- package/dist/peculiar/p-BGASC3UX.system.js +1 -1
- package/dist/peculiar/{p-CjWRKsN-.js → p-BG_D4qzJ.js} +3 -3
- package/dist/peculiar/{p-CjWRKsN-.js.map → p-BG_D4qzJ.js.map} +1 -1
- package/dist/peculiar/{p-CZwhKPgb.system.js → p-BTn-wukS.system.js} +2 -2
- package/dist/peculiar/p-BTn-wukS.system.js.map +1 -0
- package/dist/peculiar/{p-BaebEpW0.system.js.map → p-Bsy7Sqzl.system.js.map} +1 -1
- package/dist/peculiar/{p-DRvp86xt.system.js → p-CEzxVCEh.system.js} +5 -5
- package/dist/peculiar/{p-DRvp86xt.system.js.map → p-CEzxVCEh.system.js.map} +1 -1
- package/dist/peculiar/{p-PeMaLTUD.js → p-CSS3OhZq.js} +9 -16
- package/dist/peculiar/p-CSS3OhZq.js.map +1 -0
- package/dist/peculiar/p-CZuaTO2G.js +12 -0
- package/dist/peculiar/p-CZuaTO2G.js.map +1 -0
- package/dist/peculiar/p-CgCUixvk.system.js +12 -0
- package/dist/peculiar/p-CgCUixvk.system.js.map +1 -0
- package/dist/peculiar/p-CoPYW15U.js +19 -0
- package/dist/peculiar/p-CoPYW15U.js.map +1 -0
- package/dist/peculiar/{p-BypepohK.system.js.map → p-D8TC0Na9.system.js.map} +1 -1
- package/dist/peculiar/p-DKooqn40.js +369 -0
- package/dist/peculiar/{p-CGRNSrHk.js.map → p-DKooqn40.js.map} +1 -1
- package/dist/peculiar/p-DLsQGkmT.system.js.map +1 -0
- package/dist/peculiar/{p-C9sY8yng.system.js → p-DTz3NA_M.system.js} +3 -3
- package/dist/peculiar/{p-C9sY8yng.system.js.map → p-DTz3NA_M.system.js.map} +1 -1
- package/dist/peculiar/p-D_WeukQa.system.js +135 -0
- package/dist/peculiar/p-D_WeukQa.system.js.map +1 -0
- package/dist/peculiar/{p-CezfC5i1.system.js → p-DcTXA-2R.system.js} +17 -17
- package/dist/peculiar/{p-CezfC5i1.system.js.map → p-DcTXA-2R.system.js.map} +1 -1
- package/dist/peculiar/{p-84f69023.system.entry.js → p-a193f8fd.system.entry.js} +2 -2
- package/dist/peculiar/p-a4e74904.entry.js +124 -0
- package/dist/peculiar/p-a4e74904.entry.js.map +1 -0
- package/dist/peculiar/p-ce006f1c.system.entry.js +5 -0
- package/dist/peculiar/{p-591a9019.system.entry.js.map → p-ce006f1c.system.entry.js.map} +1 -1
- package/dist/peculiar/p-e3967e76.entry.js +5 -0
- package/dist/peculiar/{p-0de4837d.entry.js.map → p-e3967e76.entry.js.map} +1 -1
- package/dist/peculiar/p-e7c60082.system.entry.js +125 -0
- package/dist/peculiar/p-e7c60082.system.entry.js.map +1 -0
- package/dist/peculiar/p-f465afe6.entry.js +5 -0
- package/dist/peculiar/{p-315805ce.entry.js.map → p-f465afe6.entry.js.map} +1 -1
- package/dist/peculiar/{p-BloT0Xj9.system.js.map → p-tBL0ekYY.system.js.map} +1 -1
- package/dist/peculiar/{p-DrmgUhyv.js → p-tl0v45Y7.js} +4 -4
- package/dist/peculiar/{p-DrmgUhyv.js.map → p-tl0v45Y7.js.map} +1 -1
- package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-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-certificates-viewer.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-details-parts/attributes/extension_request_attribute.d.ts +15 -0
- package/dist/types/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.d.ts +15 -0
- package/dist/types/constants/oids.d.ts +2 -0
- package/dist/types/crypto/attribute.d.ts +2 -0
- package/dist/types/crypto/pkcs10_certificate_request.d.ts +0 -2
- package/hydrate/index.js +68 -6
- package/hydrate/index.mjs +68 -6
- package/package.json +3 -2
- package/dist/cjs/certification_request-CxHe71zR.js.map +0 -1
- package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js.map +0 -1
- package/dist/esm/certification_request-PeMaLTUD.js.map +0 -1
- package/dist/esm/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
- package/dist/esm-es5/certification_request-PeMaLTUD.js.map +0 -1
- package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js +0 -19
- package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
- package/dist/peculiar/p-00d6f11f.system.entry.js +0 -111
- package/dist/peculiar/p-00d6f11f.system.entry.js.map +0 -1
- package/dist/peculiar/p-0de4837d.entry.js +0 -5
- package/dist/peculiar/p-14fcbc5c.system.entry.js +0 -5
- package/dist/peculiar/p-315805ce.entry.js +0 -5
- package/dist/peculiar/p-591a9019.system.entry.js +0 -5
- package/dist/peculiar/p-BipKYW6e.system.js +0 -142
- package/dist/peculiar/p-BipKYW6e.system.js.map +0 -1
- package/dist/peculiar/p-CGRNSrHk.js +0 -369
- package/dist/peculiar/p-CZwhKPgb.system.js.map +0 -1
- package/dist/peculiar/p-D1eNnGDF.js +0 -19
- package/dist/peculiar/p-D1eNnGDF.js.map +0 -1
- package/dist/peculiar/p-ITVWR0oT.system.js.map +0 -1
- package/dist/peculiar/p-J1t5v5N3.system.js +0 -19
- package/dist/peculiar/p-J1t5v5N3.system.js.map +0 -1
- package/dist/peculiar/p-PeMaLTUD.js.map +0 -1
- package/dist/peculiar/p-c8b3766a.entry.js +0 -110
- package/dist/peculiar/p-c8b3766a.entry.js.map +0 -1
- /package/dist/peculiar/{p-5479a530.entry.js.map → p-4cc72a56.entry.js.map} +0 -0
- /package/dist/peculiar/{p-84f69023.system.entry.js.map → p-a193f8fd.system.entry.js.map} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
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 { AsnConvert } from "@peculiar/asn1-schema";
|
|
12
|
+
import { h } from "@stencil/core";
|
|
13
|
+
import { Convert } from "pvtsutils";
|
|
14
|
+
import { RowValue, TableRowTable } from "../row";
|
|
15
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
16
|
+
import { NamePart } from "./name_part";
|
|
17
|
+
export const PrivateKeyPossessionStatementAttribute = (props) => {
|
|
18
|
+
const { attribute } = props;
|
|
19
|
+
const certificateRaw = attribute.value.cert
|
|
20
|
+
? AsnConvert.serialize(attribute.value.cert)
|
|
21
|
+
: null;
|
|
22
|
+
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Serial Number", value: Convert.ToHex(attribute.value.signer.serialNumber), monospace: true }), h(RowValue, { name: "Issuer", value: "" }), h(TableRowTable, null, h(NamePart, { name: attribute.value.signer.issuer })), certificateRaw && [
|
|
23
|
+
h(RowValue, { name: "Certificate", value: "" }),
|
|
24
|
+
h(TableRowTable, null, h("peculiar-certificate-viewer", { certificate: Convert.ToBase64(certificateRaw) })),
|
|
25
|
+
]));
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=private_key_possession_statement_attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private_key_possession_statement_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,CAAC,MAAM,sCAAsC,GACiB,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC5B,MAAM,cAAc,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI;QACzC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;QAC5C,CAAC,CAAC,IAAI,CAAC;IAET,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;QAEpB,EAAC,QAAQ,IACP,IAAI,EAAC,eAAe,EACpB,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EACzD,SAAS,SACT;QACF,EAAC,QAAQ,IACP,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,EAAE,GACR;QACF,EAAC,aAAa;YACZ,EAAC,QAAQ,IACP,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GACnC,CACY;QACf,cAAc,IAAI;YACjB,EAAC,QAAQ,IACP,IAAI,EAAC,aAAa,EAClB,KAAK,EAAC,EAAE,GACR;YACF,EAAC,aAAa;gBACZ,mCACE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,GAC7C,CACY;SACjB,CACc,CAClB,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 { AsnConvert } from '@peculiar/asn1-schema';\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { PrivateKeyPossessionStatement } from '@peculiar/asn1-private-key-stmt';\nimport { Convert } from 'pvtsutils';\nimport { Attribute } from '../../../crypto/attribute';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface IPrivateKeyPossessionStatementAttributeProps {\n attribute: Attribute<PrivateKeyPossessionStatement>;\n}\n\nexport const PrivateKeyPossessionStatementAttribute:\nFunctionalComponent<IPrivateKeyPossessionStatementAttributeProps> = (props) => {\n const { attribute } = props;\n const certificateRaw = attribute.value.cert\n ? AsnConvert.serialize(attribute.value.cert)\n : null;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Serial Number\"\n value={Convert.ToHex(attribute.value.signer.serialNumber)}\n monospace\n />\n <RowValue\n name=\"Issuer\"\n value=\"\"\n />\n <TableRowTable>\n <NamePart\n name={attribute.value.signer.issuer}\n />\n </TableRowTable>\n {certificateRaw && [\n <RowValue\n name=\"Certificate\"\n value=\"\"\n />,\n <TableRowTable>\n <peculiar-certificate-viewer\n certificate={Convert.ToBase64(certificateRaw)}\n />\n </TableRowTable>,\n ]}\n </BasicAttribute>\n );\n};\n"]}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { Host, h, Build, } from "@stencil/core";
|
|
12
12
|
import { Pkcs10CertificateRequest } from "../../crypto";
|
|
13
13
|
import { getDNSNameLink, getIPAddressLink, getLEILink, } from "../../utils/third_party_links";
|
|
14
|
-
import { BasicInformation, SubjectName, Signature, Thumbprints,
|
|
14
|
+
import { BasicInformation, SubjectName, Signature, Thumbprints, Miscellaneous, PublicKey, Attributes, } from "../certificate-details-parts";
|
|
15
15
|
import { Typography } from "../typography";
|
|
16
16
|
export class CsrViewer {
|
|
17
17
|
constructor() {
|
|
@@ -102,7 +102,7 @@ export class CsrViewer {
|
|
|
102
102
|
if (!this.certificateDecoded) {
|
|
103
103
|
return this.renderEmptyState();
|
|
104
104
|
}
|
|
105
|
-
return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(SubjectName, { name: this.certificateDecoded.subject }), h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }),
|
|
105
|
+
return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(SubjectName, { name: this.certificateDecoded.subject }), h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
|
|
106
106
|
}
|
|
107
107
|
static get is() { return "peculiar-csr-viewer"; }
|
|
108
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csr-viewer.js","sourceRoot":"","sources":["../../../src/components/csr-viewer/csr-viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAA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,GAC5C;gBAEF,EAAC,WAAW,IACV,WAAW,EAAE,IAAI,CAAC,kBAAkB,CAAC,WAAW,GAChD;gBAEF,EAAC,UAAU,IACT,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAC9C,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,GAC7D;gBAEF,EAAC,UAAU,IACT,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAC9C,KAAK,EAAC,mBAAmB,EACzB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,GAC7D;gBAED,IAAI,CAAC,QAAQ,IAAI,CAChB,EAAC,aAAa,IACZ,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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\nimport { Pkcs10CertificateRequest } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCsrProp = string | Pkcs10CertificateRequest;\n\n@Component({\n tag: 'peculiar-csr-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CsrViewer {\n private certificateDecoded: Pkcs10CertificateRequest;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TCsrProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof Pkcs10CertificateRequest) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new Pkcs10CertificateRequest(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseAttributes();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: TCsrProp,\n oldValue: TCsrProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof Pkcs10CertificateRequest\n && oldValue instanceof Pkcs10CertificateRequest\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => value;\n\n private getAuthKeyIdSiblingsLink = (value: string) => value;\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate request.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate request available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n title=\"Extension Request\"\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"csr-viewer.js","sourceRoot":"","sources":["../../../src/components/csr-viewer/csr-viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB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T,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAC9C,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,GAC7D;gBAED,IAAI,CAAC,QAAQ,IAAI,CAChB,EAAC,aAAa,IACZ,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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\nimport { Pkcs10CertificateRequest } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCsrProp = string | Pkcs10CertificateRequest;\n\n@Component({\n tag: 'peculiar-csr-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CsrViewer {\n private certificateDecoded: Pkcs10CertificateRequest;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TCsrProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof Pkcs10CertificateRequest) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new Pkcs10CertificateRequest(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseAttributes();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: TCsrProp,\n oldValue: TCsrProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof Pkcs10CertificateRequest\n && oldValue instanceof Pkcs10CertificateRequest\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => value;\n\n private getAuthKeyIdSiblingsLink = (value: string) => value;\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate request.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate request available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1235,6 +1235,7 @@ export const OIDs = {
|
|
|
1235
1235
|
'1.3.6.1.4.1.16334.509.2.3': 'Ngc Class3',
|
|
1236
1236
|
'1.3.6.1.4.1.17326.10.8.12.1.2': 'Camerfirma EV policy',
|
|
1237
1237
|
'1.3.6.1.4.1.17326.10.14.2.1.2': 'Camerfirma EV policy',
|
|
1238
|
+
'1.3.6.1.4.1.22112.2.1': 'Private Key Possession Statement',
|
|
1238
1239
|
'1.3.6.1.4.1.22234.2.5.2.3.1': 'Cert Plus EV policy',
|
|
1239
1240
|
'1.3.6.1.4.1.23223.1.1.1': 'Start Com EV policy',
|
|
1240
1241
|
'1.3.6.1.4.1.23629.1.4.2.1.1': 'Safenet Usage Limit',
|
|
@@ -1628,6 +1629,7 @@ export const OIDs = {
|
|
|
1628
1629
|
'1.3.132.0.37': 'Sect409r1',
|
|
1629
1630
|
'1.3.132.0.38': 'Sect571k1',
|
|
1630
1631
|
'1.3.132.0.39': 'Sect571r1',
|
|
1632
|
+
'1.3.132.1.12': 'ECDH',
|
|
1631
1633
|
'1.3.133.16.840.9.84': 'x984',
|
|
1632
1634
|
'1.3.133.16.840.9.84.0': 'x984 Module',
|
|
1633
1635
|
'1.3.133.16.840.9.84.0.1': 'x984 Biometrics',
|