@peculiar/certificates-viewer 3.4.0 → 3.6.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.
Files changed (32) hide show
  1. package/dist/cjs/{certification_request-b5fe8a57.js → certification_request-6cd86a69.js} +7 -4
  2. package/dist/cjs/{crl-a1ac7534.js → crl-91c8642c.js} +1 -1
  3. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +17 -7
  4. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +3 -3
  5. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +3 -3
  6. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +2 -2
  7. package/dist/cjs/{public_key-3d4ae164.js → public_key-dccd1cdf.js} +1 -1
  8. package/dist/cjs/{x509_certificate-29a3636a.js → x509_certificate-87a3fdb6.js} +1 -1
  9. package/dist/collection/components/crl-viewer/crl-viewer.js +1 -1
  10. package/dist/collection/components/crl-viewer/revoked_certificates.js +15 -4
  11. package/dist/collection/constants/oids.js +3 -0
  12. package/dist/esm/{certification_request-35ade000.js → certification_request-5089bdb5.js} +4 -1
  13. package/dist/esm/{crl-42d5e233.js → crl-cd78d029.js} +1 -1
  14. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +17 -7
  15. package/dist/esm/peculiar-certificate-decoder.entry.js +3 -3
  16. package/dist/esm/peculiar-certificate-viewer.entry.js +3 -3
  17. package/dist/esm/peculiar-certificates-viewer.entry.js +2 -2
  18. package/dist/esm/{public_key-b2dba162.js → public_key-081d831c.js} +1 -1
  19. package/dist/esm/{x509_certificate-2503dcc1.js → x509_certificate-69c7b972.js} +1 -1
  20. package/dist/peculiar/p-28d6119e.entry.js +26 -0
  21. package/dist/peculiar/{p-7a0fb5a8.entry.js → p-39896604.entry.js} +1 -1
  22. package/dist/peculiar/{p-a5d07697.js → p-3bd51c63.js} +2 -2
  23. package/dist/peculiar/{p-cb9b9f9c.entry.js → p-72856c36.entry.js} +2 -2
  24. package/dist/peculiar/{p-6cd6e6da.js → p-85377ca1.js} +1 -1
  25. package/dist/peculiar/{p-b7045733.js → p-a7322c0b.js} +1 -1
  26. package/dist/peculiar/{p-3d0fdbd5.entry.js → p-ade86ece.entry.js} +1 -1
  27. package/dist/peculiar/{p-54171e39.js → p-f8d68bc3.js} +3 -3
  28. package/dist/peculiar/peculiar.esm.js +1 -1
  29. package/dist/types/components/crl-viewer/revoked_certificates.d.ts +1 -1
  30. package/dist/types/constants/oids.d.ts +2 -0
  31. package/package.json +2 -2
  32. package/dist/peculiar/p-1a8379f0.entry.js +0 -26
@@ -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-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";
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-3bd51c63.js";import"./p-fec9d812.js";import"./p-cff9655c.js";import{X as l}from"./p-a7322c0b.js";import{X as p,C as h,a as f}from"./p-85377ca1.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 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}
11
+ */function d(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 d(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 d(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),d=c(t),u=n(t);let b,w;if(i&&!(e||d||s||u))return this.clearValue(),void alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.");try{e&&(b=new l(t)),d&&(b=new p(t)),s&&(b=new h(t)),u&&(b=new f(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 f(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 f&&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}
@@ -1,7 +1,7 @@
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 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";
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-3bd51c63.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.
@@ -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-a5d07697.js";import{b as g,D as l}from"./p-cff9655c.js";import{d as p}from"./p-fec9d812.js";
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-3bd51c63.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,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-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}
4
+ import{r as t,h as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-a7322c0b.js";import"./p-3bd51c63.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-f8d68bc3.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-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";
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,_ as s,p as f,$ as i,a0 as d,a1 as b,a2 as r,a3 as l,a4 as u,a5 as m,a6 as v,a7 as x,a8 as g,a9 as p,aa as y,ab as C,ac as h,ad as N,ae as S,af as A,ag as D,ah as I,ai as G,aj as j,ak as T,al as O,am as k,an as $,ao as P,X as L,ap as V,aq as R,ar as U,as as E,at as K,au as H,av as X,aw as M,ax as Y,ay as _}from"./p-3bd51c63.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -23,7 +23,7 @@ import{h as e}from"./p-f7683ba5.js";import{b as a}from"./p-cff9655c.js";import{l
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
25
  */
26
- const B=a=>{const{value:n}=a;return n?e("tr",{class:"title"},e("td",{colSpan:2},e("peculiar-typography",{type:"h6"},n))):null},w=a=>{const{name:n,value:c,monospace:t,collapse:o,href:s,extraValue:f}=a;if(!n)return null;if(null==c)return null;let i;i=o?e("peculiar-text-hider",null,c):c;const d=!!c.toString();return e("tr",null,e("td",{colSpan:d?1:2},e("peculiar-typography",{color:"grey_5"},n,d?":":"")),d&&e("td",{class:{monospace:t}},function(e){return 0===e.indexOf("http")}(c.toString())||s?e("peculiar-link",{href:s||c.toString()},c):e("peculiar-typography",{monospace:t},i,f)))},W=c=>{const{signature:t}=c;return t?[e(B,{value:n.getString("signature")}),e(w,{name:n.getString("algorithm"),value:q(t.algorithm)}),e(w,{name:n.getString("value"),value:a.Convert.ToHex(t.value),monospace:!0,collapse:!0})]:null},z={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"},F=n=>{const{generalName:c,getDNSNameLink:r,getIPAddressLink:l}=n;return c?Object.keys(c).map((n=>{const u=c[n];if(u instanceof o)return[e(w,{name:z[n]||n,value:""}),u.map((a=>a.map((a=>e(w,{name:t[a.type]||a.type,value:a.value.toString()})))))];if(u instanceof s){try{const a=f.parse(u.value,i);return e(w,{name:t[u.typeId]||u.typeId,value:a.toString()})}catch(e){}try{const a=f.parse(u.value,d);if(a.explicitText)return e(w,{name:t[u.typeId]||u.typeId,value:a.explicitText.toString()})}catch(e){}return e(w,{name:t[u.typeId]||u.typeId,value:a.Convert.ToHex(u.value),monospace:!0})}return a.BufferSourceConverter.isBufferSource(u)?e(w,{name:z[n]||n,value:a.Convert.ToString(u)}):e(w,u instanceof b?{name:z[n]||n,value:a.Convert.ToString(u.partyName)}:"dNSName"===n?{name:z[n]||n,value:u,href:r(u)}:"iPAddress"===n?{name:z[n]||n,value:u,href:l(u)}:{name:z[n]||n,value:u})})):null},Q=a=>{const{thumbprints:c}=a;if(!c)return null;const t=Object.keys(c);return t.length?[e(B,{value:n.getString("fingerprints")}),t.map((a=>e(w,{name:a,value:c[a],monospace:!0})))]:null},Z=(a,c)=>{const{extension:t}=a;return[e(w,{name:"Name",value:q(t.asn.extnID)}),e(w,{name:"Critical",value:n.getString(t.asn.critical?"yes":"no")}),c,e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",{class:"bg_fill"})))]},J=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Usage",value:n.value.toJSON().join(", ")}))},ee=a=>{const{extension:c}=a;return e(Z,{extension:c},e(w,{name:"Certificate Authority",value:n.getString(c.value.cA?"yes":"no")}),e(w,{name:"Path Length Constraint",value:c.value.pathLenConstraint}))},ae=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>e(w,{name:`Purpose #${n+1}`,value:q(a)}))))},ne=n=>{const{extension:c,getSubjectKeyIdChildrenLink:t,getSubjectKeyIdSiblingsLink:o}=n,s=a.Convert.ToHex(c.value.buffer),f=t(s),i=o(s);return e(Z,{extension:c},e(w,{name:"Key ID",value:s,monospace:!0,extraValue:[f&&e("span",null," [",e("peculiar-link",{href:f},"children"),"]"),i&&e("span",null," [",e("peculiar-link",{href:i},"siblings"),"]")]}))},ce=n=>{const{extension:c,getAuthKeyIdParentLink:t,getAuthKeyIdSiblingsLink:o}=n,s=a.Convert.ToHex(c.value.keyIdentifier.buffer),f=t(s),i=o(s);return e(Z,{extension:c},e(w,{name:"Key ID",value:s,monospace:!0,extraValue:[f&&e("span",null," [",e("peculiar-link",{href:f},"parents"),"]"),i&&e("span",null," [",e("peculiar-link",{href:i},"siblings"),"]")]}))},te=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map((n=>{var c,t;return[null===(c=n.distributionPoint)||void 0===c?void 0:c.fullName.map((n=>e(F,Object.assign({generalName:n},a)))),null===(t=n.cRLIssuer)||void 0===t?void 0:t.map((n=>e(F,Object.assign({generalName:n},a))))]})))},oe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((n,c)=>[e(w,{name:`Description #${c+1}`,value:""}),e(w,{name:"Method",value:q(n.accessMethod)}),e(F,Object.assign({generalName:n.accessLocation},a))])))},se=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map((n=>e(F,Object.assign({generalName:n},a)))))},fe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>{var c;return[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"ID",value:q(a.policyIdentifier)}),null===(c=a.policyQualifiers)||void 0===c?void 0:c.map(((a,c)=>{const t=[e(w,{name:`Qualifier #${n+1}.${c+1}`,value:""}),e(w,{name:"ID",value:q(a.policyQualifierId)})];if("1.3.6.1.5.5.7.2.1"===a.policyQualifierId){const n=f.parse(a.qualifier,i);t.push(e(w,{name:"Value",value:n.toString()}))}if("1.3.6.1.5.5.7.2.2"===a.policyQualifierId){const n=f.parse(a.qualifier,d);n.explicitText&&t.push(e(w,{name:"Value",value:n.explicitText.toString()}))}return t}))]})))},ie={"9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5":"Akamai CT","39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9":"Alpha CT",a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638:"CNNIC CT",cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900:"Certly.IO","1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4":"Cloudflare “Nimbus2017”",db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64:"Cloudflare “Nimbus2018”","747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56":"Cloudflare “Nimbus2019”","5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558":"Cloudflare “Nimbus2020”","4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8":"Cloudflare “Nimbus2021”","41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6":"Cloudflare “Nimbus2022”","7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52":"Cloudflare “Nimbus2023”","6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5":"DigiCert Nessie2018",fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c:"DigiCert Nessie2019",c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565:"DigiCert Nessie2020",eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9:"DigiCert Nessie2021","51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5":"DigiCert Nessie2022",b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a:"DigiCert Nessie2023","5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd":"DigiCert Server","8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f":"DigiCert Server 2",c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360:"DigiCert Yeti2018",e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe:"DigiCert Yeti2019",f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273:"DigiCert Yeti2020","5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca":"DigiCert Yeti2021","2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02":"DigiCert Yeti2022","35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c":"DigiCert Yeti2023","717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668":"GDCA 1","14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a":"GDCA 2",c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa:"GDCA CT #1","924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01":"GDCA CT #2",fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28:"Google “Argon2017”",a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25:"Google “Argon2018”","63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d":"Google “Argon2019”",b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e:"Google “Argon2020”",f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3:"Google “Argon2021”","2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784":"Google “Argon2022”","68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4":"Google “Aviator”",c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6:"Google “Crucible”","1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb":"Google “Daedalus”","293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478":"Google “Icarus”",a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10:"Google “Pilot”",ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb:"Google “Rocketeer”",bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185:"Google “Skydiver”","52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03":"Google “Solera2018”","0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00":"Google “Solera2019”","1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7":"Google “Solera2020”",a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7:"Google “Solera2021”","697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3":"Google “Solera2022”",a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681:"Google “Submariner”",b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77:"Google “Testtube”",b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e:"Google “Xenon2018”","084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0":"Google “Xenon2019”","07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c":"Google “Xenon2020”","7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7":"Google “Xenon2021”","46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47":"Google “Xenon2022”","7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3":"Izenpe","8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566":"Izenpe “Argi”","296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd":"Let“s Encrypt ”Clicky”","537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440":"Nordu “flimsy”",aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd:"Nordu “plausible”",e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273:"PuChuangSiDa CT",cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6:"SHECA CT 1","32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623":"SHECA CT 2",db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98:"Sectigo (Comodo) “Dodo” CT","6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913":"Sectigo (Comodo) “Mammoth” CT","5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c":"Sectigo (Comodo) “Sabre” CT","34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef":"StartCom",ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc:"Symantec",a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2:"Symantec Deneb","15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f":"Symantec “Sirius”",bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5:"Symantec “Vega”",b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b:"Up In The Air “Behind the Sofa”",ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d:"Venafi","03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b":"Venafi Gen2 CT","41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263":"WoSign","63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7":"WoSign 2","9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b":"WoSign CT #1"},de=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.toJSON().map(((a,n)=>[e(w,{name:`SCT #${n+1}`,value:""}),e(w,{name:"Version",value:a.version+1}),e(w,{name:"Log Operator",value:ie[a.logId]||a.logId}),e(w,{name:"Log Key ID",value:a.logId,monospace:!0}),e(w,{name:"Timestamp",value:c(a.timestamp)}),e(w,{name:"Signature Algorithm",value:`${a.hashAlgorithm} ${a.signatureAlgorithm}`.toUpperCase()}),e(w,{name:"Signature",value:a.signature,monospace:!0})])))},be=a=>{var n,c;const{extension:t}=a;return e(Z,{extension:t},null===(n=t.value.excludedSubtrees)||void 0===n?void 0:n.map((n=>e(F,Object.assign({generalName:n.base},a)))),null===(c=t.value.permittedSubtrees)||void 0===c?void 0:c.map((n=>e(F,Object.assign({generalName:n.base},a)))))},re=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Template ID",value:n.value.templateID}),e(w,{name:"Template Major Version",value:n.value.templateMajorVersion}),e(w,{name:"Template Minor Version",value:n.value.templateMinorVersion}))},le=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Name",value:n.value.toString()}))},ue=a=>{const{extension:n}=a,c=n.value.getVersion();return e(Z,{extension:n},e(w,{name:"Certificate Index",value:c.certificateIndex}),e(w,{name:"Key Index",value:c.keyIndex}))},me=n=>{const{extension:c}=n;return e(Z,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Statement #${c+1}`,value:""}),e(w,{name:"ID",value:q(n.statementId)}),e(w,{name:"Info",value:n.statementInfo.byteLength?a.Convert.ToHex(n.statementInfo):null,monospace:!0})])))},ve=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Comment",value:n.value.value}))},xe=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Type",value:n.value.toJSON().join(", ")}))},ge=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Role",value:n.value.text}))},pe=a=>{const{extension:n,getLEILink:c}=a;return e(Z,{extension:n},e(w,{name:"Identifier",value:n.value.text,href:c(n.value.text)}))},ye=a=>{const{extension:c}=a;return e(Z,{extension:c},e(w,{name:"Version",value:c.value.version}),e(F,Object.assign({generalName:c.value.location},a)),e(w,{name:"Requires Auth",value:n.getString(c.value.requiresAuth?"yes":"no")}))},Ce=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.version}))},he=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Reason",value:n.value.toJSON()}))};
26
+ const B=a=>{const{value:n}=a;return n?e("tr",{class:"title"},e("td",{colSpan:2},e("peculiar-typography",{type:"h6"},n))):null},w=a=>{const{name:n,value:c,monospace:t,collapse:o,href:s,extraValue:f}=a;if(!n)return null;if(null==c)return null;let i;i=o?e("peculiar-text-hider",null,c):c;const d=!!c.toString();return e("tr",null,e("td",{colSpan:d?1:2},e("peculiar-typography",{color:"grey_5"},n,d?":":"")),d&&e("td",{class:{monospace:t}},function(e){return 0===e.indexOf("http")}(c.toString())||s?e("peculiar-link",{href:s||c.toString()},c):e("peculiar-typography",{monospace:t},i,f)))},W=c=>{const{signature:t}=c;return t?[e(B,{value:n.getString("signature")}),e(w,{name:n.getString("algorithm"),value:q(t.algorithm)}),e(w,{name:n.getString("value"),value:a.Convert.ToHex(t.value),monospace:!0,collapse:!0})]:null},z={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"},F=n=>{const{generalName:c,getDNSNameLink:r,getIPAddressLink:l}=n;return c?Object.keys(c).map((n=>{const u=c[n];if(u instanceof o)return[e(w,{name:z[n]||n,value:""}),u.map((a=>a.map((a=>e(w,{name:t[a.type]||a.type,value:a.value.toString()})))))];if(u instanceof s){try{const a=f.parse(u.value,i);return e(w,{name:t[u.typeId]||u.typeId,value:a.toString()})}catch(e){}try{const a=f.parse(u.value,d);if(a.explicitText)return e(w,{name:t[u.typeId]||u.typeId,value:a.explicitText.toString()})}catch(e){}return e(w,{name:t[u.typeId]||u.typeId,value:a.Convert.ToHex(u.value),monospace:!0})}return a.BufferSourceConverter.isBufferSource(u)?e(w,{name:z[n]||n,value:a.Convert.ToString(u)}):e(w,u instanceof b?{name:z[n]||n,value:a.Convert.ToString(u.partyName)}:"dNSName"===n?{name:z[n]||n,value:u,href:r(u)}:"iPAddress"===n?{name:z[n]||n,value:u,href:l(u)}:{name:z[n]||n,value:u})})):null},Q=a=>{const{thumbprints:c}=a;if(!c)return null;const t=Object.keys(c);return t.length?[e(B,{value:n.getString("fingerprints")}),t.map((a=>e(w,{name:a,value:c[a],monospace:!0})))]:null},J=(a,c)=>{const{extension:t}=a;return[e(w,{name:"Name",value:q(t.asn.extnID)}),e(w,{name:"Critical",value:n.getString(t.asn.critical?"yes":"no")}),c,e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",{class:"bg_fill"})))]},Z=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Usage",value:n.value.toJSON().join(", ")}))},ee=a=>{const{extension:c}=a;return e(J,{extension:c},e(w,{name:"Certificate Authority",value:n.getString(c.value.cA?"yes":"no")}),e(w,{name:"Path Length Constraint",value:c.value.pathLenConstraint}))},ae=a=>{const{extension:n}=a;return e(J,{extension:n},n.value.map(((a,n)=>e(w,{name:`Purpose #${n+1}`,value:q(a)}))))},ne=n=>{const{extension:c,getSubjectKeyIdChildrenLink:t,getSubjectKeyIdSiblingsLink:o}=n,s=a.Convert.ToHex(c.value.buffer),f=t(s),i=o(s);return e(J,{extension:c},e(w,{name:"Key ID",value:s,monospace:!0,extraValue:[f&&e("span",null," [",e("peculiar-link",{href:f},"children"),"]"),i&&e("span",null," [",e("peculiar-link",{href:i},"siblings"),"]")]}))},ce=n=>{const{extension:c,getAuthKeyIdParentLink:t,getAuthKeyIdSiblingsLink:o}=n,s=a.Convert.ToHex(c.value.keyIdentifier.buffer),f=t(s),i=o(s);return e(J,{extension:c},e(w,{name:"Key ID",value:s,monospace:!0,extraValue:[f&&e("span",null," [",e("peculiar-link",{href:f},"parents"),"]"),i&&e("span",null," [",e("peculiar-link",{href:i},"siblings"),"]")]}))},te=a=>{const{extension:n}=a;return e(J,{extension:n},n.value.map((n=>{var c,t;return[null===(c=n.distributionPoint)||void 0===c?void 0:c.fullName.map((n=>e(F,Object.assign({generalName:n},a)))),null===(t=n.cRLIssuer)||void 0===t?void 0:t.map((n=>e(F,Object.assign({generalName:n},a))))]})))},oe=a=>{const{extension:n}=a;return e(J,{extension:n},n.value.map(((n,c)=>[e(w,{name:`Description #${c+1}`,value:""}),e(w,{name:"Method",value:q(n.accessMethod)}),e(F,Object.assign({generalName:n.accessLocation},a))])))},se=a=>{const{extension:n}=a;return e(J,{extension:n},n.value.map((n=>e(F,Object.assign({generalName:n},a)))))},fe=a=>{const{extension:n}=a;return e(J,{extension:n},n.value.map(((a,n)=>{var c;return[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"ID",value:q(a.policyIdentifier)}),null===(c=a.policyQualifiers)||void 0===c?void 0:c.map(((a,c)=>{const t=[e(w,{name:`Qualifier #${n+1}.${c+1}`,value:""}),e(w,{name:"ID",value:q(a.policyQualifierId)})];if("1.3.6.1.5.5.7.2.1"===a.policyQualifierId){const n=f.parse(a.qualifier,i);t.push(e(w,{name:"Value",value:n.toString()}))}if("1.3.6.1.5.5.7.2.2"===a.policyQualifierId){const n=f.parse(a.qualifier,d);n.explicitText&&t.push(e(w,{name:"Value",value:n.explicitText.toString()}))}return t}))]})))},ie={"9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5":"Akamai CT","39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9":"Alpha CT",a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638:"CNNIC CT",cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900:"Certly.IO","1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4":"Cloudflare “Nimbus2017”",db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64:"Cloudflare “Nimbus2018”","747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56":"Cloudflare “Nimbus2019”","5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558":"Cloudflare “Nimbus2020”","4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8":"Cloudflare “Nimbus2021”","41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6":"Cloudflare “Nimbus2022”","7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52":"Cloudflare “Nimbus2023”","6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5":"DigiCert Nessie2018",fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c:"DigiCert Nessie2019",c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565:"DigiCert Nessie2020",eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9:"DigiCert Nessie2021","51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5":"DigiCert Nessie2022",b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a:"DigiCert Nessie2023","5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd":"DigiCert Server","8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f":"DigiCert Server 2",c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360:"DigiCert Yeti2018",e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe:"DigiCert Yeti2019",f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273:"DigiCert Yeti2020","5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca":"DigiCert Yeti2021","2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02":"DigiCert Yeti2022","35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c":"DigiCert Yeti2023","717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668":"GDCA 1","14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a":"GDCA 2",c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa:"GDCA CT #1","924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01":"GDCA CT #2",fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28:"Google “Argon2017”",a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25:"Google “Argon2018”","63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d":"Google “Argon2019”",b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e:"Google “Argon2020”",f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3:"Google “Argon2021”","2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784":"Google “Argon2022”","68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4":"Google “Aviator”",c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6:"Google “Crucible”","1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb":"Google “Daedalus”","293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478":"Google “Icarus”",a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10:"Google “Pilot”",ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb:"Google “Rocketeer”",bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185:"Google “Skydiver”","52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03":"Google “Solera2018”","0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00":"Google “Solera2019”","1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7":"Google “Solera2020”",a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7:"Google “Solera2021”","697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3":"Google “Solera2022”",a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681:"Google “Submariner”",b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77:"Google “Testtube”",b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e:"Google “Xenon2018”","084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0":"Google “Xenon2019”","07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c":"Google “Xenon2020”","7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7":"Google “Xenon2021”","46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47":"Google “Xenon2022”","7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3":"Izenpe","8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566":"Izenpe “Argi”","296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd":"Let“s Encrypt ”Clicky”","537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440":"Nordu “flimsy”",aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd:"Nordu “plausible”",e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273:"PuChuangSiDa CT",cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6:"SHECA CT 1","32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623":"SHECA CT 2",db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98:"Sectigo (Comodo) “Dodo” CT","6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913":"Sectigo (Comodo) “Mammoth” CT","5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c":"Sectigo (Comodo) “Sabre” CT","34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef":"StartCom",ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc:"Symantec",a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2:"Symantec Deneb","15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f":"Symantec “Sirius”",bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5:"Symantec “Vega”",b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b:"Up In The Air “Behind the Sofa”",ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d:"Venafi","03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b":"Venafi Gen2 CT","41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263":"WoSign","63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7":"WoSign 2","9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b":"WoSign CT #1"},de=a=>{const{extension:n}=a;return e(J,{extension:n},n.value.toJSON().map(((a,n)=>[e(w,{name:`SCT #${n+1}`,value:""}),e(w,{name:"Version",value:a.version+1}),e(w,{name:"Log Operator",value:ie[a.logId]||a.logId}),e(w,{name:"Log Key ID",value:a.logId,monospace:!0}),e(w,{name:"Timestamp",value:c(a.timestamp)}),e(w,{name:"Signature Algorithm",value:`${a.hashAlgorithm} ${a.signatureAlgorithm}`.toUpperCase()}),e(w,{name:"Signature",value:a.signature,monospace:!0})])))},be=a=>{var n,c;const{extension:t}=a;return e(J,{extension:t},null===(n=t.value.excludedSubtrees)||void 0===n?void 0:n.map((n=>e(F,Object.assign({generalName:n.base},a)))),null===(c=t.value.permittedSubtrees)||void 0===c?void 0:c.map((n=>e(F,Object.assign({generalName:n.base},a)))))},re=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Template ID",value:n.value.templateID}),e(w,{name:"Template Major Version",value:n.value.templateMajorVersion}),e(w,{name:"Template Minor Version",value:n.value.templateMinorVersion}))},le=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Name",value:n.value.toString()}))},ue=a=>{const{extension:n}=a,c=n.value.getVersion();return e(J,{extension:n},e(w,{name:"Certificate Index",value:c.certificateIndex}),e(w,{name:"Key Index",value:c.keyIndex}))},me=n=>{const{extension:c}=n;return e(J,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Statement #${c+1}`,value:""}),e(w,{name:"ID",value:q(n.statementId)}),e(w,{name:"Info",value:n.statementInfo.byteLength?a.Convert.ToHex(n.statementInfo):null,monospace:!0})])))},ve=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Comment",value:n.value.value}))},xe=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Type",value:n.value.toJSON().join(", ")}))},ge=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Role",value:n.value.text}))},pe=a=>{const{extension:n,getLEILink:c}=a;return e(J,{extension:n},e(w,{name:"Identifier",value:n.value.text,href:c(n.value.text)}))},ye=a=>{const{extension:c}=a;return e(J,{extension:c},e(w,{name:"Version",value:c.value.version}),e(F,Object.assign({generalName:c.value.location},a)),e(w,{name:"Requires Auth",value:n.getString(c.value.requiresAuth?"yes":"no")}))},Ce=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Version",value:n.value.version}))},he=a=>{const{extension:n}=a;return e(J,{extension:n},e(w,{name:"Reason",value:n.value.toJSON()}))};
27
27
  /**
28
28
  * @license
29
29
  * 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 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}`
41
+ */const Se=a=>{const{extension:n}=a;return e(J,{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(J,{extension:n},e(w,{name:"Value",value:n.value,monospace:!0}))},De=a=>{const{extension:n}=a;return e(J,{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(J,{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(J,{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(J,{extension:c},s("Subject",c.value.subjectLogo),s("Issuer",c.value.issuerLogo))},Te=a=>{const{extension:n}=a;return e(J,{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(J,{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(J,{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(J,{extension:c},e(w,{name:n.getString("value"),value:c.value.value}))},Pe=a=>{var c;const{extension:t}=a;return e(J,{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(Z,{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:J,{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.
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),a=r["data-opts"]||{};return a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const a=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[a]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const s=new Map;t[a]=i=>{const n=new URL(i,c).href;let l=s.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${a}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[a].m),i.remove()}})),s.set(n,l),e.head.appendChild(i)}return l}}})(a.resourcesUrl,r),t.customElements?c(a):__sc_import_peculiar("./p-9f4ee110.js").then((()=>a))})().then((e=>r([["p-dafae164",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-3d0fdbd5",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-cb9b9f9c",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-7a0fb5a8",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-1a8379f0",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-870c3592",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
4
+ import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-dafae164",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-ade86ece",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-72856c36",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-39896604",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-28d6119e",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-870c3592",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { FunctionalComponent } from '../../stencil-public-runtime';
9
9
  import { IRevokedCertificate } from '../../crypto';
10
- interface IRevokedCertificatesProps {
10
+ interface IRevokedCertificatesProps extends IGeneralNameOptions {
11
11
  revokedCertificates: IRevokedCertificate[];
12
12
  }
13
13
  export declare const RevokedCertificates: FunctionalComponent<IRevokedCertificatesProps>;
@@ -2302,4 +2302,6 @@ export declare const OIDs: {
2302
2302
  '0.4.0.9496.7': string;
2303
2303
  '0.4.0.9496.8': string;
2304
2304
  '0.4.0.9496.9': string;
2305
+ '1.3.6.1.4.1.37244.2.1': string;
2306
+ '1.3.6.1.4.1.37244.2.2': string;
2305
2307
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peculiar/certificates-viewer",
3
- "version": "3.4.0",
3
+ "version": "3.6.0",
4
4
  "private": false,
5
5
  "description": "Peculiar Certificate Viewer web-components makes it easy for you to display certificate related details in your web application.",
6
6
  "keywords": [
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "0a6fcecccbca1572393d0f4cb0788e19d30e3668"
73
+ "gitHead": "82429d5cf5c2a16ab8ba905fee85cf9b37d80afb"
74
74
  }
@@ -1,26 +0,0 @@
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}