@peculiar/certificates-viewer 4.2.1 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attribute-certificate-viewer.js +17 -14
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/attribute.js +53 -0
- package/components/attribute.js.map +1 -0
- package/components/certificate-viewer.js +15 -13
- package/components/certificate-viewer.js.map +1 -1
- package/components/crl-viewer.js +20 -18
- package/components/crl-viewer.js.map +1 -1
- package/components/csr-viewer.js +9 -99
- package/components/csr-viewer.js.map +1 -1
- package/components/download.js +12518 -9
- package/components/download.js.map +1 -1
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/components/index2.js +3 -48
- package/components/index2.js.map +1 -1
- package/components/issuer_name.js +2 -2
- package/components/miscellaneous.js +41 -12555
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +17 -105
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificates-viewer.js +1 -2
- package/components/peculiar-certificates-viewer.js.map +1 -1
- package/components/peculiar-crl-viewer.js +1 -1
- package/components/peculiar-csr-viewer.js +1 -1
- package/components/pkcs10_certificate_request.js +102 -0
- package/components/pkcs10_certificate_request.js.map +1 -0
- package/components/read_file.js +110 -0
- package/components/read_file.js.map +1 -0
- package/components/subject_name.js +2 -2
- package/dist/cjs/{certification_request-b0d72620.js → certification_request-314859bb.js} +3266 -2810
- package/dist/cjs/certification_request-314859bb.js.map +1 -0
- package/dist/cjs/index.cjs.js +12 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{miscellaneous-dcb93a5b.js → miscellaneous-f1bc3a4b.js} +22 -23
- package/dist/cjs/miscellaneous-f1bc3a4b.js.map +1 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +20 -20
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +20 -108
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +3 -4
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +2 -3
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/pkcs10_certificate_request-93c66ce7.js +149 -0
- package/dist/cjs/pkcs10_certificate_request-93c66ce7.js.map +1 -0
- package/dist/cjs/read_file-2e22a97e.js +115 -0
- package/dist/cjs/read_file-2e22a97e.js.map +1 -0
- package/dist/cjs/{x509_certificate-ebf4cbd4.js → x509_certificate-0776e3ec.js} +17 -16
- package/dist/cjs/x509_certificate-0776e3ec.js.map +1 -0
- package/dist/cjs/x509_crl-5326d209.js +179 -0
- package/dist/cjs/x509_crl-5326d209.js.map +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +15 -72
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
- package/dist/collection/components/crl-viewer/crl-viewer.js +6 -6
- package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
- package/dist/collection/components/csr-viewer/csr-viewer.js +6 -6
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
- package/dist/collection/constants/oids.js +3 -0
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/index.js +2 -2
- package/dist/collection/crypto/index.js.map +1 -1
- package/dist/collection/crypto/{csr.js → pkcs10_certificate_request.js} +14 -12
- package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -0
- package/dist/collection/crypto/x509_attribute_certificate.js +13 -11
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
- package/dist/collection/crypto/x509_certificate.js +13 -11
- package/dist/collection/crypto/x509_certificate.js.map +1 -1
- package/dist/collection/crypto/{crl.js → x509_crl.js} +14 -12
- package/dist/collection/crypto/x509_crl.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/download.js +8 -8
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/collection/utils/validator.js +0 -8
- package/dist/collection/utils/validator.js.map +1 -1
- package/dist/esm/{certification_request-2c054ece.js → certification_request-b531916a.js} +3202 -2745
- package/dist/esm/certification_request-b531916a.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{miscellaneous-0e98b5bc.js → miscellaneous-7fe71e3f.js} +2 -3
- package/dist/esm/miscellaneous-7fe71e3f.js.map +1 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +12 -12
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-decoder.entry.js +18 -106
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +3 -4
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +2 -3
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm/pkcs10_certificate_request-cca2ca68.js +146 -0
- package/dist/esm/pkcs10_certificate_request-cca2ca68.js.map +1 -0
- package/dist/esm/read_file-bb0b1450.js +110 -0
- package/dist/esm/read_file-bb0b1450.js.map +1 -0
- package/dist/esm/{x509_certificate-ad568d3a.js → x509_certificate-050175dd.js} +15 -14
- package/dist/esm/x509_certificate-050175dd.js.map +1 -0
- package/dist/esm/x509_crl-c497f907.js +176 -0
- package/dist/esm/x509_crl-c497f907.js.map +1 -0
- package/dist/esm-es5/{certification_request-2c054ece.js → certification_request-b531916a.js} +61 -23
- package/dist/esm-es5/certification_request-b531916a.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{miscellaneous-0e98b5bc.js → miscellaneous-7fe71e3f.js} +2 -2
- package/dist/esm-es5/{miscellaneous-0e98b5bc.js.map → miscellaneous-7fe71e3f.js.map} +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +2 -2
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +2 -9
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/pkcs10_certificate_request-cca2ca68.js +19 -0
- package/dist/esm-es5/pkcs10_certificate_request-cca2ca68.js.map +1 -0
- package/dist/esm-es5/read_file-bb0b1450.js +12 -0
- package/dist/esm-es5/read_file-bb0b1450.js.map +1 -0
- package/dist/esm-es5/x509_certificate-050175dd.js +12 -0
- package/dist/esm-es5/x509_certificate-050175dd.js.map +1 -0
- package/dist/esm-es5/x509_crl-c497f907.js +19 -0
- package/dist/esm-es5/x509_crl-c497f907.js.map +1 -0
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/p-05af3b74.system.js +13 -0
- package/dist/peculiar/p-05af3b74.system.js.map +1 -0
- package/dist/peculiar/p-163a3052.system.js +20 -0
- package/dist/peculiar/p-163a3052.system.js.map +1 -0
- package/dist/peculiar/p-25a532a3.js +12 -0
- package/dist/peculiar/p-25a532a3.js.map +1 -0
- package/dist/peculiar/{p-5cf4562f.system.entry.js → p-2d9c40d6.system.entry.js} +16 -16
- package/dist/peculiar/p-2d9c40d6.system.entry.js.map +1 -0
- package/dist/peculiar/p-494d26fb.entry.js +5 -0
- package/dist/peculiar/p-494d26fb.entry.js.map +1 -0
- package/dist/peculiar/{p-ff3ced3c.system.js → p-52f13c4a.system.js} +45 -45
- package/dist/peculiar/{p-ff3ced3c.system.js.map → p-52f13c4a.system.js.map} +1 -1
- package/dist/peculiar/p-55303453.system.js +12 -0
- package/dist/peculiar/p-55303453.system.js.map +1 -0
- package/dist/peculiar/p-5a699274.js +19 -0
- package/dist/peculiar/p-5a699274.js.map +1 -0
- package/dist/peculiar/p-6221d0a4.system.entry.js +5 -0
- package/dist/peculiar/p-6221d0a4.system.entry.js.map +1 -0
- package/dist/peculiar/p-666438a8.js +135 -0
- package/dist/peculiar/p-666438a8.js.map +1 -0
- package/dist/peculiar/{p-c23fd001.entry.js → p-7a5173be.entry.js} +16 -16
- package/dist/peculiar/p-7a5173be.entry.js.map +1 -0
- package/dist/peculiar/p-80477c05.js +12 -0
- package/dist/peculiar/p-80477c05.js.map +1 -0
- package/dist/peculiar/p-8393399a.system.js +1 -1
- package/dist/peculiar/p-8ff95ad8.entry.js +5 -0
- package/dist/peculiar/{p-54b37ef9.entry.js.map → p-8ff95ad8.entry.js.map} +1 -1
- package/dist/peculiar/p-a06f51a2.system.js +19 -0
- package/dist/peculiar/p-a06f51a2.system.js.map +1 -0
- package/dist/peculiar/{p-75166532.js → p-adf16adb.js} +21 -21
- package/dist/peculiar/{p-75166532.js.map → p-adf16adb.js.map} +1 -1
- package/dist/peculiar/p-b6d5e413.js +19 -0
- package/dist/peculiar/p-b6d5e413.js.map +1 -0
- package/dist/peculiar/p-bd7fb688.system.entry.js +5 -0
- package/dist/peculiar/{p-00302a20.system.entry.js.map → p-bd7fb688.system.entry.js.map} +1 -1
- package/dist/peculiar/{p-496449cf.system.entry.js → p-cc256004.system.entry.js} +2 -2
- package/dist/peculiar/p-d1066b51.system.js +135 -0
- package/dist/peculiar/p-d1066b51.system.js.map +1 -0
- package/dist/peculiar/p-d6229f42.system.js +5 -0
- package/dist/peculiar/{p-5f3b0fc7.entry.js → p-ddadcb44.entry.js} +3 -3
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +3 -3
- package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +2 -2
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +2 -2
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +2 -2
- package/dist/types/constants/oids.d.ts +3 -0
- package/dist/types/crypto/index.d.ts +2 -2
- package/dist/types/crypto/{csr.d.ts → pkcs10_certificate_request.d.ts} +4 -5
- package/dist/types/crypto/x509_attribute_certificate.d.ts +3 -4
- package/dist/types/crypto/x509_certificate.d.ts +3 -4
- package/dist/types/crypto/{crl.d.ts → x509_crl.d.ts} +4 -5
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/download.d.ts +4 -4
- package/dist/types/utils/validator.d.ts +0 -4
- package/hydrate/index.js +84 -138
- package/package.json +4 -4
- package/dist/cjs/certification_request-b0d72620.js.map +0 -1
- package/dist/cjs/crl-812dd7a1.js +0 -312
- package/dist/cjs/crl-812dd7a1.js.map +0 -1
- package/dist/cjs/download-6f550549.js +0 -476
- package/dist/cjs/download-6f550549.js.map +0 -1
- package/dist/cjs/miscellaneous-dcb93a5b.js.map +0 -1
- package/dist/cjs/x509_certificate-ebf4cbd4.js.map +0 -1
- package/dist/collection/crypto/crl.js.map +0 -1
- package/dist/collection/crypto/csr.js.map +0 -1
- package/dist/esm/certification_request-2c054ece.js.map +0 -1
- package/dist/esm/crl-a7318483.js +0 -308
- package/dist/esm/crl-a7318483.js.map +0 -1
- package/dist/esm/download-8c128e2e.js +0 -470
- package/dist/esm/download-8c128e2e.js.map +0 -1
- package/dist/esm/miscellaneous-0e98b5bc.js.map +0 -1
- package/dist/esm/x509_certificate-ad568d3a.js.map +0 -1
- package/dist/esm-es5/certification_request-2c054ece.js.map +0 -1
- package/dist/esm-es5/crl-a7318483.js +0 -33
- package/dist/esm-es5/crl-a7318483.js.map +0 -1
- package/dist/esm-es5/download-8c128e2e.js +0 -43
- package/dist/esm-es5/download-8c128e2e.js.map +0 -1
- package/dist/esm-es5/x509_certificate-ad568d3a.js +0 -12
- package/dist/esm-es5/x509_certificate-ad568d3a.js.map +0 -1
- package/dist/peculiar/p-00302a20.system.entry.js +0 -5
- package/dist/peculiar/p-0dbc8238.system.js +0 -13
- package/dist/peculiar/p-0dbc8238.system.js.map +0 -1
- package/dist/peculiar/p-1302bd67.js +0 -97
- package/dist/peculiar/p-1302bd67.js.map +0 -1
- package/dist/peculiar/p-1f766dd5.js +0 -43
- package/dist/peculiar/p-1f766dd5.js.map +0 -1
- package/dist/peculiar/p-3d44cbd2.js +0 -12
- package/dist/peculiar/p-3d44cbd2.js.map +0 -1
- package/dist/peculiar/p-3f9af5f5.system.js +0 -97
- package/dist/peculiar/p-3f9af5f5.system.js.map +0 -1
- package/dist/peculiar/p-54b37ef9.entry.js +0 -5
- package/dist/peculiar/p-5c6f9a14.entry.js +0 -12
- package/dist/peculiar/p-5c6f9a14.entry.js.map +0 -1
- package/dist/peculiar/p-5cf4562f.system.entry.js.map +0 -1
- package/dist/peculiar/p-6680f277.system.entry.js +0 -13
- package/dist/peculiar/p-6680f277.system.entry.js.map +0 -1
- package/dist/peculiar/p-924790f5.js +0 -33
- package/dist/peculiar/p-924790f5.js.map +0 -1
- package/dist/peculiar/p-b2890eb8.system.js +0 -5
- package/dist/peculiar/p-c156b495.system.js +0 -33
- package/dist/peculiar/p-c156b495.system.js.map +0 -1
- package/dist/peculiar/p-c23fd001.entry.js.map +0 -1
- package/dist/peculiar/p-dde511c8.system.js +0 -43
- package/dist/peculiar/p-dde511c8.system.js.map +0 -1
- /package/dist/peculiar/{p-496449cf.system.entry.js.map → p-cc256004.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-b2890eb8.system.js.map → p-d6229f42.system.js.map} +0 -0
- /package/dist/peculiar/{p-5f3b0fc7.entry.js.map → p-ddadcb44.entry.js.map} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,h as e,H as r}from"./p-3cb79cd9.js";import{X as a}from"./p-80477c05.js";import"./p-666438a8.js";import{B as o,h as s,I as i,P as c,S as n,b as v,E as p,d as l,e as h,f as d,M as b}from"./p-adf16adb.js";import{T as g}from"./p-4bc5ddbe.js";import"./p-e6a6e602.js";import"./p-ae91d778.js";const u="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";const y=u;const w=class{constructor(e){t(this,e);this.getAuthKeyIdParentLink=t=>{var e;return(e=this.authKeyIdParentLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=t=>{var e;return(e=this.authKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=t=>{var e;return(e=this.subjectKeyIdChildrenLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=t=>{var e;return(e=this.subjectKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.certificate=undefined;this.download=undefined;this.authKeyIdParentLink=undefined;this.authKeyIdSiblingsLink=undefined;this.subjectKeyIdChildrenLink=undefined;this.subjectKeyIdSiblingsLink=undefined;this.issuerDnLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}handleMediaQueryChange(t){this.mobileScreenView=t.matches}componentWillLoad(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}}disconnectedCallback(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))}async decodeCertificate(t){this.isDecodeInProcess=true;try{if(t instanceof a){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new a(t)}else{return}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=false}watchCertificateAndDecode(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof a&&e instanceof a){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return e("div",{class:"status_wrapper"},e(g,null,"There was an error decoding this certificate."))}renderEmptyState(){return e("div",{class:"status_wrapper"},e(g,null,"There is no certificate available."))}render(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return e(r,{"data-mobile-screen-view":String(this.mobileScreenView)},e("table",null,e(o,Object.assign({},this.certificateDecoded)),e(s,{name:this.certificateDecoded.subject}),e(i,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),e(c,{publicKey:this.certificateDecoded.publicKey}),e(n,{signature:this.certificateDecoded.signature}),e(v,{thumbprints:this.certificateDecoded.thumbprints}),e(p,{extensions:this.certificateDecoded.extensions,getLEILink:l,getDNSNameLink:h,getIPAddressLink:d,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&e(b,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};w.style=y;export{w as peculiar_certificate_viewer};
|
|
5
|
+
//# sourceMappingURL=p-8ff95ad8.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["certificateViewerCss","PeculiarCertificateViewerStyle0","CertificateViewer","this","getAuthKeyIdParentLink","value","_a","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","error","certificateDecodeError","console","watchCertificateAndDecode","newValue","oldValue","serialNumber","getIssuerDnLink","issuerDnLink","renderErrorState","h","class","Typography","renderEmptyState","render","Host","String","BasicInformation","Object","assign","SubjectName","name","subject","IssuerName","issuer","PublicKey","publicKey","Signature","signature","Thumbprints","thumbprints","Extensions","extensions","getLEILink","getDNSNameLink","getIPAddressLink","download","Miscellaneous"],"sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\n\nimport {\n X509Certificate,\n} from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: CertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView: boolean = false;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: CertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: CertificateProp, oldValue: CertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;oUAAA,MAAMA,EAAuB,mhSAC7B,MAAAC,EAAeD,E,MCwCFE,EAAiB,M,yBAsIpBC,KAAAC,uBAA0BC,I,MAAkB,OAAAC,EAAA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AK6B,sB"}
|
|
1
|
+
{"version":3,"names":["certificateViewerCss","PeculiarCertificateViewerStyle0","CertificateViewer","this","getAuthKeyIdParentLink","value","_a","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","error","certificateDecodeError","console","watchCertificateAndDecode","newValue","oldValue","serialNumber","getIssuerDnLink","issuerDnLink","renderErrorState","h","class","Typography","renderEmptyState","render","Host","String","BasicInformation","Object","assign","SubjectName","name","subject","IssuerName","issuer","PublicKey","publicKey","Signature","signature","Thumbprints","thumbprints","Extensions","extensions","getLEILink","getDNSNameLink","getIPAddressLink","download","Miscellaneous"],"sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\n\nimport {\n X509Certificate,\n} from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: CertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView: boolean = false;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: CertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: CertificateProp, oldValue: CertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;4SAAA,MAAMA,EAAuB,mhSAC7B,MAAAC,EAAeD,E,MCwCFE,EAAiB,M,yBAsIpBC,KAAAC,uBAA0BC,I,MAAkB,OAAAC,EAAAH,KAAKI,uBAAmB,MAAAD,SAAA,SAAAA,EACxEE,QAAQ,gBAAiBH,EAAM,EAE3BF,KAAAM,yBAA4BJ,I,MAAkB,OAAAC,EAAAH,KAAKO,yBAAqB,MAAAJ,SAAA,SAAAA,EAC5EE,QAAQ,gBAAiBH,EAAM,EAE3BF,KAAAQ,4BAA+BN,I,MAAkB,OAAAC,EAAAH,KAAKS,4BAAwB,MAAAN,SAAA,SAAAA,EAClFE,QAAQ,mBAAoBH,EAAM,EAE9BF,KAAAU,4BAA+BR,I,MAAkB,OAAAC,EAAAH,KAAKW,4BAAwB,MAAAR,SAAA,SAAAA,EAClFE,QAAQ,mBAAoBH,EAAM,E,mQA9EsB,qB,sBAEvB,M,uBAEC,I,CAE9B,sBAAAU,CAAuBC,GAC7Bb,KAAKc,iBAAmBD,EAAME,O,CAGhC,iBAAAC,G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,OAAO7B,KAAK6C,kB,CAGd,OACEH,EAACK,EAAI,2BACsBC,OAAOhD,KAAKc,mBAErC4B,EAAA,aACEA,EAACO,EAAgBC,OAAAC,OAAA,GACXnD,KAAK6B,qBAGXa,EAACU,EAAW,CACVC,KAAMrD,KAAK6B,mBAAmByB,UAGhCZ,EAACa,EAAU,CACTF,KAAMrD,KAAK6B,mBAAmB2B,OAC9BhB,aAAcxC,KAAKuC,oBAGrBG,EAACe,EAAS,CACRC,UAAW1D,KAAK6B,mBAAmB6B,YAGrChB,EAACiB,EAAS,CACRC,UAAW5D,KAAK6B,mBAAmB+B,YAGrClB,EAACmB,EAAW,CACVC,YAAa9D,KAAK6B,mBAAmBiC,cAGvCpB,EAACqB,EAAU,CACTC,WAAYhE,KAAK6B,mBAAmBmC,WACpCC,WAAYA,EACZC,eAAgBA,EAChBC,iBAAkBA,EAClBlE,uBAAwBD,KAAKC,uBAC7BK,yBAA0BN,KAAKM,yBAC/BE,4BAA6BR,KAAKQ,4BAClCE,4BAA6BV,KAAKU,8BAGnCV,KAAKoE,UACJ1B,EAAC2B,EAAa,CACZnD,YAAalB,KAAK6B,sB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))t[r]=n[r]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}();var __awaiter=this&&this.__awaiter||function(t,n,r,e){function i(t){return t instanceof r?t:new r((function(n){n(t)}))}return new(r||(r=Promise))((function(r,u){function o(t){try{a(e.next(t))}catch(t){u(t)}}function c(t){try{a(e["throw"](t))}catch(t){u(t)}}function a(t){t.done?r(t.value):i(t.value).then(o,c)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},e,i,u,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(n){return a([t,n])}}function a(c){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(r=0)),r)try{if(e=1,i&&(u=c[0]&2?i["return"]:c[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,c[1])).done)return u;if(i=0,u)c=[c[0]&2,u.value];switch(c[0]){case 0:case 1:u=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;i=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!u||c[1]>u[0]&&c[1]<u[3])){r.label=c[1];break}if(c[0]===6&&r.label<u[1]){r.label=u[1];u=c;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(c);break}if(u[2])r.ops.pop();r.trys.pop();continue}c=n.call(t,r)}catch(t){c=[6,t];i=0}finally{e=u=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
|
|
2
|
+
/*!
|
|
3
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
+
*/System.register(["./p-d1066b51.system.js"],(function(t){"use strict";var n,r,e,i,u,o,c,a,s,f,h,l,v,b,w,m,_,y,d,p,g,E,x,j,O,S,C,T,k,A,N,I,P,R,D,G,K,q,B,F,H;return{setters:[function(t){n=t.A;r=t.a;e=t.b;i=t.C;u=t.i;o=t.c;c=t.e;a=t.f;s=t.g;f=t.h;h=t.j;l=t.k;v=t.l;b=t.T;w=t.m;m=t.n;_=t.o;y=t.W;d=t.p;p=t.I;g=t.q;E=t.V;x=t.r;j=t.s;O=t.t;S=t.U;C=t.u;T=t.E;k=t.v;A=t.w;N=t.N;I=t.x;P=t.y;R=t.z;D=t.B;G=t.R;K=t.F;q=t.G;B=t.H;F=t.J;H=t.D}],execute:function(){var Q;
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var U=(Q={},Q[u]=o,Q[c]=a,Q[s]=f,Q[h]=l,Q[v]=b,Q[w]=m,Q[_]=y,Q[d]=p,Q[g]=E,Q[x]=j,Q[O]=S,Q[C]=T,Q);var z=function(t){__extends(n,t);function n(n){var u=t.call(this,n,r)||this;var o=u.getAsnExtnValue();try{var c=U[u.asn.type];if(c){u.value=e.parse(o,c)}else{console.warn("Didn't detect parser for \"".concat(u.asn.type,'" attribute.'));u.value=i.ToHex(o)}}catch(t){console.error('Error parse "'.concat(u.asn.type,'" attribute:'),t.message);u.value=i.ToHex(o)}return u}n.prototype.getAsnExtnValue=function(){return this.asn.values[0]};return n}(n);t("A",z);
|
|
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
|
+
*/var J=function(t){__extends(n,t);function n(n){var r=t.call(this,k(n),A)||this;r.thumbprints={};r.type="PKCS#10 Certificate Request";r.tag="CERTIFICATE REQUEST";var e=r.asn.certificationRequestInfo;r.subject=new N(e.subject).toJSON();r.version=e.version;return r}Object.defineProperty(n.prototype,"publicKey",{get:function(){var t=this.asn.certificationRequestInfo.subjectPKInfo,n=t.subjectPublicKey,r=t.algorithm;var e;if(r.algorithm===I&&r.parameters){e=P.parse(r.parameters,R)}if(r.algorithm===D){e=P.parse(n,G)}var i=P.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:e,value:i,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"signature",{get:function(){var t=this.asn,n=t.signature,r=t.signatureAlgorithm;return{value:n,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var t=0;t<this.subject.length;t+=1){var n=this.subject[t];if(n.shortName==="CN"||n.shortName==="E"||n.shortName==="O"){return n.value}}return""},enumerable:false,configurable:true});n.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var n,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,K(t,this.raw)];case 1:n=e.sent();if(n){this.thumbprints[t]=i.ToHex(n)}return[3,3];case 2:r=e.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};n.prototype.parseAttributes=function(){var t=this.asn.certificationRequestInfo;if(t.attributes){this.attributes=t.attributes.map((function(t){return new z(P.serialize(t))}));var n=this.attributes.find((function(t){return t.asn.type===C}));if(n){this.extensions=n.value.map((function(t){return new q(P.serialize(t))}))}}};n.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"hex":return F(i.ToHex(this.raw));case"pem":return"-----BEGIN ".concat(this.tag,"-----\n").concat(B(this.toString("base64")),"\n-----END ").concat(this.tag,"-----");default:return i.ToBase64(this.raw)}};n.prototype.downloadAsPEM=function(t){H.csr.asPEM(this.toString("pem"),t||this.commonName)};n.prototype.downloadAsDER=function(t){H.csr.asDER(this.raw,t||this.commonName)};return n}(n);t("P",J)}}}));
|
|
19
|
+
//# sourceMappingURL=p-a06f51a2.system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["attributesParsers","_a","id_DomainNameBeneficiary","DomainNameBeneficiary","id_DomainNameLegalRepresentative","DomainNameLegalRepresentative","id_DomainNameOwner","DomainNameOwner","id_DomainNameTechnicalOperator","DomainNameTechnicalOperator","id_TypeRelationship","TypeRelationship","id_ActivityDescription","ActivityDescription","id_WebGDPR","WebGDPR","id_InsuranceValue","InsuranceValue","id_ValuationRanking","ValuationRanking","id_pkcs9_at_challengePassword","ChallengePassword","id_pkcs9_at_unstructuredName","UnstructuredName","id_pkcs9_at_extensionRequest","ExtensionRequest","__extends","Attribute","_super","raw","_this","call","this","AsnAttribute","asnExtnValue","getAsnExtnValue","target","asn","type","value","AsnParser","parse","console","warn","concat","Convert","ToHex","error","message","prototype","values","AsnData","Pkcs10CertificateRequest","certificateRawToBuffer","CertificationRequest","thumbprints","tag","certificationRequestInfo","subject","Name","toJSON","version","Object","defineProperty","subjectPKInfo","subjectPublicKey","algorithm","params","id_ecPublicKey","parameters","AsnConvert","ECParameters","id_rsaEncryption","RSAPublicKey","spki","serialize","signature","signatureAlgorithm","i","length","name","shortName","getThumbprint","getCertificateThumbprint","thumbprint","sent","error_1","parseAttributes","attributes","map","e","extensionRequestAttribute","find","attribute","extensions","Extension","toString","format","hexFormat","base64Format","ToBase64","downloadAsPEM","Download","csr","asPEM","commonName","downloadAsDER","asDER"],"sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\n\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { Extension, TExtensionValue } from './extension';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public extensions: Extension<TExtensionValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = 'CERTIFICATE REQUEST';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n\n const extensionRequestAttribute = this.attributes.find(\n (attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest,\n ) as Attribute<ExtensionRequest>;\n\n if (extensionRequestAttribute) {\n this.extensions = extensionRequestAttribute.value\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n }\n\n public toString(format: 'hex' | 'pem' | 'base64' = 'pem'): string {\n switch (format) {\n case 'hex':\n return hexFormat(Convert.ToHex(this.raw));\n case 'pem':\n return `-----BEGIN ${this.tag}-----\\n${base64Format(this.toString('base64'))}\\n-----END ${this.tag}-----`;\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;eAoDA,IAAMA,GAAiBC,EAAA,GACrBA,EAACC,GAA2BC,EAC5BF,EAACG,GAAmCC,EACpCJ,EAACK,GAAqBC,EACtBN,EAACO,GAAiCC,EAClCR,EAACS,GAAsBC,EACvBV,EAACW,GAAyBC,EA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e,GAAnC,IAEd,IAAMC,EAA4B3D,KAAKwD,WAAWI,MAChD,SAACC,GAAc,OAAAA,EAAUxD,IAAIC,OAASd,CAAvB,IAGjB,GAAImE,EAA2B,CAC7B3D,KAAK8D,WAAaH,EAA0BpD,MACzCkD,KAAI,SAACC,GAAM,WAAIK,EAAUzB,EAAWK,UAAUe,GAAnC,G,IAKbtC,EAAAH,UAAA+C,SAAA,SAASC,GAAA,GAAAA,SAAA,GAAAA,EAAA,KAAwC,CACtD,OAAQA,GACN,IAAK,MACH,OAAOC,EAAUrD,EAAQC,MAAMd,KAAKH,MACtC,IAAK,MACH,MAAO,cAAAe,OAAcZ,KAAKwB,IAAG,WAAAZ,OAAUuD,EAAanE,KAAKgE,SAAS,WAAU,eAAApD,OAAcZ,KAAKwB,IAAG,SACpG,QACE,OAAOX,EAAQuD,SAASpE,KAAKH,K,EAI5BuB,EAAAH,UAAAoD,cAAA,SAAcrB,GACnBsB,EAASC,IAAIC,MACXxE,KAAKgE,SAAS,OACdhB,GAAQhD,KAAKyE,W,EAIVrD,EAAAH,UAAAyD,cAAA,SAAc1B,GACnBsB,EAASC,IAAII,MACX3E,KAAKH,IACLmD,GAAQhD,KAAKyE,W,YA3H2BtD,G"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{h as e}from"./p-3cb79cd9.js";import{
|
|
4
|
+
import{h as e}from"./p-3cb79cd9.js";import{$ as a,Z as n,_ as t,C as c,a0 as s,a4 as o,b as r,a5 as i,a6 as f,a7 as u,a8 as l,a9 as d,aa as b,ab as m,ac as v,ad as x,ae as p,af as g,ag as y,ah as h,ai as C,aj as S,ak as N,al as A,am as I,an as D,ao as j,ap as O,aq as G,ar as T,as as k,at as L,au as P,av as R,aw as V,ax as B,ay as $,az as E,aA as U,aB as K,aC as H,aD as M,aE as q,aF as w,aG as X,a1 as Y,aH as Q,aI as z,aJ as F,aK as W,aL as Z,aM as J,aN as _,aO as ee,aP as ae,aQ as ne,aR as te,aS as ce}from"./p-666438a8.js";import{L as se}from"./p-e6a6e602.js";import{T as oe,B as re}from"./p-4bc5ddbe.js";import{D as ie}from"./p-ae91d778.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -36,21 +36,21 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/const ve=(a,n)=>e("tr",null,e("td",{colSpan:2},e("table",null,n)));const xe=a=>{const{value:n}=a;if(!n){return null}return[e("tr",{class:"title"},e("td",{colSpan:2},e(
|
|
39
|
+
*/const ve=(a,n)=>e("tr",null,e("td",{colSpan:2},e("table",null,n)));const xe=a=>{const{value:n}=a;if(!n){return null}return[e("tr",{class:"title"},e("td",{colSpan:2},e(oe,{variant:"s1",color:"black"},n))),e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",null)))]};const pe=a=>{const{name:n,value:t,monospace:c,collapse:s,href:o,extraValue:r}=a;if(!n){return null}if(t===undefined||t===null){return null}let i;if(s){i=e("peculiar-text-hider",null,t)}else{i=t}const f=!!t.toString();return e("tr",null,e("td",{colSpan:f?1:2},e(oe,{variant:"b2",color:"gray-9"},n)),f&&e("td",{class:{monospace:c}},me(t.toString())||o?e(se,{variant:"b2",href:o||t.toString()},t):e(oe,{variant:"b2",color:"black"},i,r)))};
|
|
40
40
|
/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const ge=a=>{const{serialNumber:c,version:
|
|
46
|
+
*/const ge=a=>{const{serialNumber:c,version:s,validity:o,notBefore:r,notAfter:i,lastUpdate:f,nextUpdate:u,type:l}=a;return[e(xe,{value:n.getString("basicInformation")}),e(pe,{name:n.getString("type"),value:l}),e(pe,{name:n.getString("serialNumber"),value:c,monospace:true}),e(pe,{name:n.getString("version"),value:s}),e(pe,{name:n.getString("validity"),value:o}),e(pe,{name:n.getString("issued"),value:r?t(r):undefined}),e(pe,{name:n.getString("expired"),value:i?t(i):undefined}),e(pe,{name:n.getString("lastUpdate"),value:f?t(f):undefined}),e(pe,{name:n.getString("nextUpdate"),value:u?t(u):undefined})]};
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the MIT license found in the
|
|
52
52
|
* LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/function ye(e){if(e.params&&"modulus"in e.params){let a=e.params.modulus.byteLength;if(a%2){a-=1}return a*8}return null}function he(e){if(e.params&&"publicExponent"in e.params){return e.params.publicExponent.byteLength===3?65537:3}return null}const Ce=a=>{const{publicKey:t}=a;if(!t){return null}function
|
|
53
|
+
*/function ye(e){if(e.params&&"modulus"in e.params){let a=e.params.modulus.byteLength;if(a%2){a-=1}return a*8}return null}function he(e){if(e.params&&"publicExponent"in e.params){return e.params.publicExponent.byteLength===3?65537:3}return null}const Ce=a=>{const{publicKey:t}=a;if(!t){return null}function s(a){return[e(pe,{name:n.getString("algorithm"),value:fe(a.algorithm)}),e(pe,{name:n.getString("namedCurve"),value:fe(a.params&&"namedCurve"in a.params?a.params.namedCurve:undefined)}),e(pe,{name:n.getString("exponent"),value:he(a)}),e(pe,{name:n.getString("modulus"),value:ye(a)}),e(pe,{name:n.getString("value"),value:c.ToHex(a.value),monospace:true,collapse:true})]}return[e(xe,{value:n.getString("publicKeyInfo")}),s(t),Array.isArray(t.params)&&t.params.length&&t.params.map((a=>e(ve,null,s(a))))]};
|
|
54
54
|
/**
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -64,14 +64,14 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the MIT license found in the
|
|
66
66
|
* LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const Ne=a=>{const{name:t,issuerDnLink:c}=a;const
|
|
67
|
+
*/const Ne=a=>{const{name:t,issuerDnLink:c}=a;const s=n.getString("issuerName");return[e(xe,{value:c?e(se,{href:c},s):s}),t.map((a=>e(pe,{name:a.name||a.type,value:a.value})))]};
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the MIT license found in the
|
|
73
73
|
* LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const Ae=a=>{const{signature:t}=a;if(!t){return null}function
|
|
74
|
+
*/const Ae=a=>{const{signature:t}=a;if(!t){return null}function s(a){return[e(pe,{name:n.getString("algorithm"),value:fe(a.algorithm)}),e(pe,{name:n.getString("value"),value:c.ToHex(a.value),monospace:true,collapse:true})]}return[e(xe,{value:n.getString("signature")}),s(t),t.params&&t.params.length&&t.params.map((a=>e(ve,null,s(a))))]};
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -106,28 +106,28 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the MIT license found in the
|
|
108
108
|
* LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const
|
|
109
|
+
*/const Ge=a=>{const{extension:n}=a;return e(De,{extension:n},Boolean(n.value.length)&&[e(pe,{name:"Purposes",value:""}),n.value.map((a=>e(ve,null,e(pe,{name:"Purpose",value:fe(a)}))))])};
|
|
110
110
|
/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the MIT license found in the
|
|
115
115
|
* LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const Te=a=>{const{extension:n,getSubjectKeyIdChildrenLink:t,getSubjectKeyIdSiblingsLink:s}=a;const o=c.ToHex(n.value.buffer);const r=t(o);const i=s(o);return e(De,{extension:n},e(pe,{name:"Key ID",value:o,monospace:true,extraValue:[r&&e("span",null," [",e(se,{href:r},"children"),"]"),i&&e("span",null," [",e(se,{href:i},"siblings"),"]")]}))};
|
|
117
117
|
/**
|
|
118
118
|
* @license
|
|
119
119
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the MIT license found in the
|
|
122
122
|
* LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const ke=a=>{const{extension:n,getAuthKeyIdParentLink:t,getAuthKeyIdSiblingsLink:
|
|
123
|
+
*/const ke=a=>{const{extension:n,getAuthKeyIdParentLink:t,getAuthKeyIdSiblingsLink:s}=a;const o=c.ToHex(n.value.keyIdentifier.buffer);const r=t(o);const i=s(o);return e(De,{extension:n},e(pe,{name:"Key ID",value:o,monospace:true,extraValue:[r&&e("span",null," [",e(se,{href:r},"parents"),"]"),i&&e("span",null," [",e(se,{href:i},"siblings"),"]")]}))};
|
|
124
124
|
/**
|
|
125
125
|
* @license
|
|
126
126
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
127
127
|
*
|
|
128
128
|
* This source code is licensed under the MIT license found in the
|
|
129
129
|
* LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const Le={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"};const Pe=n=>{const{generalName:t,getDNSNameLink:
|
|
130
|
+
*/const Le={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"};const Pe=n=>{const{generalName:t,getDNSNameLink:d,getIPAddressLink:b}=n;if(!t){return null}return Object.keys(t).map((n=>{const m=t[n];if(m instanceof s){return[e(pe,{name:Le[n]||n,value:""}),e(ve,null,m.map((n=>n.map((n=>e(pe,{name:a[n.type]||n.type,value:n.value.toString()}))))))]}if(m instanceof o){try{const n=r.parse(m.value,i);return e(pe,{name:a[m.typeId]||m.typeId,value:n.toString()})}catch(e){}try{const n=r.parse(m.value,f);if(n.explicitText){return e(pe,{name:a[m.typeId]||m.typeId,value:n.explicitText.toString()})}}catch(e){}return e(pe,{name:a[m.typeId]||m.typeId,value:c.ToHex(m.value),monospace:true})}if(u.isBufferSource(m)){return e(pe,{name:Le[n]||n,value:c.ToString(m)})}if(m instanceof l){return e(pe,{name:Le[n]||n,value:m.partyName.toString()})}if(n==="dNSName"){return e(pe,{name:Le[n]||n,value:m,href:d(m)})}if(n==="iPAddress"){return e(pe,{name:Le[n]||n,value:m,href:b(m)})}return e(pe,{name:Le[n]||n,value:m})}))};
|
|
131
131
|
/**
|
|
132
132
|
* @license
|
|
133
133
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -155,7 +155,7 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
155
155
|
*
|
|
156
156
|
* This source code is licensed under the MIT license found in the
|
|
157
157
|
* LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const $e=a=>{const{extension:n}=a;return e(De,{extension:n},Boolean(n.value.length)&&[e(pe,{name:"Policies",value:""}),n.value.map((a=>e(ve,null,e(pe,{name:"Policy ID",value:fe(a.policyIdentifier)}),a.policyQualifiers&&Boolean(a.policyQualifiers.length)&&[e(pe,{name:"Qualifiers",value:""}),a.policyQualifiers.map((a=>{const n=[e(pe,{name:"Qualifier ID",value:fe(a.policyQualifierId)})];if(a.policyQualifierId==="1.3.6.1.5.5.7.2.1"){const t=
|
|
158
|
+
*/const $e=a=>{const{extension:n}=a;return e(De,{extension:n},Boolean(n.value.length)&&[e(pe,{name:"Policies",value:""}),n.value.map((a=>e(ve,null,e(pe,{name:"Policy ID",value:fe(a.policyIdentifier)}),a.policyQualifiers&&Boolean(a.policyQualifiers.length)&&[e(pe,{name:"Qualifiers",value:""}),a.policyQualifiers.map((a=>{const n=[e(pe,{name:"Qualifier ID",value:fe(a.policyQualifierId)})];if(a.policyQualifierId==="1.3.6.1.5.5.7.2.1"){const t=r.parse(a.qualifier,i);n.push(e(pe,{name:"Value",value:t.toString()}))}if(a.policyQualifierId==="1.3.6.1.5.5.7.2.2"){const t=r.parse(a.qualifier,f);if(t.explicitText){n.push(e(pe,{name:"Value",value:t.explicitText.toString()}))}}return e(ve,null,n)}))])))])};
|
|
159
159
|
/**
|
|
160
160
|
* @license
|
|
161
161
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -197,14 +197,14 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
197
197
|
*
|
|
198
198
|
* This source code is licensed under the MIT license found in the
|
|
199
199
|
* LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const qe=a=>{const{extension:n}=a;const t=n.value.getVersion();return e(De,{extension:n},e(pe,{name:"Certificate Index",value:t.certificateIndex}),e(pe,{name:"Key Index",value:t.keyIndex}))};var we,Xe,Ye,Qe;let ze=class e{constructor(e){if(typeof e==="string"){this.alphabetic=e}else if(typeof e==="number"){this.numeric=e}}};
|
|
200
|
+
*/const qe=a=>{const{extension:n}=a;const t=n.value.getVersion();return e(De,{extension:n},e(pe,{name:"Certificate Index",value:t.certificateIndex}),e(pe,{name:"Key Index",value:t.keyIndex}))};var we,Xe,Ye,Qe;let ze=class e{constructor(e){if(typeof e==="string"){this.alphabetic=e}else if(typeof e==="number"){this.numeric=e}}};d([b({type:m.PrintableString})],ze.prototype,"alphabetic",void 0);d([b({type:m.PrintableString})],ze.prototype,"numeric",void 0);ze=d([v({type:x.Choice})],ze);class Fe{constructor(e={}){this.currency=new ze;this.amount=0;this.exponent=0;Object.assign(this,e)}}d([b({type:ze})],Fe.prototype,"currency",void 0);d([b({type:m.Integer})],Fe.prototype,"amount",void 0);d([b({type:m.Integer})],Fe.prototype,"exponent",void 0);let We=class e extends Fe{};We=d([v({type:x.Sequence})],We);let Ze=class e{constructor(e=0){this.value=e}};d([b({type:m.Integer})],Ze.prototype,"value",void 0);Ze=d([v({type:x.Choice})],Ze);let Je=class e{constructor(e={}){this.url="";this.language="";Object.assign(this,e)}};d([b({type:m.IA5String})],Je.prototype,"url",void 0);d([b({type:m.PrintableString})],Je.prototype,"language",void 0);Je=d([v({type:x.Sequence})],Je);let _e=we=class e extends p{constructor(e){super(e);Object.setPrototypeOf(this,we.prototype)}};_e=we=d([v({type:x.Sequence,itemType:Je})],_e);let ea=Xe=class e extends _e{constructor(e){super(e);Object.setPrototypeOf(this,Xe.prototype)}};ea=Xe=d([v({type:x.Sequence,itemType:Je})],ea);let aa=Ye=class e extends p{constructor(e){super(e);Object.setPrototypeOf(this,Ye.prototype)}};aa=Ye=d([v({type:x.Sequence,itemType:m.ObjectIdentifier})],aa);let na=Qe=class e extends p{constructor(e){super(e);Object.setPrototypeOf(this,Qe.prototype)}};na=Qe=d([v({type:x.Sequence,itemType:m.PrintableString})],na);const ta="0.4.0.1862.1";const ca=`${ta}.3`;const sa=`${ta}.5`;const oa=`${ta}.6`
|
|
201
201
|
/**
|
|
202
202
|
* @license
|
|
203
203
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
204
204
|
*
|
|
205
205
|
* This source code is licensed under the MIT license found in the
|
|
206
206
|
* LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/;const ra=a=>{const{extension:n}=a;function t(a,n){if(!n.byteLength){return null}if(a===
|
|
207
|
+
*/;const ra=a=>{const{extension:n}=a;function t(a,n){if(!n.byteLength){return null}if(a===g){const a=r.parse(n,y);return e(pe,{name:"Semantics Identifier",value:fe(a.semanticsIdentifier)})}if(a===oa){const a=r.parse(n,aa);return e(pe,{name:"QC Types",value:a.map((e=>fe(e))).join(", ")})}if(a===ca){const a=r.parse(n,Ze);return e(pe,{name:"Retention Period",value:`${a.value} years`})}if(a===sa){const a=r.parse(n,_e);return[e(pe,{name:"PDS Locations",value:""}),a.map((a=>e(ve,null,e(pe,{name:"URL",value:a.url}),e(pe,{name:"Language",value:a.language}))))]}return e(pe,{name:"Info",value:c.ToHex(n),monospace:true})}return e(De,{extension:n},Boolean(n.value.length)&&[e(pe,{name:"Statements",value:""}),n.value.map((a=>e(ve,null,e(pe,{name:"Statement ID",value:fe(a.statementId)}),t(a.statementId,a.statementInfo))))])};
|
|
208
208
|
/**
|
|
209
209
|
* @license
|
|
210
210
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -260,7 +260,7 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
260
260
|
*
|
|
261
261
|
* This source code is licensed under the MIT license found in the
|
|
262
262
|
* LICENSE file in the root directory of this source tree.
|
|
263
|
-
*/function va(e){return
|
|
263
|
+
*/function va(e){return c.ToString(e.values[0])}
|
|
264
264
|
/**
|
|
265
265
|
* @license
|
|
266
266
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -295,14 +295,14 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
295
295
|
*
|
|
296
296
|
* This source code is licensed under the MIT license found in the
|
|
297
297
|
* LICENSE file in the root directory of this source tree.
|
|
298
|
-
*/const ha=a=>{const{extension:n}=a;return e(De,{extension:n},Boolean(n.value.length)&&[e(pe,{name:"Biometrics",value:""}),n.value.map((a=>e(ve,null,e(pe,{name:"OID",value:fe(a.typeOfBiometricData.biometricDataOid)}),e(pe,{name:"Type",value:a.typeOfBiometricData.predefinedBiometricType}),e(pe,{name:"Algorithm",value:fe(a.hashAlgorithm.algorithm)}),e(pe,{name:"Hash",value:
|
|
298
|
+
*/const ha=a=>{const{extension:n}=a;return e(De,{extension:n},Boolean(n.value.length)&&[e(pe,{name:"Biometrics",value:""}),n.value.map((a=>e(ve,null,e(pe,{name:"OID",value:fe(a.typeOfBiometricData.biometricDataOid)}),e(pe,{name:"Type",value:a.typeOfBiometricData.predefinedBiometricType}),e(pe,{name:"Algorithm",value:fe(a.hashAlgorithm.algorithm)}),e(pe,{name:"Hash",value:c.ToHex(a.biometricDataHash.buffer),monospace:true}),e(pe,{name:"Source Uri",value:a.sourceDataUri}))))])};
|
|
299
299
|
/**
|
|
300
300
|
* @license
|
|
301
301
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
302
302
|
*
|
|
303
303
|
* This source code is licensed under the MIT license found in the
|
|
304
304
|
* LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const Ca=a=>{const{extension:n}=a;const t=a=>{if(!a){return null}return a.map((a=>{const{imageDetails:n}=a;return[e(pe,{name:"Image Type",value:n.mediaType}),e(pe,{name:"Image Hash",value:
|
|
305
|
+
*/const Ca=a=>{const{extension:n}=a;const t=a=>{if(!a){return null}return a.map((a=>{const{imageDetails:n}=a;return[e(pe,{name:"Image Type",value:n.mediaType}),e(pe,{name:"Image Hash",value:c.ToHex(n.logotypeHash[0].hashValue),monospace:true}),e(pe,{name:"Image URL",value:n.logotypeURI[0],monospace:true,collapse:true}),e(pe,{name:"Image Hash Algorithm",value:fe(n.logotypeHash[0].hashAlg.algorithm)})]}))};const s=a=>{if(!a){return null}return a.map((a=>{const{audioDetails:n}=a;return[e(pe,{name:"Audio Type",value:n.mediaType}),e(pe,{name:"Audio Hash",value:c.ToHex(n.logotypeHash[0].hashValue),monospace:true}),e(pe,{name:"Audio URL",value:n.logotypeURI[0],monospace:true,collapse:true}),e(pe,{name:"Audio Hash Algorithm",value:fe(n.logotypeHash[0].hashAlg.algorithm)})]}))};const o=(a,n)=>{if(!n||!n.direct){return null}const{image:c,audio:o}=n.direct;return[e(pe,{name:"Type",value:a}),t(c),s(o),e("tr",null,e("td",null),e("td",null))]};return e(De,{extension:n},o("Subject",n.value.subjectLogo),o("Issuer",n.value.issuerLogo))};
|
|
306
306
|
/**
|
|
307
307
|
* @license
|
|
308
308
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -316,7 +316,7 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
316
316
|
*
|
|
317
317
|
* This source code is licensed under the MIT license found in the
|
|
318
318
|
* LICENSE file in the root directory of this source tree.
|
|
319
|
-
*/const Na=a=>{const{extension:n}=a;return e(De,{extension:n},n.value.requireExplicitPolicy&&e(pe,{name:"Require Explicit Policy",value:
|
|
319
|
+
*/const Na=a=>{const{extension:n}=a;return e(De,{extension:n},n.value.requireExplicitPolicy&&e(pe,{name:"Require Explicit Policy",value:h.toASN(n.value.requireExplicitPolicy).valueBlock.toString()}),n.value.inhibitPolicyMapping&&e(pe,{name:"Inhibit Policy Mapping",value:h.toASN(n.value.inhibitPolicyMapping).valueBlock.toString()}))};
|
|
320
320
|
/**
|
|
321
321
|
* @license
|
|
322
322
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -344,7 +344,7 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
344
344
|
*
|
|
345
345
|
* This source code is licensed under the MIT license found in the
|
|
346
346
|
* LICENSE file in the root directory of this source tree.
|
|
347
|
-
*/const ja=a=>{const{extension:t}=a;const
|
|
347
|
+
*/const ja=a=>{const{extension:t}=a;const s=a=>Object.keys(a).map((t=>{const o=a[t];let i="";switch(true){case typeof o==="string"||typeof o==="number":i=o;break;case o instanceof N:i=o.join(", ");break;case typeof o==="boolean":i=o?n.getString("yes"):n.getString("no");break;case Object.is(o,null):i="NULL";break;case o instanceof S:return[e(pe,{name:ue(t),value:""}),e(ve,null,s(o))];case u.isBufferSource(o):if(t==="attestationApplicationId"){try{const a=r.parse(o,C);if(a.packageInfos.length||a.signatureDigests.length){return[e(pe,{name:ue(t),value:""}),Boolean(a.packageInfos)&&e(ve,null,e(pe,{name:ue("packageInfos"),value:""}),a.packageInfos.map((a=>e(ve,null,s(a)))))]}}catch(e){}}try{i=c.ToString(o)}catch(e){i=c.ToHex(o)}break}return e(pe,{name:ue(t),value:i})}));const o=(a,n)=>{if(n.length===0){return null}return[e(pe,{name:a,value:""}),e(ve,null,n.map(s))]};return e(De,{extension:t},e(pe,{name:ue("attestationVersion"),value:t.value.attestationVersion}),e(pe,{name:ue("attestationSecurityLevel"),value:t.value.attestationSecurityLevel}),e(pe,{name:ue("keymasterVersion"),value:t.value.keymasterVersion}),e(pe,{name:ue("keymasterSecurityLevel"),value:t.value.keymasterSecurityLevel}),e(pe,{name:ue("attestationChallenge"),value:c.ToString(t.value.attestationChallenge)}),e(pe,{name:ue("uniqueId"),value:c.ToString(t.value.uniqueId)||undefined}),o(ue("softwareEnforced"),t.value.softwareEnforced),o(ue("teeEnforced"),t.value.teeEnforced))};
|
|
348
348
|
/**
|
|
349
349
|
* @license
|
|
350
350
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -358,12 +358,12 @@ import{h as e}from"./p-3cb79cd9.js";import{a1 as a,$ as n,a0 as t,a2 as c,a6 as
|
|
|
358
358
|
*
|
|
359
359
|
* This source code is licensed under the MIT license found in the
|
|
360
360
|
* LICENSE file in the root directory of this source tree.
|
|
361
|
-
*/const
|
|
361
|
+
*/const Ga=a=>{const{extensions:n,title:t}=a;if(!n||!n.length){return null}return[e(xe,{value:t||"Extensions"}),n.map((n=>{try{if(n.value instanceof A){return e(je,{extension:n})}if(n.value instanceof I){return e(Oe,{extension:n})}if(n.value instanceof D){return e(Ge,{extension:n})}if(n.value instanceof j){return e(Te,Object.assign({extension:n},a))}if(n.value instanceof O){return e(ke,Object.assign({extension:n},a))}if(n.value instanceof G){return e(Re,Object.assign({extension:n},a))}if(n.value instanceof T||n.value instanceof k){return e(Ve,Object.assign({extension:n},a))}if(n.value instanceof L){return e(Be,Object.assign({extension:n},a))}if(n.value instanceof P){return e($e,{extension:n})}if(n.value instanceof R){return e(Ue,{extension:n})}if(n.value instanceof V){return e(Ke,Object.assign({extension:n},a))}if(n.value instanceof B){return e(He,{extension:n})}if(n.value instanceof $){return e(Me,{extension:n})}if(n.value instanceof E){return e(qe,{extension:n})}if(n.value instanceof U){return e(ra,{extension:n})}if(n.value instanceof K){return e(ia,{extension:n})}if(n.value instanceof H){return e(fa,{extension:n})}if(n.value instanceof M){return e(ua,{extension:n})}if(n.value instanceof q){return e(la,Object.assign({extension:n},a))}if(n.value instanceof w){return e(da,Object.assign({extension:n},a))}if(n.value instanceof X){return e(ba,{extension:n})}if(n.value instanceof Y){return e(ma,{extension:n})}if(n.value instanceof Q){return e(xa,{extension:n})}if(n.value instanceof z){return e(ga,{extension:n})}if(n.value instanceof F){return e(ya,{extension:n})}if(n.value instanceof W){return e(ha,{extension:n})}if(n.value instanceof Z){return e(Ca,{extension:n})}if(n.value instanceof J){return e(Sa,{extension:n})}if(n.value instanceof _){return e(Na,{extension:n})}if(n.value instanceof ee){return e(Aa,{extension:n})}if(n.value instanceof ae){return e(Ia,{extension:n})}if(n.value instanceof ne){return e(Da,Object.assign({extension:n},a))}if(n.value instanceof te){return e(ja,Object.assign({extension:n},a))}if(n.value instanceof ce){return e(Oa,Object.assign({extension:n},a))}if(typeof n.value==="string"){return e(pa,{extension:n})}return e(De,{extension:n})}catch(e){console.error("Error render extension:",n.asn.extnID);return null}}))]};
|
|
362
362
|
/**
|
|
363
363
|
* @license
|
|
364
364
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
365
365
|
*
|
|
366
366
|
* This source code is licensed under the MIT license found in the
|
|
367
367
|
* LICENSE file in the root directory of this source tree.
|
|
368
|
-
*/const
|
|
369
|
-
//# sourceMappingURL=p-
|
|
368
|
+
*/const Ta=a=>{const{certificate:t}=a;return[e(xe,{value:n.getString("miscellaneous")}),e("tr",null,e("td",null,e(re,{onClick:()=>t.downloadAsPEM(),startIcon:e(ie,null)},n.getString("download.pem")))),e("tr",null,e("td",null,e(re,{onClick:()=>t.downloadAsDER(),startIcon:e(ie,null)},n.getString("download.der"))))]};export{ge as B,Ga as E,Pe as G,Ne as I,Ta as M,Ce as P,pe as R,Ae as S,ve as T,xe as a,Ie as b,ue as c,le as d,de as e,be as f,fe as g,Se as h};
|
|
369
|
+
//# sourceMappingURL=p-adf16adb.js.map
|