@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,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{a0 as a,a1 as s,a2 as t,A as e,a3 as n,q as r,a4 as o,a5 as i,a6 as b,a7 as c,a8 as h,a9 as u,aa as p,ab as l,ac as x,ad as d,ae as f,af as S,ag as m,ah as w,ai as A,aj as E,ak as g,al as q,am as C,an as N,ao as O,ap as $,aq as j,ar as y,as as D,at as J,au as V,av as Z,aw as k,ax as v,ay as z,az as B,aA as F,aB as G,aC as H,aD as I,aE as K,aF as L,aG as M,b as P,aH as Q,aI as R,aJ as T,aK as U,aL as W,aM as X,aN as Y,aO as _,aP as aa,aQ as sa,aR as ta,aS as ea,aT as na,aU as ra,aV as oa,aW as ia,aX as ba,aY as ca,aZ as ha,a_ as ua,a$ as pa,b0 as la,b1 as xa,b2 as da,b3 as fa,b4 as Sa,b5 as ma,b6 as wa,b7 as Aa,b8 as Ea,b9 as ga,ba as qa,bb as Ca,bc as Na,bd as Oa,be as $a,bf as ja,bg as ya}from"./p-CSS3OhZq.js";const Da="1.3.6.1.4.1.11129.2.4.2";class Ja extends a{constructor(){super(...arguments);this.items=[]}fromASN(a){super.fromASN(a);const e=new s(this.buffer);const n=e.readNumber(2);this.items=[];while(e.position<n){this.items.push(new t(e))}return this}toJSON(){return this.items.map((a=>a.toJSON()))}}const Va="1.3.6.1.5.5.7.1.12";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Za={[ya]:M,[ja]:L,[$a]:K,[Oa]:I,[Na]:H,[Ca]:G,"2.5.29.46":G,[qa]:F,[ga]:B,[Ea]:z,[Aa]:v,[wa]:k,[ma]:Z,[Sa]:V,[fa]:J,[da]:D,[xa]:y,[la]:j,[pa]:$,[ua]:O,[ha]:N,[ca]:C,[ba]:q,[ia]:g,[oa]:E,[ra]:A,[Da]:Ja,[na]:w,[ea]:m,[ta]:S,[sa]:f,[aa]:d,[_]:x,"2.16.724.1.2.2.4.1":l,[Y]:l,[Va]:p,[X]:u,[W]:h,[U]:c,[T]:b,[R]:i,[Q]:o};class ka extends e{getAsnExtnValue(){return this.asn.extnValue.buffer}constructor(a){super(a,n);const s=this.getAsnExtnValue();try{const a=Za[this.asn.extnID];if(a){this.value=r.parse(s,a)}else{console.warn(`Didn't detect parser for "${this.asn.extnID}" extension.`);this.value=P.Convert.ToHex(s)}}catch(a){console.error(`Error parse "${this.asn.extnID}" extension:`,a.message);this.value=P.Convert.ToHex(s)}}}export{Ja as C,ka as E};
|
|
12
|
+
//# sourceMappingURL=p-CZuaTO2G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"p-CZuaTO2G.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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GAAG,CAAC,SAAS,CAAC,MAAM;;AAGlC,IAAA,WAAA,CAAY,GAAiB,EAAA;AAC3B,QAAA,KAAK,CAAC,GAAG,EAAEA,WAAY,CAAC;AAExB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE;AAE3C,QAAA,IAAI;YACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;YAEhD,IAAI,MAAM,EAAE;gBACV,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAI,YAAY,EAAE,MAAM,CAAC;;iBAChD;gBACL,OAAO,CAAC,IAAI,CAAC,CAA6B,0BAAA,EAAA,IAAI,CAAC,GAAG,CAAC,MAAM,CAAc,YAAA,CAAA,CAAC;gBAExE,IAAI,CAAC,KAAK,GAAGC,oBAAO,CAAC,KAAK,CAAC,YAAY,CAAM;;;QAE/C,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,CAAC,KAAK,CAAC,CAAA,aAAA,EAAgB,IAAI,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]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))t[r]=n[r]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}();
|
|
2
|
+
/*!
|
|
3
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
+
*/System.register(["./p-D_WeukQa.system.js"],(function(t){"use strict";var n,r,e,i,s,o,u,c,a,f,h,v,l,_,x,d,p,w,y,j,b,E,O,m,C,D,S,g,k,A,Q,T,W,q,z,B,F,G,H,I,J,K,L,M,N,P,R,U,V,X,Y,Z,$,tt,nt,rt,et,it,st,ot,ut,ct,at,ft,ht,vt,lt,_t,xt,dt,pt,wt,yt,jt,bt,Et,Ot,mt,Ct,Dt,St,gt,kt,At;return{setters:[function(t){n=t.a0;r=t.a1;e=t.a2;i=t.A;s=t.a3;o=t.q;u=t.a4;c=t.a5;a=t.a6;f=t.a7;h=t.a8;v=t.a9;l=t.aa;_=t.ab;x=t.ac;d=t.ad;p=t.ae;w=t.af;y=t.ag;j=t.ah;b=t.ai;E=t.aj;O=t.ak;m=t.al;C=t.am;D=t.an;S=t.ao;g=t.ap;k=t.aq;A=t.ar;Q=t.as;T=t.at;W=t.au;q=t.av;z=t.aw;B=t.ax;F=t.ay;G=t.az;H=t.aA;I=t.aB;J=t.aC;K=t.aD;L=t.aE;M=t.aF;N=t.aG;P=t.b;R=t.aH;U=t.aI;V=t.aJ;X=t.aK;Y=t.aL;Z=t.aM;$=t.aN;tt=t.aO;nt=t.aP;rt=t.aQ;et=t.aR;it=t.aS;st=t.aT;ot=t.aU;ut=t.aV;ct=t.aW;at=t.aX;ft=t.aY;ht=t.aZ;vt=t.a_;lt=t.a$;_t=t.b0;xt=t.b1;dt=t.b2;pt=t.b3;wt=t.b4;yt=t.b5;jt=t.b6;bt=t.b7;Et=t.b8;Ot=t.b9;mt=t.ba;Ct=t.bb;Dt=t.bc;St=t.bd;gt=t.be;kt=t.bf;At=t.bg}],execute:function(){var Qt;var Tt="1.3.6.1.4.1.11129.2.4.2";var Wt=function(t){__extends(n,t);function n(){var n=t.apply(this,arguments)||this;n.items=[];return n}n.prototype.fromASN=function(n){t.prototype.fromASN.call(this,n);var i=new r(this.buffer);var s=i.readNumber(2);this.items=[];while(i.position<s){this.items.push(new e(i))}return this};n.prototype.toJSON=function(){return this.items.map((function(t){return t.toJSON()}))};return n}(n);t("C",Wt);var qt="1.3.6.1.5.5.7.1.12";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var zt=(Qt={},Qt[At]=N,Qt[kt]=M,Qt[gt]=L,Qt[St]=K,Qt[Dt]=J,Qt[Ct]=I,Qt["2.5.29.46"]=I,Qt[mt]=H,Qt[Ot]=G,Qt[Et]=F,Qt[bt]=B,Qt[jt]=z,Qt[yt]=q,Qt[wt]=W,Qt[pt]=T,Qt[dt]=Q,Qt[xt]=A,Qt[_t]=k,Qt[lt]=g,Qt[vt]=S,Qt[ht]=D,Qt[ft]=C,Qt[at]=m,Qt[ct]=O,Qt[ut]=E,Qt[ot]=b,Qt[Tt]=Wt,Qt[st]=j,Qt[it]=y,Qt[et]=w,Qt[rt]=p,Qt[nt]=d,Qt[tt]=x,Qt["2.16.724.1.2.2.4.1"]=_,Qt[$]=_,Qt[qt]=l,Qt[Z]=v,Qt[Y]=h,Qt[X]=f,Qt[V]=a,Qt[U]=c,Qt[R]=u,Qt);var Bt=function(t){__extends(n,t);function n(n){var r=t.call(this,n,s)||this;var e=r.getAsnExtnValue();try{var i=zt[r.asn.extnID];if(i){r.value=o.parse(e,i)}else{console.warn("Didn't detect parser for \"".concat(r.asn.extnID,'" extension.'));r.value=P.Convert.ToHex(e)}}catch(t){console.error('Error parse "'.concat(r.asn.extnID,'" extension:'),t.message);r.value=P.Convert.ToHex(e)}return r}n.prototype.getAsnExtnValue=function(){return this.asn.extnValue.buffer};return n}(i);t("E",Bt)}}}));
|
|
12
|
+
//# sourceMappingURL=p-CgCUixvk.system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"p-CgCUixvk.system.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAGO,MAAM,0BAA0B,GAAG,yBAAyB;YAC5D,MAAM,uBAAuB,SAAS,WAAW,CAAC;YACzD,IAAI,WAAW,GAAG;YAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC;YAC3B,QAAQ,IAAI,CAAC,KAAK,GAAG,EAAE;YACvB;YACA,IAAI,OAAO,CAAC,GAAG,EAAE;YACjB,QAAQ,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAC1B,QAAQ,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAA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BAChD;4BACL,OAAO,CAAC,IAAI,CAAC,CAA6B,0BAAA,EAAA,IAAI,CAAC,GAAG,CAAC,MAAM,CAAc,YAAA,CAAA,CAAC;4BAExE,IAAI,CAAC,KAAK,GAAGC,oBAAO,CAAC,KAAK,CAAC,YAAY,CAAM;;;oBAE/C,OAAO,KAAK,EAAE;YACd,YAAA,OAAO,CAAC,KAAK,CAAC,CAAA,aAAA,EAAgB,IAAI,CAAC,GAAG,CAAC,MAAM,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC;wBAE3E,IAAI,CAAC,KAAK,GAAGA,oBAAO,CAAC,KAAK,CAAC,YAAY,CAAM;;;YAGlD;;;;;;;;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{A as s,p as t,q as a,r as e,s as i,U as r,t as n,V as h,I as o,W as c,u,T as l,v as f,w as m,x as p,y as g,b,z as d,B as A,F as w,G as E,H as y,J as S,K as q,L as x,M as P,O as R,Q as C,S as K,X as v,c as D,Y as I,P as N,N as O,i as j,e as H,E as M,f as T,R as V,m as $,D as z}from"./p-CSS3OhZq.js";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const B={[v]:g,[K]:p,[C]:m,[R]:f,[P]:l,[x]:u,[q]:c,[S]:o,[y]:h,[E]:n,[w]:r,[A]:i,[d]:e};class F extends s{getAsnExtnValue(){return this.asn.values[0]}constructor(s){super(s,t);const e=this.getAsnExtnValue();try{const s=B[this.asn.type];if(s){this.value=a.parse(e,s)}else{console.warn(`Didn't detect parser for "${this.asn.type}" attribute.`);this.value=b.Convert.ToHex(e)}}catch(s){console.error(`Error parse "${this.asn.type}" attribute:`,s.message);this.value=b.Convert.ToHex(e)}}}
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/class G extends s{constructor(s){super(D(s),I);this.thumbprints={};this.type="PKCS#10 Certificate Request";this.tag=N.CertificateRequestTag;const{certificationRequestInfo:t}=this.asn;this.subject=new O(t.subject).toJSON();this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;if(t.algorithm===j&&t.parameters){a=H.parse(t.parameters,M)}if(t.algorithm===T){a=H.parse(s,V)}const e=H.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:a,value:e,algorithm:t.algorithm}}get signature(){const{signature:s,signatureAlgorithm:t}=this.asn;return{value:s,algorithm:t.algorithm}}get commonName(){if(!this.subject){return""}for(let s=0;s<this.subject.length;s+=1){const t=this.subject[s];if(t.shortName==="CN"||t.shortName==="E"||t.shortName==="O"){return t.value}}return""}async getThumbprint(s="SHA-1"){try{const t=await $(s,this.raw);if(t){this.thumbprints[s]=b.Convert.ToHex(t)}}catch(s){console.error("Error thumbprint get:",s)}}parseAttributes(){const{certificationRequestInfo:s}=this.asn;if(s.attributes){this.attributes=s.attributes.map((s=>new F(H.serialize(s))))}}toString(s="pem"){switch(s){case"pem":return N.encode(this.raw,this.tag);case"base64url":return b.Convert.ToBase64Url(this.raw);default:return b.Convert.ToBase64(this.raw)}}downloadAsPEM(s){z.csr.asPEM(this.toString("pem"),s||this.commonName)}downloadAsDER(s){z.csr.asDER(this.raw,s||this.commonName)}}export{F as A,G as P};
|
|
19
|
+
//# sourceMappingURL=p-CoPYW15U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"p-CoPYW15U.js","sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\nimport {\n id_at_statementOfPossession,\n PrivateKeyPossessionStatement,\n} from '@peculiar/asn1-private-key-stmt';\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n [id_at_statementOfPossession]: PrivateKeyPossessionStatement,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\n\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = PemConverter.CertificateRequestTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["AsnAttribute","Convert"],"mappings":";;;;;AAAA;;;;;;AAMG;AAiDH,MAAM,iBAAiB,GAAG;IACxB,CAAC,wBAAwB,GAAG,qBAAqB;IACjD,CAAC,gCAAgC,GAAG,6BAA6B;IACjE,CAAC,kBAAkB,GAAG,eAAe;IACrC,CAAC,8BAA8B,GAAG,2BAA2B;IAC7D,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,sBAAsB,GAAG,mBAAmB;IAC7C,CAAC,UAAU,GAAG,OAAO;IACrB,CAAC,iBAAiB,GAAG,cAAc;IACnC,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,6BAA6B,GAAG,iBAAiB;IAClD,CAAC,4BAA4B,GAAG,gBAAgB;IAChD,CAAC,4BAA4B,GAAG,gBAAgB;IAChD,CAAC,2BAA2B,GAAG,6BAA6B;CAC7D;AAMK,MAAO,SAAqC,SAAQ,OAAqB,CAAA;IAGrE,eAAe,GAAA;QACrB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;;AAG3B,IAAA,WAAA,CAAY,GAAiB,EAAA;AAC3B,QAAA,KAAK,CAAC,GAAG,EAAEA,WAAY,CAAC;AAExB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE;AAE3C,QAAA,IAAI;YACF,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAE/C,IAAI,MAAM,EAAE;gBACV,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAI,YAAY,EAAE,MAAM,CAAC;;iBAChD;gBACL,OAAO,CAAC,IAAI,CAAC,CAA6B,0BAAA,EAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAc,YAAA,CAAA,CAAC;gBAEtE,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AAC;;;IAI1C,eAAe,GAAA;AACpB,QAAA,MAAM,EAAE,wBAAwB,EAAE,GAAG,IAAI,CAAC,GAAG;AAE7C,QAAA,IAAI,wBAAwB,CAAC,UAAU,EAAE;AACvC,YAAA,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC;AACxC,iBAAA,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;;;IAIlD,QAAQ,CAAC,SAAyC,KAAK,EAAA;QAC5D,QAAQ,MAAM;AACZ,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;AAChD,YAAA,KAAK,WAAW;gBACd,OAAOA,oBAAO,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;AACtC,YAAA;gBACE,OAAOA,oBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;;AAIhC,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpB,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAGI,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,GAAG,EACR,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-BypepohK.system.js","sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr:last-child {\n .divider {\n display: none;\n }\n }\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\nimport { X509Certificate } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\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: TCertificateProp;\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 * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: TCertificateProp, oldValue: TCertificateProp) {\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 X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\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 <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\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 <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAA,MAAM,oBAAoB,GAAG,4jSAA4jS;;YCwC5kS,iBAAiB,0CAAA,MAAA;MAL9B,IAAA,WAAA,CAAA,OAAA,EAAA;;MAgEE;;;;;;MAMG;MACuB,QAAA,IAAsB,CAAA,sBAAA,GAAY,oBAAoB;MAEvE,QAAA,IAAgB,CAAA,gBAAA,GAAG,KAAK;MAExB,QAAA,IAAiB,CAAA,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IACR,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAC5C,CAAA,EAEF,CAAC,CAAA,SAAS,IACR,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAC5C,CAAA,EAEF,CAAC,CAAA,WAAW,IACV,WAAW,EAAE,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAChD,CAAA,EAEF,CAAC,CAAA,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,EAC7D,CAAA,EAED,IAAI,CAAC,QAAQ,KACZ,CAAA,CAAC,aAAa,EACZ,EAAA,WAAW,EAAE,IAAI,CAAC,kBAAkB,EAAA,CACpC,CACH,CACK,CACH;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-D8TC0Na9.system.js","sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr:last-child {\n .divider {\n display: none;\n }\n }\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\nimport { X509Certificate } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\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: TCertificateProp;\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 * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: TCertificateProp, oldValue: TCertificateProp) {\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 X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\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 <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\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 <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAA,MAAM,oBAAoB,GAAG,4jSAA4jS;;YCwC5kS,iBAAiB,0CAAA,MAAA;MAL9B,IAAA,WAAA,CAAA,OAAA,EAAA;;MAgEE;;;;;;MAMG;MACuB,QAAA,IAAsB,CAAA,sBAAA,GAAY,oBAAoB;MAEvE,QAAA,IAAgB,CAAA,gBAAA,GAAG,KAAK;MAExB,QAAA,IAAiB,CAAA,iBAAA,GAAG,IAAI;MAgEzB,QAAA,IAAA,CAAA,sBAAsB,GAAG,CAAC,KAAa,KAAI;;MAAC,YAAA,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,mBAAmB,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CACxE,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC;eAAA;MAE3B,QAAA,IAAA,CAAA,wBAAwB,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AI,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,EAC7D,CAAA,EAED,IAAI,CAAC,QAAQ,KACZ,CAAA,CAAC,aAAa,EACZ,EAAA,WAAW,EAAE,IAAI,CAAC,kBAAkB,EAAA,CACpC,CACH,CACK,CACH;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{h as e}from"./p-CwgZaF40.js";import{$ as n,Z as a,_ as t,b as c,bm as o,bn as s,q as r,bo as i,bp as f,bq as u,br as l,bs as b,bt as d,bu as m,bv as v,bw as p,bx as x,by as g,bz as y,bA as h,bB as C,bC as S,au as N,aE as A,ay as I,ao as D,aF as j,aB as O,aG as T,a8 as G,aq as k,aC as L,at as P,am as B,al as R,ai as V,an as $,ak as E,aj as U,ag as K,ah as q,af as w,ae as H,az as M,ap as X,ad as Y,ac as Z,ab as z,aa as F,a9 as Q,as as W,ar as J,a7 as _,aA as ee,a5 as ne,a4 as ae}from"./p-CSS3OhZq.js";import{L as te}from"./p-DMZr5ztF.js";import{C as ce}from"./p-CZuaTO2G.js";import{T as oe,B as se}from"./p-CutTi-2B.js";import{D as re}from"./p-JyD6URnB.js";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/function ie(e){const a=n[e];if(a){return`${a} (${e})`}return e}
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/function fe(e){const n=e.replace(/([A-Z])/g," $1");return n.charAt(0).toUpperCase()+n.slice(1)}
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/const ue=e=>`https://search.gleif.org/#/record/${e}`;const le=e=>`https://search.censys.io/search?resource=hosts&q=dns.names%3A${e}`;const be=e=>`https://search.censys.io/search?resource=hosts&q=ip%3A${e}`
|
|
26
|
+
/**
|
|
27
|
+
* @license
|
|
28
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/;function de(e){return e.indexOf("http")===0}
|
|
33
|
+
/**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/const me=(n,a)=>e("tr",null,e("td",{colSpan:2},e("table",null,a)));const ve=n=>{const{value:a}=n;if(!a){return null}return[e("tr",{class:"title"},e("td",{colSpan:2},e(oe,{variant:"s1",color:"black"},a))),e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",null)))]};const pe=n=>{const{name:a,value:t,monospace:c,collapse:o,href:s,extraValue:r}=n;if(!a){return null}if(t===undefined||t===null){return null}let i;if(o){i=e("peculiar-text-hider",null,t)}else{i=t}const f=!!t.toString();return e("tr",null,e("td",{colSpan:f?1:2},e(oe,{variant:"b2",color:"gray-9"},a)),f&&e("td",{class:{monospace:c}},de(t.toString())||s?e(te,{variant:"b2",href:s||t.toString()},t):e(oe,{variant:"b2",color:"black"},i,r)))};
|
|
40
|
+
/**
|
|
41
|
+
* @license
|
|
42
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const xe=n=>{const{serialNumber:c,version:o,validity:s,notBefore:r,notAfter:i,lastUpdate:f,nextUpdate:u,type:l}=n;return[e(ve,{value:a.getString("basicInformation")}),e(pe,{name:a.getString("type"),value:l}),e(pe,{name:a.getString("serialNumber"),value:c,monospace:true}),e(pe,{name:a.getString("version"),value:o}),e(pe,{name:a.getString("validity"),value:s}),e(pe,{name:a.getString("issued"),value:r?t(r):undefined}),e(pe,{name:a.getString("expired"),value:i?t(i):undefined}),e(pe,{name:a.getString("lastUpdate"),value:f?t(f):undefined}),e(pe,{name:a.getString("nextUpdate"),value:u?t(u):undefined})]};
|
|
47
|
+
/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the MIT license found in the
|
|
52
|
+
* LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/function ge(e){if(e.params&&"modulus"in e.params){let n=e.params.modulus.byteLength;if(n%2){n-=1}return n*8}return null}function ye(e){if(e.params&&"publicExponent"in e.params){return e.params.publicExponent.byteLength===3?65537:3}return null}const he=n=>{const{publicKey:t}=n;if(!t){return null}function o(n){return[e(pe,{name:a.getString("algorithm"),value:ie(n.algorithm)}),e(pe,{name:a.getString("namedCurve"),value:ie(n.params&&"namedCurve"in n.params?n.params.namedCurve:undefined)}),e(pe,{name:a.getString("exponent"),value:ye(n)}),e(pe,{name:a.getString("modulus"),value:ge(n)}),e(pe,{name:a.getString("value"),value:c.Convert.ToHex(n.value),monospace:true,collapse:true})]}return[e(ve,{value:a.getString("publicKeyInfo")}),o(t),Array.isArray(t.params)&&t.params.length&&t.params.map((n=>e(me,null,o(n))))]};
|
|
54
|
+
/**
|
|
55
|
+
* @license
|
|
56
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const Ce=n=>{const{name:t}=n;return[e(ve,{value:a.getString("subjectName")}),t.map((n=>e(pe,{name:n.name||n.type,value:n.value})))]};
|
|
61
|
+
/**
|
|
62
|
+
* @license
|
|
63
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the MIT license found in the
|
|
66
|
+
* LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const Se=n=>{const{name:t,issuerDnLink:c}=n;const o=a.getString("issuerName");return[e(ve,{value:c?e(te,{href:c},o):o}),t.map((n=>e(pe,{name:n.name||n.type,value:n.value})))]};
|
|
68
|
+
/**
|
|
69
|
+
* @license
|
|
70
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the MIT license found in the
|
|
73
|
+
* LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const Ne=n=>{const{signature:t}=n;if(!t){return null}function o(n){return[e(pe,{name:a.getString("algorithm"),value:ie(n.algorithm)}),e(pe,{name:a.getString("value"),value:c.Convert.ToHex(n.value),monospace:true,collapse:true})]}return[e(ve,{value:a.getString("signature")}),o(t),t.params&&t.params.length&&t.params.map((n=>e(me,null,o(n))))]};
|
|
75
|
+
/**
|
|
76
|
+
* @license
|
|
77
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the MIT license found in the
|
|
80
|
+
* LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Ae=n=>{const{thumbprints:t}=n;if(!t){return null}const c=Object.keys(t);if(!c.length){return null}return[e(ve,{value:a.getString("fingerprints")}),c.map((n=>e(pe,{name:n,value:t[n],monospace:true})))]};
|
|
82
|
+
/**
|
|
83
|
+
* @license
|
|
84
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the MIT license found in the
|
|
87
|
+
* LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const Ie=(n,t)=>{const{extension:c}=n;return[e(pe,{name:"Name",value:ie(c.asn.extnID)}),e(pe,{name:"Critical",value:c.asn.critical?a.getString("yes"):a.getString("no")}),t,e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",null)))]};
|
|
89
|
+
/**
|
|
90
|
+
* @license
|
|
91
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the MIT license found in the
|
|
94
|
+
* LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const De=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Usage",value:a.value.toJSON().join(", ")}))};
|
|
96
|
+
/**
|
|
97
|
+
* @license
|
|
98
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the MIT license found in the
|
|
101
|
+
* LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const je=n=>{const{extension:t}=n;return e(Ie,{extension:t},e(pe,{name:"Certificate Authority",value:t.value.cA?a.getString("yes"):a.getString("no")}),e(pe,{name:"Path Length Constraint",value:t.value.pathLenConstraint}))};
|
|
103
|
+
/**
|
|
104
|
+
* @license
|
|
105
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the MIT license found in the
|
|
108
|
+
* LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Oe=n=>{const{extension:a}=n;return e(Ie,{extension:a},Boolean(a.value.length)&&[e(pe,{name:"Purposes",value:""}),a.value.map((n=>e(me,null,e(pe,{name:"Purpose",value:ie(n)}))))])};
|
|
110
|
+
/**
|
|
111
|
+
* @license
|
|
112
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the MIT license found in the
|
|
115
|
+
* LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Te=n=>{const{extension:a,getSubjectKeyIdChildrenLink:t,getSubjectKeyIdSiblingsLink:o}=n;const s=c.Convert.ToHex(a.value.buffer);const r=t(s);const i=o(s);return e(Ie,{extension:a},e(pe,{name:"Key ID",value:s,monospace:true,extraValue:[r&&e("span",null," [",e(te,{href:r},"children"),"]"),i&&e("span",null," [",e(te,{href:i},"siblings"),"]")]}))};
|
|
117
|
+
/**
|
|
118
|
+
* @license
|
|
119
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the MIT license found in the
|
|
122
|
+
* LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const Ge=n=>{const{extension:a,getAuthKeyIdParentLink:t,getAuthKeyIdSiblingsLink:o}=n;const s=c.Convert.ToHex(a.value.keyIdentifier.buffer);const r=t(s);const i=o(s);return e(Ie,{extension:a},e(pe,{name:"Key ID",value:s,monospace:true,extraValue:[r&&e("span",null," [",e(te,{href:r},"parents"),"]"),i&&e("span",null," [",e(te,{href:i},"siblings"),"]")]}))};
|
|
124
|
+
/**
|
|
125
|
+
* @license
|
|
126
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the MIT license found in the
|
|
129
|
+
* LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const ke={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"};const Le=a=>{const{generalName:t,getDNSNameLink:l,getIPAddressLink:b}=a;if(!t){return null}return Object.keys(t).map((a=>{const d=t[a];if(d instanceof o){return[e(pe,{name:ke[a]||a,value:""}),e(me,null,d.map((a=>a.map((a=>e(pe,{name:n[a.type]||a.type,value:a.value.toString()}))))))]}if(d instanceof s){try{const a=r.parse(d.value,i);return e(pe,{name:n[d.typeId]||d.typeId,value:a.toString()})}catch(e){}try{const a=r.parse(d.value,f);if(a.explicitText){return e(pe,{name:n[d.typeId]||d.typeId,value:a.explicitText.toString()})}}catch(e){}return e(pe,{name:n[d.typeId]||d.typeId,value:c.Convert.ToHex(d.value),monospace:true})}if(c.BufferSourceConverter.isBufferSource(d)){return e(pe,{name:ke[a]||a,value:c.Convert.ToString(d)})}if(d instanceof u){return e(pe,{name:ke[a]||a,value:d.partyName.toString()})}if(a==="dNSName"){return e(pe,{name:ke[a]||a,value:d,href:l(d)})}if(a==="iPAddress"){return e(pe,{name:ke[a]||a,value:d,href:b(d)})}return e(pe,{name:ke[a]||a,value:d})}))};
|
|
131
|
+
/**
|
|
132
|
+
* @license
|
|
133
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the MIT license found in the
|
|
136
|
+
* LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const Pe=n=>{const{extension:a}=n;return e(Ie,{extension:a},a.value.map((a=>{var t,c;return[(t=a.distributionPoint)===null||t===void 0?void 0:t.fullName.map((a=>e(Le,Object.assign({generalName:a},n)))),(c=a.cRLIssuer)===null||c===void 0?void 0:c.map((a=>e(Le,Object.assign({generalName:a},n))))]})))};
|
|
138
|
+
/**
|
|
139
|
+
* @license
|
|
140
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the MIT license found in the
|
|
143
|
+
* LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const Be=n=>{const{extension:a}=n;return e(Ie,{extension:a},Boolean(a.value.length)&&[e(pe,{name:"Descriptions",value:""}),a.value.map((a=>e(me,null,e(pe,{name:"Method",value:ie(a.accessMethod)}),e(Le,Object.assign({generalName:a.accessLocation},n)))))])};
|
|
145
|
+
/**
|
|
146
|
+
* @license
|
|
147
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the MIT license found in the
|
|
150
|
+
* LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const Re=n=>{const{extension:a}=n;return e(Ie,{extension:a},a.value.map((a=>e(Le,Object.assign({generalName:a},n)))))};
|
|
152
|
+
/**
|
|
153
|
+
* @license
|
|
154
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the MIT license found in the
|
|
157
|
+
* LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const Ve=n=>{const{extension:a}=n;return e(Ie,{extension:a},Boolean(a.value.length)&&[e(pe,{name:"Policies",value:""}),a.value.map((n=>e(me,null,e(pe,{name:"Policy ID",value:ie(n.policyIdentifier)}),n.policyQualifiers&&Boolean(n.policyQualifiers.length)&&[e(pe,{name:"Qualifiers",value:""}),n.policyQualifiers.map((n=>{const a=[e(pe,{name:"Qualifier ID",value:ie(n.policyQualifierId)})];if(n.policyQualifierId==="1.3.6.1.5.5.7.2.1"){const t=r.parse(n.qualifier,i);a.push(e(pe,{name:"Value",value:t.toString()}))}if(n.policyQualifierId==="1.3.6.1.5.5.7.2.2"){const t=r.parse(n.qualifier,f);if(t.explicitText){a.push(e(pe,{name:"Value",value:t.explicitText.toString()}))}}return e(me,null,a)}))])))])};
|
|
159
|
+
/**
|
|
160
|
+
* @license
|
|
161
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the MIT license found in the
|
|
164
|
+
* LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/var $e={"9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5":"Akamai CT","39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9":"Alpha CT",a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638:"CNNIC CT",cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900:"Certly.IO","1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4":"Cloudflare “Nimbus2017”",db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64:"Cloudflare “Nimbus2018”","747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56":"Cloudflare “Nimbus2019”","5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558":"Cloudflare “Nimbus2020”","4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8":"Cloudflare “Nimbus2021”","41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6":"Cloudflare “Nimbus2022”","7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52":"Cloudflare “Nimbus2023”","6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5":"DigiCert Nessie2018",fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c:"DigiCert Nessie2019",c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565:"DigiCert Nessie2020",eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9:"DigiCert Nessie2021","51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5":"DigiCert Nessie2022",b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a:"DigiCert Nessie2023","5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd":"DigiCert Server","8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f":"DigiCert Server 2",c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360:"DigiCert Yeti2018",e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe:"DigiCert Yeti2019",f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273:"DigiCert Yeti2020","5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca":"DigiCert Yeti2021","2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02":"DigiCert Yeti2022","35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c":"DigiCert Yeti2023","717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668":"GDCA 1","14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a":"GDCA 2",c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa:"GDCA CT #1","924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01":"GDCA CT #2",fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28:"Google “Argon2017”",a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25:"Google “Argon2018”","63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d":"Google “Argon2019”",b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e:"Google “Argon2020”",f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3:"Google “Argon2021”","2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784":"Google “Argon2022”",e83ed0da3ef5063532e75728bc896bc903d3cbd1116beceb69e1777d6d06bd6e:"Google “Argon2023”","68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4":"Google “Aviator”",c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6:"Google “Crucible”","1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb":"Google “Daedalus”","293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478":"Google “Icarus”",a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10:"Google “Pilot”",ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb:"Google “Rocketeer”",bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185:"Google “Skydiver”","52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03":"Google “Solera2018”","0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00":"Google “Solera2019”","1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7":"Google “Solera2020”",a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7:"Google “Solera2021”","697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3":"Google “Solera2022”",a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681:"Google “Submariner”",b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77:"Google “Testtube”",b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e:"Google “Xenon2018”","084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0":"Google “Xenon2019”","07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c":"Google “Xenon2020”","7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7":"Google “Xenon2021”","46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47":"Google “Xenon2022”","7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3":"Izenpe","8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566":"Izenpe “Argi”","296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd":"Let“s Encrypt ”Clicky”","537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440":"Nordu “flimsy”",aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd:"Nordu “plausible”",e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273:"PuChuangSiDa CT",cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6:"SHECA CT 1","32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623":"SHECA CT 2",db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98:"Sectigo (Comodo) “Dodo” CT","6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913":"Sectigo (Comodo) “Mammoth” CT","5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c":"Sectigo (Comodo) “Sabre” CT","34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef":"StartCom",ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc:"Symantec",a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2:"Symantec Deneb","15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f":"Symantec “Sirius”",bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5:"Symantec “Vega”",b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b:"Up In The Air “Behind the Sofa”",ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d:"Venafi","03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b":"Venafi Gen2 CT","41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263":"WoSign","63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7":"WoSign 2","9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b":"WoSign CT #1"};
|
|
166
|
+
/**
|
|
167
|
+
* @license
|
|
168
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the MIT license found in the
|
|
171
|
+
* LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const Ee=n=>{const{extension:a}=n;return e(Ie,{extension:a},Boolean(a.value.items.length)&&[e(pe,{name:"Signed Certificate Timestamps",value:""}),a.value.toJSON().map((n=>e(me,null,e(pe,{name:"Version",value:n.version+1}),e(pe,{name:"Log Operator",value:$e[n.logId]||n.logId}),e(pe,{name:"Log Key ID",value:n.logId,monospace:true}),e(pe,{name:"Timestamp",value:t(n.timestamp)}),e(pe,{name:"Signature Algorithm",value:`${n.hashAlgorithm} ${n.signatureAlgorithm}`.toUpperCase()}),e(pe,{name:"Signature",value:n.signature,monospace:true}))))])};
|
|
173
|
+
/**
|
|
174
|
+
* @license
|
|
175
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the MIT license found in the
|
|
178
|
+
* LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const Ue=n=>{var a,t;const{extension:c}=n;return e(Ie,{extension:c},(a=c.value.excludedSubtrees)===null||a===void 0?void 0:a.map((a=>e(Le,Object.assign({generalName:a.base},n)))),(t=c.value.permittedSubtrees)===null||t===void 0?void 0:t.map((a=>e(Le,Object.assign({generalName:a.base},n)))))};
|
|
180
|
+
/**
|
|
181
|
+
* @license
|
|
182
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the MIT license found in the
|
|
185
|
+
* LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Ke=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Template ID",value:a.value.templateID}),e(pe,{name:"Template Major Version",value:a.value.templateMajorVersion}),e(pe,{name:"Template Minor Version",value:a.value.templateMinorVersion}))};
|
|
187
|
+
/**
|
|
188
|
+
* @license
|
|
189
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the MIT license found in the
|
|
192
|
+
* LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const qe=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Name",value:a.value.toString()}))};
|
|
194
|
+
/**
|
|
195
|
+
* @license
|
|
196
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the MIT license found in the
|
|
199
|
+
* LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const we=n=>{const{extension:a}=n;const t=a.value.getVersion();return e(Ie,{extension:a},e(pe,{name:"Certificate Index",value:t.certificateIndex}),e(pe,{name:"Key Index",value:t.keyIndex}))};var He,Me,Xe,Ye;let Ze=class e{constructor(e){if(typeof e==="string"){this.alphabetic=e}else if(typeof e==="number"){this.numeric=e}}};l([b({type:d.PrintableString})],Ze.prototype,"alphabetic",void 0);l([b({type:d.PrintableString})],Ze.prototype,"numeric",void 0);Ze=l([m({type:v.Choice})],Ze);class ze{constructor(e={}){this.currency=new Ze;this.amount=0;this.exponent=0;Object.assign(this,e)}}l([b({type:Ze})],ze.prototype,"currency",void 0);l([b({type:d.Integer})],ze.prototype,"amount",void 0);l([b({type:d.Integer})],ze.prototype,"exponent",void 0);let Fe=class e extends ze{};Fe=l([m({type:v.Sequence})],Fe);let Qe=class e{constructor(e=0){this.value=e}};l([b({type:d.Integer})],Qe.prototype,"value",void 0);Qe=l([m({type:v.Choice})],Qe);let We=class e{constructor(e={}){this.url="";this.language="";Object.assign(this,e)}};l([b({type:d.IA5String})],We.prototype,"url",void 0);l([b({type:d.PrintableString})],We.prototype,"language",void 0);We=l([m({type:v.Sequence})],We);let Je=He=class e extends p{constructor(e){super(e);Object.setPrototypeOf(this,He.prototype)}};Je=He=l([m({type:v.Sequence,itemType:We})],Je);let _e=Me=class e extends Je{constructor(e){super(e);Object.setPrototypeOf(this,Me.prototype)}};_e=Me=l([m({type:v.Sequence,itemType:We})],_e);let en=Xe=class e extends p{constructor(e){super(e);Object.setPrototypeOf(this,Xe.prototype)}};en=Xe=l([m({type:v.Sequence,itemType:d.ObjectIdentifier})],en);let nn=Ye=class e extends p{constructor(e){super(e);Object.setPrototypeOf(this,Ye.prototype)}};nn=Ye=l([m({type:v.Sequence,itemType:d.PrintableString})],nn);const an="0.4.0.1862.1";const tn=`${an}.3`;const cn=`${an}.5`;const on=`${an}.6`
|
|
201
|
+
/**
|
|
202
|
+
* @license
|
|
203
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the MIT license found in the
|
|
206
|
+
* LICENSE file in the root directory of this source tree.
|
|
207
|
+
*/;const sn=n=>{const{extension:a}=n;function t(n,a){if(!a.byteLength){return null}if(n===x){const n=r.parse(a,g);return e(pe,{name:"Semantics Identifier",value:ie(n.semanticsIdentifier)})}if(n===on){const n=r.parse(a,en);return e(pe,{name:"QC Types",value:n.map((e=>ie(e))).join(", ")})}if(n===tn){const n=r.parse(a,Qe);return e(pe,{name:"Retention Period",value:`${n.value} years`})}if(n===cn){const n=r.parse(a,Je);return[e(pe,{name:"PDS Locations",value:""}),n.map((n=>e(me,null,e(pe,{name:"URL",value:n.url}),e(pe,{name:"Language",value:n.language}))))]}return e(pe,{name:"Info",value:c.Convert.ToHex(a),monospace:true})}return e(Ie,{extension:a},Boolean(a.value.length)&&[e(pe,{name:"Statements",value:""}),a.value.map((n=>e(me,null,e(pe,{name:"Statement ID",value:ie(n.statementId)}),t(n.statementId,n.statementInfo))))])};
|
|
208
|
+
/**
|
|
209
|
+
* @license
|
|
210
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the MIT license found in the
|
|
213
|
+
* LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const rn=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Comment",value:a.value.value}))};
|
|
215
|
+
/**
|
|
216
|
+
* @license
|
|
217
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the MIT license found in the
|
|
220
|
+
* LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const fn=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Type",value:a.value.toJSON().join(", ")}))};
|
|
222
|
+
/**
|
|
223
|
+
* @license
|
|
224
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the MIT license found in the
|
|
227
|
+
* LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const un=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Role",value:a.value.text}))};
|
|
229
|
+
/**
|
|
230
|
+
* @license
|
|
231
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the MIT license found in the
|
|
234
|
+
* LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const ln=n=>{const{extension:a,getLEILink:t}=n;return e(Ie,{extension:a},e(pe,{name:"Identifier",value:a.value.text,href:t(a.value.text)}))};
|
|
236
|
+
/**
|
|
237
|
+
* @license
|
|
238
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the MIT license found in the
|
|
241
|
+
* LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const bn=n=>{const{extension:t}=n;return e(Ie,{extension:t},e(pe,{name:"Version",value:t.value.version}),e(Le,Object.assign({generalName:t.value.location},n)),e(pe,{name:"Requires Auth",value:t.value.requiresAuth?a.getString("yes"):a.getString("no")}))};
|
|
243
|
+
/**
|
|
244
|
+
* @license
|
|
245
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the MIT license found in the
|
|
248
|
+
* LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const dn=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Version",value:a.value.version}))};
|
|
250
|
+
/**
|
|
251
|
+
* @license
|
|
252
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the MIT license found in the
|
|
255
|
+
* LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const mn=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Reason",value:a.value.toJSON()}))};
|
|
257
|
+
/**
|
|
258
|
+
* @license
|
|
259
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the MIT license found in the
|
|
262
|
+
* LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/function vn(e){return c.Convert.ToString(e.values[0])}
|
|
264
|
+
/**
|
|
265
|
+
* @license
|
|
266
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the MIT license found in the
|
|
269
|
+
* LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const pn=n=>{const{extension:a}=n;return e(Ie,{extension:a},Boolean(a.value.length)&&[e(pe,{name:"Attributes",value:""}),a.value.map((n=>e(me,null,e(pe,{name:"Type",value:ie(n.type)}),e(pe,{name:"Value",value:vn(n)}))))])};
|
|
271
|
+
/**
|
|
272
|
+
* @license
|
|
273
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the MIT license found in the
|
|
276
|
+
* LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/const xn=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Value",value:a.value,monospace:true}))};
|
|
278
|
+
/**
|
|
279
|
+
* @license
|
|
280
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the MIT license found in the
|
|
283
|
+
* LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const gn=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Not Before",value:t(a.value.notBefore)}),e(pe,{name:"Not After",value:t(a.value.notAfter)}))};
|
|
285
|
+
/**
|
|
286
|
+
* @license
|
|
287
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the MIT license found in the
|
|
290
|
+
* LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const yn=n=>{const{extension:a}=n;return e(Ie,{extension:a},e(pe,{name:"Version",value:a.value.entrustVers}),e(pe,{name:"Info Flags",value:a.value.entrustInfoFlags.toJSON().join(", ")}))};
|
|
292
|
+
/**
|
|
293
|
+
* @license
|
|
294
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
295
|
+
*
|
|
296
|
+
* This source code is licensed under the MIT license found in the
|
|
297
|
+
* LICENSE file in the root directory of this source tree.
|
|
298
|
+
*/const hn=n=>{const{extension:a}=n;return e(Ie,{extension:a},Boolean(a.value.length)&&[e(pe,{name:"Biometrics",value:""}),a.value.map((n=>e(me,null,e(pe,{name:"OID",value:ie(n.typeOfBiometricData.biometricDataOid)}),e(pe,{name:"Type",value:n.typeOfBiometricData.predefinedBiometricType}),e(pe,{name:"Algorithm",value:ie(n.hashAlgorithm.algorithm)}),e(pe,{name:"Hash",value:c.Convert.ToHex(n.biometricDataHash.buffer),monospace:true}),e(pe,{name:"Source Uri",value:n.sourceDataUri}))))])};
|
|
299
|
+
/**
|
|
300
|
+
* @license
|
|
301
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the MIT license found in the
|
|
304
|
+
* LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const Cn=n=>{const{extension:a}=n;const t=n=>{if(!n){return null}return n.map((n=>{const{imageDetails:a}=n;return[e(pe,{name:"Image Type",value:a.mediaType}),e(pe,{name:"Image Hash",value:c.Convert.ToHex(a.logotypeHash[0].hashValue),monospace:true}),e(pe,{name:"Image URL",value:a.logotypeURI[0],monospace:true,collapse:true}),e(pe,{name:"Image Hash Algorithm",value:ie(a.logotypeHash[0].hashAlg.algorithm)})]}))};const o=n=>{if(!n){return null}return n.map((n=>{const{audioDetails:a}=n;return[e(pe,{name:"Audio Type",value:a.mediaType}),e(pe,{name:"Audio Hash",value:c.Convert.ToHex(a.logotypeHash[0].hashValue),monospace:true}),e(pe,{name:"Audio URL",value:a.logotypeURI[0],monospace:true,collapse:true}),e(pe,{name:"Audio Hash Algorithm",value:ie(a.logotypeHash[0].hashAlg.algorithm)})]}))};const s=(n,a)=>{if(!a||!a.direct){return null}const{image:c,audio:s}=a.direct;return[e(pe,{name:"Type",value:n}),t(c),o(s),e("tr",null,e("td",null),e("td",null))]};return e(Ie,{extension:a},s("Subject",a.value.subjectLogo),s("Issuer",a.value.issuerLogo))};
|
|
306
|
+
/**
|
|
307
|
+
* @license
|
|
308
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
309
|
+
*
|
|
310
|
+
* This source code is licensed under the MIT license found in the
|
|
311
|
+
* LICENSE file in the root directory of this source tree.
|
|
312
|
+
*/const Sn=n=>{const{extension:a}=n;return e(Ie,{extension:a},a.value.length>0&&[e(pe,{name:"Entries",value:""}),a.value.map((n=>e(me,null,e(pe,{name:"SPC",value:n.spc}),e(pe,{name:"Range",value:n.range?`start=${n.range.start} count==${n.range.count}`:null}),e(pe,{name:"One",value:n.one}))))])};
|
|
313
|
+
/**
|
|
314
|
+
* @license
|
|
315
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the MIT license found in the
|
|
318
|
+
* LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const Nn=n=>{const{extension:a}=n;return e(Ie,{extension:a},a.value.requireExplicitPolicy&&e(pe,{name:"Require Explicit Policy",value:y.toASN(a.value.requireExplicitPolicy).valueBlock.toString()}),a.value.inhibitPolicyMapping&&e(pe,{name:"Inhibit Policy Mapping",value:y.toASN(a.value.inhibitPolicyMapping).valueBlock.toString()}))};
|
|
320
|
+
/**
|
|
321
|
+
* @license
|
|
322
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the MIT license found in the
|
|
325
|
+
* LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const An=n=>{const{extension:a}=n;return e(Ie,{extension:a},a.value.length>0&&[e(pe,{name:"Policies",value:""}),a.value.map((n=>e(me,null,e(pe,{name:"Issuer Domain",value:ie(n.issuerDomainPolicy)}),e(pe,{name:"Subject Domain",value:ie(n.subjectDomainPolicy)}))))])};
|
|
327
|
+
/**
|
|
328
|
+
* @license
|
|
329
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the MIT license found in the
|
|
332
|
+
* LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/const In=n=>{const{extension:t}=n;return e(Ie,{extension:t},e(pe,{name:a.getString("value"),value:t.value.value}))};
|
|
334
|
+
/**
|
|
335
|
+
* @license
|
|
336
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the MIT license found in the
|
|
339
|
+
* LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const Dn=n=>{var t;const{extension:c}=n;return e(Ie,{extension:c},(t=c.value.distributionPoint)===null||t===void 0?void 0:t.fullName.map((a=>e(Le,Object.assign({generalName:a},n)))),c.value.onlySomeReasons&&e(pe,{name:a.getString("onlyReasons"),value:c.value.onlySomeReasons.toJSON().join(", ")}),c.value.indirectCRL&&e(pe,{name:a.getString("indirectCRL"),value:a.getString("yes")}),c.value.onlyContainsUserCerts&&e(pe,{name:a.getString("onlyUserCertificates"),value:a.getString("yes")}),c.value.onlyContainsAttributeCerts&&e(pe,{name:a.getString("onlyAttributeCertificates"),value:a.getString("yes")}),c.value.onlyContainsCACerts&&e(pe,{name:a.getString("onlyCACertificates"),value:a.getString("yes")}))};
|
|
341
|
+
/**
|
|
342
|
+
* @license
|
|
343
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
344
|
+
*
|
|
345
|
+
* This source code is licensed under the MIT license found in the
|
|
346
|
+
* LICENSE file in the root directory of this source tree.
|
|
347
|
+
*/const jn=n=>{const{extension:t}=n;const o=n=>Object.keys(n).map((t=>{const s=n[t];let i="";switch(true){case typeof s==="string"||typeof s==="number":i=s;break;case s instanceof S:i=s.join(", ");break;case typeof s==="boolean":i=s?a.getString("yes"):a.getString("no");break;case Object.is(s,null):i="NULL";break;case s instanceof C:return[e(pe,{name:fe(t),value:""}),e(me,null,o(s))];case c.BufferSourceConverter.isBufferSource(s):if(t==="attestationApplicationId"){try{const n=r.parse(s,h);if(n.packageInfos.length||n.signatureDigests.length){return[e(pe,{name:fe(t),value:""}),Boolean(n.packageInfos)&&e(me,null,e(pe,{name:fe("packageInfos"),value:""}),n.packageInfos.map((n=>e(me,null,o(n)))))]}}catch(e){}}try{i=c.Convert.ToString(s)}catch(e){i=c.Convert.ToHex(s)}break}return e(pe,{name:fe(t),value:i})}));const s=(n,a)=>{if(a.length===0){return null}return[e(pe,{name:n,value:""}),e(me,null,a.map(o))]};return e(Ie,{extension:t},e(pe,{name:fe("attestationVersion"),value:t.value.attestationVersion}),e(pe,{name:fe("attestationSecurityLevel"),value:t.value.attestationSecurityLevel}),e(pe,{name:fe("keymasterVersion"),value:t.value.keymasterVersion}),e(pe,{name:fe("keymasterSecurityLevel"),value:t.value.keymasterSecurityLevel}),e(pe,{name:fe("attestationChallenge"),value:c.Convert.ToString(t.value.attestationChallenge)}),e(pe,{name:fe("uniqueId"),value:c.Convert.ToString(t.value.uniqueId)||undefined}),s(fe("softwareEnforced"),t.value.softwareEnforced),s(fe("teeEnforced"),t.value.teeEnforced))};
|
|
348
|
+
/**
|
|
349
|
+
* @license
|
|
350
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the MIT license found in the
|
|
353
|
+
* LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const On=n=>{const{extension:a}=n;return e(Ie,{extension:a},Object.keys(a.value).map((n=>e(pe,{name:fe(n),value:a.value[n]}))))};
|
|
355
|
+
/**
|
|
356
|
+
* @license
|
|
357
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the MIT license found in the
|
|
360
|
+
* LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const Tn=n=>{const{extensions:a,title:t}=n;if(!a||!a.length){return null}return[e(ve,{value:t||"Extensions"}),a.map((a=>{try{if(a.value instanceof N){return e(De,{extension:a})}if(a.value instanceof A){return e(je,{extension:a})}if(a.value instanceof I){return e(Oe,{extension:a})}if(a.value instanceof D){return e(Te,Object.assign({extension:a},n))}if(a.value instanceof j){return e(Ge,Object.assign({extension:a},n))}if(a.value instanceof O){return e(Pe,Object.assign({extension:a},n))}if(a.value instanceof T||a.value instanceof G){return e(Be,Object.assign({extension:a},n))}if(a.value instanceof k){return e(Re,Object.assign({extension:a},n))}if(a.value instanceof L){return e(Ve,{extension:a})}if(a.value instanceof ce){return e(Ee,{extension:a})}if(a.value instanceof P){return e(Ue,Object.assign({extension:a},n))}if(a.value instanceof B){return e(Ke,{extension:a})}if(a.value instanceof R){return e(qe,{extension:a})}if(a.value instanceof V){return e(we,{extension:a})}if(a.value instanceof $){return e(sn,{extension:a})}if(a.value instanceof E){return e(rn,{extension:a})}if(a.value instanceof U){return e(fn,{extension:a})}if(a.value instanceof K){return e(un,{extension:a})}if(a.value instanceof q){return e(ln,Object.assign({extension:a},n))}if(a.value instanceof w){return e(bn,Object.assign({extension:a},n))}if(a.value instanceof H){return e(dn,{extension:a})}if(a.value instanceof M){return e(mn,{extension:a})}if(a.value instanceof X){return e(pn,{extension:a})}if(a.value instanceof Y){return e(gn,{extension:a})}if(a.value instanceof Z){return e(yn,{extension:a})}if(a.value instanceof z){return e(hn,{extension:a})}if(a.value instanceof F){return e(Cn,{extension:a})}if(a.value instanceof Q){return e(Sn,{extension:a})}if(a.value instanceof W){return e(Nn,{extension:a})}if(a.value instanceof J){return e(An,{extension:a})}if(a.value instanceof _){return e(In,{extension:a})}if(a.value instanceof ee){return e(Dn,Object.assign({extension:a},n))}if(a.value instanceof ne){return e(jn,Object.assign({extension:a},n))}if(a.value instanceof ae){return e(On,Object.assign({extension:a},n))}if(typeof a.value==="string"){return e(xn,{extension:a})}return e(Ie,{extension:a})}catch(e){console.error("Error render extension:",a.asn.extnID);return null}}))]};
|
|
362
|
+
/**
|
|
363
|
+
* @license
|
|
364
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
365
|
+
*
|
|
366
|
+
* This source code is licensed under the MIT license found in the
|
|
367
|
+
* LICENSE file in the root directory of this source tree.
|
|
368
|
+
*/const Gn=n=>{const{certificate:t}=n;return[e(ve,{value:a.getString("miscellaneous")}),e("tr",null,e("td",null,e(se,{startIcon:e(re,null),onClick:()=>t.downloadAsPEM()},a.getString("download.pem")))),e("tr",null,e("td",null,e(se,{startIcon:e(re,null),onClick:()=>t.downloadAsDER()},a.getString("download.der"))))]};export{xe as B,Tn as E,Le as G,Se as I,Gn as M,he as P,pe as R,Ce as S,Ae as T,Ne as a,le as b,ue as c,ie as d,fe as e,me as f,be as g,ve as h};
|
|
369
|
+
//# sourceMappingURL=p-DKooqn40.js.map
|