@peculiar/certificates-viewer 4.2.2 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attribute-certificate-viewer.js +1 -1
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/certificate-viewer.js +2 -2
- package/components/certificate-viewer.js.map +1 -1
- package/components/crl-viewer.js +2 -2
- package/components/crl-viewer.js.map +1 -1
- package/components/download.js +84 -18
- package/components/download.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +12 -69
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/pkcs10_certificate_request.js +1 -1
- package/components/pkcs10_certificate_request.js.map +1 -1
- package/dist/cjs/{certification_request-815ec558.js → certification_request-ad267278.js} +84 -23
- package/dist/cjs/certification_request-ad267278.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{miscellaneous-9a573276.js → miscellaneous-67439e59.js} +2 -2
- package/dist/cjs/{miscellaneous-9a573276.js.map → miscellaneous-67439e59.js.map} +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +15 -72
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +3 -3
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +2 -2
- package/dist/cjs/{pkcs10_certificate_request-0ebc0023.js → pkcs10_certificate_request-64898c88.js} +3 -3
- package/dist/cjs/pkcs10_certificate_request-64898c88.js.map +1 -0
- package/dist/cjs/{x509_certificate-9914b149.js → x509_certificate-4b0894c2.js} +3 -3
- package/dist/cjs/x509_certificate-4b0894c2.js.map +1 -0
- package/dist/cjs/{x509_crl-86b6e71d.js → x509_crl-fc8d41a1.js} +5 -5
- package/dist/cjs/x509_crl-fc8d41a1.js.map +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +12 -69
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/constants/oids.js +3 -0
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/pkcs10_certificate_request.js +1 -1
- package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
- package/dist/collection/crypto/x509_attribute_certificate.js +1 -1
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
- package/dist/collection/crypto/x509_certificate.js +1 -1
- package/dist/collection/crypto/x509_certificate.js.map +1 -1
- package/dist/collection/crypto/x509_crl.js +1 -1
- package/dist/collection/crypto/x509_crl.js.map +1 -1
- package/dist/collection/utils/download.js +8 -8
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/collection/utils/validator.js +0 -8
- package/dist/collection/utils/validator.js.map +1 -1
- package/dist/esm/{certification_request-08b4deb8.js → certification_request-a4699dcf.js} +85 -19
- package/dist/esm/certification_request-a4699dcf.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/{miscellaneous-d4bbc6f2.js → miscellaneous-ba1fd2bd.js} +2 -2
- package/dist/esm/{miscellaneous-d4bbc6f2.js.map → miscellaneous-ba1fd2bd.js.map} +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +4 -4
- package/dist/esm/peculiar-certificate-decoder.entry.js +15 -72
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +3 -3
- package/dist/esm/peculiar-certificates-viewer.entry.js +2 -2
- package/dist/esm/{pkcs10_certificate_request-3763c2af.js → pkcs10_certificate_request-785a4794.js} +3 -3
- package/dist/esm/pkcs10_certificate_request-785a4794.js.map +1 -0
- package/dist/esm/{x509_certificate-47b4c5ee.js → x509_certificate-05a23c0e.js} +3 -3
- package/dist/esm/x509_certificate-05a23c0e.js.map +1 -0
- package/dist/esm/{x509_crl-ba76d3ed.js → x509_crl-26081461.js} +5 -5
- package/dist/esm/x509_crl-26081461.js.map +1 -0
- package/dist/esm-es5/{certification_request-08b4deb8.js → certification_request-a4699dcf.js} +6 -6
- package/dist/esm-es5/certification_request-a4699dcf.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{miscellaneous-d4bbc6f2.js → miscellaneous-ba1fd2bd.js} +2 -2
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +2 -2
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/{pkcs10_certificate_request-3763c2af.js → pkcs10_certificate_request-785a4794.js} +3 -3
- package/dist/esm-es5/{pkcs10_certificate_request-3763c2af.js.map → pkcs10_certificate_request-785a4794.js.map} +1 -1
- package/dist/esm-es5/{x509_certificate-47b4c5ee.js → x509_certificate-05a23c0e.js} +3 -3
- package/dist/{peculiar/p-1818204e.system.js.map → esm-es5/x509_certificate-05a23c0e.js.map} +1 -1
- package/dist/esm-es5/{x509_crl-ba76d3ed.js → x509_crl-26081461.js} +4 -4
- package/dist/esm-es5/x509_crl-26081461.js.map +1 -0
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/{p-8db3e1fd.system.entry.js → p-1566ad92.system.entry.js} +2 -2
- package/dist/peculiar/{p-c10bfa6a.system.js → p-2bc2abea.system.js} +2 -2
- package/dist/peculiar/{p-6acca6ea.js → p-32807e5e.js} +12 -12
- package/dist/peculiar/p-32807e5e.js.map +1 -0
- package/dist/peculiar/{p-84e3e94a.entry.js → p-5d1d4a96.entry.js} +7 -7
- package/dist/peculiar/{p-f8efbe93.entry.js → p-67e82386.entry.js} +2 -2
- package/dist/peculiar/{p-b0c963b1.js → p-6e2ad7eb.js} +13 -13
- package/dist/peculiar/{p-4ee5140c.system.js → p-7ddd9a82.system.js} +3 -3
- package/dist/peculiar/{p-4ee5140c.system.js.map → p-7ddd9a82.system.js.map} +1 -1
- package/dist/peculiar/p-8393399a.system.js +1 -1
- package/dist/peculiar/{p-0f3787cf.system.entry.js → p-9263e7ee.system.entry.js} +2 -2
- package/dist/peculiar/{p-1818204e.system.js → p-98e3a016.system.js} +3 -3
- package/dist/{esm-es5/x509_certificate-47b4c5ee.js.map → peculiar/p-98e3a016.system.js.map} +1 -1
- package/dist/peculiar/p-9ad547d2.system.entry.js +5 -0
- package/dist/peculiar/p-9ad547d2.system.entry.js.map +1 -0
- package/dist/peculiar/{p-28b4d316.system.js → p-a1a48332.system.js} +2 -2
- package/dist/peculiar/{p-31d5da39.js → p-ab5a4988.js} +3 -3
- package/dist/peculiar/{p-31d5da39.js.map → p-ab5a4988.js.map} +1 -1
- package/dist/peculiar/{p-30e18f2d.system.js → p-ae44c2b0.system.js} +4 -4
- package/dist/peculiar/p-ae44c2b0.system.js.map +1 -0
- package/dist/peculiar/{p-9c8dc738.entry.js → p-bafd67f3.entry.js} +2 -2
- package/dist/peculiar/p-cd1b1876.entry.js +5 -0
- package/dist/peculiar/p-cd1b1876.entry.js.map +1 -0
- package/dist/peculiar/{p-82e4faf0.js → p-d5ba4fc2.js} +4 -4
- package/dist/peculiar/p-d5ba4fc2.js.map +1 -0
- package/dist/peculiar/p-e37e4df2.system.js +135 -0
- package/dist/peculiar/p-e37e4df2.system.js.map +1 -0
- package/dist/peculiar/{p-78a6b479.js → p-f8c91ee4.js} +4 -4
- package/dist/peculiar/{p-78a6b479.js.map → p-f8c91ee4.js.map} +1 -1
- package/dist/peculiar/{p-364df80d.system.entry.js → p-f9c07207.system.entry.js} +3 -3
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +1 -1
- package/dist/types/constants/oids.d.ts +3 -0
- package/dist/types/utils/download.d.ts +4 -4
- package/dist/types/utils/validator.d.ts +0 -4
- package/hydrate/index.js +98 -89
- package/package.json +22 -22
- package/dist/cjs/certification_request-815ec558.js.map +0 -1
- package/dist/cjs/pkcs10_certificate_request-0ebc0023.js.map +0 -1
- package/dist/cjs/x509_certificate-9914b149.js.map +0 -1
- package/dist/cjs/x509_crl-86b6e71d.js.map +0 -1
- package/dist/esm/certification_request-08b4deb8.js.map +0 -1
- package/dist/esm/pkcs10_certificate_request-3763c2af.js.map +0 -1
- package/dist/esm/x509_certificate-47b4c5ee.js.map +0 -1
- package/dist/esm/x509_crl-ba76d3ed.js.map +0 -1
- package/dist/esm-es5/certification_request-08b4deb8.js.map +0 -1
- package/dist/esm-es5/x509_crl-ba76d3ed.js.map +0 -1
- package/dist/peculiar/p-30e18f2d.system.js.map +0 -1
- package/dist/peculiar/p-6acca6ea.js.map +0 -1
- package/dist/peculiar/p-82005297.system.entry.js +0 -5
- package/dist/peculiar/p-82005297.system.entry.js.map +0 -1
- package/dist/peculiar/p-82e4faf0.js.map +0 -1
- package/dist/peculiar/p-c3fce3f5.entry.js +0 -5
- package/dist/peculiar/p-c3fce3f5.entry.js.map +0 -1
- package/dist/peculiar/p-df2c8826.system.js +0 -135
- package/dist/peculiar/p-df2c8826.system.js.map +0 -1
- /package/dist/esm-es5/{miscellaneous-d4bbc6f2.js.map → miscellaneous-ba1fd2bd.js.map} +0 -0
- /package/dist/peculiar/{p-8db3e1fd.system.entry.js.map → p-1566ad92.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-c10bfa6a.system.js.map → p-2bc2abea.system.js.map} +0 -0
- /package/dist/peculiar/{p-84e3e94a.entry.js.map → p-5d1d4a96.entry.js.map} +0 -0
- /package/dist/peculiar/{p-f8efbe93.entry.js.map → p-67e82386.entry.js.map} +0 -0
- /package/dist/peculiar/{p-b0c963b1.js.map → p-6e2ad7eb.js.map} +0 -0
- /package/dist/peculiar/{p-0f3787cf.system.entry.js.map → p-9263e7ee.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-28b4d316.system.js.map → p-a1a48332.system.js.map} +0 -0
- /package/dist/peculiar/{p-9c8dc738.entry.js.map → p-bafd67f3.entry.js.map} +0 -0
- /package/dist/peculiar/{p-364df80d.system.entry.js.map → p-f9c07207.system.entry.js.map} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{A as s,a as t,b as a,C as e,i,c as r,e as n,f as h,g as o,h as c,j as u,k as l,l as f,T as m,m as p,n as g,o as E,W as b,p as d,I as A,q as w,V as
|
|
4
|
+
import{A as s,a as t,b as a,C as e,i,c as r,e as n,f as h,g as o,h as c,j as u,k as l,l as f,T as m,m as p,n as g,o as E,W as b,p as d,I as A,q as w,V as R,r as x,s as y,t as C,U as I,u as N,E as T,v as $,w as q,N as D,x as P,y as S,z as j,B as v,R as K,F as B,G as F,H as G,J as H,D as U}from"./p-32807e5e.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const V={[i]:r,[n]:h,[o]:c,[u]:l,[f]:m,[p]:g,[E]:b,[d]:A,[w]:
|
|
11
|
+
*/const V={[i]:r,[n]:h,[o]:c,[u]:l,[f]:m,[p]:g,[E]:b,[d]:A,[w]:R,[x]:y,[C]:I,[N]:T};class k extends s{getAsnExtnValue(){return this.asn.values[0]}constructor(s){super(s,t);const i=this.getAsnExtnValue();try{const s=V[this.asn.type];if(s){this.value=a.parse(i,s)}else{console.warn(`Didn't detect parser for "${this.asn.type}" attribute.`);this.value=e.ToHex(i)}}catch(s){console.error(`Error parse "${this.asn.type}" attribute:`,s.message);this.value=e.ToHex(i)}}}
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/class z extends s{constructor(s){super($(s),q);this.thumbprints={};this.type="PKCS#10 Certificate Request";this.tag="CERTIFICATE REQUEST";const{certificationRequestInfo:t}=this.asn;this.subject=new D(t.subject).toJSON();this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;if(t.algorithm===P&&t.parameters){a=S.parse(t.parameters,j)}if(t.algorithm===v){a=S.parse(s,K)}const e=S.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 B(s,this.raw);if(t){this.thumbprints[s]=e.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 k(S.serialize(s))));const t=this.attributes.find((s=>s.asn.type===N));if(t){this.extensions=t.value.map((s=>new F(S.serialize(s))))}}}toString(s="pem"){switch(s){case"hex":return H(e.ToHex(this.raw));case"pem":return`-----BEGIN ${this.tag}-----\n${G(this.toString("base64"))}\n-----END ${this.tag}-----`;default:return e.ToBase64(this.raw)}}downloadAsPEM(s){U.csr.asPEM(this.toString("pem"),s||this.commonName)}downloadAsDER(s){U.csr.asDER(this.
|
|
19
|
-
//# sourceMappingURL=p-
|
|
18
|
+
*/class z extends s{constructor(s){super($(s),q);this.thumbprints={};this.type="PKCS#10 Certificate Request";this.tag="CERTIFICATE REQUEST";const{certificationRequestInfo:t}=this.asn;this.subject=new D(t.subject).toJSON();this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;if(t.algorithm===P&&t.parameters){a=S.parse(t.parameters,j)}if(t.algorithm===v){a=S.parse(s,K)}const e=S.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 B(s,this.raw);if(t){this.thumbprints[s]=e.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 k(S.serialize(s))));const t=this.attributes.find((s=>s.asn.type===N));if(t){this.extensions=t.value.map((s=>new F(S.serialize(s))))}}}toString(s="pem"){switch(s){case"hex":return H(e.ToHex(this.raw));case"pem":return`-----BEGIN ${this.tag}-----\n${G(this.toString("base64"))}\n-----END ${this.tag}-----`;default:return e.ToBase64(this.raw)}}downloadAsPEM(s){U.csr.asPEM(this.toString("pem"),s||this.commonName)}downloadAsDER(s){U.csr.asDER(this.raw,s||this.commonName)}}export{k as A,z as P};
|
|
19
|
+
//# sourceMappingURL=p-f8c91ee4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["attributesParsers","id_DomainNameBeneficiary","DomainNameBeneficiary","id_DomainNameLegalRepresentative","DomainNameLegalRepresentative","id_DomainNameOwner","DomainNameOwner","id_DomainNameTechnicalOperator","DomainNameTechnicalOperator","id_TypeRelationship","TypeRelationship","id_ActivityDescription","ActivityDescription","id_WebGDPR","WebGDPR","id_InsuranceValue","InsuranceValue","id_ValuationRanking","ValuationRanking","id_pkcs9_at_challengePassword","ChallengePassword","id_pkcs9_at_unstructuredName","UnstructuredName","id_pkcs9_at_extensionRequest","ExtensionRequest","Attribute","AsnData","getAsnExtnValue","this","asn","values","constructor","raw","super","AsnAttribute","asnExtnValue","target","type","value","AsnParser","parse","console","warn","Convert","ToHex","error","message","Pkcs10CertificateRequest","certificateRawToBuffer","CertificationRequest","thumbprints","tag","certificationRequestInfo","subject","Name","toJSON","version","publicKey","subjectPublicKey","algorithm","subjectPKInfo","params","id_ecPublicKey","parameters","AsnConvert","ECParameters","id_rsaEncryption","RSAPublicKey","spki","serialize","signature","signatureAlgorithm","commonName","i","length","name","shortName","getThumbprint","thumbprint","getCertificateThumbprint","parseAttributes","attributes","map","e","extensionRequestAttribute","find","attribute","extensions","Extension","toString","format","hexFormat","base64Format","ToBase64","downloadAsPEM","Download","csr","asPEM","downloadAsDER","asDER"],"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';\n\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};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\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 {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { Extension, TExtensionValue } from './extension';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\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 extensions: Extension<TExtensionValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = 'CERTIFICATE REQUEST';\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: string = '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 const extensionRequestAttribute = this.attributes.find(\n (attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest,\n ) as Attribute<ExtensionRequest>;\n\n if (extensionRequestAttribute) {\n this.extensions = extensionRequestAttribute.value\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n }\n\n public toString(format: 'hex' | 'pem' | 'base64' = 'pem'): string {\n switch (format) {\n case 'hex':\n return hexFormat(Convert.ToHex(this.raw));\n case 'pem':\n return `-----BEGIN ${this.tag}-----\\n${base64Format(this.toString('base64'))}\\n-----END ${this.tag}-----`;\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.toString('hex'),\n name || this.commonName,\n );\n }\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"names":["attributesParsers","id_DomainNameBeneficiary","DomainNameBeneficiary","id_DomainNameLegalRepresentative","DomainNameLegalRepresentative","id_DomainNameOwner","DomainNameOwner","id_DomainNameTechnicalOperator","DomainNameTechnicalOperator","id_TypeRelationship","TypeRelationship","id_ActivityDescription","ActivityDescription","id_WebGDPR","WebGDPR","id_InsuranceValue","InsuranceValue","id_ValuationRanking","ValuationRanking","id_pkcs9_at_challengePassword","ChallengePassword","id_pkcs9_at_unstructuredName","UnstructuredName","id_pkcs9_at_extensionRequest","ExtensionRequest","Attribute","AsnData","getAsnExtnValue","this","asn","values","constructor","raw","super","AsnAttribute","asnExtnValue","target","type","value","AsnParser","parse","console","warn","Convert","ToHex","error","message","Pkcs10CertificateRequest","certificateRawToBuffer","CertificationRequest","thumbprints","tag","certificationRequestInfo","subject","Name","toJSON","version","publicKey","subjectPublicKey","algorithm","subjectPKInfo","params","id_ecPublicKey","parameters","AsnConvert","ECParameters","id_rsaEncryption","RSAPublicKey","spki","serialize","signature","signatureAlgorithm","commonName","i","length","name","shortName","getThumbprint","thumbprint","getCertificateThumbprint","parseAttributes","attributes","map","e","extensionRequestAttribute","find","attribute","extensions","Extension","toString","format","hexFormat","base64Format","ToBase64","downloadAsPEM","Download","csr","asPEM","downloadAsDER","asDER"],"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';\n\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};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\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 {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { Extension, TExtensionValue } from './extension';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\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 extensions: Extension<TExtensionValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = 'CERTIFICATE REQUEST';\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: string = '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 const extensionRequestAttribute = this.attributes.find(\n (attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest,\n ) as Attribute<ExtensionRequest>;\n\n if (extensionRequestAttribute) {\n this.extensions = extensionRequestAttribute.value\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n }\n\n public toString(format: 'hex' | 'pem' | 'base64' = 'pem'): string {\n switch (format) {\n case 'hex':\n return hexFormat(Convert.ToHex(this.raw));\n case 'pem':\n return `-----BEGIN ${this.tag}-----\\n${base64Format(this.toString('base64'))}\\n-----END ${this.tag}-----`;\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"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function n(t){try{c(a.next(t))}catch(t){i(t)}}function s(t){try{c(a["throw"](t))}catch(t){i(t)}}function c(t){t.done?r(t.value):o(t.value).then(n,s)}c((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(t){return function(e){return c([t,e])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];o=0}finally{a=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
-
*/System.register(["./p-821bdcdc.system.js","./p-
|
|
4
|
+
*/System.register(["./p-821bdcdc.system.js","./p-e37e4df2.system.js","./p-ae44c2b0.system.js","./p-2bc2abea.system.js","./p-9712b827.system.js","./p-7ddd9a82.system.js","./p-243244af.system.js","./p-8bbee8f4.system.js"],(function(t){"use strict";var e,r,a,o,i,n,s,c,v,p,l,h,d,g,b,u,f,y,w,m,x,z,k,L,I,j,S,N,_,A,K,D,P,E,C,O,T,H,V;return{setters:[function(t){e=t.h;r=t.r;a=t.H},function(t){o=t.$;i=t.Z;n=t.a0;s=t.n;c=t.W;v=t.I;p=t.T;l=t.V;h=t.U;d=t.s;g=t.C;b=t._;u=t.a1;f=t.a2;y=t.a3},function(t){w=t.X;m=t.a},function(t){x=t.g;z=t.R;k=t.c;L=t.T;I=t.G;j=t.a;S=t.B;N=t.S;_=t.b;A=t.d;K=t.e;D=t.f;P=t.E;E=t.M;C=t.I;O=t.h;T=t.P},function(t){H=t.T},function(t){V=t.P},function(){},function(){}],execute:function(){
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -93,7 +93,7 @@ var q=function(t,r){var a=t.attribute;return[e(z,{name:"Name",value:x(a.asn.type
|
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the MIT license found in the
|
|
95
95
|
* LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/var $=function(t){var r=t.revokedCertificates,a=t.getDNSNameLink,o=t.getIPAddressLink;if(!r||!r.length){return null}return[e(j,{value:i.getString("revokedCertificates")}),r.map((function(t){return[e(z,{name:i.getString("serialNumber"),value:g.ToHex(t.userCertificate),monospace:true}),e(z,{name:i.getString("revocationDate"),value:
|
|
96
|
+
*/var $=function(t){var r=t.revokedCertificates,a=t.getDNSNameLink,o=t.getIPAddressLink;if(!r||!r.length){return null}return[e(j,{value:i.getString("revokedCertificates")}),r.map((function(t){return[e(z,{name:i.getString("serialNumber"),value:g.ToHex(t.userCertificate),monospace:true}),e(z,{name:i.getString("revocationDate"),value:b(t.revocationDate.getTime())}),t.crlEntryExtensions&&t.crlEntryExtensions.length&&[e(z,{name:"".concat(i.getString("crlEntryExtensions"),":"),value:""}),e(L,null,t.crlEntryExtensions.map((function(t){if(t.value instanceof u){return e(z,{name:x(t.asn.extnID),value:t.value.toJSON()||t.value.reason})}if(t.value instanceof f){return e(z,{name:x(t.asn.extnID),value:t.value.value.getTime()})}if(t.value instanceof y&&t.value.length){return[e(z,{name:"".concat(x(t.asn.extnID),":"),value:""}),t.value.map((function(t){return e(L,null,e(I,{generalName:t,getDNSNameLink:a,getIPAddressLink:o}))}))]}return e(z,{name:x(t.asn.extnID),value:g.ToHex(t.asn.extnValue),monospace:true})})))],e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",null)))]}))]};
|
|
97
97
|
/**
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -108,4 +108,4 @@ var q=function(t,r){var a=t.attribute;return[e(z,{name:"Name",value:x(a.asn.type
|
|
|
108
108
|
* This source code is licensed under the MIT license found in the
|
|
109
109
|
* LICENSE file in the root directory of this source tree.
|
|
110
110
|
*/var et=function(t){var r=t.issuer;if(!r){return null}return[e(j,{value:i.getString("issuer")}),r.map((function(t){return e(I,{generalName:t,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}})}))]};var rt="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var at=rt;var ot=t("peculiar_attribute_certificate_viewer",function(){function t(t){var e=this;r(this,t);this.getAuthKeyIdParentLink=function(t){var r;return(r=e.authKeyIdParentLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=function(t){var r;return(r=e.authKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=function(t){var r;return(r=e.subjectKeyIdChildrenLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=function(t){var r;return(r=e.subjectKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)};this.certificate=undefined;this.download=undefined;this.authKeyIdParentLink=undefined;this.authKeyIdSiblingsLink=undefined;this.subjectKeyIdChildrenLink=undefined;this.subjectKeyIdSiblingsLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}t.prototype.handleMediaQueryChange=function(t){this.mobileScreenView=t.matches};t.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};t.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};t.prototype.decodeCertificate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(t instanceof w){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new w(t)}else{return[2]}this.certificateDecoded.parseExtensions();this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:e=r.sent();this.certificateDecodeError=e;console.error("Error certificate parse:",e);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};t.prototype.watchCertificateAndDecode=function(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof w&&e instanceof w){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}};t.prototype.renderErrorState=function(){return e("div",{class:"status_wrapper"},e(H,null,"There was an error decoding this attribute certificate."))};t.prototype.renderEmptyState=function(){return e("div",{class:"status_wrapper"},e(H,null,"There is no attribute certificate available."))};t.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return e(a,{"data-mobile-screen-view":String(this.mobileScreenView)},e("table",null,e(S,Object.assign({},this.certificateDecoded)),e(et,{issuer:this.certificateDecoded.issuer}),e(tt,{holder:this.certificateDecoded.holder}),e(N,{signature:this.certificateDecoded.signature}),e(_,{thumbprints:this.certificateDecoded.thumbprints}),e(Z,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:K,getIPAddressLink:D,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),e(P,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:K,getIPAddressLink:D,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&e(E,{certificate:this.certificateDecoded})))};Object.defineProperty(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}());ot.style=at;var it="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var nt=it;var st=t("peculiar_crl_viewer",function(){function t(t){var e=this;r(this,t);this.getAuthKeyIdParentLink=function(t){var r;return(r=e.authKeyIdParentLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=function(t){var r;return(r=e.authKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.certificate=undefined;this.download=undefined;this.authKeyIdParentLink=undefined;this.authKeyIdSiblingsLink=undefined;this.issuerDnLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}t.prototype.handleMediaQueryChange=function(t){this.mobileScreenView=t.matches};t.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};t.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};t.prototype.decodeCertificate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(t instanceof m){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new m(t)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:e=r.sent();this.certificateDecodeError=e;console.error("Error certificate parse:",e);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};t.prototype.getIssuerDnLink=function(){return this.issuerDnLink};t.prototype.watchCertificateAndDecode=function(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof m&&e instanceof m){if(t.commonName!==e.commonName){this.decodeCertificate(t)}}};t.prototype.renderErrorState=function(){return e("div",{class:"status_wrapper"},e(H,null,"There was an error decoding this certificate revocation list."))};t.prototype.renderEmptyState=function(){return e("div",{class:"status_wrapper"},e(H,null,"There is no certificate revocation list available."))};t.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return e(a,{"data-mobile-screen-view":String(this.mobileScreenView)},e("table",null,e(S,Object.assign({},this.certificateDecoded)),e(C,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),e(N,{signature:this.certificateDecoded.signature}),e(_,{thumbprints:this.certificateDecoded.thumbprints}),e(P,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:K,getIPAddressLink:D,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink}),e($,{revokedCertificates:this.certificateDecoded.revokedCertificates,getDNSNameLink:K,getIPAddressLink:D}),this.download&&e(E,{certificate:this.certificateDecoded})))};Object.defineProperty(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}());st.style=nt;var ct="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var vt=ct;var pt=t("peculiar_csr_viewer",function(){function t(t){var e=this;r(this,t);this.getAuthKeyIdParentLink=function(t){return t};this.getAuthKeyIdSiblingsLink=function(t){return t};this.getSubjectKeyIdChildrenLink=function(t){var r;return(r=e.subjectKeyIdChildrenLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=function(t){var r;return(r=e.subjectKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)};this.certificate=undefined;this.download=undefined;this.subjectKeyIdChildrenLink=undefined;this.subjectKeyIdSiblingsLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}t.prototype.handleMediaQueryChange=function(t){this.mobileScreenView=t.matches};t.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};t.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};t.prototype.decodeCertificate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(t instanceof V){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new V(t)}else{return[2]}this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:e=r.sent();this.certificateDecodeError=e;console.error("Error certificate parse:",e);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};t.prototype.watchCertificateAndDecode=function(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof V&&e instanceof V){if(t.commonName!==e.commonName){this.decodeCertificate(t)}}};t.prototype.renderErrorState=function(){return e("div",{class:"status_wrapper"},e(H,null,"There was an error decoding this certificate request."))};t.prototype.renderEmptyState=function(){return e("div",{class:"status_wrapper"},e(H,null,"There is no certificate request available."))};t.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return e(a,{"data-mobile-screen-view":String(this.mobileScreenView)},e("table",null,e(S,Object.assign({},this.certificateDecoded)),e(O,{name:this.certificateDecoded.subject}),e(T,{publicKey:this.certificateDecoded.publicKey}),e(N,{signature:this.certificateDecoded.signature}),e(_,{thumbprints:this.certificateDecoded.thumbprints}),e(Z,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:K,getIPAddressLink:D,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),e(P,{extensions:this.certificateDecoded.extensions,title:"Extension Request",getLEILink:A,getDNSNameLink:K,getIPAddressLink:D,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&e(E,{certificate:this.certificateDecoded})))};Object.defineProperty(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}());pt.style=vt}}}));
|
|
111
|
-
//# sourceMappingURL=p-
|
|
111
|
+
//# sourceMappingURL=p-f9c07207.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,b as i}from"./p-3cb79cd9.js";export{s as setNonce}from"./p-3cb79cd9.js";import{g as t}from"./p-dac867e8.js";const c=()=>{const i=import.meta.url;const t={};if(i!==""){t.resourcesUrl=new URL(".",i).href}return e(t)};c().then((async e=>{await t();return i([["p-
|
|
4
|
+
import{p as e,b as i}from"./p-3cb79cd9.js";export{s as setNonce}from"./p-3cb79cd9.js";import{g as t}from"./p-dac867e8.js";const c=()=>{const i=import.meta.url;const t={};if(i!==""){t.resourcesUrl=new URL(".",i).href}return e(t)};c().then((async e=>{await t();return i([["p-cd1b1876",[[1,"peculiar-certificate-decoder",{certificateExamples:[16],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-67e82386",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]},null,{certificates:["watchCertificates"]}]]],["p-713563fb",[[6,"peculiar-text-hider",{opened:[32]}]]],["p-bafd67f3",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["p-5d1d4a96",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["p-afbd1c8e",[[2,"peculiar-button-menu",{groups:[16],open:[32]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)}));
|
|
5
5
|
//# sourceMappingURL=peculiar.esm.js.map
|
|
@@ -36,7 +36,7 @@ export declare class CertificateDecoder {
|
|
|
36
36
|
private handleChangeExample;
|
|
37
37
|
private handleDropFile;
|
|
38
38
|
clearValue(): void;
|
|
39
|
-
setValue(value:
|
|
39
|
+
setValue(value: typeof this.certificateDecoded): void;
|
|
40
40
|
decode(certificate: string): void;
|
|
41
41
|
render(): any;
|
|
42
42
|
}
|
|
@@ -982,6 +982,7 @@ export declare const OIDs: {
|
|
|
982
982
|
'1.2.840.113635.100.4.6.3': string;
|
|
983
983
|
'1.2.840.113635.100.4.6.4': string;
|
|
984
984
|
'1.2.840.113635.100.4.7': string;
|
|
985
|
+
'1.2.840.113635.100.4.13': string;
|
|
985
986
|
'1.2.840.113635.100.5': string;
|
|
986
987
|
'1.2.840.113635.100.5.1': string;
|
|
987
988
|
'1.2.840.113635.100.5.2': string;
|
|
@@ -993,6 +994,8 @@ export declare const OIDs: {
|
|
|
993
994
|
'1.2.840.113635.100.6.1.2': string;
|
|
994
995
|
'1.2.840.113635.100.6.1.3': string;
|
|
995
996
|
'1.2.840.113635.100.6.2.3': string;
|
|
997
|
+
'1.2.840.113635.100.6.1.33': string;
|
|
998
|
+
'1.2.840.113635.100.6.1.14': string;
|
|
996
999
|
'1.2.840.114021.1.6.1': string;
|
|
997
1000
|
'1.2.840.114021.4.1': string;
|
|
998
1001
|
'1.3.6.1.4.1.188.7.1.1': string;
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
export declare class Download {
|
|
9
9
|
static cert: {
|
|
10
10
|
asPEM: (pem: string, name: string) => void;
|
|
11
|
-
asDER: (
|
|
11
|
+
asDER: (raw: ArrayBuffer, name: string) => void;
|
|
12
12
|
};
|
|
13
13
|
static attrCert: {
|
|
14
14
|
asPEM: (pem: string, name: string) => void;
|
|
15
|
-
asDER: (
|
|
15
|
+
asDER: (raw: ArrayBuffer, name: string) => void;
|
|
16
16
|
};
|
|
17
17
|
static csr: {
|
|
18
18
|
asPEM: (pem: string, name: string) => void;
|
|
19
|
-
asDER: (
|
|
19
|
+
asDER: (raw: ArrayBuffer, name: string) => void;
|
|
20
20
|
};
|
|
21
21
|
static crl: {
|
|
22
22
|
asPEM: (pem: string, name: string) => void;
|
|
23
|
-
asDER: (
|
|
23
|
+
asDER: (raw: ArrayBuffer, name: string) => void;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
@@ -7,8 +7,4 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const isHex: (value: string) => boolean;
|
|
9
9
|
export declare const isPem: (value: string) => boolean;
|
|
10
|
-
export declare const isX509Pem: (value: string) => boolean;
|
|
11
|
-
export declare const isX509CRLPem: (value: string) => boolean;
|
|
12
|
-
export declare const isPkcs10Pem: (value: string) => boolean;
|
|
13
|
-
export declare const isX509AttributePem: (value: string) => boolean;
|
|
14
10
|
export declare const isBase64: (value: string) => boolean;
|
package/hydrate/index.js
CHANGED
|
@@ -14331,6 +14331,71 @@ create$1(id_ecdsaWithSHA256);
|
|
|
14331
14331
|
create$1(id_ecdsaWithSHA384);
|
|
14332
14332
|
create$1(id_ecdsaWithSHA512);
|
|
14333
14333
|
|
|
14334
|
+
let FieldID = class FieldID {
|
|
14335
|
+
constructor(params = {}) {
|
|
14336
|
+
Object.assign(this, params);
|
|
14337
|
+
}
|
|
14338
|
+
};
|
|
14339
|
+
__decorate$1([
|
|
14340
|
+
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
|
|
14341
|
+
], FieldID.prototype, "fieldType", void 0);
|
|
14342
|
+
__decorate$1([
|
|
14343
|
+
AsnProp({ type: AsnPropTypes.Any })
|
|
14344
|
+
], FieldID.prototype, "parameters", void 0);
|
|
14345
|
+
FieldID = __decorate$1([
|
|
14346
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
14347
|
+
], FieldID);
|
|
14348
|
+
class ECPoint extends OctetString {
|
|
14349
|
+
}
|
|
14350
|
+
let Curve = class Curve {
|
|
14351
|
+
constructor(params = {}) {
|
|
14352
|
+
Object.assign(this, params);
|
|
14353
|
+
}
|
|
14354
|
+
};
|
|
14355
|
+
__decorate$1([
|
|
14356
|
+
AsnProp({ type: AsnPropTypes.OctetString })
|
|
14357
|
+
], Curve.prototype, "a", void 0);
|
|
14358
|
+
__decorate$1([
|
|
14359
|
+
AsnProp({ type: AsnPropTypes.OctetString })
|
|
14360
|
+
], Curve.prototype, "b", void 0);
|
|
14361
|
+
__decorate$1([
|
|
14362
|
+
AsnProp({ type: AsnPropTypes.BitString, optional: true })
|
|
14363
|
+
], Curve.prototype, "seed", void 0);
|
|
14364
|
+
Curve = __decorate$1([
|
|
14365
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
14366
|
+
], Curve);
|
|
14367
|
+
var ECPVer;
|
|
14368
|
+
(function (ECPVer) {
|
|
14369
|
+
ECPVer[ECPVer["ecpVer1"] = 1] = "ecpVer1";
|
|
14370
|
+
})(ECPVer || (ECPVer = {}));
|
|
14371
|
+
let SpecifiedECDomain = class SpecifiedECDomain {
|
|
14372
|
+
constructor(params = {}) {
|
|
14373
|
+
this.version = ECPVer.ecpVer1;
|
|
14374
|
+
Object.assign(this, params);
|
|
14375
|
+
}
|
|
14376
|
+
};
|
|
14377
|
+
__decorate$1([
|
|
14378
|
+
AsnProp({ type: AsnPropTypes.Integer })
|
|
14379
|
+
], SpecifiedECDomain.prototype, "version", void 0);
|
|
14380
|
+
__decorate$1([
|
|
14381
|
+
AsnProp({ type: FieldID })
|
|
14382
|
+
], SpecifiedECDomain.prototype, "fieldID", void 0);
|
|
14383
|
+
__decorate$1([
|
|
14384
|
+
AsnProp({ type: Curve })
|
|
14385
|
+
], SpecifiedECDomain.prototype, "curve", void 0);
|
|
14386
|
+
__decorate$1([
|
|
14387
|
+
AsnProp({ type: ECPoint })
|
|
14388
|
+
], SpecifiedECDomain.prototype, "base", void 0);
|
|
14389
|
+
__decorate$1([
|
|
14390
|
+
AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
|
|
14391
|
+
], SpecifiedECDomain.prototype, "order", void 0);
|
|
14392
|
+
__decorate$1([
|
|
14393
|
+
AsnProp({ type: AsnPropTypes.Integer, optional: true })
|
|
14394
|
+
], SpecifiedECDomain.prototype, "cofactor", void 0);
|
|
14395
|
+
SpecifiedECDomain = __decorate$1([
|
|
14396
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
14397
|
+
], SpecifiedECDomain);
|
|
14398
|
+
|
|
14334
14399
|
let ECParameters = class ECParameters {
|
|
14335
14400
|
constructor(params = {}) {
|
|
14336
14401
|
Object.assign(this, params);
|
|
@@ -14339,6 +14404,12 @@ let ECParameters = class ECParameters {
|
|
|
14339
14404
|
__decorate$1([
|
|
14340
14405
|
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
|
|
14341
14406
|
], ECParameters.prototype, "namedCurve", void 0);
|
|
14407
|
+
__decorate$1([
|
|
14408
|
+
AsnProp({ type: AsnPropTypes.Null })
|
|
14409
|
+
], ECParameters.prototype, "implicitCurve", void 0);
|
|
14410
|
+
__decorate$1([
|
|
14411
|
+
AsnProp({ type: SpecifiedECDomain })
|
|
14412
|
+
], ECParameters.prototype, "specifiedCurve", void 0);
|
|
14342
14413
|
ECParameters = __decorate$1([
|
|
14343
14414
|
AsnType({ type: AsnTypeTypes.Choice })
|
|
14344
14415
|
], ECParameters);
|
|
@@ -14749,14 +14820,6 @@ const isHex = (value) => (/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/
|
|
|
14749
14820
|
.test(value));
|
|
14750
14821
|
const isPem = (value) => (/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/
|
|
14751
14822
|
.test(value));
|
|
14752
|
-
const isX509Pem = (value) => (/-----BEGIN CERTIFICATE-----([A-Za-z0-9+\/=\s]+)-----END CERTIFICATE-----/
|
|
14753
|
-
.test(value));
|
|
14754
|
-
const isX509CRLPem = (value) => (/-----BEGIN X509 CRL-----([A-Za-z0-9+\/=\s]+)-----END X509 CRL-----/
|
|
14755
|
-
.test(value));
|
|
14756
|
-
const isPkcs10Pem = (value) => (/-----BEGIN CERTIFICATE REQUEST-----([A-Za-z0-9+\/=\s]+)-----END CERTIFICATE REQUEST-----/
|
|
14757
|
-
.test(value));
|
|
14758
|
-
const isX509AttributePem = (value) => (/-----BEGIN ATTRIBUTE CERTIFICATE-----([A-Za-z0-9+\/=\s]+)-----END ATTRIBUTE CERTIFICATE-----/
|
|
14759
|
-
.test(value));
|
|
14760
14823
|
const isBase64 = (value) => {
|
|
14761
14824
|
try {
|
|
14762
14825
|
window.atob(value);
|
|
@@ -15029,32 +15092,32 @@ Download.cert = {
|
|
|
15029
15092
|
asPEM: (pem, name) => {
|
|
15030
15093
|
downloadFromBuffer(Convert_1.FromString(pem), name, 'cer', 'application/pkix-cert');
|
|
15031
15094
|
},
|
|
15032
|
-
asDER: (
|
|
15033
|
-
downloadFromBuffer(
|
|
15095
|
+
asDER: (raw, name) => {
|
|
15096
|
+
downloadFromBuffer(raw, name, 'cer', 'application/pkix-cert');
|
|
15034
15097
|
},
|
|
15035
15098
|
};
|
|
15036
15099
|
Download.attrCert = {
|
|
15037
15100
|
asPEM: (pem, name) => {
|
|
15038
15101
|
downloadFromBuffer(Convert_1.FromString(pem), name, 'cer', 'application/pkix-attr-cert');
|
|
15039
15102
|
},
|
|
15040
|
-
asDER: (
|
|
15041
|
-
downloadFromBuffer(
|
|
15103
|
+
asDER: (raw, name) => {
|
|
15104
|
+
downloadFromBuffer(raw, name, 'cer', 'application/pkix-attr-cert');
|
|
15042
15105
|
},
|
|
15043
15106
|
};
|
|
15044
15107
|
Download.csr = {
|
|
15045
15108
|
asPEM: (pem, name) => {
|
|
15046
15109
|
downloadFromBuffer(Convert_1.FromString(pem), name, 'csr', 'application/pkcs10');
|
|
15047
15110
|
},
|
|
15048
|
-
asDER: (
|
|
15049
|
-
downloadFromBuffer(
|
|
15111
|
+
asDER: (raw, name) => {
|
|
15112
|
+
downloadFromBuffer(raw, name, 'csr', 'application/pkcs10');
|
|
15050
15113
|
},
|
|
15051
15114
|
};
|
|
15052
15115
|
Download.crl = {
|
|
15053
15116
|
asPEM: (pem, name) => {
|
|
15054
15117
|
downloadFromBuffer(Convert_1.FromString(pem), name, 'crl', 'application/pkix-crl');
|
|
15055
15118
|
},
|
|
15056
|
-
asDER: (
|
|
15057
|
-
downloadFromBuffer(
|
|
15119
|
+
asDER: (raw, name) => {
|
|
15120
|
+
downloadFromBuffer(raw, name, 'crl', 'application/pkix-crl');
|
|
15058
15121
|
},
|
|
15059
15122
|
};
|
|
15060
15123
|
|
|
@@ -16042,6 +16105,7 @@ const OIDs = {
|
|
|
16042
16105
|
'1.2.840.113635.100.4.6.3': 'Apple Crypto Tier2 QoS',
|
|
16043
16106
|
'1.2.840.113635.100.4.6.4': 'Apple Crypto Tier3 QoS',
|
|
16044
16107
|
'1.2.840.113635.100.4.7': 'Apple ID Sharing Certificate',
|
|
16108
|
+
'1.2.840.113635.100.4.13': 'Apple Extended Key Usage Developer ID Installer',
|
|
16045
16109
|
'1.2.840.113635.100.5': 'Apple Certificate Policies',
|
|
16046
16110
|
'1.2.840.113635.100.5.1': 'Apple Certificate Policy ID',
|
|
16047
16111
|
'1.2.840.113635.100.5.2': 'Apple Dot Mac Certificate Policy ID',
|
|
@@ -16053,6 +16117,8 @@ const OIDs = {
|
|
|
16053
16117
|
'1.2.840.113635.100.6.1.2': 'Apple Certificate Extension ADC Developer Signing',
|
|
16054
16118
|
'1.2.840.113635.100.6.1.3': 'Apple Certificate Extension ADC Apple Signing',
|
|
16055
16119
|
'1.2.840.113635.100.6.2.3': 'Apple Application Integration',
|
|
16120
|
+
'1.2.840.113635.100.6.1.33': 'Apple Certificate Extension Developer ID Date',
|
|
16121
|
+
'1.2.840.113635.100.6.1.14': 'Apple Certificate Extension Developer ID Installer',
|
|
16056
16122
|
'1.2.840.114021.1.6.1': 'Identrus unknown policy Identifier',
|
|
16057
16123
|
'1.2.840.114021.4.1': 'Identrus OCSP',
|
|
16058
16124
|
'1.3.6.1.4.1.188.7.1.1': 'Ascom',
|
|
@@ -19251,7 +19317,7 @@ class X509Certificate extends AsnData {
|
|
|
19251
19317
|
Download.cert.asPEM(this.toString('pem'), name || this.commonName);
|
|
19252
19318
|
}
|
|
19253
19319
|
downloadAsDER(name) {
|
|
19254
|
-
Download.cert.asDER(this.
|
|
19320
|
+
Download.cert.asDER(this.raw, name || this.commonName);
|
|
19255
19321
|
}
|
|
19256
19322
|
}
|
|
19257
19323
|
|
|
@@ -20436,7 +20502,7 @@ __decorate$1([
|
|
|
20436
20502
|
AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
|
|
20437
20503
|
], SignedData.prototype, "certificates", void 0);
|
|
20438
20504
|
__decorate$1([
|
|
20439
|
-
AsnProp({ type:
|
|
20505
|
+
AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
|
|
20440
20506
|
], SignedData.prototype, "crls", void 0);
|
|
20441
20507
|
__decorate$1([
|
|
20442
20508
|
AsnProp({ type: SignerInfos })
|
|
@@ -20921,7 +20987,7 @@ class X509AttributeCertificate extends AsnData {
|
|
|
20921
20987
|
Download.attrCert.asPEM(this.toString('pem'), name || this.commonName);
|
|
20922
20988
|
}
|
|
20923
20989
|
downloadAsDER(name) {
|
|
20924
|
-
Download.attrCert.asDER(this.
|
|
20990
|
+
Download.attrCert.asDER(this.raw, name || this.commonName);
|
|
20925
20991
|
}
|
|
20926
20992
|
}
|
|
20927
20993
|
|
|
@@ -21065,7 +21131,7 @@ class Pkcs10CertificateRequest extends AsnData {
|
|
|
21065
21131
|
Download.csr.asPEM(this.toString('pem'), name || this.commonName);
|
|
21066
21132
|
}
|
|
21067
21133
|
downloadAsDER(name) {
|
|
21068
|
-
Download.csr.asDER(this.
|
|
21134
|
+
Download.csr.asDER(this.raw, name || this.commonName);
|
|
21069
21135
|
}
|
|
21070
21136
|
}
|
|
21071
21137
|
|
|
@@ -21148,7 +21214,7 @@ class X509Crl extends AsnData {
|
|
|
21148
21214
|
Download.crl.asPEM(this.toString('pem'), name || this.commonName);
|
|
21149
21215
|
}
|
|
21150
21216
|
downloadAsDER(name) {
|
|
21151
|
-
Download.crl.asDER(this.
|
|
21217
|
+
Download.crl.asDER(this.raw, name || this.commonName);
|
|
21152
21218
|
}
|
|
21153
21219
|
}
|
|
21154
21220
|
|
|
@@ -23242,79 +23308,22 @@ class CertificateDecoder {
|
|
|
23242
23308
|
this.successParse.emit(value.toString('base64'));
|
|
23243
23309
|
}
|
|
23244
23310
|
decode(certificate) {
|
|
23245
|
-
|
|
23246
|
-
|
|
23247
|
-
|
|
23248
|
-
|
|
23249
|
-
|
|
23250
|
-
|
|
23251
|
-
|
|
23252
|
-
|
|
23311
|
+
new Promise((resolve) => {
|
|
23312
|
+
resolve(new X509Certificate(certificate));
|
|
23313
|
+
})
|
|
23314
|
+
.catch(() => new X509AttributeCertificate(certificate))
|
|
23315
|
+
.catch(() => new Pkcs10CertificateRequest(certificate))
|
|
23316
|
+
.catch(() => new X509Crl(certificate))
|
|
23317
|
+
.then((res) => this.setValue(res))
|
|
23318
|
+
.catch((err) => {
|
|
23253
23319
|
this.clearValue();
|
|
23254
|
-
|
|
23255
|
-
return;
|
|
23256
|
-
}
|
|
23257
|
-
try {
|
|
23258
|
-
if (isX509Pem$1) {
|
|
23259
|
-
decoded = new X509Certificate(certificate);
|
|
23260
|
-
}
|
|
23261
|
-
if (isX509AttributePem$1) {
|
|
23262
|
-
decoded = new X509AttributeCertificate(certificate);
|
|
23263
|
-
}
|
|
23264
|
-
if (isPkcs10Pem$1) {
|
|
23265
|
-
decoded = new Pkcs10CertificateRequest(certificate);
|
|
23266
|
-
}
|
|
23267
|
-
if (isX509CRLPem$1) {
|
|
23268
|
-
decoded = new X509Crl(certificate);
|
|
23269
|
-
}
|
|
23270
|
-
}
|
|
23271
|
-
catch (error) {
|
|
23272
|
-
decodeError = error;
|
|
23273
|
-
}
|
|
23274
|
-
if (!decoded) {
|
|
23275
|
-
try {
|
|
23276
|
-
decoded = new X509Certificate(certificate);
|
|
23277
|
-
}
|
|
23278
|
-
catch (error) {
|
|
23279
|
-
decodeError = error;
|
|
23280
|
-
}
|
|
23281
|
-
}
|
|
23282
|
-
if (!decoded) {
|
|
23283
|
-
try {
|
|
23284
|
-
decoded = new X509AttributeCertificate(certificate);
|
|
23285
|
-
}
|
|
23286
|
-
catch (error) {
|
|
23287
|
-
decodeError = error;
|
|
23288
|
-
}
|
|
23289
|
-
}
|
|
23290
|
-
if (!decoded) {
|
|
23291
|
-
try {
|
|
23292
|
-
decoded = new Pkcs10CertificateRequest(certificate);
|
|
23293
|
-
}
|
|
23294
|
-
catch (error) {
|
|
23295
|
-
decodeError = error;
|
|
23296
|
-
}
|
|
23297
|
-
}
|
|
23298
|
-
if (!decoded) {
|
|
23299
|
-
try {
|
|
23300
|
-
decoded = new X509Crl(certificate);
|
|
23301
|
-
}
|
|
23302
|
-
catch (error) {
|
|
23303
|
-
decodeError = error;
|
|
23304
|
-
}
|
|
23305
|
-
}
|
|
23306
|
-
if (!decoded) {
|
|
23307
|
-
this.clearValue();
|
|
23308
|
-
console.log(decodeError);
|
|
23320
|
+
console.log(err);
|
|
23309
23321
|
alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');
|
|
23310
|
-
}
|
|
23311
|
-
else {
|
|
23312
|
-
this.setValue(decoded);
|
|
23313
|
-
}
|
|
23322
|
+
});
|
|
23314
23323
|
}
|
|
23315
23324
|
render() {
|
|
23316
23325
|
var _a;
|
|
23317
|
-
return (hAsync(Host, { key: '
|
|
23326
|
+
return (hAsync(Host, { key: '7c3bfca68882e39705e9640f76754cce2e5d6c6a' }, hAsync("textarea", { key: '4d24f4b914f7f118efde2144e7597e0767d59ce8', placeholder: "Certificate DER or PEM", class: "textarea t-b2 c-black", ref: (el) => { this.inputPaste = el; }, onDrop: this.handleDropFile }), hAsync("div", { key: '06ba6e2b5658225a585ec9711e6f3f945ef3a840', class: "controls" }, hAsync("div", { key: 'df2e115ea04d4eae7985f6ee57bfe47354f50240', class: "control_row" }, hAsync(Typography, { key: '05c30b2956055455cdb1f52b40995752dd0d7da4', variant: "b3", color: "secondary-tint-2" }, "Drag or load file:"), hAsync("input", { key: 'cca59d7c59d9917e728f9795bcfbd546d4cf75b8', type: "file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl", onChange: this.handleChangeInputFile, value: "" })), ((_a = this.certificateExamples) === null || _a === void 0 ? void 0 : _a.length) && (hAsync("div", { class: "control_row" }, hAsync(Typography, { variant: "b3", color: "secondary-tint-2" }, "Load examples:"), hAsync("select", { onChange: this.handleChangeExample }, hAsync("option", { value: "" }, "None"), this.certificateExamples.map((example) => (hAsync("option", { value: example.value }, example.title)))))), hAsync("div", { key: '6d1f010e03d7836459214e5c0abe1af7fbbe2a10', class: "control_row" }, hAsync(Button, { key: '4038db36b62ff11f592f380f5c98bebb0014585e', onClick: this.handleClickDecode }, "Decode"), hAsync(Button, { key: 'fb7c30e61b10194b5f02a2cefa06191904f5ce46', onClick: this.handleClickClear }, "Clear"))), this.certificateDecoded instanceof X509Certificate && (hAsync("peculiar-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof X509AttributeCertificate && (hAsync("peculiar-attribute-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof Pkcs10CertificateRequest && (hAsync("peculiar-csr-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof X509Crl && (hAsync("peculiar-crl-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true }))));
|
|
23318
23327
|
}
|
|
23319
23328
|
static get style() { return PeculiarCertificateDecoderStyle0; }
|
|
23320
23329
|
static get cmpMeta() { return {
|