@peculiar/certificates-viewer 3.3.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{certification_request-50ce61b3.js → certification_request-b5fe8a57.js} +6 -6
- package/dist/cjs/{crl-0c15e04a.js → crl-a1ac7534.js} +11 -2
- package/dist/cjs/{l10n-4eaa5263.js → l10n-17c96aba.js} +5 -3
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +23 -8
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -3
- package/dist/cjs/{public_key-2b73778a.js → public_key-3d4ae164.js} +2 -2
- package/dist/cjs/{x509_certificate-c94ce29e.js → x509_certificate-29a3636a.js} +2 -2
- package/dist/collection/components/crl-viewer/crl-viewer.js +1 -1
- package/dist/collection/components/crl-viewer/revoked_certificates.js +20 -3
- package/dist/collection/crypto/crl.js +9 -0
- package/dist/collection/locales/en.json +3 -2
- package/dist/esm/{certification_request-5b5c2fa2.js → certification_request-35ade000.js} +2 -2
- package/dist/esm/{crl-10d4db54.js → crl-42d5e233.js} +11 -2
- package/dist/esm/{l10n-116c79fa.js → l10n-a68d5748.js} +5 -3
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +23 -8
- package/dist/esm/peculiar-certificate-decoder.entry.js +4 -4
- package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm/{public_key-c1e6801e.js → public_key-b2dba162.js} +2 -2
- package/dist/esm/{x509_certificate-61126913.js → x509_certificate-2503dcc1.js} +2 -2
- package/dist/peculiar/locales/en.json +3 -2
- package/dist/peculiar/p-1a8379f0.entry.js +26 -0
- package/dist/peculiar/{p-7ef69178.entry.js → p-3d0fdbd5.entry.js} +1 -1
- package/dist/peculiar/{p-53aac672.js → p-54171e39.js} +3 -3
- package/dist/peculiar/{p-5a898f51.js → p-6cd6e6da.js} +5 -5
- package/dist/peculiar/{p-318a1e9f.entry.js → p-7a0fb5a8.entry.js} +1 -1
- package/dist/peculiar/{p-652f77d0.entry.js → p-870c3592.entry.js} +1 -1
- package/dist/peculiar/{p-bbf0fd6c.js → p-a5d07697.js} +2 -2
- package/dist/peculiar/{p-309fdd02.js → p-b7045733.js} +1 -1
- package/dist/peculiar/{p-10aa0b03.entry.js → p-cb9b9f9c.entry.js} +2 -2
- package/dist/peculiar/{p-ed58acd0.js → p-fec9d812.js} +2 -2
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/crl-viewer/revoked_certificates.d.ts +2 -2
- package/dist/types/crypto/crl.d.ts +7 -1
- package/dist/types/utils/l10n.d.ts +2 -1
- package/package.json +2 -2
- package/dist/peculiar/p-ff867be1.entry.js +0 -26
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{h as t,r as e,H as i}from"./p-f7683ba5.js";import{Q as a,S as r,y as s,W as n,I as d,T as o,V as l,U as h,t as c,X as p,Y as b}from"./p-a5d07697.js";import{b as g}from"./p-cff9655c.js";import{l as u,a as m}from"./p-fec9d812.js";import{X as x,a as v,C as f}from"./p-6cd6e6da.js";import{g as w,R as y,G as k,a as L,B as I,S,T as _,b as A,c as N,d as j,E as K,M as D,I as C,e as E,P}from"./p-54171e39.js";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const z=(e,i)=>{const{attribute:a}=e;return[t(y,{name:"Name",value:w(a.asn.type)}),i,t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]},T=e=>{const{name:i}=e;return i?i.map((e=>e.map((e=>t(y,{name:a[e.type]||e.type,value:e.value.toString()}))))):null},H=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(T,{name:i.value}))},V=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Code Authority",value:""}),t(k,{generalName:i.value.codeAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Code Id",value:""}),t(k,{generalName:i.value.codeId,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Short Name",value:i.value.shortName}),t(y,{name:"Short Description",value:i.value.shortDescription}))},$=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Assessment Authority",value:""}),t(k,{generalName:i.value.assessmentAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Assessment Location",value:""}),t(k,{generalName:i.value.assessmentLocation,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Assessment Ref",value:""}),t(k,{generalName:i.value.assessmentRef,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Data Storage Territory",value:i.value.dataStorageTerritory}),t(y,{name:"Description",value:i.value.description}))},O=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:`${i.value.base} * 10^${i.value.degree} ${i.value.location}`}))},q=e=>{const{attribute:i}=e;return t(z,{attribute:i},Object.keys(i.value).map((e=>t(y,{name:e,value:i.value[e].toNumber()?u.getString("yes"):u.getString("no")}))))},R=t=>{let e=1;return t/100>1?e=100:t/10>1&&(e=10),`${t}/${5*e}`},W=e=>{const{attribute:i}=e,a=Object.keys(i.value).map((e=>[R(i.value[e]),t("br",null)]));return t(z,{attribute:i},t(y,{name:"Value",value:a}))},X=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:i.value,monospace:!0}))},B=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:i.value.utf8String}))},G=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:i.value.toString()}))},M=e=>{const{attributes:i}=e;return i&&i.length?[t(L,{value:"Attributes"}),i.map((e=>{try{return t(e.value instanceof r?H:e.value instanceof s?V:e.value instanceof n?$:e.value instanceof d?O:e.value instanceof o?q:e.value instanceof l?W:e.value instanceof h?B:e.value instanceof c?G:"string"==typeof e.value?X:z,{attribute:e})}catch(t){return console.error("Error render attribute:",e.asn.type),null}}))]:null},Q=e=>{const{issuer:i}=e;return i?[t(L,{value:u.getString("issuer")}),i.map((e=>t(k,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""})))]:null},U=e=>{const{holder:i}=e;if(!i)return null;const{baseCertificateID:a,objectDigestInfo:r}=i;return[t(L,{value:u.getString("holder")}),a&&[a.issuer.map((e=>t(k,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""}))),t("tr",null,t("td",null),t("td",null)),t(y,{name:u.getString("serialNumber"),value:g.Convert.ToHex(a.serial),monospace:!0}),t("tr",null,t("td",null),t("td",null))],r&&[t(y,{name:u.getString("digestInfo"),value:""}),t(y,{name:u.getString("algorithm"),value:w(r.digestAlgorithm.algorithm)}),t(y,{name:u.getString("value"),value:g.Convert.ToHex(r.objectDigest),monospace:!0}),t(y,{name:u.getString("type"),value:r.digestedObjectType})]]},Y=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof x)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new x(t)}this.certificateDecoded.parseExtensions(),this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof x&&e instanceof x&&t.serialNumber!==e.serialNumber&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this attribute certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no attribute certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,null,t("table",null,t(I,Object.assign({},this.certificateDecoded)),t(Q,{issuer:this.certificateDecoded.issuer}),t(U,{holder:this.certificateDecoded.holder}),t(S,{signature:this.certificateDecoded.signature}),t(_,{thumbprints:this.certificateDecoded.thumbprints}),t(M,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(K,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(D,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/Y.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/
|
|
26
|
+
const F=e=>{const{revokedCertificates:i}=e;return i&&i.length?[t(L,{value:u.getString("revokedCertificates")}),i.map((e=>[t(y,{name:u.getString("serialNumber"),value:g.Convert.ToHex(e.userCertificate),monospace:!0}),t(y,{name:u.getString("revocationDate"),value:m(e.revocationDate.getTime())}),e.crlEntryExtensions&&e.crlEntryExtensions.length&&[t(y,{name:`${u.getString("crlEntryExtensions")}:`,value:""}),e.crlEntryExtensions.map((e=>t(y,e.value instanceof p?{name:w(e.asn.extnID),value:e.value.toJSON()||e.value.reason}:e.value instanceof b?{name:w(e.asn.extnID),value:e.value.value.getTime()}:{name:w(e.asn.extnID),value:g.Convert.ToHex(e.asn.extnValue),monospace:!0})))],t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]))]:null},J=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof v)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new v(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}getIssuerDnLink(){return this.issuerDnLink}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof v&&e instanceof v&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate revocation list."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate revocation list available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,{"data-view":this.view},t("table",null,t(I,Object.assign({},this.certificateDecoded)),t(C,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(S,{signature:this.certificateDecoded.signature}),t(_,{thumbprints:this.certificateDecoded.thumbprints}),t(K,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink}),t(F,{revokedCertificates:this.certificateDecoded.revokedCertificates}),this.download&&t(D,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};J.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";const Z=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>t,this.getAuthKeyIdSiblingsLink=t=>t,this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof f)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new f(t)}this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof f&&e instanceof f&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate request."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate request available."))}getExtensionRequestAttribute(){if(this.certificateDecoded)return this.certificateDecoded.attributes.find((t=>"1.2.840.113549.1.9.14"===t.asn.type))}render(){if(this.certificateDecodeError)return this.renderErrorState();if(!this.certificateDecoded)return this.renderEmptyState();const e=this.getExtensionRequestAttribute();return t(i,{"data-view":this.view},t("table",null,t(I,Object.assign({},this.certificateDecoded)),t(E,{name:this.certificateDecoded.subject}),t(P,{publicKey:this.certificateDecoded.publicKey}),t(S,{signature:this.certificateDecoded.signature}),t(_,{thumbprints:this.certificateDecoded.thumbprints}),t(M,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(K,{extensions:null==e?void 0:e.value,title:"Extension Request",getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(D,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};Z.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{Y as peculiar_attribute_certificate_viewer,J as peculiar_crl_viewer,Z as peculiar_csr_viewer}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-
|
|
4
|
+
import{r as t,h as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-b7045733.js";import"./p-a5d07697.js";import"./p-cff9655c.js";import"./p-fec9d812.js";import{B as r,e as d,I as s,P as o,S as n,T as l,E as p,b as h,c,d as b,M as g}from"./p-54171e39.js";const x=class{constructor(i){t(this,i),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var i;return null===(i=this.authKeyIdParentLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var i;return null===(i=this.authKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var i;return null===(i=this.subjectKeyIdChildrenLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var i;return null===(i=this.subjectKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof a)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new a(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,i){"string"!=typeof t||"string"!=typeof i?t instanceof a&&i instanceof a&&t.serialNumber!==i.serialNumber&&this.decodeCertificate(t):t!==i&&this.decodeCertificate(t)}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))}renderEmptyState(){return i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?i(e,{"data-view":this.view},i("table",null,i(r,Object.assign({},this.certificateDecoded)),i(d,{name:this.certificateDecoded.subject}),i(s,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),i(o,{publicKey:this.certificateDecoded.publicKey}),i(n,{signature:this.certificateDecoded.signature}),i(l,{thumbprints:this.certificateDecoded.thumbprints}),i(p,{extensions:this.certificateDecoded.extensions,getLEILink:h,getDNSNameLink:c,getIPAddressLink:b,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&i(g,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};x.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{x as peculiar_certificate_viewer}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{h as e}from"./p-f7683ba5.js";import{b as a}from"./p-cff9655c.js";import{l as n,a as c}from"./p-
|
|
4
|
+
import{h as e}from"./p-f7683ba5.js";import{b as a}from"./p-cff9655c.js";import{l as n,a as c}from"./p-fec9d812.js";import{Q as t,S as o,Z as s,p as f,_ as i,$ as d,a0 as b,a1 as r,a2 as l,a3 as u,a4 as m,a5 as v,a6 as x,a7 as g,a8 as p,a9 as y,aa as C,ab as h,ac as N,ad as S,ae as A,af as D,ag as I,ah as G,ai as j,aj as T,ak as O,al as k,am as $,an as P,X as L,ao as V,ap as R,aq as U,ar as E,as as K,at as H,au as X,av as M,aw as Y,ax as _}from"./p-a5d07697.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -38,7 +38,7 @@ function Ne(e){return a.Convert.ToString(e.values[0])}
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const Se=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Attribute #${n+1}`,value:""}),e(w,{name:"Type",value:q(a.type)}),e(w,{name:"Value",value:Ne(a)})])))},Ae=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Value",value:n.value,monospace:!0}))},De=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Not Before",value:c(n.value.notBefore)}),e(w,{name:"Not After",value:c(n.value.notAfter)}))},Ie=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.entrustVers}),e(w,{name:"Info Flags",value:n.value.entrustInfoFlags.toJSON().join(", ")}))},Ge=n=>{const{extension:c}=n;return e(Z,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Biometric #${c+1}`,value:""}),e(w,{name:"OID",value:q(n.typeOfBiometricData.biometricDataOid)}),e(w,{name:"Type",value:n.typeOfBiometricData.predefinedBiometricType}),e(w,{name:"Algorithm",value:q(n.hashAlgorithm.algorithm)}),e(w,{name:"Hash",value:a.Convert.ToHex(n.biometricDataHash.buffer),monospace:!0}),e(w,{name:"Source Uri",value:n.sourceDataUri})])))},je=n=>{const{extension:c}=n,t=n=>n?n.map((n=>{const{imageDetails:c}=n;return[e(w,{name:"Image Type",value:c.mediaType}),e(w,{name:"Image Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Image URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Image Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,o=n=>n?n.map((n=>{const{audioDetails:c}=n;return[e(w,{name:"Audio Type",value:c.mediaType}),e(w,{name:"Audio Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Audio URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Audio Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,s=(a,n)=>{if(!n||!n.direct)return null;const{image:c,audio:s}=n.direct;return[e(w,{name:"Type",value:a}),t(c),o(s),e("tr",null,e("td",null),e("td",null))]};return e(Z,{extension:c},s("Subject",c.value.subjectLogo),s("Issuer",c.value.issuerLogo))},Te=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Entry #${n+1}`,value:""}),e(w,{name:"SPC",value:a.spc}),e(w,{name:"Range",value:a.range?`start=${a.range.start} count==${a.range.count}`:null}),e(w,{name:"One",value:a.one})])))},Oe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.requireExplicitPolicy&&e(w,{name:"Require Explicit Policy",value:r.toASN(n.value.requireExplicitPolicy).valueBlock.toString()}),n.value.inhibitPolicyMapping&&e(w,{name:"Inhibit Policy Mapping",value:r.toASN(n.value.inhibitPolicyMapping).valueBlock.toString()}))},ke=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"Issuer Domain",value:q(a.issuerDomainPolicy)}),e(w,{name:"Subject Domain",value:q(a.subjectDomainPolicy)})])))},$e=a=>{const{extension:c}=a;return e(Z,{extension:c},e(w,{name:n.getString("value"),value:c.value.value}))},Pe=a=>{var c;const{extension:t}=a;return e(Z,{extension:t},null===(c=t.value.distributionPoint)||void 0===c?void 0:c.fullName.map((n=>e(F,Object.assign({generalName:n},a)))),t.value.onlySomeReasons&&e(w,{name:n.getString("onlyReasons"),value:t.value.onlySomeReasons.toJSON().join(", ")}),t.value.indirectCRL&&e(w,{name:n.getString("indirectCRL"),value:n.getString("yes")}),t.value.onlyContainsUserCerts&&e(w,{name:n.getString("onlyUserCertificates"),value:n.getString("yes")}),t.value.onlyContainsAttributeCerts&&e(w,{name:n.getString("onlyAttributeCertificates"),value:n.getString("yes")}),t.value.onlyContainsCACerts&&e(w,{name:n.getString("onlyCACertificates"),value:n.getString("yes")}))},Le=a=>{const{extensions:n,title:c}=a;return n&&n.length?[e(B,{value:c||"Extensions"}),n.map((n=>{try{return n.value instanceof l?e(J,{extension:n}):n.value instanceof u?e(ee,{extension:n}):n.value instanceof m?e(ae,{extension:n}):n.value instanceof v?e(ne,Object.assign({extension:n},a)):n.value instanceof x?e(ce,Object.assign({extension:n},a)):n.value instanceof g?e(te,Object.assign({extension:n},a)):n.value instanceof p||n.value instanceof y?e(oe,Object.assign({extension:n},a)):n.value instanceof C?e(se,Object.assign({extension:n},a)):n.value instanceof h?e(fe,{extension:n}):n.value instanceof N?e(de,{extension:n}):n.value instanceof S?e(be,Object.assign({extension:n},a)):n.value instanceof A?e(re,{extension:n}):n.value instanceof D?e(le,{extension:n}):n.value instanceof I?e(ue,{extension:n}):n.value instanceof G?e(me,{extension:n}):n.value instanceof j?e(ve,{extension:n}):n.value instanceof T?e(xe,{extension:n}):n.value instanceof O?e(ge,{extension:n}):n.value instanceof k?e(pe,Object.assign({extension:n},a)):n.value instanceof $?e(ye,Object.assign({extension:n},a)):n.value instanceof P?e(Ce,{extension:n}):n.value instanceof L?e(he,{extension:n}):n.value instanceof V?e(Se,{extension:n}):n.value instanceof R?e(De,{extension:n}):n.value instanceof U?e(Ie,{extension:n}):n.value instanceof E?e(Ge,{extension:n}):n.value instanceof K?e(je,{extension:n}):n.value instanceof H?e(Te,{extension:n}):n.value instanceof X?e(Oe,{extension:n}):n.value instanceof
|
|
41
|
+
*/const Se=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Attribute #${n+1}`,value:""}),e(w,{name:"Type",value:q(a.type)}),e(w,{name:"Value",value:Ne(a)})])))},Ae=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Value",value:n.value,monospace:!0}))},De=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Not Before",value:c(n.value.notBefore)}),e(w,{name:"Not After",value:c(n.value.notAfter)}))},Ie=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.entrustVers}),e(w,{name:"Info Flags",value:n.value.entrustInfoFlags.toJSON().join(", ")}))},Ge=n=>{const{extension:c}=n;return e(Z,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Biometric #${c+1}`,value:""}),e(w,{name:"OID",value:q(n.typeOfBiometricData.biometricDataOid)}),e(w,{name:"Type",value:n.typeOfBiometricData.predefinedBiometricType}),e(w,{name:"Algorithm",value:q(n.hashAlgorithm.algorithm)}),e(w,{name:"Hash",value:a.Convert.ToHex(n.biometricDataHash.buffer),monospace:!0}),e(w,{name:"Source Uri",value:n.sourceDataUri})])))},je=n=>{const{extension:c}=n,t=n=>n?n.map((n=>{const{imageDetails:c}=n;return[e(w,{name:"Image Type",value:c.mediaType}),e(w,{name:"Image Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Image URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Image Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,o=n=>n?n.map((n=>{const{audioDetails:c}=n;return[e(w,{name:"Audio Type",value:c.mediaType}),e(w,{name:"Audio Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Audio URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Audio Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,s=(a,n)=>{if(!n||!n.direct)return null;const{image:c,audio:s}=n.direct;return[e(w,{name:"Type",value:a}),t(c),o(s),e("tr",null,e("td",null),e("td",null))]};return e(Z,{extension:c},s("Subject",c.value.subjectLogo),s("Issuer",c.value.issuerLogo))},Te=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Entry #${n+1}`,value:""}),e(w,{name:"SPC",value:a.spc}),e(w,{name:"Range",value:a.range?`start=${a.range.start} count==${a.range.count}`:null}),e(w,{name:"One",value:a.one})])))},Oe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.requireExplicitPolicy&&e(w,{name:"Require Explicit Policy",value:r.toASN(n.value.requireExplicitPolicy).valueBlock.toString()}),n.value.inhibitPolicyMapping&&e(w,{name:"Inhibit Policy Mapping",value:r.toASN(n.value.inhibitPolicyMapping).valueBlock.toString()}))},ke=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"Issuer Domain",value:q(a.issuerDomainPolicy)}),e(w,{name:"Subject Domain",value:q(a.subjectDomainPolicy)})])))},$e=a=>{const{extension:c}=a;return e(Z,{extension:c},e(w,{name:n.getString("value"),value:c.value.value}))},Pe=a=>{var c;const{extension:t}=a;return e(Z,{extension:t},null===(c=t.value.distributionPoint)||void 0===c?void 0:c.fullName.map((n=>e(F,Object.assign({generalName:n},a)))),t.value.onlySomeReasons&&e(w,{name:n.getString("onlyReasons"),value:t.value.onlySomeReasons.toJSON().join(", ")}),t.value.indirectCRL&&e(w,{name:n.getString("indirectCRL"),value:n.getString("yes")}),t.value.onlyContainsUserCerts&&e(w,{name:n.getString("onlyUserCertificates"),value:n.getString("yes")}),t.value.onlyContainsAttributeCerts&&e(w,{name:n.getString("onlyAttributeCertificates"),value:n.getString("yes")}),t.value.onlyContainsCACerts&&e(w,{name:n.getString("onlyCACertificates"),value:n.getString("yes")}))},Le=a=>{const{extensions:n,title:c}=a;return n&&n.length?[e(B,{value:c||"Extensions"}),n.map((n=>{try{return n.value instanceof l?e(J,{extension:n}):n.value instanceof u?e(ee,{extension:n}):n.value instanceof m?e(ae,{extension:n}):n.value instanceof v?e(ne,Object.assign({extension:n},a)):n.value instanceof x?e(ce,Object.assign({extension:n},a)):n.value instanceof g?e(te,Object.assign({extension:n},a)):n.value instanceof p||n.value instanceof y?e(oe,Object.assign({extension:n},a)):n.value instanceof C?e(se,Object.assign({extension:n},a)):n.value instanceof h?e(fe,{extension:n}):n.value instanceof N?e(de,{extension:n}):n.value instanceof S?e(be,Object.assign({extension:n},a)):n.value instanceof A?e(re,{extension:n}):n.value instanceof D?e(le,{extension:n}):n.value instanceof I?e(ue,{extension:n}):n.value instanceof G?e(me,{extension:n}):n.value instanceof j?e(ve,{extension:n}):n.value instanceof T?e(xe,{extension:n}):n.value instanceof O?e(ge,{extension:n}):n.value instanceof k?e(pe,Object.assign({extension:n},a)):n.value instanceof $?e(ye,Object.assign({extension:n},a)):n.value instanceof P?e(Ce,{extension:n}):n.value instanceof L?e(he,{extension:n}):n.value instanceof V?e(Se,{extension:n}):n.value instanceof R?e(De,{extension:n}):n.value instanceof U?e(Ie,{extension:n}):n.value instanceof E?e(Ge,{extension:n}):n.value instanceof K?e(je,{extension:n}):n.value instanceof H?e(Te,{extension:n}):n.value instanceof X?e(Oe,{extension:n}):n.value instanceof M?e(ke,{extension:n}):n.value instanceof Y?e($e,{extension:n}):n.value instanceof _?e(Pe,Object.assign({extension:n},a)):e("string"==typeof n.value?Ae:Z,{extension:n})}catch(e){return console.error("Error render extension:",n.asn.extnID),null}}))]:null},Ve=a=>{const{serialNumber:t,version:o,validity:s,notBefore:f,notAfter:i,lastUpdate:d,nextUpdate:b,type:r}=a;return[e(B,{value:n.getString("basicInformation")}),e(w,{name:n.getString("type"),value:r}),e(w,{name:n.getString("serialNumber"),value:t,monospace:!0}),e(w,{name:n.getString("version"),value:o}),e(w,{name:n.getString("validity"),value:s}),e(w,{name:n.getString("issued"),value:f?c(f):void 0}),e(w,{name:n.getString("expired"),value:i?c(i):void 0}),e(w,{name:n.getString("lastUpdate"),value:d?c(d):void 0}),e(w,{name:n.getString("nextUpdate"),value:b?c(b):void 0})]},Re=a=>{const{certificate:c}=a;return[e(B,{value:n.getString("miscellaneous")}),e("tr",null,e("td",{class:"vertical_align_middle"},e("peculiar-typography",{color:"grey_5"},n.getString("download"),":")),e("td",null,e("peculiar-button-split",{onClick:()=>c.downloadAsPEM(),actions:[{text:n.getString("download.der"),onClick:()=>c.downloadAsDER()}]},n.getString("download.pem"))))]},Ue=e=>`https://search.gleif.org/#/record/${e}`,Ee=e=>`https://search.censys.io/search?resource=hosts&q=dns.names%3A${e}`,Ke=e=>`https://search.censys.io/search?resource=hosts&q=ip%3A${e}`
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -60,4 +60,4 @@ function Ne(e){return a.Convert.ToString(e.values[0])}
|
|
|
60
60
|
* This source code is licensed under the MIT license found in the
|
|
61
61
|
* LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
function
|
|
63
|
+
function Me(e){var a;if(null===(a=e.params)||void 0===a?void 0:a.modulus){let a=e.params.modulus.byteLength;return a%2&&(a-=1),8*a}return null}function Ye(e){var a;return(null===(a=e.params)||void 0===a?void 0:a.publicExponent)?3===e.params.publicExponent.byteLength?65537:3:null}const _e=c=>{var t;const{publicKey:o}=c;return o?[e(B,{value:n.getString("publicKeyInfo")}),e(w,{name:n.getString("algorithm"),value:q(o.algorithm)}),e(w,{name:n.getString("namedCurve"),value:q(null===(t=o.params)||void 0===t?void 0:t.namedCurve)}),e(w,{name:n.getString("exponent"),value:Ye(o)}),e(w,{name:n.getString("modulus"),value:Me(o)}),e(w,{name:n.getString("value"),value:a.Convert.ToHex(o.value),monospace:!0,collapse:!0})]:null};export{Ve as B,Le as E,F as G,He as I,Re as M,_e as P,w as R,W as S,Q as T,B as a,Ue as b,Ee as c,Ke as d,Xe as e,q as g}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{A as t,n as s,o as e,p as
|
|
4
|
+
import{A as t,n as s,o as e,p as r,q as i,E as a,f as n,r as o,U as h,s as c,t as u,u as l,V as m,v as E,I as g,w as p,W as A,x as d,y as f,z as b,T as w,B as x,D as C,F as T,G as R,H as I,J as v,K as k,L as N,e as F,M as y,m as B,k as D,l as P,O as H,N as L,g as S,h as j,j as U,R as X,P as q}from"./p-a5d07697.js";import{b as G,D as K}from"./p-cff9655c.js";import{d as M}from"./p-fec9d812.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
|
-
*/class $ extends t{constructor(t){super(t,s);const F=this.getAsnExtnValue();switch(this.asn.type){case
|
|
11
|
+
*/class $ extends t{constructor(t){super(t,s);const F=this.getAsnExtnValue();switch(this.asn.type){case k:this.value=r.parse(F,N);break;case I:this.value=r.parse(F,v);break;case T:this.value=r.parse(F,R);break;case x:this.value=r.parse(F,C);break;case b:this.value=r.parse(F,w);break;case d:this.value=r.parse(F,f);break;case p:this.value=r.parse(F,A);break;case E:this.value=r.parse(F,g);break;case l:this.value=r.parse(F,m);break;case c:this.value=r.parse(F,u);break;case o:this.value=r.parse(F,h);break;case e:{const t=r.parse(F,i);this.value=t.map((t=>new a(n.serialize(t))));break}default:this.value=G.Convert.ToHex(F)}}getAsnExtnValue(){return this.asn.values[0]}}
|
|
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 O extends t{constructor(t){var s;super(F(t),
|
|
18
|
+
*/class O extends t{constructor(t){var s;super(F(t),y),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:e}=this.asn;this.serialNumber=G.Convert.ToHex(e.serialNumber),this.version=e.version;const r=e.attrCertValidityPeriod.notBeforeTime;if(!r)throw new Error("Cannot get 'notBefore' value");this.notBefore=r;const i=e.attrCertValidityPeriod.notAfterTime;if(!i)throw new Error("Cannot get 'notAfter' value");this.notAfter=i,this.validity=M(this.notBefore,this.notAfter),this.issuer=e.issuer.v1Form||(null===(s=e.issuer.v2Form)||void 0===s?void 0:s.issuerName),this.holder=e.holder}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}parseExtensions(){const{acinfo:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new a(n.serialize(t)))))}parseAttributes(){const{acinfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${P(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}downloadAsPEM(t){K.attrCert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.attrCert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/class V extends t{constructor(t){super(F(t),H),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new L(s.subject).toJSON(),this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let e;return s.algorithm===S&&s.parameters&&(e=n.parse(s.parameters,j)),s.algorithm===U&&(e=n.parse(t,X)),{params:e,value:n.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}async getThumbprint(t="SHA-1"){try{const s=await
|
|
25
|
+
*/class V extends t{constructor(t){super(F(t),H),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new L(s.subject).toJSON(),this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let e;return s.algorithm===S&&s.parameters&&(e=n.parse(s.parameters,j)),s.algorithm===U&&(e=n.parse(t,X)),{params:e,value:n.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}parseAttributes(){const{certificationRequestInfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${P(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}downloadAsPEM(t){K.csr.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.csr.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license found in the
|
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/class Q extends t{constructor(t){super(F(t),q),this.thumbprints={},this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new L(s.issuer).toJSON(),this.version=s.version+1,this.lastUpdate=s.thisUpdate.getTime(),this.nextUpdate=s.nextUpdate.getTime()}async getThumbprint(t="SHA-1"){try{const s=await
|
|
32
|
+
*/class Q extends t{constructor(t){super(F(t),q),this.thumbprints={},this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new L(s.issuer).toJSON(),this.version=s.version+1,this.lastUpdate=s.thisUpdate.getTime(),this.nextUpdate=s.nextUpdate.getTime(),this.revokedCertificates=(s.revokedCertificates||[]).map((t=>{var s;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:null===(s=t.crlEntryExtensions)||void 0===s?void 0:s.map((t=>new a(n.serialize(t))))}}))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}parseExtensions(){const{tbsCertList:t}=this.asn;t.crlExtensions&&(this.extensions=t.crlExtensions.map((t=>new a(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN X509 CRL-----\n${P(this.exportAsBase64())}\n-----END X509 CRL-----`}downloadAsPEM(t){K.crl.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.crl.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{V as C,O as X,Q as a}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{X as a}from"./p-309fdd02.js";import{Q as i}from"./p-bbf0fd6c.js";import"./p-cff9655c.js";import{l}from"./p-ed58acd0.js";const s=class{constructor(e){t(this,e),this.detailsOpen=r(this,"detailsOpen",7),this.detailsClose=r(this,"detailsClose",7),this.certificates=[],this.filterWithSearch=!0,this.highlightWithSearch=!0,this.search="",this.certificatesDecoded=[],this.isDecodeInProcess=!0,this.isHasTests=!1,this.isHasRoots=!1,this.handleClickDetails=(t,r)=>{r.stopPropagation(),this.certificateSelectedForDetails=t,this.detailsOpen.emit(t)},this.handleModalClose=()=>{this.certificateSelectedForDetails=void 0,this.detailsClose.emit()},this.handleSearch=t=>{this.search=t.target.value.trim()}}componentWillLoad(){this.certificatesDecodeAndSet()}watchCertificates(t,r){JSON.stringify(t)!==JSON.stringify(r)&&this.certificatesDecodeAndSet()}async certificatesDecodeAndSet(){let t=!1,r=!1;if(!Array.isArray(this.certificates))return;const e=[];for(const o of this.certificates)try{const i=new a(o.value);await i.getThumbprint("SHA-1"),e.push({body:i,tests:o.tests,name:o.name}),!r&&i.isRoot&&(r=!0),t||o.tests&&(o.tests.expired||o.tests.revoked||o.tests.valid)&&(t=!0)}catch(t){console.error("Error certificate parse:",t)}this.isHasTests=t,this.isHasRoots=r,this.isDecodeInProcess=!1,this.certificatesDecoded=e}handleClickDownloadAsPem(t,r){r.stopPropagation(),t.body.downloadAsPEM(t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),t.body.downloadAsDER(t.name||t.body.commonName)}handleClickRow(t){this.expandedRow=this.expandedRow===t?void 0:t}getMaxColSpanValue(){let t=4;return this.isHasTests&&(t+=1),this.isHasRoots||(t+=1),t}renderExpandedRow(t){const r=this.getMaxColSpanValue();return e("tr",{class:"expanded_summary"},e("td",{colSpan:r},e("peculiar-certificate-summary",{certificate:t,showIssuer:!t.isRoot})))}renderCertificateTests(t){if(!t)return null;const r=[];return t.valid&&r.push(e("peculiar-button",{class:"button_table_action",href:t.valid,target:"_blank"},l.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},l.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},l.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const s=a===this.expandedRow,c=i[o.body.signature.algorithm]||o.body.signature.algorithm;this.filterWithSearch&&this.search&&-1===[c,o.body.issuerCommonName,o.name,o.body.commonName,o.body.thumbprints["SHA-1"]].join(" ").toLowerCase().indexOf(this.search.toLowerCase())||r.push([e("tr",{class:{expanded:s},onClick:this.handleClickRow.bind(this,a),key:o.body.thumbprints["SHA-1"]},!this.isHasRoots&&e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("issuer"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.body.issuerCommonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("name"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.name||o.body.commonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("publicKey"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},c))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("fingerprint")," (SHA-1):"),e("peculiar-typography",{class:"content",monospace:!0},e("peculiar-highlight-words",{search:t},o.body.thumbprints["SHA-1"]))),e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},l.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:l.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},l.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),s&&this.renderExpandedRow(o.body)])})),r}renderCertificateDetailsModal(){return this.certificateSelectedForDetails?e("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},e("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),e("div",{class:"modal_container",role:"dialog",part:"presentation_container"},e("header",{class:"modal_title"},e("peculiar-typography",{type:"h4"},l.getString("certificateDetails")),e("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},e("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),e("div",{class:"modal_content"},e("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails})))):null}renderSearch(){return this.filterWithSearch||this.highlightWithSearch?e("div",{class:"search_section"},e("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"})):null}renderEmptyState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))}renderEmptySearchState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))}renderLoadingState(){return e("div",{class:"loading_container"},e("peculiar-circular-progress",null))}renderBody(){if(this.isDecodeInProcess)return null;if(!this.certificatesDecoded.length)return this.renderEmptyState();const t=this.renderContentState();return this.search&&!t.length?this.renderEmptySearchState():t}render(){return e(o,null,this.renderSearch(),e("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},e("thead",null,e("tr",null,!this.isHasRoots&&e("th",{class:"col_issuer"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("fingerprint")," (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("testURLs"))))),e("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};s.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';export{s as peculiar_certificates_viewer}
|
|
4
|
+
import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{X as a}from"./p-b7045733.js";import{Q as i}from"./p-a5d07697.js";import"./p-cff9655c.js";import{l}from"./p-fec9d812.js";const s=class{constructor(e){t(this,e),this.detailsOpen=r(this,"detailsOpen",7),this.detailsClose=r(this,"detailsClose",7),this.certificates=[],this.filterWithSearch=!0,this.highlightWithSearch=!0,this.search="",this.certificatesDecoded=[],this.isDecodeInProcess=!0,this.isHasTests=!1,this.isHasRoots=!1,this.handleClickDetails=(t,r)=>{r.stopPropagation(),this.certificateSelectedForDetails=t,this.detailsOpen.emit(t)},this.handleModalClose=()=>{this.certificateSelectedForDetails=void 0,this.detailsClose.emit()},this.handleSearch=t=>{this.search=t.target.value.trim()}}componentWillLoad(){this.certificatesDecodeAndSet()}watchCertificates(t,r){JSON.stringify(t)!==JSON.stringify(r)&&this.certificatesDecodeAndSet()}async certificatesDecodeAndSet(){let t=!1,r=!1;if(!Array.isArray(this.certificates))return;const e=[];for(const o of this.certificates)try{const i=new a(o.value);await i.getThumbprint("SHA-1"),e.push({body:i,tests:o.tests,name:o.name}),!r&&i.isRoot&&(r=!0),t||o.tests&&(o.tests.expired||o.tests.revoked||o.tests.valid)&&(t=!0)}catch(t){console.error("Error certificate parse:",t)}this.isHasTests=t,this.isHasRoots=r,this.isDecodeInProcess=!1,this.certificatesDecoded=e}handleClickDownloadAsPem(t,r){r.stopPropagation(),t.body.downloadAsPEM(t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),t.body.downloadAsDER(t.name||t.body.commonName)}handleClickRow(t){this.expandedRow=this.expandedRow===t?void 0:t}getMaxColSpanValue(){let t=4;return this.isHasTests&&(t+=1),this.isHasRoots||(t+=1),t}renderExpandedRow(t){const r=this.getMaxColSpanValue();return e("tr",{class:"expanded_summary"},e("td",{colSpan:r},e("peculiar-certificate-summary",{certificate:t,showIssuer:!t.isRoot})))}renderCertificateTests(t){if(!t)return null;const r=[];return t.valid&&r.push(e("peculiar-button",{class:"button_table_action",href:t.valid,target:"_blank"},l.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},l.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},l.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const s=a===this.expandedRow,c=i[o.body.signature.algorithm]||o.body.signature.algorithm;this.filterWithSearch&&this.search&&-1===[c,o.body.issuerCommonName,o.name,o.body.commonName,o.body.thumbprints["SHA-1"]].join(" ").toLowerCase().indexOf(this.search.toLowerCase())||r.push([e("tr",{class:{expanded:s},onClick:this.handleClickRow.bind(this,a),key:o.body.thumbprints["SHA-1"]},!this.isHasRoots&&e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("issuer"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.body.issuerCommonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("name"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.name||o.body.commonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("publicKey"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},c))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("fingerprint")," (SHA-1):"),e("peculiar-typography",{class:"content",monospace:!0},e("peculiar-highlight-words",{search:t},o.body.thumbprints["SHA-1"]))),e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},l.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:l.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},l.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),s&&this.renderExpandedRow(o.body)])})),r}renderCertificateDetailsModal(){return this.certificateSelectedForDetails?e("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},e("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),e("div",{class:"modal_container",role:"dialog",part:"presentation_container"},e("header",{class:"modal_title"},e("peculiar-typography",{type:"h4"},l.getString("certificateDetails")),e("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},e("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),e("div",{class:"modal_content"},e("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails})))):null}renderSearch(){return this.filterWithSearch||this.highlightWithSearch?e("div",{class:"search_section"},e("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"})):null}renderEmptyState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))}renderEmptySearchState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))}renderLoadingState(){return e("div",{class:"loading_container"},e("peculiar-circular-progress",null))}renderBody(){if(this.isDecodeInProcess)return null;if(!this.certificatesDecoded.length)return this.renderEmptyState();const t=this.renderContentState();return this.search&&!t.length?this.renderEmptySearchState():t}render(){return e(o,null,this.renderSearch(),e("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},e("thead",null,e("tr",null,!this.isHasRoots&&e("th",{class:"col_issuer"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("fingerprint")," (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("testURLs"))))),e("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};s.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';export{s as peculiar_certificates_viewer}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as r,H as s,g as i}from"./p-f7683ba5.js";import{l as e,a as o}from"./p-
|
|
4
|
+
import{r as t,h as r,H as s,g as i}from"./p-f7683ba5.js";import{l as e,a as o}from"./p-fec9d812.js";import"./p-cff9655c.js";const a=class{constructor(r){t(this,r),this.showIssuer=!0}renderRow(t,s,i){return r("tr",null,r("td",null,r("peculiar-typography",{color:"grey_5"},t,":")),r("td",null,r("peculiar-typography",{class:"meta_value",monospace:i},s)))}render(){return r(s,null,r("table",null,r("tbody",null,this.renderRow(e.getString("subjectName"),this.certificate.subjectToString()),this.showIssuer&&this.renderRow(e.getString("issuerName"),this.certificate.issuerToString()),this.renderRow(e.getString("serialNumber"),this.certificate.serialNumber,!0),this.renderRow(e.getString("version"),this.certificate.version),this.renderRow(e.getString("validity"),this.certificate.validity),this.renderRow(e.getString("issued"),o(this.certificate.notBefore)),this.renderRow(e.getString("expired"),o(this.certificate.notAfter)))))}};a.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";const h=class{constructor(r){t(this,r),this.size=24,this.width=4,this.box=50}render(){return r(s,null,r("div",{class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},r("svg",{class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},r("circle",{class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}),r("circle",{class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}))))}};h.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:#3584f7;stroke:rgba(var(--pv-color-primary-rgb), 1)}.circle_progress_backdrop{stroke:#d1d5d9;stroke:rgba(var(--pv-color-grey_3-rgb), 1)}";const l=class{constructor(r){t(this,r),this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let r=t;if(this.search){const s=new RegExp(`(${this.search})`,"gi");r=t.replace(s,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=r}resetHighlightSearch(t){const r=new RegExp(`</?${this.tag}>`,"g");return t.replace(r,"")}render(){return r(s,null,r("slot",null))}get host(){return i(this)}};l.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline}::slotted(mark){background-color:rgba(247, 168, 49, 0.4);background-color:rgba(var(--pv-color-attention-rgb), 0.4)}";export{a as peculiar_certificate_summary,h as peculiar_circular_progress,l as peculiar_highlight_words}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{b as t,c as e,a as i}from"./p-cff9655c.js";import"./p-
|
|
4
|
+
import{b as t,c as e,a as i}from"./p-cff9655c.js";import"./p-fec9d812.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -84,4 +84,4 @@ class vn extends gn{constructor(e){super(e,Zi);const i=this.getAsnExtnValue();tr
|
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the MIT license found in the
|
|
86
86
|
* LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/class En{constructor(){this.providers=new Map;const t=window.crypto||window.msCrypto;void 0!==t&&this.set(En.DEFAULT,t)}static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}get(t=En.DEFAULT){const e=this.providers.get(t.toLowerCase());if(!e)throw new Error(`Cannot get Crypto by name '${t}'`);return e}set(t,e){if("string"==typeof t){if(!e)throw new TypeError("Argument 'value' is required");this.providers.set(t.toLowerCase(),e)}else this.providers.set(En.DEFAULT,t);return this}}En.DEFAULT="default";const wn=new En,Pn=/-----BEGIN [^-]+-----([A-Za-z0-9+/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+/=\s]+)====/,bn=t=>t.replace(/(.{32})/g,"$1\n").replace(/(.{4})/g,"$1 ").trim(),Dn=t=>t.replace(/(.{64})/g,"$1\n"),In=e=>{const i=(t=>{const e=Pn.exec(t);return e?e[1]||e[2]:t})(e);let s;return s=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(i)?t.Convert.FromHex(i):(t=>{try{return window.atob(t),!0}catch(t){return!1}})(i)||r(i)?t.Convert.FromBase64(i):t.Convert.FromBinary(e),s},Bn=async(t,e)=>{const i=wn.get();if(i.subtle)return i.subtle.digest(t,e)};class Tn{constructor(t={}){this.acIssuer=new je,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}var xn;Ee([Se({type:je})],Tn.prototype,"acIssuer",void 0),Ee([Se({type:Kt.Integer})],Tn.prototype,"acSerial",void 0),Ee([Se({type:Mi,repeated:"sequence"})],Tn.prototype,"attrs",void 0);let On=xn=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,xn.prototype)}};On=xn=Ee([fe({type:Mt.Sequence,itemType:Kt.ObjectIdentifier})],On);class Rn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}Ee([Se({type:Kt.Integer,optional:!0})],Rn.prototype,"pathLenConstraint",void 0),Ee([Se({type:On,implicit:!0,context:0,optional:!0})],Rn.prototype,"permittedAttrs",void 0),Ee([Se({type:On,implicit:!0,context:1,optional:!0})],Rn.prototype,"excludedAttrs",void 0),Ee([Se({type:Kt.Boolean,defaultValue:!0})],Rn.prototype,"permitUnSpecified",void 0);class Nn{constructor(t={}){this.issuer=new We,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}var kn;Ee([Se({type:We})],Nn.prototype,"issuer",void 0),Ee([Se({type:Kt.Integer,converter:Vt})],Nn.prototype,"serial",void 0),Ee([Se({type:Kt.BitString,optional:!0})],Nn.prototype,"issuerUID",void 0),function(t){t[t.publicKey=0]="publicKey",t[t.publicKeyCert=1]="publicKeyCert",t[t.otherObjectTypes=2]="otherObjectTypes"}(kn||(kn={}));class Mn{constructor(t={}){this.digestedObjectType=kn.publicKey,this.digestAlgorithm=new Qi,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.Enumerated})],Mn.prototype,"digestedObjectType",void 0),Ee([Se({type:Kt.ObjectIdentifier,optional:!0})],Mn.prototype,"otherObjectTypeID",void 0),Ee([Se({type:Qi})],Mn.prototype,"digestAlgorithm",void 0),Ee([Se({type:Kt.BitString})],Mn.prototype,"objectDigest",void 0);class Kn{constructor(t={}){Object.assign(this,t)}}Ee([Se({type:We,optional:!0})],Kn.prototype,"issuerName",void 0),Ee([Se({type:Nn,context:0,implicit:!0,optional:!0})],Kn.prototype,"baseCertificateID",void 0),Ee([Se({type:Mn,context:1,implicit:!0,optional:!0})],Kn.prototype,"objectDigestInfo",void 0);let jn=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:je,repeated:"sequence"})],jn.prototype,"v1Form",void 0),Ee([Se({type:Kn,context:0,implicit:!0})],jn.prototype,"v2Form",void 0),jn=Ee([fe({type:Mt.Choice})],jn);class Hn{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}Ee([Se({type:Kt.GeneralizedTime})],Hn.prototype,"notBeforeTime",void 0),Ee([Se({type:Kt.GeneralizedTime})],Hn.prototype,"notAfterTime",void 0);class _n{constructor(t={}){Object.assign(this,t)}}var Un,Fn,Vn;Ee([Se({type:Nn,implicit:!0,context:0,optional:!0})],_n.prototype,"baseCertificateID",void 0),Ee([Se({type:We,implicit:!0,context:1,optional:!0})],_n.prototype,"entityName",void 0),Ee([Se({type:Mn,implicit:!0,context:2,optional:!0})],_n.prototype,"objectDigestInfo",void 0),function(t){t[t.v2=1]="v2"}(Un||(Un={}));class Ln{constructor(t={}){this.version=Un.v2,this.holder=new _n,this.issuer=new jn,this.signature=new Qi,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new Hn,this.attributes=[],Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Ln.prototype,"version",void 0),Ee([Se({type:_n})],Ln.prototype,"holder",void 0),Ee([Se({type:jn})],Ln.prototype,"issuer",void 0),Ee([Se({type:Qi})],Ln.prototype,"signature",void 0),Ee([Se({type:Kt.Integer,converter:Vt})],Ln.prototype,"serialNumber",void 0),Ee([Se({type:Hn})],Ln.prototype,"attrCertValidityPeriod",void 0),Ee([Se({type:Mi,repeated:"sequence"})],Ln.prototype,"attributes",void 0),Ee([Se({type:Kt.BitString,optional:!0})],Ln.prototype,"issuerUniqueID",void 0),Ee([Se({type:Xi,optional:!0})],Ln.prototype,"extensions",void 0);class Gn{constructor(t={}){this.acinfo=new Ln,this.signatureAlgorithm=new Qi,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Ln})],Gn.prototype,"acinfo",void 0),Ee([Se({type:Qi})],Gn.prototype,"signatureAlgorithm",void 0),Ee([Se({type:Kt.BitString})],Gn.prototype,"signatureValue",void 0),function(t){t[t.unmarked=1]="unmarked",t[t.unclassified=2]="unclassified",t[t.restricted=4]="restricted",t[t.confidential=8]="confidential",t[t.secret=16]="secret",t[t.topSecret=32]="topSecret"}(Fn||(Fn={}));class $n extends jt{}class Qn{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier,implicit:!0,context:0})],Qn.prototype,"type",void 0),Ee([Se({type:Kt.Any,implicit:!0,context:1})],Qn.prototype,"value",void 0);class Wn{constructor(t={}){this.policyId="",this.classList=new $n(Fn.unclassified),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Wn.prototype,"policyId",void 0),Ee([Se({type:$n,defaultValue:new $n(Fn.unclassified)})],Wn.prototype,"classList",void 0),Ee([Se({type:Qn,repeated:"set"})],Wn.prototype,"securityCategories",void 0);class qn{constructor(t={}){Object.assign(this,t)}}Ee([Se({type:Ht})],qn.prototype,"cotets",void 0),Ee([Se({type:Kt.ObjectIdentifier})],qn.prototype,"oid",void 0),Ee([Se({type:Kt.Utf8String})],qn.prototype,"string",void 0);class zn{constructor(t={}){this.values=[],Object.assign(this,t)}}Ee([Se({type:We,implicit:!0,context:0,optional:!0})],zn.prototype,"policyAuthority",void 0),Ee([Se({type:qn,repeated:"sequence"})],zn.prototype,"values",void 0);class Jn{constructor(t={}){this.targetCertificate=new Nn,Object.assign(this,t)}}Ee([Se({type:Nn})],Jn.prototype,"targetCertificate",void 0),Ee([Se({type:je,optional:!0})],Jn.prototype,"targetName",void 0),Ee([Se({type:Mn,optional:!0})],Jn.prototype,"certDigestInfo",void 0);let Zn=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:je,context:0,implicit:!0})],Zn.prototype,"targetName",void 0),Ee([Se({type:je,context:1,implicit:!0})],Zn.prototype,"targetGroup",void 0),Ee([Se({type:Jn,context:2,implicit:!0})],Zn.prototype,"targetCert",void 0),Zn=Ee([fe({type:Mt.Choice})],Zn);let Xn=Vn=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Vn.prototype)}};var Yn;Xn=Vn=Ee([fe({type:Mt.Sequence,itemType:Zn})],Xn);let to=Yn=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Yn.prototype)}};to=Yn=Ee([fe({type:Mt.Sequence,itemType:Xn})],to);class eo{constructor(t={}){Object.assign(this,t)}}Ee([Se({type:We,implicit:!0,context:0,optional:!0})],eo.prototype,"roleAuthority",void 0),Ee([Se({type:je,implicit:!0,context:1})],eo.prototype,"roleName",void 0);class io{constructor(t={}){this.service=new je,this.ident=new je,Object.assign(this,t)}}Ee([Se({type:je})],io.prototype,"service",void 0),Ee([Se({type:je})],io.prototype,"ident",void 0),Ee([Se({type:Ht,optional:!0})],io.prototype,"authInfo",void 0);const ro="0.4.0.9496.6";let so=class{constructor(t={}){this.codeAuthority=new je,this.codeId=new je,this.shortName="",this.shortDescription="",Object.assign(this,t)}};Ee([Se({type:je,context:0})],so.prototype,"codeAuthority",void 0),Ee([Se({type:je,context:1})],so.prototype,"codeId",void 0),Ee([Se({type:Kt.Utf8String,context:2})],so.prototype,"shortName",void 0),Ee([Se({type:Kt.Utf8String,context:3})],so.prototype,"shortDescription",void 0),so=Ee([fe({type:Mt.Sequence})],so);let no=class extends Ne{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};no=Ee([fe({type:Mt.Sequence})],no);const oo="0.4.0.9496.1";let ao=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};ao=Ee([fe({type:Mt.Sequence})],ao);const co="0.4.0.9496.2";let lo=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};lo=Ee([fe({type:Mt.Sequence})],lo);const uo="0.4.0.9496.3";let ho=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};ho=Ee([fe({type:Mt.Sequence})],ho);const po="0.4.0.9496.4";let yo=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};yo=Ee([fe({type:Mt.Sequence})],yo);const fo="0.4.0.9496.8";let So=class{constructor(t={}){this.location="",this.base=0,this.degree=0,Object.assign(this,t)}toString(){return`${this.base} x 10^${this.degree} ${this.location}`}};Ee([Se({type:Kt.PrintableString})],So.prototype,"location",void 0),Ee([Se({type:Kt.Integer})],So.prototype,"base",void 0),Ee([Se({type:Kt.Integer})],So.prototype,"degree",void 0),So=Ee([fe({type:Mt.Sequence})],So);const Co="0.4.0.9496.9";let Ao=class{constructor(t={}){this.stars5=0,this.stars4=0,this.stars3=0,this.stars2=0,this.stars1=0,Object.assign(this,t)}};Ee([Se({type:Kt.Integer})],Ao.prototype,"stars5",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars4",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars3",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars2",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars1",void 0),Ao=Ee([fe({type:Mt.Sequence})],Ao);const mo="0.4.0.9496.5";let go=class{constructor(t={}){this.DNBvsDNO=new jt(0),this.DNBvsDNT=new jt(0),this.DNOvsDNT=new jt(0),Object.assign(this,t)}};Ee([Se({type:jt,context:0})],go.prototype,"DNBvsDNO",void 0),Ee([Se({type:jt,context:1})],go.prototype,"DNBvsDNT",void 0),Ee([Se({type:jt,context:2})],go.prototype,"DNOvsDNT",void 0),go=Ee([fe({type:Mt.Sequence})],go);const vo="0.4.0.9496.7";let Eo=class{constructor(t={}){this.assessmentAuthority=new je,this.assessmentRef=new je,this.assessmentLocation=new je,this.dataStorageTerritory="",this.description="",Object.assign(this,t)}};Ee([Se({type:je,context:0})],Eo.prototype,"assessmentAuthority",void 0),Ee([Se({type:je,context:1})],Eo.prototype,"assessmentRef",void 0),Ee([Se({type:je,context:2})],Eo.prototype,"assessmentLocation",void 0),Ee([Se({type:Kt.PrintableString,context:3})],Eo.prototype,"dataStorageTerritory",void 0),Ee([Se({type:Kt.Utf8String,context:4})],Eo.prototype,"description",void 0),Eo=Ee([fe({type:Mt.Sequence})],Eo);class wo{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}}var Po;Ee([Se({type:Kt.ObjectIdentifier})],wo.prototype,"attrType",void 0),Ee([Se({type:Kt.Any,repeated:"set"})],wo.prototype,"attrValues",void 0);class bo{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],bo.prototype,"otherCertFormat",void 0),Ee([Se({type:Kt.Any})],bo.prototype,"otherCert",void 0);let Do=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:er})],Do.prototype,"certificate",void 0),Ee([Se({type:Gn,context:2,implicit:!0})],Do.prototype,"v2AttrCert",void 0),Ee([Se({type:bo,context:3,implicit:!0})],Do.prototype,"other",void 0),Do=Ee([fe({type:Mt.Choice})],Do);let Io=Po=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Po.prototype)}};Io=Po=Ee([fe({type:Mt.Set,itemType:Do})],Io);class Bo{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Bo.prototype,"contentType",void 0),Ee([Se({type:Kt.Any,context:0})],Bo.prototype,"content",void 0);let To=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Ht})],To.prototype,"single",void 0),Ee([Se({type:Kt.Any})],To.prototype,"any",void 0),To=Ee([fe({type:Mt.Choice})],To);class xo{constructor(t={}){this.eContentType="",Object.assign(this,t)}}var Oo;Ee([Se({type:Kt.ObjectIdentifier})],xo.prototype,"eContentType",void 0),Ee([Se({type:To,context:0,optional:!0})],xo.prototype,"eContent",void 0),function(t){t[t.v0=0]="v0",t[t.v1=1]="v1",t[t.v2=2]="v2",t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v5=5]="v5"}(Oo||(Oo={}));let Ro=class extends Qi{};Ro=Ee([fe({type:Mt.Sequence})],Ro);let No=class extends Qi{};No=Ee([fe({type:Mt.Sequence})],No);let ko=class extends Qi{};ko=Ee([fe({type:Mt.Sequence})],ko);let Mo=class extends Qi{};Mo=Ee([fe({type:Mt.Sequence})],Mo);let Ko=class extends Qi{};Ko=Ee([fe({type:Mt.Sequence})],Ko);let jo=class extends Qi{};jo=Ee([fe({type:Mt.Sequence})],jo);let Ho=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Ht,context:0,implicit:!0,optional:!0})],Ho.prototype,"value",void 0),Ee([Se({type:Ht,converter:Wt,context:0,implicit:!0,optional:!0,repeated:"sequence"})],Ho.prototype,"constructedValue",void 0),Ho=Ee([fe({type:Mt.Choice})],Ho);class _o{constructor(t={}){this.contentType="",this.contentEncryptionAlgorithm=new Mo,Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],_o.prototype,"contentType",void 0),Ee([Se({type:Mo})],_o.prototype,"contentEncryptionAlgorithm",void 0),Ee([Se({type:Ho,optional:!0})],_o.prototype,"encryptedContent",void 0);class Uo{constructor(t={}){this.issuer=new Ne,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Ne})],Uo.prototype,"issuer",void 0),Ee([Se({type:Kt.Integer,converter:Vt})],Uo.prototype,"serialNumber",void 0);class Fo{constructor(t={}){this.keyAttrId="",Object.assign(this,t)}}var Vo;Ee([Se({type:Kt.ObjectIdentifier})],Fo.prototype,"keyAttrId",void 0),Ee([Se({type:Kt.Any,optional:!0})],Fo.prototype,"keyAttr",void 0);class Lo{constructor(t={}){this.subjectKeyIdentifier=new Hi,Object.assign(this,t)}}Ee([Se({type:Hi})],Lo.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Kt.GeneralizedTime,optional:!0})],Lo.prototype,"date",void 0),Ee([Se({type:Fo,optional:!0})],Lo.prototype,"other",void 0);let Go=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Lo,context:0,implicit:!0,optional:!0})],Go.prototype,"rKeyId",void 0),Ee([Se({type:Uo,optional:!0})],Go.prototype,"issuerAndSerialNumber",void 0),Go=Ee([fe({type:Mt.Choice})],Go);class $o{constructor(t={}){this.rid=new Go,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Go})],$o.prototype,"rid",void 0),Ee([Se({type:Ht})],$o.prototype,"encryptedKey",void 0);let Qo=Vo=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};Qo=Vo=Ee([fe({type:Mt.Sequence,itemType:$o})],Qo);class Wo{constructor(t={}){this.algorithm=new Qi,this.publicKey=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Qi})],Wo.prototype,"algorithm",void 0),Ee([Se({type:Kt.BitString})],Wo.prototype,"publicKey",void 0);let qo=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Hi,context:0,implicit:!0,optional:!0})],qo.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Wo,context:1,implicit:!0,optional:!0})],qo.prototype,"originatorKey",void 0),Ee([Se({type:Uo,optional:!0})],qo.prototype,"issuerAndSerialNumber",void 0),qo=Ee([fe({type:Mt.Choice})],qo);class zo{constructor(t={}){this.version=Oo.v3,this.originator=new qo,this.keyEncryptionAlgorithm=new ko,this.recipientEncryptedKeys=new Qo,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],zo.prototype,"version",void 0),Ee([Se({type:qo,context:0})],zo.prototype,"originator",void 0),Ee([Se({type:Ht,context:1,optional:!0})],zo.prototype,"ukm",void 0),Ee([Se({type:ko})],zo.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Qo})],zo.prototype,"recipientEncryptedKeys",void 0);let Jo=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Hi,context:0,implicit:!0})],Jo.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Uo})],Jo.prototype,"issuerAndSerialNumber",void 0),Jo=Ee([fe({type:Mt.Choice})],Jo);class Zo{constructor(t={}){this.version=Oo.v0,this.rid=new Jo,this.keyEncryptionAlgorithm=new ko,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Zo.prototype,"version",void 0),Ee([Se({type:Jo})],Zo.prototype,"rid",void 0),Ee([Se({type:ko})],Zo.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Ht})],Zo.prototype,"encryptedKey",void 0);class Xo{constructor(t={}){this.keyIdentifier=new Ht,Object.assign(this,t)}}Ee([Se({type:Ht})],Xo.prototype,"keyIdentifier",void 0),Ee([Se({type:Kt.GeneralizedTime,optional:!0})],Xo.prototype,"date",void 0),Ee([Se({type:Fo,optional:!0})],Xo.prototype,"other",void 0);class Yo{constructor(t={}){this.version=Oo.v4,this.kekid=new Xo,this.keyEncryptionAlgorithm=new ko,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Yo.prototype,"version",void 0),Ee([Se({type:Xo})],Yo.prototype,"kekid",void 0),Ee([Se({type:ko})],Yo.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Ht})],Yo.prototype,"encryptedKey",void 0);class ta{constructor(t={}){this.version=Oo.v0,this.keyEncryptionAlgorithm=new ko,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],ta.prototype,"version",void 0),Ee([Se({type:jo,context:0,optional:!0})],ta.prototype,"keyDerivationAlgorithm",void 0),Ee([Se({type:ko})],ta.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Ht})],ta.prototype,"encryptedKey",void 0);class ea{constructor(t={}){this.oriType="",this.oriValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],ea.prototype,"oriType",void 0),Ee([Se({type:Kt.Any})],ea.prototype,"oriValue",void 0);let ia=class{constructor(t={}){Object.assign(this,t)}};var ra;Ee([Se({type:Zo,optional:!0})],ia.prototype,"ktri",void 0),Ee([Se({type:zo,context:1,implicit:!0,optional:!0})],ia.prototype,"kari",void 0),Ee([Se({type:Yo,context:2,implicit:!0,optional:!0})],ia.prototype,"kekri",void 0),Ee([Se({type:ta,context:3,implicit:!0,optional:!0})],ia.prototype,"pwri",void 0),Ee([Se({type:ea,context:4,implicit:!0,optional:!0})],ia.prototype,"ori",void 0),ia=Ee([fe({type:Mt.Choice})],ia);let sa=ra=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ra.prototype)}};var na;sa=ra=Ee([fe({type:Mt.Set,itemType:ia})],sa);class oa{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],oa.prototype,"otherRevInfoFormat",void 0),Ee([Se({type:Kt.Any})],oa.prototype,"otherRevInfo",void 0);let aa=class{constructor(t={}){this.other=new oa,Object.assign(this,t)}};Ee([Se({type:oa,context:1,implicit:!0})],aa.prototype,"other",void 0),aa=Ee([fe({type:Mt.Choice})],aa);let ca=na=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,na.prototype)}};ca=na=Ee([fe({type:Mt.Set,itemType:aa})],ca);class la{constructor(t={}){Object.assign(this,t)}}var ua;Ee([Se({type:Io,context:0,implicit:!0,optional:!0})],la.prototype,"certs",void 0),Ee([Se({type:ca,context:1,implicit:!0,optional:!0})],la.prototype,"crls",void 0);let ha=ua=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};ha=ua=Ee([fe({type:Mt.Set,itemType:wo})],ha);class pa{constructor(t={}){this.version=Oo.v0,this.recipientInfos=new sa,this.encryptedContentInfo=new _o,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],pa.prototype,"version",void 0),Ee([Se({type:la,context:0,implicit:!0,optional:!0})],pa.prototype,"originatorInfo",void 0),Ee([Se({type:sa})],pa.prototype,"recipientInfos",void 0),Ee([Se({type:_o})],pa.prototype,"encryptedContentInfo",void 0),Ee([Se({type:ha,context:1,implicit:!0,optional:!0})],pa.prototype,"unprotectedAttrs",void 0);let da=class{constructor(t={}){Object.assign(this,t)}};var ya;Ee([Se({type:Hi,context:0,implicit:!0})],da.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Uo})],da.prototype,"issuerAndSerialNumber",void 0),da=Ee([fe({type:Mt.Choice})],da);class fa{constructor(t={}){this.version=Oo.v0,this.sid=new da,this.digestAlgorithm=new Ro,this.signatureAlgorithm=new No,this.signature=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],fa.prototype,"version",void 0),Ee([Se({type:da})],fa.prototype,"sid",void 0),Ee([Se({type:Ro})],fa.prototype,"digestAlgorithm",void 0),Ee([Se({type:wo,repeated:"set",context:0,implicit:!0,optional:!0})],fa.prototype,"signedAttrs",void 0),Ee([Se({type:No})],fa.prototype,"signatureAlgorithm",void 0),Ee([Se({type:Ht})],fa.prototype,"signature",void 0),Ee([Se({type:wo,repeated:"set",context:1,implicit:!0,optional:!0})],fa.prototype,"unsignedAttrs",void 0);let Sa=ya=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ya.prototype)}};var Ca;Sa=ya=Ee([fe({type:Mt.Set,itemType:fa})],Sa);let Aa=Ca=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ca.prototype)}};Aa=Ca=Ee([fe({type:Mt.Set,itemType:Ro})],Aa);class ma{constructor(t={}){this.version=Oo.v0,this.digestAlgorithms=new Aa,this.encapContentInfo=new xo,this.signerInfos=new Sa,Object.assign(this,t)}}var ga;Ee([Se({type:Kt.Integer})],ma.prototype,"version",void 0),Ee([Se({type:Aa})],ma.prototype,"digestAlgorithms",void 0),Ee([Se({type:xo})],ma.prototype,"encapContentInfo",void 0),Ee([Se({type:Io,context:0,implicit:!0,optional:!0})],ma.prototype,"certificates",void 0),Ee([Se({type:aa,context:1,implicit:!0,optional:!0})],ma.prototype,"crls",void 0),Ee([Se({type:Sa})],ma.prototype,"signerInfos",void 0);class va{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}Ee([Se({type:Kt.ObjectIdentifier})],va.prototype,"attrId",void 0),Ee([Se({type:Kt.Any,repeated:"set"})],va.prototype,"attrValues",void 0);let Ea=ga=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ga.prototype)}};var wa;Ea=ga=Ee([fe({type:Mt.Sequence,itemType:va})],Ea);let Pa=wa=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,wa.prototype)}};Pa=wa=Ee([fe({type:Mt.Sequence,itemType:Bo})],Pa);class ba{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],ba.prototype,"certId",void 0),Ee([Se({type:Kt.Any,context:0})],ba.prototype,"certValue",void 0);class Da{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Da.prototype,"crlId",void 0),Ee([Se({type:Kt.Any,context:0})],Da.prototype,"crltValue",void 0);class Ia extends Ht{}class Ba{constructor(t={}){this.encryptionAlgorithm=new Qi,this.encryptedData=new Ia,Object.assign(this,t)}}var Ta,xa;Ee([Se({type:Qi})],Ba.prototype,"encryptionAlgorithm",void 0),Ee([Se({type:Ia})],Ba.prototype,"encryptedData",void 0),function(t){t[t.v1=0]="v1"}(xa||(xa={}));class Oa extends Ht{}let Ra=Ta=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ta.prototype)}};Ra=Ta=Ee([fe({type:Mt.Sequence,itemType:Mi})],Ra);class Na{constructor(t={}){this.version=xa.v1,this.privateKeyAlgorithm=new Qi,this.privateKey=new Oa,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Na.prototype,"version",void 0),Ee([Se({type:Qi})],Na.prototype,"privateKeyAlgorithm",void 0),Ee([Se({type:Oa})],Na.prototype,"privateKey",void 0),Ee([Se({type:Ra,implicit:!0,context:0,optional:!0})],Na.prototype,"attributes",void 0);let ka=class extends Na{};ka=Ee([fe({type:Mt.Sequence})],ka);let Ma=class extends Ba{};Ma=Ee([fe({type:Mt.Sequence})],Ma);class Ka{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Ka.prototype,"secretTypeId",void 0),Ee([Se({type:Kt.Any,context:0})],Ka.prototype,"secretValue",void 0);class ja{constructor(t={}){this.mac=new Tr,this.macSalt=new Ht,this.iterations=1,Object.assign(this,t)}}Ee([Se({type:Tr})],ja.prototype,"mac",void 0),Ee([Se({type:Ht})],ja.prototype,"macSalt",void 0),Ee([Se({type:Kt.Integer,defaultValue:1})],ja.prototype,"iterations",void 0);class Ha{constructor(t={}){this.version=3,this.authSafe=new Bo,this.macData=new ja,Object.assign(this,t)}}var _a;Ee([Se({type:Kt.Integer})],Ha.prototype,"version",void 0),Ee([Se({type:Bo})],Ha.prototype,"authSafe",void 0),Ee([Se({type:ja,optional:!0})],Ha.prototype,"macData",void 0);class Ua{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Ua.prototype,"bagId",void 0),Ee([Se({type:Kt.Any,context:0})],Ua.prototype,"bagValue",void 0),Ee([Se({type:va,repeated:"set",optional:!0})],Ua.prototype,"bagAttributes",void 0);let Fa=_a=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,_a.prototype)}};var Va,La,Ga;Fa=_a=Ee([fe({type:Mt.Sequence,itemType:Ua})],Fa);const $a="1.2.840.113549.1.9",Qa=`${$a}.2`,Wa=`${$a}.7`,qa=`${$a}.14`;let za=class extends Be{constructor(t={}){super(t)}toString(){return{}.toString(),this.ia5String||super.toString()}};Ee([Se({type:Kt.IA5String})],za.prototype,"ia5String",void 0),za=Ee([fe({type:Mt.Choice})],za);let Ja=class extends Bo{};Ja=Ee([fe({type:Mt.Sequence})],Ja);let Za=class extends Ha{};Za=Ee([fe({type:Mt.Sequence})],Za);let Xa=class extends Ba{};Xa=Ee([fe({type:Mt.Sequence})],Xa);let Ya=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.IA5String})],Ya.prototype,"value",void 0),Ya=Ee([fe({type:Mt.Choice})],Ya);let tc=class extends za{};tc=Ee([fe({type:Mt.Choice})],tc);let ec=class extends Be{};ec=Ee([fe({type:Mt.Choice})],ec);let ic=class{constructor(t=new Date){this.value=t}};Ee([Se({type:Kt.GeneralizedTime})],ic.prototype,"value",void 0),ic=Ee([fe({type:Mt.Choice})],ic);let rc=class extends Be{};rc=Ee([fe({type:Mt.Choice})],rc);let sc=class{constructor(t="M"){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.PrintableString})],sc.prototype,"value",void 0),sc=Ee([fe({type:Mt.Choice})],sc);let nc=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.PrintableString})],nc.prototype,"value",void 0),nc=Ee([fe({type:Mt.Choice})],nc);let oc=class extends nc{};oc=Ee([fe({type:Mt.Choice})],oc);let ac=class extends Be{};ac=Ee([fe({type:Mt.Choice})],ac);let cc=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.ObjectIdentifier})],cc.prototype,"value",void 0),cc=Ee([fe({type:Mt.Choice})],cc);let lc=class extends qi{};lc=Ee([fe({type:Mt.Choice})],lc);let uc=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};Ee([Se({type:Kt.Integer})],uc.prototype,"value",void 0),uc=Ee([fe({type:Mt.Choice})],uc);let hc=class extends fa{};hc=Ee([fe({type:Mt.Sequence})],hc);let pc=class extends Be{};pc=Ee([fe({type:Mt.Choice})],pc);let dc=Va=class extends Xi{constructor(t){super(t),Object.setPrototypeOf(this,Va.prototype)}};dc=Va=Ee([fe({type:Mt.Sequence})],dc);let yc=La=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,La.prototype)}};yc=La=Ee([fe({type:Mt.Set,itemType:wo})],yc);let fc=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.BmpString})],fc.prototype,"value",void 0),fc=Ee([fe({type:Mt.Choice})],fc);let Sc=class extends Qi{};Sc=Ee([fe({type:Mt.Sequence})],Sc);let Cc=Ga=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ga.prototype)}};var Ac;Cc=Ga=Ee([fe({type:Mt.Sequence,itemType:Sc})],Cc);let mc=Ac=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ac.prototype)}};mc=Ac=Ee([fe({type:Mt.Sequence,itemType:Mi})],mc);class gc{constructor(t={}){this.version=0,this.subject=new Ne,this.subjectPKInfo=new Wi,this.attributes=new mc,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],gc.prototype,"version",void 0),Ee([Se({type:Ne})],gc.prototype,"subject",void 0),Ee([Se({type:Wi})],gc.prototype,"subjectPKInfo",void 0),Ee([Se({type:mc,implicit:!0,context:0})],gc.prototype,"attributes",void 0);class vc{constructor(t={}){this.certificationRequestInfo=new gc,this.signatureAlgorithm=new Qi,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:gc})],vc.prototype,"certificationRequestInfo",void 0),Ee([Se({type:Qi})],vc.prototype,"signatureAlgorithm",void 0),Ee([Se({type:Kt.BitString})],vc.prototype,"signature",void 0);export{Vt as $,gn as A,po as B,er as C,yo as D,vn as E,uo as F,ho as G,co as H,So as I,lo as J,oo as K,ao as L,Gn as M,Ur as N,vc as O,sr as P,Kr as Q,kr as R,Ne as S,go as T,tc as U,Ao as V,Eo as W,Me as X,Ze as Y,Ye as Z,Ke as _,s as a,bi as a0,$e as a1,Ai as a2,Hi as a3,Ge as a4,hi as a5,Ve as a6,$i as a7,ki as a8,ri as a9,Ls as aa,Bi as ab,rs as ac,ns as ad,os as ae,Xr as af,Ts as ag,Bs as ah,Ms as ai,ks as aj,$s as ak,Gs as al,Si as am,ji as an,_i as ao,Li as ap,$r as aq,nn as ar,fn as as,Ti as at,Ri as au,si as av,yi as aw,o as b,a as c,n as d,In as e,ve as f,nr as g,ar as h,r as i,hr as j,bn as k,Dn as l,Bn as m,Mi as n,qa as o,Ae as p,dc as q,Qa as r,Wa as s,pc as t,Co as u,fo as v,vo as w,ro as x,so as y,mo as z}
|
|
87
|
+
*/class En{constructor(){this.providers=new Map;const t=window.crypto||window.msCrypto;void 0!==t&&this.set(En.DEFAULT,t)}static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}get(t=En.DEFAULT){const e=this.providers.get(t.toLowerCase());if(!e)throw new Error(`Cannot get Crypto by name '${t}'`);return e}set(t,e){if("string"==typeof t){if(!e)throw new TypeError("Argument 'value' is required");this.providers.set(t.toLowerCase(),e)}else this.providers.set(En.DEFAULT,t);return this}}En.DEFAULT="default";const wn=new En,Pn=/-----BEGIN [^-]+-----([A-Za-z0-9+/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+/=\s]+)====/,bn=t=>t.replace(/(.{32})/g,"$1\n").replace(/(.{4})/g,"$1 ").trim(),Dn=t=>t.replace(/(.{64})/g,"$1\n"),In=e=>{const i=(t=>{const e=Pn.exec(t);return e?e[1]||e[2]:t})(e);let s;return s=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(i)?t.Convert.FromHex(i):(t=>{try{return window.atob(t),!0}catch(t){return!1}})(i)||r(i)?t.Convert.FromBase64(i):t.Convert.FromBinary(e),s},Bn=async(t,e)=>{const i=wn.get();if(i.subtle)return i.subtle.digest(t,e)};class Tn{constructor(t={}){this.acIssuer=new je,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}var xn;Ee([Se({type:je})],Tn.prototype,"acIssuer",void 0),Ee([Se({type:Kt.Integer})],Tn.prototype,"acSerial",void 0),Ee([Se({type:Mi,repeated:"sequence"})],Tn.prototype,"attrs",void 0);let On=xn=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,xn.prototype)}};On=xn=Ee([fe({type:Mt.Sequence,itemType:Kt.ObjectIdentifier})],On);class Rn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}Ee([Se({type:Kt.Integer,optional:!0})],Rn.prototype,"pathLenConstraint",void 0),Ee([Se({type:On,implicit:!0,context:0,optional:!0})],Rn.prototype,"permittedAttrs",void 0),Ee([Se({type:On,implicit:!0,context:1,optional:!0})],Rn.prototype,"excludedAttrs",void 0),Ee([Se({type:Kt.Boolean,defaultValue:!0})],Rn.prototype,"permitUnSpecified",void 0);class Nn{constructor(t={}){this.issuer=new We,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}var kn;Ee([Se({type:We})],Nn.prototype,"issuer",void 0),Ee([Se({type:Kt.Integer,converter:Vt})],Nn.prototype,"serial",void 0),Ee([Se({type:Kt.BitString,optional:!0})],Nn.prototype,"issuerUID",void 0),function(t){t[t.publicKey=0]="publicKey",t[t.publicKeyCert=1]="publicKeyCert",t[t.otherObjectTypes=2]="otherObjectTypes"}(kn||(kn={}));class Mn{constructor(t={}){this.digestedObjectType=kn.publicKey,this.digestAlgorithm=new Qi,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.Enumerated})],Mn.prototype,"digestedObjectType",void 0),Ee([Se({type:Kt.ObjectIdentifier,optional:!0})],Mn.prototype,"otherObjectTypeID",void 0),Ee([Se({type:Qi})],Mn.prototype,"digestAlgorithm",void 0),Ee([Se({type:Kt.BitString})],Mn.prototype,"objectDigest",void 0);class Kn{constructor(t={}){Object.assign(this,t)}}Ee([Se({type:We,optional:!0})],Kn.prototype,"issuerName",void 0),Ee([Se({type:Nn,context:0,implicit:!0,optional:!0})],Kn.prototype,"baseCertificateID",void 0),Ee([Se({type:Mn,context:1,implicit:!0,optional:!0})],Kn.prototype,"objectDigestInfo",void 0);let jn=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:je,repeated:"sequence"})],jn.prototype,"v1Form",void 0),Ee([Se({type:Kn,context:0,implicit:!0})],jn.prototype,"v2Form",void 0),jn=Ee([fe({type:Mt.Choice})],jn);class Hn{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}Ee([Se({type:Kt.GeneralizedTime})],Hn.prototype,"notBeforeTime",void 0),Ee([Se({type:Kt.GeneralizedTime})],Hn.prototype,"notAfterTime",void 0);class _n{constructor(t={}){Object.assign(this,t)}}var Un,Fn,Vn;Ee([Se({type:Nn,implicit:!0,context:0,optional:!0})],_n.prototype,"baseCertificateID",void 0),Ee([Se({type:We,implicit:!0,context:1,optional:!0})],_n.prototype,"entityName",void 0),Ee([Se({type:Mn,implicit:!0,context:2,optional:!0})],_n.prototype,"objectDigestInfo",void 0),function(t){t[t.v2=1]="v2"}(Un||(Un={}));class Ln{constructor(t={}){this.version=Un.v2,this.holder=new _n,this.issuer=new jn,this.signature=new Qi,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new Hn,this.attributes=[],Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Ln.prototype,"version",void 0),Ee([Se({type:_n})],Ln.prototype,"holder",void 0),Ee([Se({type:jn})],Ln.prototype,"issuer",void 0),Ee([Se({type:Qi})],Ln.prototype,"signature",void 0),Ee([Se({type:Kt.Integer,converter:Vt})],Ln.prototype,"serialNumber",void 0),Ee([Se({type:Hn})],Ln.prototype,"attrCertValidityPeriod",void 0),Ee([Se({type:Mi,repeated:"sequence"})],Ln.prototype,"attributes",void 0),Ee([Se({type:Kt.BitString,optional:!0})],Ln.prototype,"issuerUniqueID",void 0),Ee([Se({type:Xi,optional:!0})],Ln.prototype,"extensions",void 0);class Gn{constructor(t={}){this.acinfo=new Ln,this.signatureAlgorithm=new Qi,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Ln})],Gn.prototype,"acinfo",void 0),Ee([Se({type:Qi})],Gn.prototype,"signatureAlgorithm",void 0),Ee([Se({type:Kt.BitString})],Gn.prototype,"signatureValue",void 0),function(t){t[t.unmarked=1]="unmarked",t[t.unclassified=2]="unclassified",t[t.restricted=4]="restricted",t[t.confidential=8]="confidential",t[t.secret=16]="secret",t[t.topSecret=32]="topSecret"}(Fn||(Fn={}));class $n extends jt{}class Qn{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier,implicit:!0,context:0})],Qn.prototype,"type",void 0),Ee([Se({type:Kt.Any,implicit:!0,context:1})],Qn.prototype,"value",void 0);class Wn{constructor(t={}){this.policyId="",this.classList=new $n(Fn.unclassified),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Wn.prototype,"policyId",void 0),Ee([Se({type:$n,defaultValue:new $n(Fn.unclassified)})],Wn.prototype,"classList",void 0),Ee([Se({type:Qn,repeated:"set"})],Wn.prototype,"securityCategories",void 0);class qn{constructor(t={}){Object.assign(this,t)}}Ee([Se({type:Ht})],qn.prototype,"cotets",void 0),Ee([Se({type:Kt.ObjectIdentifier})],qn.prototype,"oid",void 0),Ee([Se({type:Kt.Utf8String})],qn.prototype,"string",void 0);class zn{constructor(t={}){this.values=[],Object.assign(this,t)}}Ee([Se({type:We,implicit:!0,context:0,optional:!0})],zn.prototype,"policyAuthority",void 0),Ee([Se({type:qn,repeated:"sequence"})],zn.prototype,"values",void 0);class Jn{constructor(t={}){this.targetCertificate=new Nn,Object.assign(this,t)}}Ee([Se({type:Nn})],Jn.prototype,"targetCertificate",void 0),Ee([Se({type:je,optional:!0})],Jn.prototype,"targetName",void 0),Ee([Se({type:Mn,optional:!0})],Jn.prototype,"certDigestInfo",void 0);let Zn=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:je,context:0,implicit:!0})],Zn.prototype,"targetName",void 0),Ee([Se({type:je,context:1,implicit:!0})],Zn.prototype,"targetGroup",void 0),Ee([Se({type:Jn,context:2,implicit:!0})],Zn.prototype,"targetCert",void 0),Zn=Ee([fe({type:Mt.Choice})],Zn);let Xn=Vn=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Vn.prototype)}};var Yn;Xn=Vn=Ee([fe({type:Mt.Sequence,itemType:Zn})],Xn);let to=Yn=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Yn.prototype)}};to=Yn=Ee([fe({type:Mt.Sequence,itemType:Xn})],to);class eo{constructor(t={}){Object.assign(this,t)}}Ee([Se({type:We,implicit:!0,context:0,optional:!0})],eo.prototype,"roleAuthority",void 0),Ee([Se({type:je,implicit:!0,context:1})],eo.prototype,"roleName",void 0);class io{constructor(t={}){this.service=new je,this.ident=new je,Object.assign(this,t)}}Ee([Se({type:je})],io.prototype,"service",void 0),Ee([Se({type:je})],io.prototype,"ident",void 0),Ee([Se({type:Ht,optional:!0})],io.prototype,"authInfo",void 0);const ro="0.4.0.9496.6";let so=class{constructor(t={}){this.codeAuthority=new je,this.codeId=new je,this.shortName="",this.shortDescription="",Object.assign(this,t)}};Ee([Se({type:je,context:0})],so.prototype,"codeAuthority",void 0),Ee([Se({type:je,context:1})],so.prototype,"codeId",void 0),Ee([Se({type:Kt.Utf8String,context:2})],so.prototype,"shortName",void 0),Ee([Se({type:Kt.Utf8String,context:3})],so.prototype,"shortDescription",void 0),so=Ee([fe({type:Mt.Sequence})],so);let no=class extends Ne{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};no=Ee([fe({type:Mt.Sequence})],no);const oo="0.4.0.9496.1";let ao=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};ao=Ee([fe({type:Mt.Sequence})],ao);const co="0.4.0.9496.2";let lo=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};lo=Ee([fe({type:Mt.Sequence})],lo);const uo="0.4.0.9496.3";let ho=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};ho=Ee([fe({type:Mt.Sequence})],ho);const po="0.4.0.9496.4";let yo=class extends no{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}};yo=Ee([fe({type:Mt.Sequence})],yo);const fo="0.4.0.9496.8";let So=class{constructor(t={}){this.location="",this.base=0,this.degree=0,Object.assign(this,t)}toString(){return`${this.base} x 10^${this.degree} ${this.location}`}};Ee([Se({type:Kt.PrintableString})],So.prototype,"location",void 0),Ee([Se({type:Kt.Integer})],So.prototype,"base",void 0),Ee([Se({type:Kt.Integer})],So.prototype,"degree",void 0),So=Ee([fe({type:Mt.Sequence})],So);const Co="0.4.0.9496.9";let Ao=class{constructor(t={}){this.stars5=0,this.stars4=0,this.stars3=0,this.stars2=0,this.stars1=0,Object.assign(this,t)}};Ee([Se({type:Kt.Integer})],Ao.prototype,"stars5",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars4",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars3",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars2",void 0),Ee([Se({type:Kt.Integer})],Ao.prototype,"stars1",void 0),Ao=Ee([fe({type:Mt.Sequence})],Ao);const mo="0.4.0.9496.5";let go=class{constructor(t={}){this.DNBvsDNO=new jt(0),this.DNBvsDNT=new jt(0),this.DNOvsDNT=new jt(0),Object.assign(this,t)}};Ee([Se({type:jt,context:0})],go.prototype,"DNBvsDNO",void 0),Ee([Se({type:jt,context:1})],go.prototype,"DNBvsDNT",void 0),Ee([Se({type:jt,context:2})],go.prototype,"DNOvsDNT",void 0),go=Ee([fe({type:Mt.Sequence})],go);const vo="0.4.0.9496.7";let Eo=class{constructor(t={}){this.assessmentAuthority=new je,this.assessmentRef=new je,this.assessmentLocation=new je,this.dataStorageTerritory="",this.description="",Object.assign(this,t)}};Ee([Se({type:je,context:0})],Eo.prototype,"assessmentAuthority",void 0),Ee([Se({type:je,context:1})],Eo.prototype,"assessmentRef",void 0),Ee([Se({type:je,context:2})],Eo.prototype,"assessmentLocation",void 0),Ee([Se({type:Kt.PrintableString,context:3})],Eo.prototype,"dataStorageTerritory",void 0),Ee([Se({type:Kt.Utf8String,context:4})],Eo.prototype,"description",void 0),Eo=Ee([fe({type:Mt.Sequence})],Eo);class wo{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}}var Po;Ee([Se({type:Kt.ObjectIdentifier})],wo.prototype,"attrType",void 0),Ee([Se({type:Kt.Any,repeated:"set"})],wo.prototype,"attrValues",void 0);class bo{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],bo.prototype,"otherCertFormat",void 0),Ee([Se({type:Kt.Any})],bo.prototype,"otherCert",void 0);let Do=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:er})],Do.prototype,"certificate",void 0),Ee([Se({type:Gn,context:2,implicit:!0})],Do.prototype,"v2AttrCert",void 0),Ee([Se({type:bo,context:3,implicit:!0})],Do.prototype,"other",void 0),Do=Ee([fe({type:Mt.Choice})],Do);let Io=Po=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Po.prototype)}};Io=Po=Ee([fe({type:Mt.Set,itemType:Do})],Io);class Bo{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Bo.prototype,"contentType",void 0),Ee([Se({type:Kt.Any,context:0})],Bo.prototype,"content",void 0);let To=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Ht})],To.prototype,"single",void 0),Ee([Se({type:Kt.Any})],To.prototype,"any",void 0),To=Ee([fe({type:Mt.Choice})],To);class xo{constructor(t={}){this.eContentType="",Object.assign(this,t)}}var Oo;Ee([Se({type:Kt.ObjectIdentifier})],xo.prototype,"eContentType",void 0),Ee([Se({type:To,context:0,optional:!0})],xo.prototype,"eContent",void 0),function(t){t[t.v0=0]="v0",t[t.v1=1]="v1",t[t.v2=2]="v2",t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v5=5]="v5"}(Oo||(Oo={}));let Ro=class extends Qi{};Ro=Ee([fe({type:Mt.Sequence})],Ro);let No=class extends Qi{};No=Ee([fe({type:Mt.Sequence})],No);let ko=class extends Qi{};ko=Ee([fe({type:Mt.Sequence})],ko);let Mo=class extends Qi{};Mo=Ee([fe({type:Mt.Sequence})],Mo);let Ko=class extends Qi{};Ko=Ee([fe({type:Mt.Sequence})],Ko);let jo=class extends Qi{};jo=Ee([fe({type:Mt.Sequence})],jo);let Ho=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Ht,context:0,implicit:!0,optional:!0})],Ho.prototype,"value",void 0),Ee([Se({type:Ht,converter:Wt,context:0,implicit:!0,optional:!0,repeated:"sequence"})],Ho.prototype,"constructedValue",void 0),Ho=Ee([fe({type:Mt.Choice})],Ho);class _o{constructor(t={}){this.contentType="",this.contentEncryptionAlgorithm=new Mo,Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],_o.prototype,"contentType",void 0),Ee([Se({type:Mo})],_o.prototype,"contentEncryptionAlgorithm",void 0),Ee([Se({type:Ho,optional:!0})],_o.prototype,"encryptedContent",void 0);class Uo{constructor(t={}){this.issuer=new Ne,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Ne})],Uo.prototype,"issuer",void 0),Ee([Se({type:Kt.Integer,converter:Vt})],Uo.prototype,"serialNumber",void 0);class Fo{constructor(t={}){this.keyAttrId="",Object.assign(this,t)}}var Vo;Ee([Se({type:Kt.ObjectIdentifier})],Fo.prototype,"keyAttrId",void 0),Ee([Se({type:Kt.Any,optional:!0})],Fo.prototype,"keyAttr",void 0);class Lo{constructor(t={}){this.subjectKeyIdentifier=new Hi,Object.assign(this,t)}}Ee([Se({type:Hi})],Lo.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Kt.GeneralizedTime,optional:!0})],Lo.prototype,"date",void 0),Ee([Se({type:Fo,optional:!0})],Lo.prototype,"other",void 0);let Go=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Lo,context:0,implicit:!0,optional:!0})],Go.prototype,"rKeyId",void 0),Ee([Se({type:Uo,optional:!0})],Go.prototype,"issuerAndSerialNumber",void 0),Go=Ee([fe({type:Mt.Choice})],Go);class $o{constructor(t={}){this.rid=new Go,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Go})],$o.prototype,"rid",void 0),Ee([Se({type:Ht})],$o.prototype,"encryptedKey",void 0);let Qo=Vo=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};Qo=Vo=Ee([fe({type:Mt.Sequence,itemType:$o})],Qo);class Wo{constructor(t={}){this.algorithm=new Qi,this.publicKey=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Qi})],Wo.prototype,"algorithm",void 0),Ee([Se({type:Kt.BitString})],Wo.prototype,"publicKey",void 0);let qo=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Hi,context:0,implicit:!0,optional:!0})],qo.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Wo,context:1,implicit:!0,optional:!0})],qo.prototype,"originatorKey",void 0),Ee([Se({type:Uo,optional:!0})],qo.prototype,"issuerAndSerialNumber",void 0),qo=Ee([fe({type:Mt.Choice})],qo);class zo{constructor(t={}){this.version=Oo.v3,this.originator=new qo,this.keyEncryptionAlgorithm=new ko,this.recipientEncryptedKeys=new Qo,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],zo.prototype,"version",void 0),Ee([Se({type:qo,context:0})],zo.prototype,"originator",void 0),Ee([Se({type:Ht,context:1,optional:!0})],zo.prototype,"ukm",void 0),Ee([Se({type:ko})],zo.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Qo})],zo.prototype,"recipientEncryptedKeys",void 0);let Jo=class{constructor(t={}){Object.assign(this,t)}};Ee([Se({type:Hi,context:0,implicit:!0})],Jo.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Uo})],Jo.prototype,"issuerAndSerialNumber",void 0),Jo=Ee([fe({type:Mt.Choice})],Jo);class Zo{constructor(t={}){this.version=Oo.v0,this.rid=new Jo,this.keyEncryptionAlgorithm=new ko,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Zo.prototype,"version",void 0),Ee([Se({type:Jo})],Zo.prototype,"rid",void 0),Ee([Se({type:ko})],Zo.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Ht})],Zo.prototype,"encryptedKey",void 0);class Xo{constructor(t={}){this.keyIdentifier=new Ht,Object.assign(this,t)}}Ee([Se({type:Ht})],Xo.prototype,"keyIdentifier",void 0),Ee([Se({type:Kt.GeneralizedTime,optional:!0})],Xo.prototype,"date",void 0),Ee([Se({type:Fo,optional:!0})],Xo.prototype,"other",void 0);class Yo{constructor(t={}){this.version=Oo.v4,this.kekid=new Xo,this.keyEncryptionAlgorithm=new ko,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Yo.prototype,"version",void 0),Ee([Se({type:Xo})],Yo.prototype,"kekid",void 0),Ee([Se({type:ko})],Yo.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Ht})],Yo.prototype,"encryptedKey",void 0);class ta{constructor(t={}){this.version=Oo.v0,this.keyEncryptionAlgorithm=new ko,this.encryptedKey=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],ta.prototype,"version",void 0),Ee([Se({type:jo,context:0,optional:!0})],ta.prototype,"keyDerivationAlgorithm",void 0),Ee([Se({type:ko})],ta.prototype,"keyEncryptionAlgorithm",void 0),Ee([Se({type:Ht})],ta.prototype,"encryptedKey",void 0);class ea{constructor(t={}){this.oriType="",this.oriValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],ea.prototype,"oriType",void 0),Ee([Se({type:Kt.Any})],ea.prototype,"oriValue",void 0);let ia=class{constructor(t={}){Object.assign(this,t)}};var ra;Ee([Se({type:Zo,optional:!0})],ia.prototype,"ktri",void 0),Ee([Se({type:zo,context:1,implicit:!0,optional:!0})],ia.prototype,"kari",void 0),Ee([Se({type:Yo,context:2,implicit:!0,optional:!0})],ia.prototype,"kekri",void 0),Ee([Se({type:ta,context:3,implicit:!0,optional:!0})],ia.prototype,"pwri",void 0),Ee([Se({type:ea,context:4,implicit:!0,optional:!0})],ia.prototype,"ori",void 0),ia=Ee([fe({type:Mt.Choice})],ia);let sa=ra=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ra.prototype)}};var na;sa=ra=Ee([fe({type:Mt.Set,itemType:ia})],sa);class oa{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],oa.prototype,"otherRevInfoFormat",void 0),Ee([Se({type:Kt.Any})],oa.prototype,"otherRevInfo",void 0);let aa=class{constructor(t={}){this.other=new oa,Object.assign(this,t)}};Ee([Se({type:oa,context:1,implicit:!0})],aa.prototype,"other",void 0),aa=Ee([fe({type:Mt.Choice})],aa);let ca=na=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,na.prototype)}};ca=na=Ee([fe({type:Mt.Set,itemType:aa})],ca);class la{constructor(t={}){Object.assign(this,t)}}var ua;Ee([Se({type:Io,context:0,implicit:!0,optional:!0})],la.prototype,"certs",void 0),Ee([Se({type:ca,context:1,implicit:!0,optional:!0})],la.prototype,"crls",void 0);let ha=ua=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};ha=ua=Ee([fe({type:Mt.Set,itemType:wo})],ha);class pa{constructor(t={}){this.version=Oo.v0,this.recipientInfos=new sa,this.encryptedContentInfo=new _o,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],pa.prototype,"version",void 0),Ee([Se({type:la,context:0,implicit:!0,optional:!0})],pa.prototype,"originatorInfo",void 0),Ee([Se({type:sa})],pa.prototype,"recipientInfos",void 0),Ee([Se({type:_o})],pa.prototype,"encryptedContentInfo",void 0),Ee([Se({type:ha,context:1,implicit:!0,optional:!0})],pa.prototype,"unprotectedAttrs",void 0);let da=class{constructor(t={}){Object.assign(this,t)}};var ya;Ee([Se({type:Hi,context:0,implicit:!0})],da.prototype,"subjectKeyIdentifier",void 0),Ee([Se({type:Uo})],da.prototype,"issuerAndSerialNumber",void 0),da=Ee([fe({type:Mt.Choice})],da);class fa{constructor(t={}){this.version=Oo.v0,this.sid=new da,this.digestAlgorithm=new Ro,this.signatureAlgorithm=new No,this.signature=new Ht,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],fa.prototype,"version",void 0),Ee([Se({type:da})],fa.prototype,"sid",void 0),Ee([Se({type:Ro})],fa.prototype,"digestAlgorithm",void 0),Ee([Se({type:wo,repeated:"set",context:0,implicit:!0,optional:!0})],fa.prototype,"signedAttrs",void 0),Ee([Se({type:No})],fa.prototype,"signatureAlgorithm",void 0),Ee([Se({type:Ht})],fa.prototype,"signature",void 0),Ee([Se({type:wo,repeated:"set",context:1,implicit:!0,optional:!0})],fa.prototype,"unsignedAttrs",void 0);let Sa=ya=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ya.prototype)}};var Ca;Sa=ya=Ee([fe({type:Mt.Set,itemType:fa})],Sa);let Aa=Ca=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ca.prototype)}};Aa=Ca=Ee([fe({type:Mt.Set,itemType:Ro})],Aa);class ma{constructor(t={}){this.version=Oo.v0,this.digestAlgorithms=new Aa,this.encapContentInfo=new xo,this.signerInfos=new Sa,Object.assign(this,t)}}var ga;Ee([Se({type:Kt.Integer})],ma.prototype,"version",void 0),Ee([Se({type:Aa})],ma.prototype,"digestAlgorithms",void 0),Ee([Se({type:xo})],ma.prototype,"encapContentInfo",void 0),Ee([Se({type:Io,context:0,implicit:!0,optional:!0})],ma.prototype,"certificates",void 0),Ee([Se({type:aa,context:1,implicit:!0,optional:!0})],ma.prototype,"crls",void 0),Ee([Se({type:Sa})],ma.prototype,"signerInfos",void 0);class va{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}Ee([Se({type:Kt.ObjectIdentifier})],va.prototype,"attrId",void 0),Ee([Se({type:Kt.Any,repeated:"set"})],va.prototype,"attrValues",void 0);let Ea=ga=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,ga.prototype)}};var wa;Ea=ga=Ee([fe({type:Mt.Sequence,itemType:va})],Ea);let Pa=wa=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,wa.prototype)}};Pa=wa=Ee([fe({type:Mt.Sequence,itemType:Bo})],Pa);class ba{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],ba.prototype,"certId",void 0),Ee([Se({type:Kt.Any,context:0})],ba.prototype,"certValue",void 0);class Da{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Da.prototype,"crlId",void 0),Ee([Se({type:Kt.Any,context:0})],Da.prototype,"crltValue",void 0);class Ia extends Ht{}class Ba{constructor(t={}){this.encryptionAlgorithm=new Qi,this.encryptedData=new Ia,Object.assign(this,t)}}var Ta,xa;Ee([Se({type:Qi})],Ba.prototype,"encryptionAlgorithm",void 0),Ee([Se({type:Ia})],Ba.prototype,"encryptedData",void 0),function(t){t[t.v1=0]="v1"}(xa||(xa={}));class Oa extends Ht{}let Ra=Ta=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ta.prototype)}};Ra=Ta=Ee([fe({type:Mt.Sequence,itemType:Mi})],Ra);class Na{constructor(t={}){this.version=xa.v1,this.privateKeyAlgorithm=new Qi,this.privateKey=new Oa,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],Na.prototype,"version",void 0),Ee([Se({type:Qi})],Na.prototype,"privateKeyAlgorithm",void 0),Ee([Se({type:Oa})],Na.prototype,"privateKey",void 0),Ee([Se({type:Ra,implicit:!0,context:0,optional:!0})],Na.prototype,"attributes",void 0);let ka=class extends Na{};ka=Ee([fe({type:Mt.Sequence})],ka);let Ma=class extends Ba{};Ma=Ee([fe({type:Mt.Sequence})],Ma);class Ka{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Ka.prototype,"secretTypeId",void 0),Ee([Se({type:Kt.Any,context:0})],Ka.prototype,"secretValue",void 0);class ja{constructor(t={}){this.mac=new Tr,this.macSalt=new Ht,this.iterations=1,Object.assign(this,t)}}Ee([Se({type:Tr})],ja.prototype,"mac",void 0),Ee([Se({type:Ht})],ja.prototype,"macSalt",void 0),Ee([Se({type:Kt.Integer,defaultValue:1})],ja.prototype,"iterations",void 0);class Ha{constructor(t={}){this.version=3,this.authSafe=new Bo,this.macData=new ja,Object.assign(this,t)}}var _a;Ee([Se({type:Kt.Integer})],Ha.prototype,"version",void 0),Ee([Se({type:Bo})],Ha.prototype,"authSafe",void 0),Ee([Se({type:ja,optional:!0})],Ha.prototype,"macData",void 0);class Ua{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:Kt.ObjectIdentifier})],Ua.prototype,"bagId",void 0),Ee([Se({type:Kt.Any,context:0})],Ua.prototype,"bagValue",void 0),Ee([Se({type:va,repeated:"set",optional:!0})],Ua.prototype,"bagAttributes",void 0);let Fa=_a=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,_a.prototype)}};var Va,La,Ga;Fa=_a=Ee([fe({type:Mt.Sequence,itemType:Ua})],Fa);const $a="1.2.840.113549.1.9",Qa=`${$a}.2`,Wa=`${$a}.7`,qa=`${$a}.14`;let za=class extends Be{constructor(t={}){super(t)}toString(){return{}.toString(),this.ia5String||super.toString()}};Ee([Se({type:Kt.IA5String})],za.prototype,"ia5String",void 0),za=Ee([fe({type:Mt.Choice})],za);let Ja=class extends Bo{};Ja=Ee([fe({type:Mt.Sequence})],Ja);let Za=class extends Ha{};Za=Ee([fe({type:Mt.Sequence})],Za);let Xa=class extends Ba{};Xa=Ee([fe({type:Mt.Sequence})],Xa);let Ya=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.IA5String})],Ya.prototype,"value",void 0),Ya=Ee([fe({type:Mt.Choice})],Ya);let tc=class extends za{};tc=Ee([fe({type:Mt.Choice})],tc);let ec=class extends Be{};ec=Ee([fe({type:Mt.Choice})],ec);let ic=class{constructor(t=new Date){this.value=t}};Ee([Se({type:Kt.GeneralizedTime})],ic.prototype,"value",void 0),ic=Ee([fe({type:Mt.Choice})],ic);let rc=class extends Be{};rc=Ee([fe({type:Mt.Choice})],rc);let sc=class{constructor(t="M"){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.PrintableString})],sc.prototype,"value",void 0),sc=Ee([fe({type:Mt.Choice})],sc);let nc=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.PrintableString})],nc.prototype,"value",void 0),nc=Ee([fe({type:Mt.Choice})],nc);let oc=class extends nc{};oc=Ee([fe({type:Mt.Choice})],oc);let ac=class extends Be{};ac=Ee([fe({type:Mt.Choice})],ac);let cc=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.ObjectIdentifier})],cc.prototype,"value",void 0),cc=Ee([fe({type:Mt.Choice})],cc);let lc=class extends qi{};lc=Ee([fe({type:Mt.Choice})],lc);let uc=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};Ee([Se({type:Kt.Integer})],uc.prototype,"value",void 0),uc=Ee([fe({type:Mt.Choice})],uc);let hc=class extends fa{};hc=Ee([fe({type:Mt.Sequence})],hc);let pc=class extends Be{};pc=Ee([fe({type:Mt.Choice})],pc);let dc=Va=class extends Xi{constructor(t){super(t),Object.setPrototypeOf(this,Va.prototype)}};dc=Va=Ee([fe({type:Mt.Sequence})],dc);let yc=La=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,La.prototype)}};yc=La=Ee([fe({type:Mt.Set,itemType:wo})],yc);let fc=class{constructor(t=""){this.value=t}toString(){return this.value}};Ee([Se({type:Kt.BmpString})],fc.prototype,"value",void 0),fc=Ee([fe({type:Mt.Choice})],fc);let Sc=class extends Qi{};Sc=Ee([fe({type:Mt.Sequence})],Sc);let Cc=Ga=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ga.prototype)}};var Ac;Cc=Ga=Ee([fe({type:Mt.Sequence,itemType:Sc})],Cc);let mc=Ac=class extends ge{constructor(t){super(t),Object.setPrototypeOf(this,Ac.prototype)}};mc=Ac=Ee([fe({type:Mt.Sequence,itemType:Mi})],mc);class gc{constructor(t={}){this.version=0,this.subject=new Ne,this.subjectPKInfo=new Wi,this.attributes=new mc,Object.assign(this,t)}}Ee([Se({type:Kt.Integer})],gc.prototype,"version",void 0),Ee([Se({type:Ne})],gc.prototype,"subject",void 0),Ee([Se({type:Wi})],gc.prototype,"subjectPKInfo",void 0),Ee([Se({type:mc,implicit:!0,context:0})],gc.prototype,"attributes",void 0);class vc{constructor(t={}){this.certificationRequestInfo=new gc,this.signatureAlgorithm=new Qi,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}Ee([Se({type:gc})],vc.prototype,"certificationRequestInfo",void 0),Ee([Se({type:Qi})],vc.prototype,"signatureAlgorithm",void 0),Ee([Se({type:Kt.BitString})],vc.prototype,"signature",void 0);export{Ye as $,gn as A,po as B,er as C,yo as D,vn as E,uo as F,ho as G,co as H,So as I,lo as J,oo as K,ao as L,Gn as M,Ur as N,vc as O,sr as P,Kr as Q,kr as R,Ne as S,go as T,tc as U,Ao as V,Eo as W,Si as X,gi as Y,Me as Z,Ze as _,s as a,Ke as a0,Vt as a1,bi as a2,$e as a3,Ai as a4,Hi as a5,Ge as a6,hi as a7,Ve as a8,$i as a9,ki as aa,ri as ab,Ls as ac,Bi as ad,rs as ae,ns as af,os as ag,Xr as ah,Ts as ai,Bs as aj,Ms as ak,ks as al,$s as am,Gs as an,ji as ao,_i as ap,Li as aq,$r as ar,nn as as,fn as at,Ti as au,Ri as av,si as aw,yi as ax,o as b,a as c,n as d,In as e,ve as f,nr as g,ar as h,r as i,hr as j,bn as k,Dn as l,Bn as m,Mi as n,qa as o,Ae as p,dc as q,Qa as r,Wa as s,pc as t,Co as u,fo as v,vo as w,ro as x,so as y,mo as z}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{A as t,e as s,C as r,N as e,E as i,f as n,g as o,h as a,j as h,R as u,k as c,l as m,m as f}from"./p-
|
|
4
|
+
import{A as t,e as s,C as r,N as e,E as i,f as n,g as o,h as a,j as h,R as u,k as c,l as m,m as f}from"./p-a5d07697.js";import{b as g,D as l}from"./p-cff9655c.js";import{d as p}from"./p-fec9d812.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as i,h as e,H as s}from"./p-f7683ba5.js";import{i as o,a as r,b as a,c,d as n}from"./p-
|
|
4
|
+
import{r as t,c as i,h as e,H as s}from"./p-f7683ba5.js";import{i as o,a as r,b as a,c,d as n}from"./p-a5d07697.js";import"./p-fec9d812.js";import"./p-cff9655c.js";import{X as l}from"./p-b7045733.js";import{X as p,C as h,a as d}from"./p-6cd6e6da.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
|
-
*/function
|
|
11
|
+
*/function f(t){return new Promise(((i,e)=>{const s=new FileReader;s.onload=()=>i({value:s.result,fileName:t.name,fileSize:t.size,sourceMime:t.type}),s.onerror=()=>e(s.error),s.readAsBinaryString(t)}))}const u=class{constructor(e){t(this,e),this.successParse=i(this,"successParse",7),this.clearCertificate=i(this,"clearCertificate",7),this.onClickDecode=()=>{const{value:t}=this.inputPaste;t&&this.decode(t)},this.onClickExample=()=>{this.decode(this.certificateExample)},this.onClickClear=()=>{this.clearValue()},this.onChangeInputFile=async t=>{const i=t.target;if(i.files){const t=await f(i.files[0]);"string"==typeof t.value&&this.decode(t.value),i.value=""}},this.onDropFile=async t=>{t.stopPropagation(),t.preventDefault();const i=t.dataTransfer;if(i.files){const t=await f(i.files[0]);"string"==typeof t.value&&this.decode(t.value)}}}componentDidLoad(){this.defaultCertificate&&setTimeout((()=>this.decode(this.defaultCertificate)),100)}clearValue(){this.inputPaste.value="",this.certificateDecoded=null,this.clearCertificate.emit()}setValue(t){this.certificateDecoded=t,this.inputPaste.value=t.exportAsPemFormatted(),this.successParse.emit(t.exportAsBase64())}decode(t){const i=o(t),e=r(t),s=a(t),f=c(t),u=n(t);let b,w;if(i&&!(e||f||s||u))return this.clearValue(),void alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.");try{e&&(b=new l(t)),f&&(b=new p(t)),s&&(b=new h(t)),u&&(b=new d(t))}catch(t){w=t}if(!b)try{b=new l(t)}catch(t){w=t}if(!b)try{b=new p(t)}catch(t){w=t}if(!b)try{b=new h(t)}catch(t){w=t}if(!b)try{b=new d(t)}catch(t){w=t}b?this.setValue(b):(this.clearValue(),console.log(w),alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL."))}render(){return e(s,null,e("textarea",{placeholder:"Certificate DER or PEM",class:"textarea",ref:t=>{this.inputPaste=t},onDrop:this.onDropFile}),e("div",{class:"controls"},e("peculiar-button",{fill:"fill",class:"button",onClick:this.onClickDecode},"Decode"),e("peculiar-button",{class:"button"},"Choose file",e("input",{type:"file",class:"input_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.onChangeInputFile,value:""})),e("peculiar-button",{class:"button",onClick:this.onClickClear},"Clear"),this.certificateExample&&e("peculiar-button",{class:"button",onClick:this.onClickExample},"Example")),this.certificateDecoded instanceof l&&e("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof p&&e("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof h&&e("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof d&&e("peculiar-crl-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}))}};u.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block;width:100%;font-size:0}.textarea{min-height:300px;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:14px;font-family:monospace;resize:vertical;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);font-size:14px;font-size:var(--pv-font-size-h7)}.controls{margin-top:10px}.button{position:relative}.button:not(:first-child){margin-left:10px}.viewer{margin-top:64px}.input_file{opacity:0;width:100%;height:100%;top:0;left:0;display:block;position:absolute}";export{u as peculiar_certificate_decoder}
|