@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.
Files changed (227) hide show
  1. package/components/attribute-certificate-viewer.js +17 -14
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/attribute.js +53 -0
  4. package/components/attribute.js.map +1 -0
  5. package/components/certificate-viewer.js +15 -13
  6. package/components/certificate-viewer.js.map +1 -1
  7. package/components/crl-viewer.js +20 -18
  8. package/components/crl-viewer.js.map +1 -1
  9. package/components/csr-viewer.js +9 -99
  10. package/components/csr-viewer.js.map +1 -1
  11. package/components/download.js +12518 -9
  12. package/components/download.js.map +1 -1
  13. package/components/index.js +2 -0
  14. package/components/index.js.map +1 -1
  15. package/components/index2.js +3 -48
  16. package/components/index2.js.map +1 -1
  17. package/components/issuer_name.js +2 -2
  18. package/components/miscellaneous.js +41 -12555
  19. package/components/miscellaneous.js.map +1 -1
  20. package/components/peculiar-certificate-decoder.js +17 -105
  21. package/components/peculiar-certificate-decoder.js.map +1 -1
  22. package/components/peculiar-certificates-viewer.js +1 -2
  23. package/components/peculiar-certificates-viewer.js.map +1 -1
  24. package/components/peculiar-crl-viewer.js +1 -1
  25. package/components/peculiar-csr-viewer.js +1 -1
  26. package/components/pkcs10_certificate_request.js +102 -0
  27. package/components/pkcs10_certificate_request.js.map +1 -0
  28. package/components/read_file.js +110 -0
  29. package/components/read_file.js.map +1 -0
  30. package/components/subject_name.js +2 -2
  31. package/dist/cjs/{certification_request-b0d72620.js → certification_request-314859bb.js} +3266 -2810
  32. package/dist/cjs/certification_request-314859bb.js.map +1 -0
  33. package/dist/cjs/index.cjs.js +12 -5
  34. package/dist/cjs/index.cjs.js.map +1 -1
  35. package/dist/cjs/{miscellaneous-dcb93a5b.js → miscellaneous-f1bc3a4b.js} +22 -23
  36. package/dist/cjs/miscellaneous-f1bc3a4b.js.map +1 -0
  37. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +20 -20
  38. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
  39. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +20 -108
  40. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  41. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +3 -4
  42. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  43. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +2 -3
  44. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  45. package/dist/cjs/pkcs10_certificate_request-93c66ce7.js +149 -0
  46. package/dist/cjs/pkcs10_certificate_request-93c66ce7.js.map +1 -0
  47. package/dist/cjs/read_file-2e22a97e.js +115 -0
  48. package/dist/cjs/read_file-2e22a97e.js.map +1 -0
  49. package/dist/cjs/{x509_certificate-ebf4cbd4.js → x509_certificate-0776e3ec.js} +17 -16
  50. package/dist/cjs/x509_certificate-0776e3ec.js.map +1 -0
  51. package/dist/cjs/x509_crl-5326d209.js +179 -0
  52. package/dist/cjs/x509_crl-5326d209.js.map +1 -0
  53. package/dist/collection/components/certificate-decoder/certificate-decoder.js +15 -72
  54. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  55. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
  56. package/dist/collection/components/crl-viewer/crl-viewer.js +6 -6
  57. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
  58. package/dist/collection/components/csr-viewer/csr-viewer.js +6 -6
  59. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  60. package/dist/collection/constants/oids.js +3 -0
  61. package/dist/collection/constants/oids.js.map +1 -1
  62. package/dist/collection/crypto/index.js +2 -2
  63. package/dist/collection/crypto/index.js.map +1 -1
  64. package/dist/collection/crypto/{csr.js → pkcs10_certificate_request.js} +14 -12
  65. package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -0
  66. package/dist/collection/crypto/x509_attribute_certificate.js +13 -11
  67. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
  68. package/dist/collection/crypto/x509_certificate.js +13 -11
  69. package/dist/collection/crypto/x509_certificate.js.map +1 -1
  70. package/dist/collection/crypto/{crl.js → x509_crl.js} +14 -12
  71. package/dist/collection/crypto/x509_crl.js.map +1 -0
  72. package/dist/collection/index.js +2 -0
  73. package/dist/collection/index.js.map +1 -1
  74. package/dist/collection/utils/download.js +8 -8
  75. package/dist/collection/utils/download.js.map +1 -1
  76. package/dist/collection/utils/validator.js +0 -8
  77. package/dist/collection/utils/validator.js.map +1 -1
  78. package/dist/esm/{certification_request-2c054ece.js → certification_request-b531916a.js} +3202 -2745
  79. package/dist/esm/certification_request-b531916a.js.map +1 -0
  80. package/dist/esm/index.js +3 -1
  81. package/dist/esm/index.js.map +1 -1
  82. package/dist/esm/{miscellaneous-0e98b5bc.js → miscellaneous-7fe71e3f.js} +2 -3
  83. package/dist/esm/miscellaneous-7fe71e3f.js.map +1 -0
  84. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +12 -12
  85. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
  86. package/dist/esm/peculiar-certificate-decoder.entry.js +18 -106
  87. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  88. package/dist/esm/peculiar-certificate-viewer.entry.js +3 -4
  89. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  90. package/dist/esm/peculiar-certificates-viewer.entry.js +2 -3
  91. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  92. package/dist/esm/pkcs10_certificate_request-cca2ca68.js +146 -0
  93. package/dist/esm/pkcs10_certificate_request-cca2ca68.js.map +1 -0
  94. package/dist/esm/read_file-bb0b1450.js +110 -0
  95. package/dist/esm/read_file-bb0b1450.js.map +1 -0
  96. package/dist/esm/{x509_certificate-ad568d3a.js → x509_certificate-050175dd.js} +15 -14
  97. package/dist/esm/x509_certificate-050175dd.js.map +1 -0
  98. package/dist/esm/x509_crl-c497f907.js +176 -0
  99. package/dist/esm/x509_crl-c497f907.js.map +1 -0
  100. package/dist/esm-es5/{certification_request-2c054ece.js → certification_request-b531916a.js} +61 -23
  101. package/dist/esm-es5/certification_request-b531916a.js.map +1 -0
  102. package/dist/esm-es5/index.js +1 -1
  103. package/dist/esm-es5/{miscellaneous-0e98b5bc.js → miscellaneous-7fe71e3f.js} +2 -2
  104. package/dist/esm-es5/{miscellaneous-0e98b5bc.js.map → miscellaneous-7fe71e3f.js.map} +1 -1
  105. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +2 -2
  106. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
  107. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +2 -9
  108. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  109. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
  110. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  111. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  112. package/dist/esm-es5/pkcs10_certificate_request-cca2ca68.js +19 -0
  113. package/dist/esm-es5/pkcs10_certificate_request-cca2ca68.js.map +1 -0
  114. package/dist/esm-es5/read_file-bb0b1450.js +12 -0
  115. package/dist/esm-es5/read_file-bb0b1450.js.map +1 -0
  116. package/dist/esm-es5/x509_certificate-050175dd.js +12 -0
  117. package/dist/esm-es5/x509_certificate-050175dd.js.map +1 -0
  118. package/dist/esm-es5/x509_crl-c497f907.js +19 -0
  119. package/dist/esm-es5/x509_crl-c497f907.js.map +1 -0
  120. package/dist/peculiar/index.esm.js +1 -1
  121. package/dist/peculiar/p-05af3b74.system.js +13 -0
  122. package/dist/peculiar/p-05af3b74.system.js.map +1 -0
  123. package/dist/peculiar/p-163a3052.system.js +20 -0
  124. package/dist/peculiar/p-163a3052.system.js.map +1 -0
  125. package/dist/peculiar/p-25a532a3.js +12 -0
  126. package/dist/peculiar/p-25a532a3.js.map +1 -0
  127. package/dist/peculiar/{p-5cf4562f.system.entry.js → p-2d9c40d6.system.entry.js} +16 -16
  128. package/dist/peculiar/p-2d9c40d6.system.entry.js.map +1 -0
  129. package/dist/peculiar/p-494d26fb.entry.js +5 -0
  130. package/dist/peculiar/p-494d26fb.entry.js.map +1 -0
  131. package/dist/peculiar/{p-ff3ced3c.system.js → p-52f13c4a.system.js} +45 -45
  132. package/dist/peculiar/{p-ff3ced3c.system.js.map → p-52f13c4a.system.js.map} +1 -1
  133. package/dist/peculiar/p-55303453.system.js +12 -0
  134. package/dist/peculiar/p-55303453.system.js.map +1 -0
  135. package/dist/peculiar/p-5a699274.js +19 -0
  136. package/dist/peculiar/p-5a699274.js.map +1 -0
  137. package/dist/peculiar/p-6221d0a4.system.entry.js +5 -0
  138. package/dist/peculiar/p-6221d0a4.system.entry.js.map +1 -0
  139. package/dist/peculiar/p-666438a8.js +135 -0
  140. package/dist/peculiar/p-666438a8.js.map +1 -0
  141. package/dist/peculiar/{p-c23fd001.entry.js → p-7a5173be.entry.js} +16 -16
  142. package/dist/peculiar/p-7a5173be.entry.js.map +1 -0
  143. package/dist/peculiar/p-80477c05.js +12 -0
  144. package/dist/peculiar/p-80477c05.js.map +1 -0
  145. package/dist/peculiar/p-8393399a.system.js +1 -1
  146. package/dist/peculiar/p-8ff95ad8.entry.js +5 -0
  147. package/dist/peculiar/{p-54b37ef9.entry.js.map → p-8ff95ad8.entry.js.map} +1 -1
  148. package/dist/peculiar/p-a06f51a2.system.js +19 -0
  149. package/dist/peculiar/p-a06f51a2.system.js.map +1 -0
  150. package/dist/peculiar/{p-75166532.js → p-adf16adb.js} +21 -21
  151. package/dist/peculiar/{p-75166532.js.map → p-adf16adb.js.map} +1 -1
  152. package/dist/peculiar/p-b6d5e413.js +19 -0
  153. package/dist/peculiar/p-b6d5e413.js.map +1 -0
  154. package/dist/peculiar/p-bd7fb688.system.entry.js +5 -0
  155. package/dist/peculiar/{p-00302a20.system.entry.js.map → p-bd7fb688.system.entry.js.map} +1 -1
  156. package/dist/peculiar/{p-496449cf.system.entry.js → p-cc256004.system.entry.js} +2 -2
  157. package/dist/peculiar/p-d1066b51.system.js +135 -0
  158. package/dist/peculiar/p-d1066b51.system.js.map +1 -0
  159. package/dist/peculiar/p-d6229f42.system.js +5 -0
  160. package/dist/peculiar/{p-5f3b0fc7.entry.js → p-ddadcb44.entry.js} +3 -3
  161. package/dist/peculiar/peculiar.esm.js +1 -1
  162. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +3 -3
  163. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +2 -2
  164. package/dist/types/components/crl-viewer/crl-viewer.d.ts +2 -2
  165. package/dist/types/components/csr-viewer/csr-viewer.d.ts +2 -2
  166. package/dist/types/constants/oids.d.ts +3 -0
  167. package/dist/types/crypto/index.d.ts +2 -2
  168. package/dist/types/crypto/{csr.d.ts → pkcs10_certificate_request.d.ts} +4 -5
  169. package/dist/types/crypto/x509_attribute_certificate.d.ts +3 -4
  170. package/dist/types/crypto/x509_certificate.d.ts +3 -4
  171. package/dist/types/crypto/{crl.d.ts → x509_crl.d.ts} +4 -5
  172. package/dist/types/index.d.ts +2 -0
  173. package/dist/types/utils/download.d.ts +4 -4
  174. package/dist/types/utils/validator.d.ts +0 -4
  175. package/hydrate/index.js +84 -138
  176. package/package.json +4 -4
  177. package/dist/cjs/certification_request-b0d72620.js.map +0 -1
  178. package/dist/cjs/crl-812dd7a1.js +0 -312
  179. package/dist/cjs/crl-812dd7a1.js.map +0 -1
  180. package/dist/cjs/download-6f550549.js +0 -476
  181. package/dist/cjs/download-6f550549.js.map +0 -1
  182. package/dist/cjs/miscellaneous-dcb93a5b.js.map +0 -1
  183. package/dist/cjs/x509_certificate-ebf4cbd4.js.map +0 -1
  184. package/dist/collection/crypto/crl.js.map +0 -1
  185. package/dist/collection/crypto/csr.js.map +0 -1
  186. package/dist/esm/certification_request-2c054ece.js.map +0 -1
  187. package/dist/esm/crl-a7318483.js +0 -308
  188. package/dist/esm/crl-a7318483.js.map +0 -1
  189. package/dist/esm/download-8c128e2e.js +0 -470
  190. package/dist/esm/download-8c128e2e.js.map +0 -1
  191. package/dist/esm/miscellaneous-0e98b5bc.js.map +0 -1
  192. package/dist/esm/x509_certificate-ad568d3a.js.map +0 -1
  193. package/dist/esm-es5/certification_request-2c054ece.js.map +0 -1
  194. package/dist/esm-es5/crl-a7318483.js +0 -33
  195. package/dist/esm-es5/crl-a7318483.js.map +0 -1
  196. package/dist/esm-es5/download-8c128e2e.js +0 -43
  197. package/dist/esm-es5/download-8c128e2e.js.map +0 -1
  198. package/dist/esm-es5/x509_certificate-ad568d3a.js +0 -12
  199. package/dist/esm-es5/x509_certificate-ad568d3a.js.map +0 -1
  200. package/dist/peculiar/p-00302a20.system.entry.js +0 -5
  201. package/dist/peculiar/p-0dbc8238.system.js +0 -13
  202. package/dist/peculiar/p-0dbc8238.system.js.map +0 -1
  203. package/dist/peculiar/p-1302bd67.js +0 -97
  204. package/dist/peculiar/p-1302bd67.js.map +0 -1
  205. package/dist/peculiar/p-1f766dd5.js +0 -43
  206. package/dist/peculiar/p-1f766dd5.js.map +0 -1
  207. package/dist/peculiar/p-3d44cbd2.js +0 -12
  208. package/dist/peculiar/p-3d44cbd2.js.map +0 -1
  209. package/dist/peculiar/p-3f9af5f5.system.js +0 -97
  210. package/dist/peculiar/p-3f9af5f5.system.js.map +0 -1
  211. package/dist/peculiar/p-54b37ef9.entry.js +0 -5
  212. package/dist/peculiar/p-5c6f9a14.entry.js +0 -12
  213. package/dist/peculiar/p-5c6f9a14.entry.js.map +0 -1
  214. package/dist/peculiar/p-5cf4562f.system.entry.js.map +0 -1
  215. package/dist/peculiar/p-6680f277.system.entry.js +0 -13
  216. package/dist/peculiar/p-6680f277.system.entry.js.map +0 -1
  217. package/dist/peculiar/p-924790f5.js +0 -33
  218. package/dist/peculiar/p-924790f5.js.map +0 -1
  219. package/dist/peculiar/p-b2890eb8.system.js +0 -5
  220. package/dist/peculiar/p-c156b495.system.js +0 -33
  221. package/dist/peculiar/p-c156b495.system.js.map +0 -1
  222. package/dist/peculiar/p-c23fd001.entry.js.map +0 -1
  223. package/dist/peculiar/p-dde511c8.system.js +0 -43
  224. package/dist/peculiar/p-dde511c8.system.js.map +0 -1
  225. /package/dist/peculiar/{p-496449cf.system.entry.js.map → p-cc256004.system.entry.js.map} +0 -0
  226. /package/dist/peculiar/{p-b2890eb8.system.js.map → p-d6229f42.system.js.map} +0 -0
  227. /package/dist/peculiar/{p-5f3b0fc7.entry.js.map → p-ddadcb44.entry.js.map} +0 -0
@@ -1,5 +0,0 @@
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-3d44cbd2.js";import"./p-1302bd67.js";import"./p-1f766dd5.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-75166532.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-54b37ef9.entry.js.map
@@ -1,12 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import{r as t,c as e,h as r,H as a}from"./p-3cb79cd9.js";import{i as o,a as c,b as s,c as i,d as n}from"./p-1302bd67.js";import"./p-1f766dd5.js";import{X as v}from"./p-3d44cbd2.js";import{X as p,C as l,a as h}from"./p-924790f5.js";import{T as b,B as d}from"./p-4bc5ddbe.js";
5
- /**
6
- * @license
7
- * Copyright (c) Peculiar Ventures, LLC.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */function g(t){return new Promise(((e,r)=>{const a=new FileReader;a.onload=()=>e({value:a.result,fileName:t.name,fileSize:t.size,sourceMime:t.type});a.onerror=()=>r(a.error);a.readAsBinaryString(t)}))}const f="*{-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%}.textarea{min-height:300px;width:100%;border-radius:4px;border:1px solid var(--pv-color-gray-5);padding:14px;font-family:monospace;resize:vertical}.viewer{margin-top:var(--pv-size-base-12)}.controls{margin-top:var(--pv-size-base-2);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";const y=f;const x=class{constructor(r){t(this,r);this.successParse=e(this,"successParse",7);this.clearCertificate=e(this,"clearCertificate",7);this.handleClickDecode=()=>{const{value:t}=this.inputPaste;if(t){this.decode(t)}};this.handleClickClear=()=>{this.clearValue()};this.handleChangeInputFile=async t=>{const e=t.target;if(e.files){const t=await g(e.files[0]);if(typeof t.value==="string"){this.decode(t.value)}e.value=""}};this.handleChangeExample=t=>{if(t.target.value){this.decode(t.target.value)}else{this.clearValue()}};this.handleDropFile=async t=>{t.stopPropagation();t.preventDefault();const e=t.dataTransfer;if(e.files){const t=await g(e.files[0]);if(typeof t.value==="string"){this.decode(t.value)}}};this.certificateExamples=undefined;this.defaultCertificate=undefined;this.certificateDecoded=undefined}componentDidLoad(){if(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 e=o(t);const r=c(t);const a=s(t);const b=i(t);const d=n(t);let g;let f;if(e&&!(r||b||a||d)){this.clearValue();alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.");return}try{if(r){g=new v(t)}if(b){g=new p(t)}if(a){g=new l(t)}if(d){g=new h(t)}}catch(t){f=t}if(!g){try{g=new v(t)}catch(t){f=t}}if(!g){try{g=new p(t)}catch(t){f=t}}if(!g){try{g=new l(t)}catch(t){f=t}}if(!g){try{g=new h(t)}catch(t){f=t}}if(!g){this.clearValue();console.log(f);alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.")}else{this.setValue(g)}}render(){var t;return r(a,{key:"b10e5ce1d2efe26bbe7e0daafb3bbaf5a9f73a62"},r("textarea",{key:"581e7c2eadf2fe33876106b2fdc90bdc9fb92096",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:t=>{this.inputPaste=t},onDrop:this.handleDropFile}),r("div",{key:"71f93ecef6e3571d3ca795be1b53e1b19c4881d3",class:"controls"},r("div",{key:"b2f2dfbe0637d3119bbb2dbf622f7614685f5cb5",class:"control_row"},r(b,{key:"c639c7c696d589ef1035ca8c0f910ce5456e83cf",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),r("input",{key:"c8acf8a1620a802fbcf9afe6b52d8bed1e90bd23",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl",onChange:this.handleChangeInputFile,value:""})),((t=this.certificateExamples)===null||t===void 0?void 0:t.length)&&r("div",{class:"control_row"},r(b,{variant:"b3",color:"secondary-tint-2"},"Load examples:"),r("select",{onChange:this.handleChangeExample},r("option",{value:""},"None"),this.certificateExamples.map((t=>r("option",{value:t.value},t.title))))),r("div",{key:"051ce823203fa7bf2a5f4e2c85b121017fdd8651",class:"control_row"},r(d,{key:"405a0894a87ab000e3717cecd7d3fa34620c26a9",onClick:this.handleClickDecode},"Decode"),r(d,{key:"34282cb209b5fb99a29b2b415435d31646fe0e7e",onClick:this.handleClickClear},"Clear"))),this.certificateDecoded instanceof v&&r("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof p&&r("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof l&&r("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof h&&r("peculiar-crl-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}))}};x.style=y;export{x as peculiar_certificate_decoder};
12
- //# sourceMappingURL=p-5c6f9a14.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["readAsBinaryString","file","Promise","resolve","reject","reader","FileReader","onload","value","result","fileName","name","fileSize","size","sourceMime","type","onerror","error","certificateDecoderCss","PeculiarCertificateDecoderStyle0","CertificateDecoder","this","handleClickDecode","inputPaste","decode","handleClickClear","clearValue","handleChangeInputFile","async","event","element","target","files","handleChangeExample","handleDropFile","stopPropagation","preventDefault","dataTransfer","componentDidLoad","defaultCertificate","setTimeout","certificateDecoded","clearCertificate","emit","setValue","exportAsPemFormatted","successParse","exportAsBase64","certificate","isPem","validator.isPem","isX509Pem","validator.isX509Pem","isPkcs10Pem","validator.isPkcs10Pem","isX509AttributePem","validator.isX509AttributePem","isX509CRLPem","validator.isX509CRLPem","decoded","decodeError","alert","X509Certificate","X509AttributeCertificate","CSR","CRL","console","log","render","h","Host","key","placeholder","class","ref","el","onDrop","Typography","variant","color","accept","onChange","_a","certificateExamples","length","map","example","title","Button","onClick","download"],"sources":["src/utils/read_file.ts","src/components/certificate-decoder/certificate-decoder.scss?tag=peculiar-certificate-decoder&encapsulation=shadow","src/components/certificate-decoder/certificate-decoder.tsx"],"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\nexport type FileValue = string | ArrayBuffer | null;\nexport interface IFileDataType extends Blob {\n name?: string;\n mimeType?: string;\n lastModified?: number;\n}\nexport interface IReadFileResult {\n value: FileValue;\n fileName: string | undefined;\n fileSize: number | undefined;\n sourceMime: string | undefined;\n}\n\n/**\n * Read file as Binary string\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsBinaryString(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsBinaryString(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsBinaryString(file);\n });\n}\n\n/**\n * Read file as ArrayBuffer\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsArrayBuffer(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsArrayBuffer(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsArrayBuffer(file);\n });\n}\n\n/**\n * Read file as Data URL\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsDataUrl(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsDataUrl(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsDataURL(file);\n });\n}\n\n/**\n * Read file as Text\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsText(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsText(file: IFileDataType, options?: string): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsText(file, options);\n });\n}\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.textarea {\n min-height: 300px;\n width: 100%;\n border-radius: 4px;\n border: 1px solid var(--pv-color-gray-5);;\n padding: 14px;\n font-family: monospace;\n resize: vertical;\n}\n\n.viewer {\n margin-top: var(--pv-size-base-12);\n}\n\n.controls {\n margin-top: var(--pv-size-base-2);\n display: flex;\n flex-direction: column;\n gap: var(--pv-size-base-2);\n}\n\n.control_row {\n display: flex;\n align-items: center;\n gap: var(--pv-size-base);\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 Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n} from '@stencil/core';\n\nimport { validator, readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n CSR,\n CRL,\n} from '../../crypto';\nimport { Button } from '../button';\nimport { Typography } from '../typography';\n\n@Component({\n tag: 'peculiar-certificate-decoder',\n styleUrl: 'certificate-decoder.scss',\n shadow: true,\n})\nexport class CertificateDecoder {\n private inputPaste?: HTMLTextAreaElement;\n\n /**\n * The example certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateExamples?: {\n title: string;\n value: string;\n }[];\n\n /**\n * The default certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() defaultCertificate?: string;\n\n @State() certificateDecoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n\n /**\n * Emitted when the certificate has been successfully parsed.\n */\n @Event() successParse!: EventEmitter<string>;\n\n /**\n * Emitted when the certificate has been removed.\n */\n @Event() clearCertificate!: EventEmitter<void>;\n\n componentDidLoad() {\n if (this.defaultCertificate) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.defaultCertificate), 100);\n }\n }\n\n private handleClickDecode = () => {\n const { value } = this.inputPaste;\n\n if (value) {\n this.decode(value);\n }\n };\n\n private handleClickClear = () => {\n this.clearValue();\n };\n\n private handleChangeInputFile = async (event: any) => {\n const element = event.target;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n\n element.value = '';\n }\n };\n\n private handleChangeExample = (event: any) => {\n if (event.target.value) {\n this.decode(event.target.value);\n } else {\n this.clearValue();\n }\n };\n\n private handleDropFile = async (event: any) => {\n event.stopPropagation();\n event.preventDefault();\n\n const element = event.dataTransfer;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n }\n };\n\n clearValue() {\n this.inputPaste.value = '';\n this.certificateDecoded = null;\n this.clearCertificate.emit();\n }\n\n setValue(value: X509Certificate | X509AttributeCertificate | CSR | CRL) {\n this.certificateDecoded = value;\n this.inputPaste.value = value.exportAsPemFormatted();\n this.successParse.emit(value.exportAsBase64());\n }\n\n decode(certificate: string) {\n const isPem = validator.isPem(certificate);\n const isX509Pem = validator.isX509Pem(certificate);\n const isPkcs10Pem = validator.isPkcs10Pem(certificate);\n const isX509AttributePem = validator.isX509AttributePem(certificate);\n const isX509CRLPem = validator.isX509CRLPem(certificate);\n let decoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n let decodeError: Error;\n\n if (isPem && !(isX509Pem || isX509AttributePem || isPkcs10Pem || isX509CRLPem)) {\n this.clearValue();\n\n alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n\n return;\n }\n\n try {\n if (isX509Pem) {\n decoded = new X509Certificate(certificate);\n }\n\n if (isX509AttributePem) {\n decoded = new X509AttributeCertificate(certificate);\n }\n\n if (isPkcs10Pem) {\n decoded = new CSR(certificate);\n }\n\n if (isX509CRLPem) {\n decoded = new CRL(certificate);\n }\n } catch (error) {\n decodeError = error;\n }\n\n if (!decoded) {\n try {\n decoded = new X509Certificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new X509AttributeCertificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CSR(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CRL(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n this.clearValue();\n\n console.log(decodeError);\n alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n } else {\n this.setValue(decoded);\n }\n }\n\n render() {\n return (\n <Host>\n <textarea\n placeholder=\"Certificate DER or PEM\"\n class=\"textarea t-b2 c-black\"\n ref={(el) => { this.inputPaste = el; }}\n onDrop={this.handleDropFile}\n />\n <div class=\"controls\">\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Drag or load file:\n </Typography>\n <input\n type=\"file\"\n accept=\"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl\"\n onChange={this.handleChangeInputFile}\n value=\"\"\n />\n </div>\n {this.certificateExamples?.length && (\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Load examples:\n </Typography>\n <select onChange={this.handleChangeExample}>\n <option value=\"\">None</option>\n {this.certificateExamples.map((example) => (\n <option value={example.value}>\n {example.title}\n </option>\n ))}\n </select>\n </div>\n )}\n <div class=\"control_row\">\n <Button\n onClick={this.handleClickDecode}\n >\n Decode\n </Button>\n <Button\n onClick={this.handleClickClear}\n >\n Clear\n </Button>\n </div>\n </div>\n {this.certificateDecoded instanceof X509Certificate && (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof X509AttributeCertificate && (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CSR && (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CRL && (\n <peculiar-crl-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;YAiCgBA,EAAmBC,GACjC,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAS,IAAIC,WAEnBD,EAAOE,OAAS,IAAMJ,EAAQ,CAC5BK,MAAOH,EAAOI,OACdC,SAAUT,EAAKU,KACfC,SAAUX,EAAKY,KACfC,WAAYb,EAAKc,OAGnBV,EAAOW,QAAU,IAAMZ,EAAOC,EAAOY,OAErCZ,EAAOL,mBAAmBC,EAAK,GAEnC,CChDA,MAAMiB,EAAwB,knQAC9B,MAAAC,EAAeD,E,MCgCFE,EAAkB,M,uHAqCrBC,KAAAC,kBAAoB,KAC1B,MAAMd,MAAEA,GAAUa,KAAKE,WAEvB,GAAIf,EAAO,CACTa,KAAKG,OAAOhB,E,GAIRa,KAAAI,iBAAmB,KACzBJ,KAAKK,YAAY,EAGXL,KAAAM,sBAAwBC,MAAOC,IACrC,MAAMC,EAAUD,EAAME,OAEtB,GAAID,EAAQE,MAAO,CACjB,MAAM/B,QAAaD,EAAmB8B,EAAQE,MAAM,IAEpD,UAAW/B,EAAKO,Q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OACpB8E,EAAQC,WAMnBlB,EAAA,OAAAE,IAAA,2CAAKE,MAAM,eACTJ,EAACmB,EAAM,CAAAjB,IAAA,2CACLkB,QAASpE,KAAKC,mBAAiB,UAIjC+C,EAACmB,EAAM,CAAAjB,IAAA,2CACLkB,QAASpE,KAAKI,kBAAgB,WAMnCJ,KAAKoB,8BAA8BqB,GAClCO,EAAA,+BACErB,YAAa3B,KAAKoB,mBAClBgC,MAAM,SACNiB,SAAQ,OAGXrE,KAAKoB,8BAA8BsB,GAClCM,EAAA,yCACErB,YAAa3B,KAAKoB,mBAClBgC,MAAM,SACNiB,SAAQ,OAGXrE,KAAKoB,8BAA8BuB,GAClCK,EAAA,uBACErB,YAAa3B,KAAKoB,mBAClBgC,MAAM,SACNiB,SAAQ,OAGXrE,KAAKoB,8BAA8BwB,GAClCI,EAAA,uBACErB,YAAa3B,KAAKoB,mBAClBgC,MAAM,SACNiB,SAAQ,O"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["BasicAttribute","props","children","attribute","h","RowValue","name","value","getStringByOID","asn","type","colSpan","class","NamePart","map","relativeDistinguishedName","attributeTypeAndValue","OIDs","toString","NameAttribute","ActivityDescriptionAttribute","camelCaseToWords","TableRowTable","GeneralNamePart","generalName","codeAuthority","getDNSNameLink","getIPAddressLink","codeId","shortName","shortDescription","WebGdprAttribute","assessmentAuthority","assessmentLocation","assessmentRef","dataStorageTerritory","description","InsuranceValueAttribute","concat","base","degree","location","TypeRelationshipAttribute","Object","keys","keyName","toNumber","l10n","getString","getValueRank","ratio","ValuationRankingAttribute","values","AsStringAttribute","monospace","UnstructuredNameAttribute","utf8String","ChallengePasswordAttribute","Attributes","attributes","length","RowTitle","Name","ActivityDescription","WebGDPR","InsuranceValue","TypeRelationship","ValuationRanking","UnstructuredName","ChallengePassword","error","console","RevokedCertificates","revokedCertificates","certificate","Convert","ToHex","userCertificate","dateShort","revocationDate","getTime","crlEntryExtensions","extension","CRLReason","extnID","toJSON","reason","InvalidityDate","CertificateIssuer","gn","extnValue","Holder","holder","baseCertificateID","objectDigestInfo","issuer","item","serial","digestAlgorithm","algorithm","objectDigest","digestedObjectType","Issuer","certificateViewerCss","PeculiarAttributeCertificateViewerStyle0","AttributeCertificateViewer","exports","this","getAuthKeyIdParentLink","_a","_this","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","class_1","prototype","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509AttributeCertificate","certificateDecoded","parseExtensions","parseAttributes","getThumbprint","_b","sent","certificateDecodeError","error_1","watchCertificateAndDecode","newValue","oldValue","serialNumber","renderErrorState","Typography","renderEmptyState","render","Host","String","BasicInformation","assign","Signature","signature","Thumbprints","thumbprints","getLEILink","Extensions","extensions","download","Miscellaneous","PeculiarCrlViewerStyle0","CrlViewer","class_2","CRL","error_2","getIssuerDnLink","issuerDnLink","commonName","IssuerName","PeculiarCsrViewerStyle0","CsrViewer","class_3","CSR","error_3","SubjectName","subject","PublicKey","publicKey","title"],"sources":["src/components/certificate-details-parts/attributes/basic_attribute.tsx","src/components/certificate-details-parts/attributes/name_part.tsx","src/components/certificate-details-parts/attributes/name_attribute.tsx","src/components/certificate-details-parts/attributes/activity_description_attribute.tsx","src/components/certificate-details-parts/attributes/web_gdpr_attribute.tsx","src/components/certificate-details-parts/attributes/insurance_value_attribute.tsx","src/components/certificate-details-parts/attributes/type_relationship_attribute.tsx","src/components/certificate-details-parts/attributes/valuation_ranking_attribute.tsx","src/components/certificate-details-parts/attributes/as_string_attribute.tsx","src/components/certificate-details-parts/attributes/unstructured_name_attribute.tsx","src/components/certificate-details-parts/attributes/challenge_password_attribute.tsx","src/components/certificate-details-parts/attributes/index.tsx","src/components/certificate-details-parts/revoked_certificates.tsx","src/components/certificate-details-parts/holder.tsx","src/components/certificate-details-parts/issuer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-attribute-certificate-viewer&encapsulation=shadow","src/components/attribute-certificate-viewer/attribute-certificate-viewer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-crl-viewer&encapsulation=shadow","src/components/crl-viewer/crl-viewer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-csr-viewer&encapsulation=shadow","src/components/csr-viewer/csr-viewer.tsx"],"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 { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { getStringByOID } from '../../../utils';\nimport { RowValue } from '../row';\n\ninterface IBasicAttributeProps {\n attribute: Attribute<TAttributeValue>;\n}\n\nexport const BasicAttribute: FunctionalComponent<IBasicAttributeProps> = (props, children) => {\n const { attribute } = props;\n\n return ([\n <RowValue\n name=\"Name\"\n value={getStringByOID(attribute.asn.type)}\n />,\n children,\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport { OIDs } from '../../../constants/oids';\nimport { RowValue } from '../row';\n\ninterface INamePartProps {\n name: Name;\n}\n\nexport const NamePart: FunctionalComponent<INamePartProps> = (props): any[] => {\n const { name } = props;\n\n if (!name) {\n return null;\n }\n\n return name.map((relativeDistinguishedName) => (\n relativeDistinguishedName.map((attributeTypeAndValue) => (\n <RowValue\n name={OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type}\n value={attributeTypeAndValue.value.toString()}\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface INameAttributeProps {\n attribute: Attribute<Name>;\n}\n\nexport const NameAttribute:\nFunctionalComponent<INameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <NamePart\n name={attribute.value}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ActivityDescription } from '@peculiar/asn1-ntqwac';\n\nimport { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IActivityDescriptionAttributeProps {\n attribute: Attribute<ActivityDescription>;\n}\n\nexport const ActivityDescriptionAttribute:\nFunctionalComponent<IActivityDescriptionAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('codeAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('codeId')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeId}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('shortName')}\n value={attribute.value.shortName}\n />\n <RowValue\n name={camelCaseToWords('shortDescription')}\n value={attribute.value.shortDescription}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { WebGDPR } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IWebGdprAttributeProps {\n attribute: Attribute<WebGDPR>;\n}\n\nexport const WebGdprAttribute:\nFunctionalComponent<IWebGdprAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('assessmentAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentLocation')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentLocation}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentRef')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentRef}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('dataStorageTerritory')}\n value={attribute.value.dataStorageTerritory}\n />\n <RowValue\n name={camelCaseToWords('description')}\n value={attribute.value.description}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { InsuranceValue } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IInsuranceValueAttributeProps {\n attribute: Attribute<InsuranceValue>;\n}\n\nexport const InsuranceValueAttribute:\nFunctionalComponent<IInsuranceValueAttributeProps> = (props) => {\n const { attribute } = props;\n const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={value}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { TypeRelationship } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { l10n } from '../../../utils';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface ITypeRelationshipAttributeProps {\n attribute: Attribute<TypeRelationship>;\n}\n\nexport const TypeRelationshipAttribute:\nFunctionalComponent<ITypeRelationshipAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n {Object.keys(attribute.value).map((keyName) => (\n <RowValue\n name={keyName}\n value={attribute.value[keyName].toNumber() ? l10n.getString('yes') : l10n.getString('no')}\n />\n ))}\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ValuationRanking } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IValuationRankingAttributeProps {\n attribute: Attribute<ValuationRanking>;\n}\n\nconst getValueRank = (value: number): string => {\n let ratio = 1;\n\n if (value / 100 > 1) {\n ratio = 100;\n } else if (value / 10 > 1) {\n ratio = 10;\n }\n\n return `${value}/${5 * ratio}`;\n};\n\nexport const ValuationRankingAttribute:\nFunctionalComponent<IValuationRankingAttributeProps> = (props) => {\n const { attribute } = props;\n const values = Object.keys(attribute.value).map((keyName) => ([\n getValueRank(attribute.value[keyName]),\n <br />,\n ]));\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={values as any}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IAsStringAttributeProps {\n attribute: Attribute<string>;\n}\n\nexport const AsStringAttribute:\nFunctionalComponent<IAsStringAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value}\n monospace\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { UnstructuredName } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IUnstructuredNameAttributeProps {\n attribute: Attribute<UnstructuredName>;\n}\n\nexport const UnstructuredNameAttribute:\nFunctionalComponent<IUnstructuredNameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.utf8String}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ChallengePassword } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IChallengePasswordAttributeProps {\n attribute: Attribute<ChallengePassword>;\n}\n\nexport const ChallengePasswordAttribute:\nFunctionalComponent<IChallengePasswordAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.toString()}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport { Name } from '@peculiar/asn1-x509';\nimport {\n TypeRelationship,\n ActivityDescription,\n WebGDPR,\n InsuranceValue,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n UnstructuredName,\n ChallengePassword,\n} from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { RowTitle } from '../row';\nimport { NameAttribute } from './name_attribute';\nimport { ActivityDescriptionAttribute } from './activity_description_attribute';\nimport { WebGdprAttribute } from './web_gdpr_attribute';\nimport { InsuranceValueAttribute } from './insurance_value_attribute';\nimport { TypeRelationshipAttribute } from './type_relationship_attribute';\nimport { ValuationRankingAttribute } from './valuation_ranking_attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { AsStringAttribute } from './as_string_attribute';\nimport { UnstructuredNameAttribute } from './unstructured_name_attribute';\nimport { ChallengePasswordAttribute } from './challenge_password_attribute';\n\ninterface IAttributesPtops extends\n IGeneralNameOptions,\n ILeiOptions,\n IAuthorityKeyIdentifierOptions,\n ISubjectKeyIdentifierOptions {\n attributes: Attribute<TAttributeValue>[];\n}\n\nexport const Attributes: FunctionalComponent<IAttributesPtops> = (props) => {\n const { attributes } = props;\n\n if (!attributes || !attributes.length) {\n return null;\n }\n\n return ([\n <RowTitle\n value=\"Attributes\"\n />,\n attributes.map((attribute) => {\n try {\n if (attribute.value instanceof Name) {\n return (\n <NameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as any}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch (error) {\n console.error('Error render attribute:', attribute.asn.type);\n\n return null;\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 { h, FunctionalComponent } from '@stencil/core';\nimport { CRLReason, InvalidityDate, CertificateIssuer } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { dateShort, l10n, getStringByOID } from '../../utils';\nimport { IRevokedCertificate } from '../../crypto';\nimport { GeneralNamePart } from './extensions/general_name_part';\nimport { RowTitle, RowValue, TableRowTable } from './row';\n\ninterface IRevokedCertificatesProps extends IGeneralNameOptions {\n revokedCertificates: IRevokedCertificate[];\n}\n\nexport const RevokedCertificates: FunctionalComponent<IRevokedCertificatesProps> = (props) => {\n const {\n revokedCertificates,\n getDNSNameLink,\n getIPAddressLink,\n } = props;\n\n if (!revokedCertificates || !revokedCertificates.length) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('revokedCertificates')}\n />,\n revokedCertificates.map((certificate) => ([\n <RowValue\n name={l10n.getString('serialNumber')}\n value={Convert.ToHex(certificate.userCertificate)}\n monospace\n />,\n <RowValue\n name={l10n.getString('revocationDate')}\n value={dateShort(certificate.revocationDate.getTime())}\n />,\n (certificate.crlEntryExtensions && certificate.crlEntryExtensions.length && ([\n <RowValue\n name={`${l10n.getString('crlEntryExtensions')}:`}\n value=\"\"\n />,\n <TableRowTable>\n {\n certificate.crlEntryExtensions.map((extension) => {\n if (extension.value instanceof CRLReason) {\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={extension.value.toJSON() || extension.value.reason}\n />\n );\n }\n\n if (extension.value instanceof InvalidityDate) {\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={extension.value.value.getTime()}\n />\n );\n }\n\n if (extension.value instanceof CertificateIssuer && extension.value.length) {\n return ([\n <RowValue\n name={`${getStringByOID(extension.asn.extnID)}:`}\n value=\"\"\n />,\n extension.value.map((gn) => (\n <TableRowTable>\n <GeneralNamePart\n generalName={gn}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n />\n </TableRowTable>\n )),\n ]);\n }\n\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={Convert.ToHex(extension.asn.extnValue)}\n monospace\n />\n );\n })\n }\n </TableRowTable>,\n ])),\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\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 { h, FunctionalComponent } from '@stencil/core';\nimport { Convert } from 'pvtsutils';\n\nimport type { X509AttributeCertificate } from '../../crypto';\nimport { l10n, getStringByOID } from '../../utils';\nimport { RowTitle, RowValue, TableRowTable } from './row';\nimport { GeneralNamePart } from './extensions/general_name_part';\n\ninterface IHolderProps {\n holder: X509AttributeCertificate['holder'];\n}\n\nexport const Holder: FunctionalComponent<IHolderProps> = (props) => {\n const { holder } = props;\n\n if (!holder) {\n return null;\n }\n\n const { baseCertificateID, objectDigestInfo } = holder;\n\n return [\n <RowTitle\n value={l10n.getString('holder')}\n />,\n baseCertificateID && ([\n baseCertificateID.issuer.map((item) => (\n <GeneralNamePart\n generalName={item}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n )),\n <tr>\n <td />\n <td />\n </tr>,\n <RowValue\n name={l10n.getString('serialNumber')}\n value={Convert.ToHex(baseCertificateID.serial)}\n monospace\n />,\n <tr>\n <td />\n <td />\n </tr>,\n ]),\n objectDigestInfo && ([\n <RowValue\n name={l10n.getString('digestInfo')}\n value=\"\"\n />,\n <TableRowTable>\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(objectDigestInfo.digestAlgorithm.algorithm)}\n />\n <RowValue\n name={l10n.getString('value')}\n value={Convert.ToHex(objectDigestInfo.objectDigest)}\n monospace\n />\n <RowValue\n name={l10n.getString('type')}\n value={objectDigestInfo.digestedObjectType}\n />\n </TableRowTable>,\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 { h, FunctionalComponent } from '@stencil/core';\n\nimport type { X509AttributeCertificate } from '../../crypto';\nimport { l10n } from '../../utils';\nimport { RowTitle } from './row';\nimport { GeneralNamePart } from './extensions/general_name_part';\n\ninterface IIssuerProps {\n issuer: X509AttributeCertificate['issuer'];\n}\n\nexport const Issuer: FunctionalComponent<IIssuerProps> = (props) => {\n const { issuer } = props;\n\n if (!issuer) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('issuer')}\n />,\n issuer.map((item) => (\n <GeneralNamePart\n generalName={item}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n )),\n ];\n};\n","@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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\n\nimport { X509AttributeCertificate } from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n Attributes,\n Holder,\n Issuer,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type AttributeCertificateProp = string | X509AttributeCertificate;\n\n@Component({\n tag: 'peculiar-attribute-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class AttributeCertificateViewer {\n private certificateDecoded: X509AttributeCertificate;\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() certificate: AttributeCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() 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 * 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: AttributeCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509AttributeCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509AttributeCertificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n this.certificateDecoded.parseAttributes();\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(\n newValue: AttributeCertificateProp,\n oldValue: AttributeCertificateProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof X509AttributeCertificate\n && oldValue instanceof X509AttributeCertificate\n ) {\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 // 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 attribute 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 attribute 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 <Issuer\n issuer={this.certificateDecoded.issuer}\n />\n\n <Holder\n holder={this.certificateDecoded.holder}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\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 <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","@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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\n\nimport { CRL } from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n IssuerName,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n RevokedCertificates,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CrlProp = string | CRL;\n\n@Component({\n tag: 'peculiar-crl-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CrlViewer {\n private certificateDecoded: CRL;\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: CrlProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() 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 * 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: CrlProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof CRL) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new CRL(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 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 getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: CrlProp,\n oldValue: CrlProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof CRL\n && oldValue instanceof CRL\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\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 revocation list.\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 revocation list 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 <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\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 />\n\n <RevokedCertificates\n revokedCertificates={this.certificateDecoded.revokedCertificates}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n","@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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\n\nimport { CSR } from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CsrProp = string | CSR;\n\n@Component({\n tag: 'peculiar-csr-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CsrViewer {\n private certificateDecoded: CSR;\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: CsrProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\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 * 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: CsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof CSR) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new CSR(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseAttributes();\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(\n newValue: CsrProp,\n oldValue: CsrProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof CSR\n && oldValue instanceof CSR\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n private getAuthKeyIdParentLink = (value: string) => value;\n\n // eslint-disable-next-line class-methods-use-this\n private getAuthKeyIdSiblingsLink = (value: string) => 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 // 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 request.\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 request 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 <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 <Attributes\n attributes={this.certificateDecoded.attributes}\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 <Extensions\n extensions={this.certificateDecoded.extensions}\n title=\"Extension Request\"\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":";;;;;;;;;;;AAkBO,IAAMA,EAA4D,SAACC,EAAOC,GACvE,IAAAC,EAAcF,EAAKE,UAE3B,OACEC,EAACC,EAAQ,CACPC,KAAK,OACLC,MAAOC,EAAeL,EAAUM,IAAIC,QAEtCR,EACAE,EAAA,UACEA,EAAA,MAAIO,QAAS,EAAGC,MAAM,WACpBR,EAAA,eAIR;;;;;;;eCfO,IAAMS,EAAgD,SAACZ,GACpD,IAAAK,EAASL,EAAKK,KAEtB,IAAKA,EAAM,CACT,OAAO,I,CAGT,OAAOA,EAAKQ,KAAI,SAACC,GAAyB,OACxCA,EAA0BD,KAAI,SAACE,GAAqB,OAClDZ,EAACC,EAAQ,CACPC,KAAMW,EAAKD,EAAsBN,OAASM,EAAsBN,KAChEH,MAAOS,EAAsBT,MAAMW,YAHa,GADZ,GAQ5C;;;;;;;eCdO,IAAMC,EAC8B,SAAClB,GAClC,IAAAE,EAAcF,EAAKE,UAE3B,OACEC,EAACJ,EAAc,CACbG,UAAWA,GAEXC,EAACS,EAAQ,CACPP,KAAMH,EAAUI,QAIxB;;;;;;;eCXO,IAAMa,EAC6C,SAACnB,GACjD,IAAAE,EAAcF,EAAKE,UAE3B,OACEC,EAACJ,EAAc,CACbG,UAAWA,GAEXC,EAACC,EAAQ,CACPC,KAAMe,EAAiB,iBACvBd,MAAM,KAERH,EAACkB,EAAa,KACZlB,EAACmB,EAAe,CACdC,YAAarB,EAAUI,MA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ACJhK,EAACiK,EAAa,CACZ3F,YAAaiC,KAAK8B,sB,sJAjNV,I"}
@@ -1,13 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,c){function i(t){try{s(a.next(t))}catch(t){c(t)}}function n(t){try{s(a["throw"](t))}catch(t){c(t)}}function s(t){t.done?r(t.value):o(t.value).then(i,n)}s((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},a,o,c,i;return i={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function n(t){return function(e){return s([t,e])}}function s(n){if(a)throw new TypeError("Generator is already executing.");while(i&&(i=0,n[0]&&(r=0)),r)try{if(a=1,o&&(c=n[0]&2?o["return"]:n[0]?o["throw"]||((c=o["return"])&&c.call(o),0):o.next)&&!(c=c.call(o,n[1])).done)return c;if(o=0,c)n=[n[0]&2,c.value];switch(n[0]){case 0:case 1:c=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;o=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(c=r.trys,c=c.length>0&&c[c.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!c||n[1]>c[0]&&n[1]<c[3])){r.label=n[1];break}if(n[0]===6&&r.label<c[1]){r.label=c[1];c=n;break}if(c&&r.label<c[2]){r.label=c[2];r.ops.push(n);break}if(c[2])r.ops.pop();r.trys.pop();continue}n=e.call(t,r)}catch(t){n=[6,t];o=0}finally{a=c=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
- /*!
3
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */System.register(["./p-821bdcdc.system.js","./p-3f9af5f5.system.js","./p-dde511c8.system.js","./p-0dbc8238.system.js","./p-c156b495.system.js","./p-9712b827.system.js"],(function(t){"use strict";var e,r,a,o,c,i,n,s,v,p,l,h,f,b,d;return{setters:[function(t){e=t.r;r=t.c;a=t.h;o=t.H},function(t){c=t.i;i=t.a;n=t.b;s=t.c;v=t.d},function(){},function(t){p=t.X},function(t){l=t.X;h=t.C;f=t.a},function(t){b=t.T;d=t.B}],execute:function(){
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
- */
12
- function g(t){return new Promise((function(e,r){var a=new FileReader;a.onload=function(){return e({value:a.result,fileName:t.name,fileSize:t.size,sourceMime:t.type})};a.onerror=function(){return r(a.error)};a.readAsBinaryString(t)}))}var 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%}.textarea{min-height:300px;width:100%;border-radius:4px;border:1px solid var(--pv-color-gray-5);padding:14px;font-family:monospace;resize:vertical}.viewer{margin-top:var(--pv-size-base-12)}.controls{margin-top:var(--pv-size-base-2);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";var y=u;var w=t("peculiar_certificate_decoder",function(){function t(t){var a=this;e(this,t);this.successParse=r(this,"successParse",7);this.clearCertificate=r(this,"clearCertificate",7);this.handleClickDecode=function(){var t=a.inputPaste.value;if(t){a.decode(t)}};this.handleClickClear=function(){a.clearValue()};this.handleChangeInputFile=function(t){return __awaiter(a,void 0,void 0,(function(){var e,r;return __generator(this,(function(a){switch(a.label){case 0:e=t.target;if(!e.files)return[3,2];return[4,g(e.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}e.value="";a.label=2;case 2:return[2]}}))}))};this.handleChangeExample=function(t){if(t.target.value){a.decode(t.target.value)}else{a.clearValue()}};this.handleDropFile=function(t){return __awaiter(a,void 0,void 0,(function(){var e,r;return __generator(this,(function(a){switch(a.label){case 0:t.stopPropagation();t.preventDefault();e=t.dataTransfer;if(!e.files)return[3,2];return[4,g(e.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}a.label=2;case 2:return[2]}}))}))};this.certificateExamples=undefined;this.defaultCertificate=undefined;this.certificateDecoded=undefined}t.prototype.componentDidLoad=function(){var t=this;if(this.defaultCertificate){setTimeout((function(){return t.decode(t.defaultCertificate)}),100)}};t.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()};t.prototype.setValue=function(t){this.certificateDecoded=t;this.inputPaste.value=t.exportAsPemFormatted();this.successParse.emit(t.exportAsBase64())};t.prototype.decode=function(t){var e=c(t);var r=i(t);var a=n(t);var o=s(t);var b=v(t);var d;var g;if(e&&!(r||o||a||b)){this.clearValue();alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.");return}try{if(r){d=new p(t)}if(o){d=new l(t)}if(a){d=new h(t)}if(b){d=new f(t)}}catch(t){g=t}if(!d){try{d=new p(t)}catch(t){g=t}}if(!d){try{d=new l(t)}catch(t){g=t}}if(!d){try{d=new h(t)}catch(t){g=t}}if(!d){try{d=new f(t)}catch(t){g=t}}if(!d){this.clearValue();console.log(g);alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.")}else{this.setValue(d)}};t.prototype.render=function(){var t=this;var e;return a(o,{key:"b10e5ce1d2efe26bbe7e0daafb3bbaf5a9f73a62"},a("textarea",{key:"581e7c2eadf2fe33876106b2fdc90bdc9fb92096",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:function(e){t.inputPaste=e},onDrop:this.handleDropFile}),a("div",{key:"71f93ecef6e3571d3ca795be1b53e1b19c4881d3",class:"controls"},a("div",{key:"b2f2dfbe0637d3119bbb2dbf622f7614685f5cb5",class:"control_row"},a(b,{key:"c639c7c696d589ef1035ca8c0f910ce5456e83cf",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),a("input",{key:"c8acf8a1620a802fbcf9afe6b52d8bed1e90bd23",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl",onChange:this.handleChangeInputFile,value:""})),((e=this.certificateExamples)===null||e===void 0?void 0:e.length)&&a("div",{class:"control_row"},a(b,{variant:"b3",color:"secondary-tint-2"},"Load examples:"),a("select",{onChange:this.handleChangeExample},a("option",{value:""},"None"),this.certificateExamples.map((function(t){return a("option",{value:t.value},t.title)})))),a("div",{key:"051ce823203fa7bf2a5f4e2c85b121017fdd8651",class:"control_row"},a(d,{key:"405a0894a87ab000e3717cecd7d3fa34620c26a9",onClick:this.handleClickDecode},"Decode"),a(d,{key:"34282cb209b5fb99a29b2b415435d31646fe0e7e",onClick:this.handleClickClear},"Clear"))),this.certificateDecoded instanceof p&&a("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof l&&a("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof h&&a("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof f&&a("peculiar-crl-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}))};return t}());w.style=y}}}));
13
- //# sourceMappingURL=p-6680f277.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["readAsBinaryString","file","Promise","resolve","reject","reader","FileReader","onload","value","result","fileName","name","fileSize","size","sourceMime","type","onerror","error","certificateDecoderCss","PeculiarCertificateDecoderStyle0","CertificateDecoder","exports","this","handleClickDecode","_this","inputPaste","decode","handleClickClear","clearValue","handleChangeInputFile","event","__awaiter","element","target","files","_b","sent","handleChangeExample","handleDropFile","stopPropagation","preventDefault","dataTransfer","class_1","prototype","componentDidLoad","defaultCertificate","setTimeout","certificateDecoded","clearCertificate","emit","setValue","exportAsPemFormatted","successParse","exportAsBase64","certificate","isPem","validator.isPem","isX509Pem","validator.isX509Pem","isPkcs10Pem","validator.isPkcs10Pem","isX509AttributePem","validator.isX509AttributePem","isX509CRLPem","validator.isX509CRLPem","decoded","decodeError","alert","X509Certificate","X509AttributeCertificate","CSR","CRL","console","log","render","h","Host","key","placeholder","class","ref","el","onDrop","Typography","variant","color","accept","onChange","_a","certificateExamples","length","map","example","title","Button","onClick","download"],"sources":["src/utils/read_file.ts","src/components/certificate-decoder/certificate-decoder.scss?tag=peculiar-certificate-decoder&encapsulation=shadow","src/components/certificate-decoder/certificate-decoder.tsx"],"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\nexport type FileValue = string | ArrayBuffer | null;\nexport interface IFileDataType extends Blob {\n name?: string;\n mimeType?: string;\n lastModified?: number;\n}\nexport interface IReadFileResult {\n value: FileValue;\n fileName: string | undefined;\n fileSize: number | undefined;\n sourceMime: string | undefined;\n}\n\n/**\n * Read file as Binary string\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsBinaryString(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsBinaryString(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsBinaryString(file);\n });\n}\n\n/**\n * Read file as ArrayBuffer\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsArrayBuffer(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsArrayBuffer(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsArrayBuffer(file);\n });\n}\n\n/**\n * Read file as Data URL\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsDataUrl(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsDataUrl(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsDataURL(file);\n });\n}\n\n/**\n * Read file as Text\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsText(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsText(file: IFileDataType, options?: string): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsText(file, options);\n });\n}\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.textarea {\n min-height: 300px;\n width: 100%;\n border-radius: 4px;\n border: 1px solid var(--pv-color-gray-5);;\n padding: 14px;\n font-family: monospace;\n resize: vertical;\n}\n\n.viewer {\n margin-top: var(--pv-size-base-12);\n}\n\n.controls {\n margin-top: var(--pv-size-base-2);\n display: flex;\n flex-direction: column;\n gap: var(--pv-size-base-2);\n}\n\n.control_row {\n display: flex;\n align-items: center;\n gap: var(--pv-size-base);\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 Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n} from '@stencil/core';\n\nimport { validator, readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n CSR,\n CRL,\n} from '../../crypto';\nimport { Button } from '../button';\nimport { Typography } from '../typography';\n\n@Component({\n tag: 'peculiar-certificate-decoder',\n styleUrl: 'certificate-decoder.scss',\n shadow: true,\n})\nexport class CertificateDecoder {\n private inputPaste?: HTMLTextAreaElement;\n\n /**\n * The example certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateExamples?: {\n title: string;\n value: string;\n }[];\n\n /**\n * The default certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() defaultCertificate?: string;\n\n @State() certificateDecoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n\n /**\n * Emitted when the certificate has been successfully parsed.\n */\n @Event() successParse!: EventEmitter<string>;\n\n /**\n * Emitted when the certificate has been removed.\n */\n @Event() clearCertificate!: EventEmitter<void>;\n\n componentDidLoad() {\n if (this.defaultCertificate) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.defaultCertificate), 100);\n }\n }\n\n private handleClickDecode = () => {\n const { value } = this.inputPaste;\n\n if (value) {\n this.decode(value);\n }\n };\n\n private handleClickClear = () => {\n this.clearValue();\n };\n\n private handleChangeInputFile = async (event: any) => {\n const element = event.target;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n\n element.value = '';\n }\n };\n\n private handleChangeExample = (event: any) => {\n if (event.target.value) {\n this.decode(event.target.value);\n } else {\n this.clearValue();\n }\n };\n\n private handleDropFile = async (event: any) => {\n event.stopPropagation();\n event.preventDefault();\n\n const element = event.dataTransfer;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n }\n };\n\n clearValue() {\n this.inputPaste.value = '';\n this.certificateDecoded = null;\n this.clearCertificate.emit();\n }\n\n setValue(value: X509Certificate | X509AttributeCertificate | CSR | CRL) {\n this.certificateDecoded = value;\n this.inputPaste.value = value.exportAsPemFormatted();\n this.successParse.emit(value.exportAsBase64());\n }\n\n decode(certificate: string) {\n const isPem = validator.isPem(certificate);\n const isX509Pem = validator.isX509Pem(certificate);\n const isPkcs10Pem = validator.isPkcs10Pem(certificate);\n const isX509AttributePem = validator.isX509AttributePem(certificate);\n const isX509CRLPem = validator.isX509CRLPem(certificate);\n let decoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n let decodeError: Error;\n\n if (isPem && !(isX509Pem || isX509AttributePem || isPkcs10Pem || isX509CRLPem)) {\n this.clearValue();\n\n alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n\n return;\n }\n\n try {\n if (isX509Pem) {\n decoded = new X509Certificate(certificate);\n }\n\n if (isX509AttributePem) {\n decoded = new X509AttributeCertificate(certificate);\n }\n\n if (isPkcs10Pem) {\n decoded = new CSR(certificate);\n }\n\n if (isX509CRLPem) {\n decoded = new CRL(certificate);\n }\n } catch (error) {\n decodeError = error;\n }\n\n if (!decoded) {\n try {\n decoded = new X509Certificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new X509AttributeCertificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CSR(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CRL(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n this.clearValue();\n\n console.log(decodeError);\n alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n } else {\n this.setValue(decoded);\n }\n }\n\n render() {\n return (\n <Host>\n <textarea\n placeholder=\"Certificate DER or PEM\"\n class=\"textarea t-b2 c-black\"\n ref={(el) => { this.inputPaste = el; }}\n onDrop={this.handleDropFile}\n />\n <div class=\"controls\">\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Drag or load file:\n </Typography>\n <input\n type=\"file\"\n accept=\"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl\"\n onChange={this.handleChangeInputFile}\n value=\"\"\n />\n </div>\n {this.certificateExamples?.length && (\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Load examples:\n </Typography>\n <select onChange={this.handleChangeExample}>\n <option value=\"\">None</option>\n {this.certificateExamples.map((example) => (\n <option value={example.value}>\n {example.title}\n </option>\n ))}\n </select>\n </div>\n )}\n <div class=\"control_row\">\n <Button\n onClick={this.handleClickDecode}\n >\n Decode\n </Button>\n <Button\n onClick={this.handleClickClear}\n >\n Clear\n </Button>\n </div>\n </div>\n {this.certificateDecoded instanceof X509Certificate && (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof X509AttributeCertificate && (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CSR && (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CRL && (\n <peculiar-crl-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;SAiCgBA,EAAmBC,GACjC,OAAO,IAAIC,SAAQ,SAACC,EAASC,GAC3B,IAAMC,EAAS,IAAIC,WAEnBD,EAAOE,OAAS,WAAM,OAAAJ,EAAQ,CAC5BK,MAAOH,EAAOI,OACdC,SAAUT,EAAKU,KACfC,SAAUX,EAAKY,KACfC,WAAYb,EA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ErB,YAAahC,KAAKyB,mBAClBgC,MAAM,SACNiB,SAAQ,O,WAjQW,I"}
@@ -1,33 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import{A as t,t as s,u as i,v as e,D as r,w as a,x as n,y as o,z as h,B as c,F as u,G as l,T as E,H as f,I as m,J as g,W as A,K as p,L as d,M as C,V as w,O as x,P as T,Q as b,U as R,S as I,X as v,e as N,Y as y,f as F,E as B,g as D,s as P,q as H,r as S,Z as L,N as X,h as $,j as U,k as j,R as q,_ as G}from"./p-1302bd67.js";import{C as K,D as M}from"./p-1f766dd5.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 O={[e]:r,[a]:n,[o]:h,[c]:u,[l]:E,[f]:m,[g]:A,[p]:d,[C]:w,[x]:T,[b]:R,[I]:v};class Q extends t{getAsnExtnValue(){return this.asn.values[0]}constructor(t){super(t,s);const e=this.getAsnExtnValue();try{const t=O[this.asn.type];if(t){this.value=i.parse(e,t)}else{console.warn(`Didn't detect parser for "${this.asn.type}" attribute.`);this.value=K.ToHex(e)}}catch(t){console.error(`Error parse "${this.asn.type}" attribute:`,t.message);this.value=K.ToHex(e)}}}
12
- /**
13
- * @license
14
- * Copyright (c) Peculiar Ventures, LLC.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */class V extends t{constructor(t){var s;super(N(t),y);this.thumbprints={};this.type="X.509 Attribute Certificate";const{acinfo:i}=this.asn;this.serialNumber=K.ToHex(i.serialNumber);this.version=i.version;const e=i.attrCertValidityPeriod.notBeforeTime;if(!e){throw new Error("Cannot get 'notBefore' value")}this.notBefore=e;const r=i.attrCertValidityPeriod.notAfterTime;if(!r){throw new Error("Cannot get 'notAfter' value")}this.notAfter=r;this.validity=F(this.notBefore,this.notAfter);this.issuer=i.issuer.v1Form||((s=i.issuer.v2Form)===null||s===void 0?void 0:s.issuerName);this.holder=i.holder}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}parseExtensions(){const{acinfo:t}=this.asn;if(t.extensions){this.extensions=t.extensions.map((t=>new B(D.serialize(t))))}}parseAttributes(){const{acinfo:t}=this.asn;if(t.attributes){this.attributes=t.attributes.map((t=>new Q(D.serialize(t))))}}async getThumbprint(t="SHA-1"){try{const s=await P(t,this.raw);if(s){this.thumbprints[t]=K.ToHex(s)}}catch(t){console.error("Error thumbprint get:",t)}}exportAsBase64(){return K.ToBase64(this.raw)}exportAsHexFormatted(){return H(K.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${S(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}downloadAsPEM(t){M.attrCert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){M.attrCert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
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
- */class k extends t{constructor(t){super(N(t),L);this.thumbprints={};this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new X(s.subject).toJSON();this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let i;if(s.algorithm===$&&s.parameters){i=D.parse(s.parameters,U)}if(s.algorithm===j){i=D.parse(t,q)}const e=D.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:i,value:e,algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject){return""}for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if(s.shortName==="CN"||s.shortName==="E"||s.shortName==="O"){return s.value}}return""}async getThumbprint(t="SHA-1"){try{const s=await P(t,this.raw);if(s){this.thumbprints[t]=K.ToHex(s)}}catch(t){console.error("Error thumbprint get:",t)}}parseAttributes(){const{certificationRequestInfo:t}=this.asn;if(t.attributes){this.attributes=t.attributes.map((t=>new Q(D.serialize(t))));const s=this.attributes.find((t=>t.asn.type===I));if(s){this.extensions=s.value.map((t=>new B(D.serialize(t))))}}}exportAsBase64(){return K.ToBase64(this.raw)}exportAsHexFormatted(){return H(K.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${S(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}downloadAsPEM(t){M.csr.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){M.csr.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
26
- /**
27
- * @license
28
- * Copyright (c) Peculiar Ventures, LLC.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- */class z extends t{constructor(t){super(N(t),G);this.thumbprints={};this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new X(s.issuer).toJSON();this.version=s.version+1;this.lastUpdate=s.thisUpdate.getTime();this.nextUpdate=s.nextUpdate.getTime();this.revokedCertificates=(s.revokedCertificates||[]).map((t=>{var s;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:(s=t.crlEntryExtensions)===null||s===void 0?void 0:s.map((t=>new B(D.serialize(t))))}}))}async getThumbprint(t="SHA-1"){try{const s=await P(t,this.raw);if(s){this.thumbprints[t]=K.ToHex(s)}}catch(t){console.error("Error thumbprint get:",t)}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.issuer){return""}for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if(s.shortName==="CN"||s.shortName==="E"||s.shortName==="O"){return s.value}}return""}parseExtensions(){const{tbsCertList:t}=this.asn;if(t.crlExtensions){this.extensions=t.crlExtensions.map((t=>new B(D.serialize(t))))}}exportAsBase64(){return K.ToBase64(this.raw)}exportAsHexFormatted(){return H(K.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN X509 CRL-----\n${S(this.exportAsBase64())}\n-----END X509 CRL-----`}downloadAsPEM(t){M.crl.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){M.crl.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{k as C,V as X,z as a};
33
- //# sourceMappingURL=p-924790f5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["attributesParsers","id_DomainNameBeneficiary","DomainNameBeneficiary","id_DomainNameLegalRepresentative","DomainNameLegalRepresentative","id_DomainNameOwner","DomainNameOwner","id_DomainNameTechnicalOperator","DomainNameTechnicalOperator","id_TypeRelationship","TypeRelationship","id_ActivityDescription","ActivityDescription","id_WebGDPR","WebGDPR","id_InsuranceValue","InsuranceValue","id_ValuationRanking","ValuationRanking","id_pkcs9_at_challengePassword","ChallengePassword","id_pkcs9_at_unstructuredName","UnstructuredName","id_pkcs9_at_extensionRequest","ExtensionRequest","Attribute","AsnData","getAsnExtnValue","this","asn","values","constructor","raw","super","AsnAttribute","asnExtnValue","target","type","value","AsnParser","parse","console","warn","Convert","ToHex","error","message","X509AttributeCertificate","certificateRawToBuffer","AttributeCertificate","thumbprints","acinfo","serialNumber","version","notBefore","attrCertValidityPeriod","notBeforeTime","Error","notAfter","notAfterTime","validity","dateDiff","issuer","v1Form","_a","v2Form","issuerName","holder","signature","signatureValue","signatureAlgorithm","algorithm","parseExtensions","extensions","map","e","Extension","AsnConvert","serialize","parseAttributes","attributes","getThumbprint","thumbprint","getCertificateThumbprint","exportAsBase64","ToBase64","exportAsHexFormatted","hexFormat","exportAsPemFormatted","base64Format","commonName","downloadAsPEM","name","Download","attrCert","asPEM","downloadAsDER","asDER","CSR","CertificationRequest","certificationRequestInfo","subject","Name","toJSON","publicKey","subjectPublicKey","subjectPKInfo","params","id_ecPublicKey","parameters","ECParameters","id_rsaEncryption","RSAPublicKey","spki","i","length","shortName","extensionRequestAttribute","find","attribute","csr","CRL","CertificateList","tbsCertList","lastUpdate","thisUpdate","getTime","nextUpdate","revokedCertificates","revokedCertificate","revocationDate","userCertificate","crlEntryExtensions","crlExtensions","crl"],"sources":["src/crypto/attribute.ts","src/crypto/x509_attribute_certificate.ts","src/crypto/csr.ts","src/crypto/crl.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 type { GeneralName } from '@peculiar/asn1-x509';\nimport { AttributeCertificate, Holder } from '@peculiar/asn1-x509-attr';\nimport { Convert } from 'pvtsutils';\n\nimport { dateDiff, Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Extension, TExtensionValue } from './extension';\nimport { Attribute, TAttributeValue } from './attribute';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport class X509AttributeCertificate extends AsnData<AttributeCertificate> {\n public readonly serialNumber: string;\n\n public readonly version: number;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly issuer: GeneralName[];\n\n public holder: Holder;\n\n public type: string = 'X.509 Attribute Certificate';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), AttributeCertificate);\n\n const { acinfo } = this.asn;\n\n this.serialNumber = Convert.ToHex(acinfo.serialNumber);\n this.version = acinfo.version;\n\n const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;\n\n if (!notBefore) {\n throw new Error(\"Cannot get 'notBefore' value\");\n }\n\n this.notBefore = notBefore;\n\n const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;\n\n if (!notAfter) {\n throw new Error(\"Cannot get 'notAfter' value\");\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.issuer = acinfo.issuer.v1Form || acinfo.issuer.v2Form?.issuerName;\n this.holder = acinfo.holder;\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n\n return {\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public parseExtensions() {\n const { acinfo } = this.asn;\n\n if (acinfo.extensions) {\n this.extensions = acinfo.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public parseAttributes() {\n const { acinfo } = this.asn;\n\n if (acinfo.attributes) {\n this.attributes = acinfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\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 exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN ATTRIBUTE CERTIFICATE-----\\n${base64Format(this.exportAsBase64())}\\n-----END ATTRIBUTE CERTIFICATE-----`;\n }\n\n public get commonName(): string {\n return `attribute-certificate-${this.thumbprints['SHA-1']}`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.attrCert.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.attrCert.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\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 CSR 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 type: string = 'PKCS#10 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 exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN CERTIFICATE REQUEST-----\\n${base64Format(this.exportAsBase64())}\\n-----END CERTIFICATE REQUEST-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\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 */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class CRL extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'X.509 Certificate Revocation List';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\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 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.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[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 parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN X509 CRL-----\\n${base64Format(this.exportAsBase64())}\\n-----END X509 CRL-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAoDA,MAAMA,EAAoB,CACxBC,CAACA,GAA2BC,EAC5BC,CAACA,GAAmCC,EACpCC,CAACA,GAAqBC,EACtBC,CAACA,GAAiCC,EAClCC,CAACA,GAAsBC,EACvBC,CAACA,GAAyBC,EAC1BC,CAACA,GAAaC,EACdC,CAACA,GAAoBC,EACrBC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AIkD,EAAY,CACdtD,KAAKsB,YAAYqB,GAAa5B,EAAQC,MAAMsC,E,EAE9C,MAAOrC,GACPJ,QAAQI,MAAM,wBAAyBA,E,EAI3C,aAAWuB,GACT,MAAMA,UAAEA,EAASE,mBAAEA,GAAuB1C,KAAKC,IAE/C,MAAO,CACLS,MAAO8B,EACPG,UAAWD,EAAmBC,U,CAIlC,cAAWmB,GACT,IAAK9D,KAAKkC,OAAQ,CAChB,MAAO,E,CAGT,IAAK,IAAIoD,EAAI,EAAGA,EAAItF,KAAKkC,OAAOqD,OAAQD,GAAK,EAAG,CAC9C,MAAMtB,EAAOhE,KAAKkC,OAAOoD,GAEzB,GAAItB,EAAKwB,YAAc,MAAQxB,EAAKwB,YAAc,KAAOxB,EAAKwB,YAAc,IAAK,CAC/E,OAAOxB,EAAKtD,K,EAIhB,MAAO,E,CAGF,eAAAkC,GACL,MAAMmD,YAAEA,GAAgB/F,KAAKC,IAE7B,GAAI8F,EAAYU,cAAe,CAC7BzG,KAAK6C,WAAakD,EAAYU,cAC3B3D,KAAKC,GAAM,IAAIC,EAAUC,EAAWC,UAAUH,K,EAI9C,cAAAS,GACL,OAAOzC,EAAQ0C,SAASzD,KAAKI,I,CAGxB,oBAAAsD,GACL,OAAOC,EAAU5C,EAAQC,MAAMhB,KAAKI,K,CAG/B,oBAAAwD,GACL,MAAO,6BAA6BC,EAAa7D,KAAKwD,2C,CAGjD,aAAAO,CAAcC,GACnBC,EAASyC,IAAIvC,MACXnE,KAAK4D,uBACLI,GAAQhE,KAAK8D,W,CAIV,aAAAM,CAAcJ,GACnBC,EAASyC,IAAIrC,MACXrE,KAAK0D,uBACLM,GAAQhE,KAAK8D,W"}
@@ -1,5 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- System.register(["./p-dde511c8.system.js","./p-9712b827.system.js","./p-243244af.system.js","./p-eea904d7.system.js","./p-8bbee8f4.system.js","./p-5a662d6f.system.js","./p-c241e4ba.system.js","./p-821bdcdc.system.js"],(function(s){"use strict";return{setters:[function(n){var t={};t.Download=n.D;t.downloadFromBuffer=n.d;s(t)},function(n){var t={};t.Button=n.B;t.Typography=n.T;s(t)},function(n){s("Link",n.L)},function(n){var t={};t.CrossIcon=n.C;t.DetailsIcon=n.D;t.LinkIcon=n.L;s(t)},function(n){s("DownloadIcon",n.D)},function(n){s("ActionsIcon",n.A)},function(n){var t={};t.ArrowBottomIcon=n.A;t.ArrowTopIcon=n.a;s(t)},function(){}],execute:function(){}}}));
5
- //# sourceMappingURL=p-b2890eb8.system.js.map
@@ -1,33 +0,0 @@
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-3f9af5f5.system.js","./p-dde511c8.system.js"],(function(t){"use strict";var n,r,e,i,u,o,c,a,s,f,h,v,l,b,g,E,w,m,_,d,C,y,T,p,I,j,A,O,R,N,x,S,B,D,X,k,F,G,U,H,L,K,P,Q;return{setters:[function(t){n=t.A;r=t.t;e=t.u;i=t.v;u=t.D;o=t.w;c=t.x;a=t.y;s=t.z;f=t.B;h=t.F;v=t.G;l=t.T;b=t.H;g=t.I;E=t.J;w=t.W;m=t.K;_=t.L;d=t.M;C=t.V;y=t.O;T=t.P;p=t.Q;I=t.U;j=t.S;A=t.X;O=t.e;R=t.Y;N=t.f;x=t.E;S=t.g;B=t.s;D=t.q;X=t.r;k=t.Z;F=t.N;G=t.h;U=t.j;H=t.k;L=t.R;K=t._},function(t){P=t.C;Q=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 z=(q={},q[i]=u,q[o]=c,q[a]=s,q[f]=h,q[v]=l,q[b]=g,q[E]=w,q[m]=_,q[d]=C,q[y]=T,q[p]=I,q[j]=A,q);var J=function(t){__extends(n,t);function n(n){var i=t.call(this,n,r)||this;var u=i.getAsnExtnValue();try{var o=z[i.asn.type];if(o){i.value=e.parse(u,o)}else{console.warn("Didn't detect parser for \"".concat(i.asn.type,'" attribute.'));i.value=P.ToHex(u)}}catch(t){console.error('Error parse "'.concat(i.asn.type,'" attribute:'),t.message);i.value=P.ToHex(u)}return i}n.prototype.getAsnExtnValue=function(){return this.asn.values[0]};return n}(n);
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 M=function(t){__extends(n,t);function n(n){var r;var e=t.call(this,O(n),R)||this;e.thumbprints={};e.type="X.509 Attribute Certificate";var i=e.asn.acinfo;e.serialNumber=P.ToHex(i.serialNumber);e.version=i.version;var u=i.attrCertValidityPeriod.notBeforeTime;if(!u){throw new Error("Cannot get 'notBefore' value")}e.notBefore=u;var o=i.attrCertValidityPeriod.notAfterTime;if(!o){throw new Error("Cannot get 'notAfter' value")}e.notAfter=o;e.validity=N(e.notBefore,e.notAfter);e.issuer=i.issuer.v1Form||((r=i.issuer.v2Form)===null||r===void 0?void 0:r.issuerName);e.holder=i.holder;return e}Object.defineProperty(n.prototype,"signature",{get:function(){var t=this.asn,n=t.signatureValue,r=t.signatureAlgorithm;return{value:n,algorithm:r.algorithm}},enumerable:false,configurable:true});n.prototype.parseExtensions=function(){var t=this.asn.acinfo;if(t.extensions){this.extensions=t.extensions.map((function(t){return new x(S.serialize(t))}))}};n.prototype.parseAttributes=function(){var t=this.asn.acinfo;if(t.attributes){this.attributes=t.attributes.map((function(t){return new J(S.serialize(t))}))}};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,B(t,this.raw)];case 1:n=e.sent();if(n){this.thumbprints[t]=P.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.exportAsBase64=function(){return P.ToBase64(this.raw)};n.prototype.exportAsHexFormatted=function(){return D(P.ToHex(this.raw))};n.prototype.exportAsPemFormatted=function(){return"-----BEGIN ATTRIBUTE CERTIFICATE-----\n".concat(X(this.exportAsBase64()),"\n-----END ATTRIBUTE CERTIFICATE-----")};Object.defineProperty(n.prototype,"commonName",{get:function(){return"attribute-certificate-".concat(this.thumbprints["SHA-1"])},enumerable:false,configurable:true});n.prototype.downloadAsPEM=function(t){Q.attrCert.asPEM(this.exportAsPemFormatted(),t||this.commonName)};n.prototype.downloadAsDER=function(t){Q.attrCert.asDER(this.exportAsHexFormatted(),t||this.commonName)};return n}(n);t("X",M);
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
- */var V=function(t){__extends(n,t);function n(n){var r=t.call(this,O(n),k)||this;r.thumbprints={};r.type="PKCS#10 Certificate Request";var e=r.asn.certificationRequestInfo;r.subject=new F(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===G&&r.parameters){e=S.parse(r.parameters,U)}if(r.algorithm===H){e=S.parse(n,L)}var i=S.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,B(t,this.raw)];case 1:n=e.sent();if(n){this.thumbprints[t]=P.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 J(S.serialize(t))}));var n=this.attributes.find((function(t){return t.asn.type===j}));if(n){this.extensions=n.value.map((function(t){return new x(S.serialize(t))}))}}};n.prototype.exportAsBase64=function(){return P.ToBase64(this.raw)};n.prototype.exportAsHexFormatted=function(){return D(P.ToHex(this.raw))};n.prototype.exportAsPemFormatted=function(){return"-----BEGIN CERTIFICATE REQUEST-----\n".concat(X(this.exportAsBase64()),"\n-----END CERTIFICATE REQUEST-----")};n.prototype.downloadAsPEM=function(t){Q.csr.asPEM(this.exportAsPemFormatted(),t||this.commonName)};n.prototype.downloadAsDER=function(t){Q.csr.asDER(this.exportAsHexFormatted(),t||this.commonName)};return n}(n);t("C",V);
26
- /**
27
- * @license
28
- * Copyright (c) Peculiar Ventures, LLC.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- */var W=function(t){__extends(n,t);function n(n){var r=t.call(this,O(n),K)||this;r.thumbprints={};r.type="X.509 Certificate Revocation List";var e=r.asn.tbsCertList;r.issuer=new F(e.issuer).toJSON();r.version=e.version+1;r.lastUpdate=e.thisUpdate.getTime();r.nextUpdate=e.nextUpdate.getTime();r.revokedCertificates=(e.revokedCertificates||[]).map((function(t){var n;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:(n=t.crlEntryExtensions)===null||n===void 0?void 0:n.map((function(t){return new x(S.serialize(t))}))}}));return r}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,B(t,this.raw)];case 1:n=e.sent();if(n){this.thumbprints[t]=P.ToHex(n)}return[3,3];case 2:r=e.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};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.issuer){return""}for(var t=0;t<this.issuer.length;t+=1){var n=this.issuer[t];if(n.shortName==="CN"||n.shortName==="E"||n.shortName==="O"){return n.value}}return""},enumerable:false,configurable:true});n.prototype.parseExtensions=function(){var t=this.asn.tbsCertList;if(t.crlExtensions){this.extensions=t.crlExtensions.map((function(t){return new x(S.serialize(t))}))}};n.prototype.exportAsBase64=function(){return P.ToBase64(this.raw)};n.prototype.exportAsHexFormatted=function(){return D(P.ToHex(this.raw))};n.prototype.exportAsPemFormatted=function(){return"-----BEGIN X509 CRL-----\n".concat(X(this.exportAsBase64()),"\n-----END X509 CRL-----")};n.prototype.downloadAsPEM=function(t){Q.crl.asPEM(this.exportAsPemFormatted(),t||this.commonName)};n.prototype.downloadAsDER=function(t){Q.crl.asDER(this.exportAsHexFormatted(),t||this.commonName)};return n}(n);t("a",W)}}}));
33
- //# sourceMappingURL=p-c156b495.system.js.map