@peculiar/certificates-viewer 4.3.0 → 4.3.2

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 (362) hide show
  1. package/components/attribute-certificate-viewer.js +5 -5
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/attribute.js +1 -1
  4. package/components/certificate-chain-viewer.js +66 -0
  5. package/components/certificate-chain-viewer.js.map +1 -0
  6. package/components/certificate-viewer.js +5 -5
  7. package/components/certificate-viewer.js.map +1 -1
  8. package/components/circular-progress.js +3 -3
  9. package/components/crl-viewer.js +5 -5
  10. package/components/crl-viewer.js.map +1 -1
  11. package/components/download.js +257 -46
  12. package/components/download.js.map +1 -1
  13. package/components/highlight-words.js +1 -1
  14. package/components/index2.js +1 -1
  15. package/components/issuer_name.js +1 -1
  16. package/components/miscellaneous.js +1 -1
  17. package/components/miscellaneous.js.map +1 -1
  18. package/components/peculiar-certificate-chain-viewer.d.ts +11 -0
  19. package/components/peculiar-certificate-chain-viewer.js +11 -0
  20. package/components/peculiar-certificate-chain-viewer.js.map +1 -0
  21. package/components/peculiar-certificate-decoder.js +105 -19
  22. package/components/peculiar-certificate-decoder.js.map +1 -1
  23. package/components/peculiar-certificates-viewer.js +2 -2
  24. package/components/peculiar-certificates-viewer.js.map +1 -1
  25. package/components/peculiar-text-hider.js +1 -1
  26. package/components/pkcs10_certificate_request.js +5 -5
  27. package/components/pkcs10_certificate_request.js.map +1 -1
  28. package/components/subject_name.js +1 -1
  29. package/dist/cjs/{actions-789906f5.js → actions-64ce3326.js} +2 -2
  30. package/dist/cjs/{actions-789906f5.js.map → actions-64ce3326.js.map} +1 -1
  31. package/dist/cjs/{arrow_top-76e4261e.js → arrow_top-b9b9f280.js} +2 -2
  32. package/dist/cjs/{arrow_top-76e4261e.js.map → arrow_top-b9b9f280.js.map} +1 -1
  33. package/dist/cjs/{button-87086210.js → button-61bb8305.js} +2 -2
  34. package/dist/cjs/{button-87086210.js.map → button-61bb8305.js.map} +1 -1
  35. package/dist/cjs/{certification_request-314859bb.js → certification_request-393a843d.js} +279 -66
  36. package/dist/cjs/certification_request-393a843d.js.map +1 -0
  37. package/dist/cjs/{cross-bd099933.js → cross-3aeffd04.js} +2 -2
  38. package/dist/cjs/{cross-bd099933.js.map → cross-3aeffd04.js.map} +1 -1
  39. package/dist/cjs/{download-820d66ba.js → download-c2836546.js} +2 -2
  40. package/dist/cjs/{download-820d66ba.js.map → download-c2836546.js.map} +1 -1
  41. package/dist/cjs/index-484a84a0.js +2113 -0
  42. package/dist/cjs/index-484a84a0.js.map +1 -0
  43. package/dist/cjs/index.cjs.js +9 -9
  44. package/dist/cjs/{link-a3d3799d.js → link-dad7195a.js} +3 -3
  45. package/dist/cjs/{link-a3d3799d.js.map → link-dad7195a.js.map} +1 -1
  46. package/dist/cjs/loader.cjs.js +2 -2
  47. package/dist/cjs/{miscellaneous-f1bc3a4b.js → miscellaneous-ca06fb81.js} +6 -6
  48. package/dist/cjs/{miscellaneous-f1bc3a4b.js.map → miscellaneous-ca06fb81.js.map} +1 -1
  49. package/dist/cjs/{peculiar-attribute-certificate-viewer_3.cjs.entry.js → peculiar-attribute-certificate-viewer_4.cjs.entry.js} +40 -9
  50. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +1 -0
  51. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +7 -7
  52. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +101 -21
  53. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  54. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +7 -7
  55. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +8 -8
  56. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  57. package/dist/cjs/peculiar-text-hider.cjs.entry.js +4 -4
  58. package/dist/cjs/peculiar.cjs.js +10 -10
  59. package/dist/cjs/peculiar.cjs.js.map +1 -1
  60. package/dist/cjs/{pkcs10_certificate_request-93c66ce7.js → pkcs10_certificate_request-56990e4f.js} +6 -6
  61. package/dist/cjs/pkcs10_certificate_request-56990e4f.js.map +1 -0
  62. package/dist/cjs/{x509_certificate-0776e3ec.js → x509_certificate-d162984c.js} +6 -6
  63. package/dist/cjs/x509_certificate-d162984c.js.map +1 -0
  64. package/dist/cjs/{x509_crl-5326d209.js → x509_crl-13322e13.js} +11 -11
  65. package/dist/cjs/x509_crl-13322e13.js.map +1 -0
  66. package/dist/collection/collection-manifest.json +3 -2
  67. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +14 -0
  68. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -1
  69. package/dist/collection/components/button-menu/button-menu.js +2 -0
  70. package/dist/collection/components/button-menu/button-menu.js.map +1 -1
  71. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.css +1019 -0
  72. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js +101 -0
  73. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js.map +1 -0
  74. package/dist/collection/components/certificate-decoder/certificate-decoder.css +1 -4
  75. package/dist/collection/components/certificate-decoder/certificate-decoder.js +40 -18
  76. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  77. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
  78. package/dist/collection/components/certificate-viewer/certificate-viewer.js +16 -0
  79. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -1
  80. package/dist/collection/components/certificates-viewer/certificates-viewer.js +9 -1
  81. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
  82. package/dist/collection/components/circular-progress/circular-progress.js +7 -3
  83. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -1
  84. package/dist/collection/components/crl-viewer/crl-viewer.js +12 -0
  85. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
  86. package/dist/collection/components/csr-viewer/csr-viewer.js +10 -0
  87. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  88. package/dist/collection/components/highlight-words/highlight-words.js +3 -1
  89. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -1
  90. package/dist/collection/components/text-hider/text-hider.js +1 -1
  91. package/dist/collection/crypto/index.js +1 -0
  92. package/dist/collection/crypto/index.js.map +1 -1
  93. package/dist/collection/crypto/pem_converter.js +169 -0
  94. package/dist/collection/crypto/pem_converter.js.map +1 -0
  95. package/dist/collection/crypto/pkcs10_certificate_request.js +6 -5
  96. package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
  97. package/dist/collection/crypto/utils.js +18 -21
  98. package/dist/collection/crypto/utils.js.map +1 -1
  99. package/dist/collection/crypto/x509_attribute_certificate.js +6 -5
  100. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
  101. package/dist/collection/crypto/x509_certificate.js +6 -5
  102. package/dist/collection/crypto/x509_certificate.js.map +1 -1
  103. package/dist/collection/crypto/x509_certificates.js +69 -0
  104. package/dist/collection/crypto/x509_certificates.js.map +1 -0
  105. package/dist/collection/crypto/x509_crl.js +6 -5
  106. package/dist/collection/crypto/x509_crl.js.map +1 -1
  107. package/dist/collection/utils/index.js +0 -2
  108. package/dist/collection/utils/index.js.map +1 -1
  109. package/dist/collection/www-copy/index.js +123 -121
  110. package/dist/esm/{actions-aebcbc9d.js → actions-2e39a3b9.js} +2 -2
  111. package/dist/esm/{actions-aebcbc9d.js.map → actions-2e39a3b9.js.map} +1 -1
  112. package/dist/esm/{arrow_top-aee1ee02.js → arrow_top-72c7543a.js} +2 -2
  113. package/dist/esm/{arrow_top-aee1ee02.js.map → arrow_top-72c7543a.js.map} +1 -1
  114. package/dist/esm/{button-a2fabf9a.js → button-e0909687.js} +2 -2
  115. package/dist/esm/{button-a2fabf9a.js.map → button-e0909687.js.map} +1 -1
  116. package/dist/esm/{certification_request-b531916a.js → certification_request-714bd438.js} +258 -47
  117. package/dist/esm/certification_request-714bd438.js.map +1 -0
  118. package/dist/esm/{cross-1377606f.js → cross-0c62835f.js} +2 -2
  119. package/dist/esm/{cross-1377606f.js.map → cross-0c62835f.js.map} +1 -1
  120. package/dist/esm/{download-14dc1047.js → download-5686d86f.js} +2 -2
  121. package/dist/esm/{download-14dc1047.js.map → download-5686d86f.js.map} +1 -1
  122. package/dist/esm/index-38365508.js +2084 -0
  123. package/dist/esm/index-38365508.js.map +1 -0
  124. package/dist/esm/index.js +9 -9
  125. package/dist/esm/{link-7e4e9060.js → link-09718951.js} +3 -3
  126. package/dist/esm/{link-7e4e9060.js.map → link-09718951.js.map} +1 -1
  127. package/dist/esm/loader.js +3 -3
  128. package/dist/esm/{miscellaneous-7fe71e3f.js → miscellaneous-0657d00e.js} +6 -6
  129. package/dist/esm/{miscellaneous-7fe71e3f.js.map → miscellaneous-0657d00e.js.map} +1 -1
  130. package/dist/esm/{peculiar-attribute-certificate-viewer_3.entry.js → peculiar-attribute-certificate-viewer_4.entry.js} +40 -10
  131. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -0
  132. package/dist/esm/peculiar-button-menu_3.entry.js +7 -7
  133. package/dist/esm/peculiar-certificate-decoder.entry.js +101 -21
  134. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  135. package/dist/esm/peculiar-certificate-viewer.entry.js +7 -7
  136. package/dist/esm/peculiar-certificates-viewer.entry.js +8 -8
  137. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  138. package/dist/esm/peculiar-text-hider.entry.js +4 -4
  139. package/dist/esm/peculiar.js +11 -11
  140. package/dist/esm/peculiar.js.map +1 -1
  141. package/dist/esm/{pkcs10_certificate_request-cca2ca68.js → pkcs10_certificate_request-d3871050.js} +6 -6
  142. package/dist/esm/pkcs10_certificate_request-d3871050.js.map +1 -0
  143. package/dist/esm/{x509_certificate-050175dd.js → x509_certificate-d0d0c5c1.js} +6 -6
  144. package/dist/esm/x509_certificate-d0d0c5c1.js.map +1 -0
  145. package/dist/esm/{x509_crl-c497f907.js → x509_crl-e837f4c3.js} +11 -11
  146. package/dist/esm/x509_crl-e837f4c3.js.map +1 -0
  147. package/dist/esm-es5/{actions-aebcbc9d.js → actions-2e39a3b9.js} +2 -2
  148. package/dist/esm-es5/{actions-aebcbc9d.js.map → actions-2e39a3b9.js.map} +1 -1
  149. package/dist/esm-es5/app-globals-5e9b67e0.js.map +1 -1
  150. package/dist/esm-es5/{arrow_top-aee1ee02.js → arrow_top-72c7543a.js} +2 -2
  151. package/dist/esm-es5/{arrow_top-aee1ee02.js.map → arrow_top-72c7543a.js.map} +1 -1
  152. package/dist/esm-es5/{button-a2fabf9a.js → button-e0909687.js} +2 -2
  153. package/dist/esm-es5/{button-a2fabf9a.js.map → button-e0909687.js.map} +1 -1
  154. package/dist/esm-es5/{certification_request-b531916a.js → certification_request-714bd438.js} +19 -12
  155. package/dist/esm-es5/certification_request-714bd438.js.map +1 -0
  156. package/dist/esm-es5/{cross-1377606f.js → cross-0c62835f.js} +2 -2
  157. package/dist/esm-es5/{cross-1377606f.js.map → cross-0c62835f.js.map} +1 -1
  158. package/dist/esm-es5/{download-14dc1047.js → download-5686d86f.js} +2 -2
  159. package/dist/esm-es5/{download-14dc1047.js.map → download-5686d86f.js.map} +1 -1
  160. package/dist/esm-es5/index-38365508.js +6 -0
  161. package/dist/esm-es5/index-38365508.js.map +1 -0
  162. package/dist/esm-es5/index.js +1 -1
  163. package/dist/esm-es5/index.js.map +1 -1
  164. package/dist/esm-es5/{link-7e4e9060.js → link-09718951.js} +3 -3
  165. package/dist/esm-es5/{link-7e4e9060.js.map → link-09718951.js.map} +1 -1
  166. package/dist/esm-es5/loader.js +2 -2
  167. package/dist/esm-es5/loader.js.map +1 -1
  168. package/dist/esm-es5/{miscellaneous-7fe71e3f.js → miscellaneous-0657d00e.js} +2 -2
  169. package/dist/esm-es5/{miscellaneous-7fe71e3f.js.map → miscellaneous-0657d00e.js.map} +1 -1
  170. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js +110 -0
  171. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -0
  172. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
  173. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
  174. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +2 -2
  175. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  176. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  177. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  178. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +2 -2
  179. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  180. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  181. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -1
  182. package/dist/esm-es5/peculiar.js +2 -2
  183. package/dist/esm-es5/peculiar.js.map +1 -1
  184. package/dist/esm-es5/{pkcs10_certificate_request-cca2ca68.js → pkcs10_certificate_request-d3871050.js} +3 -3
  185. package/dist/esm-es5/pkcs10_certificate_request-d3871050.js.map +1 -0
  186. package/dist/esm-es5/read_file-bb0b1450.js.map +1 -1
  187. package/dist/esm-es5/x509_certificate-d0d0c5c1.js +12 -0
  188. package/dist/esm-es5/x509_certificate-d0d0c5c1.js.map +1 -0
  189. package/dist/esm-es5/x509_crl-e837f4c3.js +19 -0
  190. package/dist/esm-es5/x509_crl-e837f4c3.js.map +1 -0
  191. package/dist/peculiar/index.esm.js +1 -1
  192. package/dist/peculiar/index.esm.js.map +1 -1
  193. package/dist/peculiar/{p-5a662d6f.system.js → p-02529999.system.js} +2 -2
  194. package/dist/peculiar/{p-5a662d6f.system.js.map → p-02529999.system.js.map} +1 -1
  195. package/dist/peculiar/{p-cc256004.system.entry.js → p-04228f9c.system.entry.js} +3 -3
  196. package/dist/peculiar/{p-cc256004.system.entry.js.map → p-04228f9c.system.entry.js.map} +1 -1
  197. package/dist/peculiar/{p-bd7fb688.system.entry.js → p-12bc3ebc.system.entry.js} +2 -2
  198. package/dist/peculiar/{p-bd7fb688.system.entry.js.map → p-12bc3ebc.system.entry.js.map} +1 -1
  199. package/dist/peculiar/{p-afbd1c8e.entry.js → p-161f7f97.entry.js} +2 -2
  200. package/dist/peculiar/{p-afbd1c8e.entry.js.map → p-161f7f97.entry.js.map} +1 -1
  201. package/dist/peculiar/p-25a532a3.js.map +1 -1
  202. package/dist/peculiar/p-32cf293c.system.js +5 -0
  203. package/dist/peculiar/p-32cf293c.system.js.map +1 -0
  204. package/dist/peculiar/{p-52f13c4a.system.js → p-35cd359e.system.js} +2 -2
  205. package/dist/peculiar/{p-52f13c4a.system.js.map → p-35cd359e.system.js.map} +1 -1
  206. package/dist/peculiar/p-39bbe0b9.system.entry.js +5 -0
  207. package/dist/peculiar/{p-b5389885.system.entry.js.map → p-39bbe0b9.system.entry.js.map} +1 -1
  208. package/dist/peculiar/p-41eacbcd.system.entry.js +111 -0
  209. package/dist/peculiar/p-41eacbcd.system.entry.js.map +1 -0
  210. package/dist/peculiar/p-47b7dd9e.entry.js +110 -0
  211. package/dist/peculiar/p-47b7dd9e.entry.js.map +1 -0
  212. package/dist/peculiar/{p-8bbee8f4.system.js → p-4ee5beee.system.js} +2 -2
  213. package/dist/peculiar/{p-8bbee8f4.system.js.map → p-4ee5beee.system.js.map} +1 -1
  214. package/dist/peculiar/p-55303453.system.js.map +1 -1
  215. package/dist/peculiar/{p-ae91d778.js → p-562652dd.js} +2 -2
  216. package/dist/peculiar/{p-ae91d778.js.map → p-562652dd.js.map} +1 -1
  217. package/dist/peculiar/p-5b4db88b.system.js +5 -0
  218. package/dist/peculiar/p-5b4db88b.system.js.map +1 -0
  219. package/dist/peculiar/{p-e4ad4f13.system.entry.js → p-67452b74.system.entry.js} +2 -2
  220. package/dist/peculiar/{p-e4ad4f13.system.entry.js.map → p-67452b74.system.entry.js.map} +1 -1
  221. package/dist/peculiar/p-684b7f0f.system.js +142 -0
  222. package/dist/peculiar/p-684b7f0f.system.js.map +1 -0
  223. package/dist/peculiar/{p-8ff95ad8.entry.js → p-6eb92f5a.entry.js} +2 -2
  224. package/dist/peculiar/{p-8ff95ad8.entry.js.map → p-6eb92f5a.entry.js.map} +1 -1
  225. package/dist/peculiar/p-8dd6d1ee.entry.js +5 -0
  226. package/dist/peculiar/p-8dd6d1ee.entry.js.map +1 -0
  227. package/dist/peculiar/{p-a9487007.js → p-90c3a063.js} +2 -2
  228. package/dist/peculiar/{p-a9487007.js.map → p-90c3a063.js.map} +1 -1
  229. package/dist/peculiar/{p-adf16adb.js → p-90f461c0.js} +13 -13
  230. package/dist/peculiar/{p-adf16adb.js.map → p-90f461c0.js.map} +1 -1
  231. package/dist/peculiar/{p-99efefea.js → p-92f9641a.js} +2 -2
  232. package/dist/peculiar/{p-99efefea.js.map → p-92f9641a.js.map} +1 -1
  233. package/dist/peculiar/p-93e299aa.system.entry.js +5 -0
  234. package/dist/peculiar/p-93e299aa.system.entry.js.map +1 -0
  235. package/dist/peculiar/p-9987b899.js +19 -0
  236. package/dist/peculiar/{p-4bc5ddbe.js.map → p-9987b899.js.map} +1 -1
  237. package/dist/peculiar/p-9b64adaa.system.js +13 -0
  238. package/dist/peculiar/p-9b64adaa.system.js.map +1 -0
  239. package/dist/peculiar/{p-243244af.system.js → p-9ca02302.system.js} +2 -2
  240. package/dist/peculiar/{p-243244af.system.js.map → p-9ca02302.system.js.map} +1 -1
  241. package/dist/peculiar/p-a1adb881.js +6 -0
  242. package/dist/peculiar/p-a1adb881.js.map +1 -0
  243. package/dist/peculiar/{p-eea904d7.system.js → p-a3054d6e.system.js} +2 -2
  244. package/dist/peculiar/{p-eea904d7.system.js.map → p-a3054d6e.system.js.map} +1 -1
  245. package/dist/peculiar/{p-666438a8.js → p-a55fd6f1.js} +20 -13
  246. package/dist/peculiar/p-a55fd6f1.js.map +1 -0
  247. package/dist/peculiar/p-a87e1a0e.js +12 -0
  248. package/dist/peculiar/{p-e6a6e602.js.map → p-a87e1a0e.js.map} +1 -1
  249. package/dist/peculiar/p-a9ea6c79.system.js +20 -0
  250. package/dist/peculiar/p-a9ea6c79.system.js.map +1 -0
  251. package/dist/peculiar/{p-ddadcb44.entry.js → p-b01c70cf.entry.js} +3 -3
  252. package/dist/peculiar/{p-ddadcb44.entry.js.map → p-b01c70cf.entry.js.map} +1 -1
  253. package/dist/peculiar/p-b5674f82.js +19 -0
  254. package/dist/peculiar/p-b5674f82.js.map +1 -0
  255. package/dist/peculiar/{p-27ca6743.js → p-ba3dfc03.js} +2 -2
  256. package/dist/peculiar/{p-27ca6743.js.map → p-ba3dfc03.js.map} +1 -1
  257. package/dist/peculiar/p-bc91996c.system.js +6 -0
  258. package/dist/peculiar/p-bc91996c.system.js.map +1 -0
  259. package/dist/peculiar/p-c2995a63.system.js.map +1 -1
  260. package/dist/peculiar/p-c5d3333c.system.js +19 -0
  261. package/dist/peculiar/p-c5d3333c.system.js.map +1 -0
  262. package/dist/peculiar/p-cb8a0b79.js +19 -0
  263. package/dist/peculiar/p-cb8a0b79.js.map +1 -0
  264. package/dist/peculiar/{p-c241e4ba.system.js → p-d46670fa.system.js} +2 -2
  265. package/dist/peculiar/{p-c241e4ba.system.js.map → p-d46670fa.system.js.map} +1 -1
  266. package/dist/peculiar/{p-9712b827.system.js → p-d9145ee8.system.js} +2 -2
  267. package/dist/peculiar/{p-9712b827.system.js.map → p-d9145ee8.system.js.map} +1 -1
  268. package/dist/peculiar/p-dac867e8.js.map +1 -1
  269. package/dist/peculiar/p-f456fe47.js +12 -0
  270. package/dist/peculiar/p-f456fe47.js.map +1 -0
  271. package/dist/peculiar/p-f6ec61db.entry.js +5 -0
  272. package/dist/peculiar/{p-713563fb.entry.js.map → p-f6ec61db.entry.js.map} +1 -1
  273. package/dist/peculiar/peculiar.esm.js +1 -1
  274. package/dist/peculiar/peculiar.esm.js.map +1 -1
  275. package/dist/peculiar/peculiar.js +1 -1
  276. package/dist/types/components/certificate-chain-viewer/certificate-chain-viewer.d.ts +21 -0
  277. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +5 -4
  278. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +2 -2
  279. package/dist/types/components/typography/typography.d.ts +0 -1
  280. package/dist/types/components.d.ts +33 -4
  281. package/dist/types/crypto/index.d.ts +1 -0
  282. package/dist/types/crypto/pem_converter.d.ts +71 -0
  283. package/dist/types/crypto/pkcs10_certificate_request.d.ts +2 -2
  284. package/dist/types/crypto/utils.d.ts +7 -3
  285. package/dist/types/crypto/x509_attribute_certificate.d.ts +2 -2
  286. package/dist/types/crypto/x509_certificate.d.ts +2 -2
  287. package/dist/types/crypto/x509_certificates.d.ts +9 -0
  288. package/dist/types/crypto/x509_crl.d.ts +2 -2
  289. package/dist/types/stencil-public-runtime.d.ts +9 -10
  290. package/dist/types/utils/index.d.ts +0 -2
  291. package/hydrate/index.d.ts +36 -12
  292. package/hydrate/index.js +25200 -15088
  293. package/hydrate/index.mjs +34931 -0
  294. package/hydrate/package.json +7 -1
  295. package/loader/cdn.js +1 -1
  296. package/loader/index.cjs.js +1 -1
  297. package/loader/index.d.ts +3 -0
  298. package/loader/index.es2017.js +1 -1
  299. package/loader/index.js +1 -1
  300. package/package.json +32 -29
  301. package/dist/cjs/certification_request-314859bb.js.map +0 -1
  302. package/dist/cjs/index-e2ae280a.js +0 -2730
  303. package/dist/cjs/index-e2ae280a.js.map +0 -1
  304. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +0 -1
  305. package/dist/cjs/pkcs10_certificate_request-93c66ce7.js.map +0 -1
  306. package/dist/cjs/x509_certificate-0776e3ec.js.map +0 -1
  307. package/dist/cjs/x509_crl-5326d209.js.map +0 -1
  308. package/dist/collection/utils/validator.js +0 -25
  309. package/dist/collection/utils/validator.js.map +0 -1
  310. package/dist/esm/certification_request-b531916a.js.map +0 -1
  311. package/dist/esm/index-ae188432.js +0 -2701
  312. package/dist/esm/index-ae188432.js.map +0 -1
  313. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +0 -1
  314. package/dist/esm/pkcs10_certificate_request-cca2ca68.js.map +0 -1
  315. package/dist/esm/x509_certificate-050175dd.js.map +0 -1
  316. package/dist/esm/x509_crl-c497f907.js.map +0 -1
  317. package/dist/esm-es5/certification_request-b531916a.js.map +0 -1
  318. package/dist/esm-es5/index-ae188432.js +0 -6
  319. package/dist/esm-es5/index-ae188432.js.map +0 -1
  320. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +0 -110
  321. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +0 -1
  322. package/dist/esm-es5/pkcs10_certificate_request-cca2ca68.js.map +0 -1
  323. package/dist/esm-es5/x509_certificate-050175dd.js +0 -12
  324. package/dist/esm-es5/x509_certificate-050175dd.js.map +0 -1
  325. package/dist/esm-es5/x509_crl-c497f907.js +0 -19
  326. package/dist/esm-es5/x509_crl-c497f907.js.map +0 -1
  327. package/dist/peculiar/p-05af3b74.system.js +0 -13
  328. package/dist/peculiar/p-05af3b74.system.js.map +0 -1
  329. package/dist/peculiar/p-163a3052.system.js +0 -20
  330. package/dist/peculiar/p-163a3052.system.js.map +0 -1
  331. package/dist/peculiar/p-2d9c40d6.system.entry.js +0 -111
  332. package/dist/peculiar/p-2d9c40d6.system.entry.js.map +0 -1
  333. package/dist/peculiar/p-3cb79cd9.js +0 -6
  334. package/dist/peculiar/p-3cb79cd9.js.map +0 -1
  335. package/dist/peculiar/p-494d26fb.entry.js +0 -5
  336. package/dist/peculiar/p-494d26fb.entry.js.map +0 -1
  337. package/dist/peculiar/p-4bc5ddbe.js +0 -19
  338. package/dist/peculiar/p-5a699274.js +0 -19
  339. package/dist/peculiar/p-5a699274.js.map +0 -1
  340. package/dist/peculiar/p-6221d0a4.system.entry.js +0 -5
  341. package/dist/peculiar/p-6221d0a4.system.entry.js.map +0 -1
  342. package/dist/peculiar/p-666438a8.js.map +0 -1
  343. package/dist/peculiar/p-713563fb.entry.js +0 -5
  344. package/dist/peculiar/p-7a5173be.entry.js +0 -110
  345. package/dist/peculiar/p-7a5173be.entry.js.map +0 -1
  346. package/dist/peculiar/p-80477c05.js +0 -12
  347. package/dist/peculiar/p-80477c05.js.map +0 -1
  348. package/dist/peculiar/p-821bdcdc.system.js +0 -6
  349. package/dist/peculiar/p-821bdcdc.system.js.map +0 -1
  350. package/dist/peculiar/p-8393399a.system.js +0 -5
  351. package/dist/peculiar/p-8393399a.system.js.map +0 -1
  352. package/dist/peculiar/p-a06f51a2.system.js +0 -19
  353. package/dist/peculiar/p-a06f51a2.system.js.map +0 -1
  354. package/dist/peculiar/p-b5389885.system.entry.js +0 -5
  355. package/dist/peculiar/p-b6d5e413.js +0 -19
  356. package/dist/peculiar/p-b6d5e413.js.map +0 -1
  357. package/dist/peculiar/p-d1066b51.system.js +0 -135
  358. package/dist/peculiar/p-d1066b51.system.js.map +0 -1
  359. package/dist/peculiar/p-d6229f42.system.js +0 -5
  360. package/dist/peculiar/p-d6229f42.system.js.map +0 -1
  361. package/dist/peculiar/p-e6a6e602.js +0 -12
  362. package/dist/types/utils/validator.d.ts +0 -10
@@ -1,5 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,i,t,n){function r(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,c){function a(e){try{u(n.next(e))}catch(e){c(e)}}function s(e){try{u(n["throw"](e))}catch(e){c(e)}}function u(e){e.done?t(e.value):r(e.value).then(a,s)}u((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,r,c,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(i){return u([e,i])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(n=1,r&&(c=s[0]&2?r["return"]:s[0]?r["throw"]||((c=r["return"])&&c.call(r),0):r.next)&&!(c=c.call(r,s[1])).done)return c;if(r=0,c)s=[s[0]&2,c.value];switch(s[0]){case 0:case 1:c=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;r=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(c=t.trys,c=c.length>0&&c[c.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!c||s[1]>c[0]&&s[1]<c[3])){t.label=s[1];break}if(s[0]===6&&t.label<c[1]){t.label=c[1];c=s;break}if(c&&t.label<c[2]){t.label=c[2];t.ops.push(s);break}if(c[2])t.ops.pop();t.trys.pop();continue}s=i.call(e,t)}catch(e){s=[6,e];r=0}finally{n=c=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
- /*!
3
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */System.register(["./p-821bdcdc.system.js","./p-c2995a63.system.js"],(function(e,i){"use strict";var t,n,r;return{setters:[function(i){t=i.p;n=i.b;e("setNonce",i.s)},function(e){r=e.g}],execute:function(){var e=this;var c=function(){var e=i.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};c().then((function(i){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,r()];case 1:e.sent();return[2,n([["p-6221d0a4.system",[[1,"peculiar-certificate-decoder",{certificateExamples:[16],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-cc256004.system",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]},null,{certificates:["watchCertificates"]}]]],["p-b5389885.system",[[6,"peculiar-text-hider",{opened:[32]}]]],["p-bd7fb688.system",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["p-2d9c40d6.system",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["p-e4ad4f13.system",[[2,"peculiar-button-menu",{groups:[16],open:[32]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],i)]}}))}))}))}}}));
5
- //# sourceMappingURL=p-8393399a.system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["patchBrowser","importMeta","module","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","__awaiter","_this","globalScripts","_a","sent","bootstrapLazy","certificateExamples","defaultCertificate","certificateDecoded","certificates","filterWithSearch","highlightWithSearch","mobileMediaQueryString","mobileScreenView","search","certificatesDecoded","expandedRow","certificateSelectedForDetails","isDecodeInProcess","opened","certificate","download","authKeyIdParentLink","authKeyIdSiblingsLink","subjectKeyIdChildrenLink","subjectKeyIdSiblingsLink","issuerDnLink","groups","open","size","width"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.13.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":";;;0NAKA,IAAMA,EAAe,WAajB,IAAMC,EAAaC,EAAAC,KAAAC,IACnB,IAAMC,EAAqE,GAC3E,GAAIJ,IAAe,GAAI,CACnBI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,IACrD,CACI,OAAOC,EAAeJ,EAC1B,ECpBAL,IAAeU,MAAK,SAAOC,GAAO,OAAAC,UAAAC,OAAA,qB,4DAChC,SAAMC,K,OAANC,EAAAC,OACA,SAAOC,EAAc,yDAAuC,CAAAC,oBAAA,KAAAC,mBAAA,0BAAAC,mBAAA,kEAAAC,aAAA,KAAAC,iBAAA,yBAAAC,oBAAA,4BAAAC,uBAAA,gCAAAC,iBAAA,KAAAC,OAAA,KAAAC,oBAAA,KAAAC,YAAA,KAAAC,8BAAA,KAAAC,kBAAA,YAAAT,aAAA,0EAAAU,OAAA,iEAAAC,YAAA,MAAAC,SAAA,MAAAC,oBAAA,gCAAAC,sBAAA,kCAAAC,yBAAA,qCAAAC,yBAAA,qCAAAC,aAAA,uBAAAd,uBAAA,gCAAAC,iBAAA,KAAAK,kBAAA,YAAAE,YAAA,oGAAAA,YAAA,IAAAC,SAAA,IAAAC,oBAAA,gCAAAC,sBAAA,kCAAAC,yBAAA,qCAAAC,yBAAA,qCAAAb,uBAAA,gCAAAC,iBAAA,KAAAK,kBAAA,YAAAE,YAAA,0DAAAA,YAAA,MAAAC,SAAA,IAAAC,oBAAA,gCAAAC,sBAAA,kCAAAG,aAAA,uBAAAd,uBAAA,gCAAAC,iBAAA,KAAAK,kBAAA,YAAAE,YAAA,0DAAAA,YAAA,MAAAC,SAAA,IAAAG,yBAAA,qCAAAC,yBAAA,qCAAAb,uBAAA,gCAAAC,iBAAA,KAAAK,kBAAA,YAAAE,YAAA,mFAAAO,OAAA,KAAAC,KAAA,wCAAAC,KAAA,IAAAC,MAAA,qCAAAhB,OAAA,SAAAf,I"}
@@ -1,19 +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-d1066b51.system.js"],(function(t){"use strict";var n,r,e,i,u,o,c,a,s,f,h,l,v,b,w,m,_,y,d,p,g,E,x,j,O,S,C,T,k,A,N,I,P,R,D,G,K,q,B,F,H;return{setters:[function(t){n=t.A;r=t.a;e=t.b;i=t.C;u=t.i;o=t.c;c=t.e;a=t.f;s=t.g;f=t.h;h=t.j;l=t.k;v=t.l;b=t.T;w=t.m;m=t.n;_=t.o;y=t.W;d=t.p;p=t.I;g=t.q;E=t.V;x=t.r;j=t.s;O=t.t;S=t.U;C=t.u;T=t.E;k=t.v;A=t.w;N=t.N;I=t.x;P=t.y;R=t.z;D=t.B;G=t.R;K=t.F;q=t.G;B=t.H;F=t.J;H=t.D}],execute:function(){var Q;
5
- /**
6
- * @license
7
- * Copyright (c) Peculiar Ventures, LLC.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */var U=(Q={},Q[u]=o,Q[c]=a,Q[s]=f,Q[h]=l,Q[v]=b,Q[w]=m,Q[_]=y,Q[d]=p,Q[g]=E,Q[x]=j,Q[O]=S,Q[C]=T,Q);var z=function(t){__extends(n,t);function n(n){var u=t.call(this,n,r)||this;var o=u.getAsnExtnValue();try{var c=U[u.asn.type];if(c){u.value=e.parse(o,c)}else{console.warn("Didn't detect parser for \"".concat(u.asn.type,'" attribute.'));u.value=i.ToHex(o)}}catch(t){console.error('Error parse "'.concat(u.asn.type,'" attribute:'),t.message);u.value=i.ToHex(o)}return u}n.prototype.getAsnExtnValue=function(){return this.asn.values[0]};return n}(n);t("A",z);
12
- /**
13
- * @license
14
- * Copyright (c) Peculiar Ventures, LLC.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var J=function(t){__extends(n,t);function n(n){var r=t.call(this,k(n),A)||this;r.thumbprints={};r.type="PKCS#10 Certificate Request";r.tag="CERTIFICATE REQUEST";var e=r.asn.certificationRequestInfo;r.subject=new N(e.subject).toJSON();r.version=e.version;return r}Object.defineProperty(n.prototype,"publicKey",{get:function(){var t=this.asn.certificationRequestInfo.subjectPKInfo,n=t.subjectPublicKey,r=t.algorithm;var e;if(r.algorithm===I&&r.parameters){e=P.parse(r.parameters,R)}if(r.algorithm===D){e=P.parse(n,G)}var i=P.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:e,value:i,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"signature",{get:function(){var t=this.asn,n=t.signature,r=t.signatureAlgorithm;return{value:n,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var t=0;t<this.subject.length;t+=1){var n=this.subject[t];if(n.shortName==="CN"||n.shortName==="E"||n.shortName==="O"){return n.value}}return""},enumerable:false,configurable:true});n.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var n,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,K(t,this.raw)];case 1:n=e.sent();if(n){this.thumbprints[t]=i.ToHex(n)}return[3,3];case 2:r=e.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};n.prototype.parseAttributes=function(){var t=this.asn.certificationRequestInfo;if(t.attributes){this.attributes=t.attributes.map((function(t){return new z(P.serialize(t))}));var n=this.attributes.find((function(t){return t.asn.type===C}));if(n){this.extensions=n.value.map((function(t){return new q(P.serialize(t))}))}}};n.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"hex":return F(i.ToHex(this.raw));case"pem":return"-----BEGIN ".concat(this.tag,"-----\n").concat(B(this.toString("base64")),"\n-----END ").concat(this.tag,"-----");default:return i.ToBase64(this.raw)}};n.prototype.downloadAsPEM=function(t){H.csr.asPEM(this.toString("pem"),t||this.commonName)};n.prototype.downloadAsDER=function(t){H.csr.asDER(this.raw,t||this.commonName)};return n}(n);t("P",J)}}}));
19
- //# sourceMappingURL=p-a06f51a2.system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["attributesParsers","_a","id_DomainNameBeneficiary","DomainNameBeneficiary","id_DomainNameLegalRepresentative","DomainNameLegalRepresentative","id_DomainNameOwner","DomainNameOwner","id_DomainNameTechnicalOperator","DomainNameTechnicalOperator","id_TypeRelationship","TypeRelationship","id_ActivityDescription","ActivityDescription","id_WebGDPR","WebGDPR","id_InsuranceValue","InsuranceValue","id_ValuationRanking","ValuationRanking","id_pkcs9_at_challengePassword","ChallengePassword","id_pkcs9_at_unstructuredName","UnstructuredName","id_pkcs9_at_extensionRequest","ExtensionRequest","__extends","Attribute","_super","raw","_this","call","this","AsnAttribute","asnExtnValue","getAsnExtnValue","target","asn","type","value","AsnParser","parse","console","warn","concat","Convert","ToHex","error","message","prototype","values","AsnData","Pkcs10CertificateRequest","certificateRawToBuffer","CertificationRequest","thumbprints","tag","certificationRequestInfo","subject","Name","toJSON","version","Object","defineProperty","subjectPKInfo","subjectPublicKey","algorithm","params","id_ecPublicKey","parameters","AsnConvert","ECParameters","id_rsaEncryption","RSAPublicKey","spki","serialize","signature","signatureAlgorithm","i","length","name","shortName","getThumbprint","getCertificateThumbprint","thumbprint","sent","error_1","parseAttributes","attributes","map","e","extensionRequestAttribute","find","attribute","extensions","Extension","toString","format","hexFormat","base64Format","ToBase64","downloadAsPEM","Download","csr","asPEM","commonName","downloadAsDER","asDER"],"sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\n\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { Extension, TExtensionValue } from './extension';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public extensions: Extension<TExtensionValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = 'CERTIFICATE REQUEST';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n\n const extensionRequestAttribute = this.attributes.find(\n (attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest,\n ) as Attribute<ExtensionRequest>;\n\n if (extensionRequestAttribute) {\n this.extensions = extensionRequestAttribute.value\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n }\n\n public toString(format: 'hex' | 'pem' | 'base64' = 'pem'): string {\n switch (format) {\n case 'hex':\n return hexFormat(Convert.ToHex(this.raw));\n case 'pem':\n return `-----BEGIN ${this.tag}-----\\n${base64Format(this.toString('base64'))}\\n-----END ${this.tag}-----`;\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;eAoDA,IAAMA,GAAiBC,EAAA,GACrBA,EAACC,GAA2BC,EAC5BF,EAACG,GAAmCC,EACpCJ,EAACK,GAAqBC,EACtBN,EAACO,GAAiCC,EAClCR,EAACS,GAAsBC,EACvBV,EAACW,GAAyBC,EAC1BZ,EAACa,GAAaC,EACdd,EAACe,GAAoBC,EACrBhB,EAACiB,GAAsBC,EACvBlB,EAACmB,GAAgCC,EACjCpB,EAACqB,GAA+BC,EAChCtB,EAACuB,GAA+BC,E,qBAMwBC,UAAAC,EAAAC,GAOxD,SAAAD,EAAYE,GACV,IAAAC,EAAAF,EAAKG,KAAAC,KAACH,EAAKI,IAAaD,KAExB,IAAME,EAAeJ,EAAKK,kBAE1B,IACE,IAAMC,EAASpC,EAAkB8B,EAAKO,IAAIC,MAE1C,GAAIF,EAAQ,CACVN,EAAKS,MAAQC,EAAUC,MAASP,EAAcE,E,KACzC,CACLM,QAAQC,KAAK,8BAAAC,OAA6Bd,EAAKO,IAAIC,KAAI,iBAEvDR,EAAKS,MAAQM,EAAQC,MAAMZ,E,EAE7B,MAAOa,GACPL,QAAQK,MAAM,gBAAAH,OAAgBd,EAAKO,IAAIC,KAAI,gBAAgBS,EAAMC,SAEjElB,EAAKS,MAAQM,E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XxE,KAAKgE,SAAS,OACdhB,GAAQhD,KAAKyE,W,EAIVrD,EAAAH,UAAAyD,cAAA,SAAc1B,GACnBsB,EAASC,IAAII,MACX3E,KAAKH,IACLmD,GAAQhD,KAAKyE,W,YA3H2BtD,G"}
@@ -1,5 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- System.register(["./p-821bdcdc.system.js","./p-9712b827.system.js","./p-c241e4ba.system.js"],(function(e){"use strict";var t,a,c,i,s,n;return{setters:[function(e){t=e.r;a=e.h;c=e.H},function(e){i=e.B},function(e){s=e.a;n=e.A}],execute:function(){var r=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";var d=r;var o=e("peculiar_text_hider",function(){function e(e){t(this,e);this.opened=false}e.prototype.render=function(){var e=this;return a(c,{key:"d0442a0dcb70ffa79e5e9e9f9a4647a89b03dd8e","aria-expanded":String(this.opened)},a("div",{key:"6de993b7decfaa4ba3aec8147cbcda078fafa207",class:"content"},a("slot",{key:"11d130a9a9fa3529191944dcde50ccfb3561be19"})),a(i,{key:"e76ff63ce6b47e4d4a60abb15397b95445d6a016",class:"action",onClick:function(){e.opened=!e.opened},startIcon:this.opened?a(s,{color:"secondary"}):a(n,{color:"secondary"})}))};return e}());o.style=d}}}));
5
- //# sourceMappingURL=p-b5389885.system.entry.js.map
@@ -1,19 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import{A as s,a as t,b as a,C as i,i as e,c as r,e as n,f as h,g as o,h as c,j as u,k as l,l as f,T as m,m as p,n as g,o as E,W as b,p as d,I as A,q as w,V as R,r as x,s as y,t as C,U as I,u as N,E as T,v as $,w as q,N as D,x as P,y as S,z as j,B as v,R as K,F as B,G as F,H as G,J as H,D as U}from"./p-666438a8.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 V={[e]:r,[n]:h,[o]:c,[u]:l,[f]:m,[p]:g,[E]:b,[d]:A,[w]:R,[x]:y,[C]:I,[N]:T};class k extends s{getAsnExtnValue(){return this.asn.values[0]}constructor(s){super(s,t);const e=this.getAsnExtnValue();try{const s=V[this.asn.type];if(s){this.value=a.parse(e,s)}else{console.warn(`Didn't detect parser for "${this.asn.type}" attribute.`);this.value=i.ToHex(e)}}catch(s){console.error(`Error parse "${this.asn.type}" attribute:`,s.message);this.value=i.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 z extends s{constructor(s){super($(s),q);this.thumbprints={};this.type="PKCS#10 Certificate Request";this.tag="CERTIFICATE REQUEST";const{certificationRequestInfo:t}=this.asn;this.subject=new D(t.subject).toJSON();this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;if(t.algorithm===P&&t.parameters){a=S.parse(t.parameters,j)}if(t.algorithm===v){a=S.parse(s,K)}const i=S.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:a,value:i,algorithm:t.algorithm}}get signature(){const{signature:s,signatureAlgorithm:t}=this.asn;return{value:s,algorithm:t.algorithm}}get commonName(){if(!this.subject){return""}for(let s=0;s<this.subject.length;s+=1){const t=this.subject[s];if(t.shortName==="CN"||t.shortName==="E"||t.shortName==="O"){return t.value}}return""}async getThumbprint(s="SHA-1"){try{const t=await B(s,this.raw);if(t){this.thumbprints[s]=i.ToHex(t)}}catch(s){console.error("Error thumbprint get:",s)}}parseAttributes(){const{certificationRequestInfo:s}=this.asn;if(s.attributes){this.attributes=s.attributes.map((s=>new k(S.serialize(s))));const t=this.attributes.find((s=>s.asn.type===N));if(t){this.extensions=t.value.map((s=>new F(S.serialize(s))))}}}toString(s="pem"){switch(s){case"hex":return H(i.ToHex(this.raw));case"pem":return`-----BEGIN ${this.tag}-----\n${G(this.toString("base64"))}\n-----END ${this.tag}-----`;default:return i.ToBase64(this.raw)}}downloadAsPEM(s){U.csr.asPEM(this.toString("pem"),s||this.commonName)}downloadAsDER(s){U.csr.asDER(this.raw,s||this.commonName)}}export{k as A,z as P};
19
- //# sourceMappingURL=p-b6d5e413.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","Pkcs10CertificateRequest","certificateRawToBuffer","CertificationRequest","thumbprints","tag","certificationRequestInfo","subject","Name","toJSON","version","publicKey","subjectPublicKey","algorithm","subjectPKInfo","params","id_ecPublicKey","parameters","AsnConvert","ECParameters","id_rsaEncryption","RSAPublicKey","spki","serialize","signature","signatureAlgorithm","commonName","i","length","name","shortName","getThumbprint","thumbprint","getCertificateThumbprint","parseAttributes","attributes","map","e","extensionRequestAttribute","find","attribute","extensions","Extension","toString","format","hexFormat","base64Format","ToBase64","downloadAsPEM","Download","csr","asPEM","downloadAsDER","asDER"],"sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\n\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { Extension, TExtensionValue } from './extension';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public extensions: Extension<TExtensionValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = 'CERTIFICATE REQUEST';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n\n const extensionRequestAttribute = this.attributes.find(\n (attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest,\n ) as Attribute<ExtensionRequest>;\n\n if (extensionRequestAttribute) {\n this.extensions = extensionRequestAttribute.value\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n }\n\n public toString(format: 'hex' | 'pem' | 'base64' = 'pem'): string {\n switch (format) {\n case 'hex':\n return hexFormat(Convert.ToHex(this.raw));\n case 'pem':\n return `-----BEGIN ${this.tag}-----\\n${base64Format(this.toString('base64'))}\\n-----END ${this.tag}-----`;\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;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,CAACA,GAAsBC,EACvBC,CAACA,GAAgCC,EACjCC,CAACA,GAA+BC,EAChCC,CAACA,GAA+BC,G,MAMrBC,UAA6CC,EAGhD,eAAAC,GACN,OAAOC,KAAKC,IAAIC,OAAO,E,CAGzB,WAAAC,CAAYC,GACVC,MAAMD,EAAKE,GAEX,MAAMC,EAAeP,KAAKD,kBAE1B,IACE,MAAMS,EAASpC,EAAkB4B,KAAKC,IAAIQ,MAE1C,GAAID,EAAQ,CACVR,KAAKU,MAAQC,EAAUC,MAASL,EAAcC,E,KACzC,CACLK,QAAQC,KAAK,6BAA6Bd,KAAKC,IAAIQ,oBAEnDT,KAAKU,MAAQK,EAAQC,MAAMT,E,EAE7B,MAAOU,GACPJ,QAAQI,MAAM,gBAAgBjB,KAAKC,IAAIQ,mBAAoBQ,EAAMC,SAEjElB,KAAKU,MAAQK,EAAQC,MAAMT,E;;;;;;;SCrDpBY,UAAiCrB,EAe5C,WAAAK,CAAYC,GACVC,MAAMe,EAAuBhB,GA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