@peculiar/certificates-viewer 1.20.2-alpha.0 → 2.0.2-alpha.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 (304) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/_commonjsHelpers-cb1f949a.js +23 -0
  3. package/dist/cjs/{download-aed99556.js → certification_request-96951e7b.js} +2898 -3336
  4. package/dist/cjs/{dom-760f300f.js → dom-f57e260e.js} +4 -1
  5. package/dist/cjs/download-5e7d5455.js +438 -0
  6. package/dist/cjs/{index-2973f90a.js → index-064e95c7.js} +287 -634
  7. package/dist/cjs/index.cjs.js +12 -0
  8. package/dist/cjs/{l10n-e971a5ac.js → l10n-2e7def18.js} +72 -90
  9. package/dist/cjs/loader.cjs.js +12 -3
  10. package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +1426 -1391
  11. package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +66 -62
  12. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +222 -217
  13. package/dist/cjs/peculiar.cjs.js +70 -3
  14. package/dist/collection/collection-manifest.json +2 -2
  15. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +220 -205
  16. package/dist/collection/components/attribute-certificate-viewer/holder.js +27 -24
  17. package/dist/collection/components/attribute-certificate-viewer/issuer.js +11 -8
  18. package/dist/collection/components/button/button.css +2 -7
  19. package/dist/collection/components/button/button.js +125 -122
  20. package/dist/collection/components/button-split/button-split.js +103 -100
  21. package/dist/collection/components/certificate-decoder/certificate-decoder.css +1 -3
  22. package/dist/collection/components/certificate-decoder/certificate-decoder.js +158 -155
  23. package/dist/collection/components/certificate-summary/certificate-summary.js +75 -72
  24. package/dist/collection/components/certificate-viewer/attributes/activity_description_attribute.js +11 -8
  25. package/dist/collection/components/certificate-viewer/attributes/as_string_attribute.js +6 -3
  26. package/dist/collection/components/certificate-viewer/attributes/basic_attribute.js +11 -8
  27. package/dist/collection/components/certificate-viewer/attributes/challenge_password_attribute.js +6 -3
  28. package/dist/collection/components/certificate-viewer/attributes/index.js +45 -42
  29. package/dist/collection/components/certificate-viewer/attributes/insurance_value_attribute.js +7 -4
  30. package/dist/collection/components/certificate-viewer/attributes/name_attribute.js +6 -3
  31. package/dist/collection/components/certificate-viewer/attributes/name_part.js +8 -5
  32. package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +5 -2
  33. package/dist/collection/components/certificate-viewer/attributes/unstructured_name_attribute.js +6 -3
  34. package/dist/collection/components/certificate-viewer/attributes/valuation_ranking_attribute.js +18 -15
  35. package/dist/collection/components/certificate-viewer/attributes/web_gdpr_attribute.js +13 -10
  36. package/dist/collection/components/certificate-viewer/basic_information.js +13 -10
  37. package/dist/collection/components/certificate-viewer/certificate-viewer.js +255 -240
  38. package/dist/collection/components/certificate-viewer/extensions/archive_rev_info_extension.js +6 -3
  39. package/dist/collection/components/certificate-viewer/extensions/as_string_extension.js +6 -3
  40. package/dist/collection/components/certificate-viewer/extensions/attribute_value.js +4 -1
  41. package/dist/collection/components/certificate-viewer/extensions/authority_key_identifier_extension.js +18 -15
  42. package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +7 -4
  43. package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +12 -9
  44. package/dist/collection/components/certificate-viewer/extensions/biometric_syntax_extension.js +12 -9
  45. package/dist/collection/components/certificate-viewer/extensions/ca_version_extension.js +8 -5
  46. package/dist/collection/components/certificate-viewer/extensions/certificate_policies_extension.js +28 -25
  47. package/dist/collection/components/certificate-viewer/extensions/certificate_template_extension.js +8 -5
  48. package/dist/collection/components/certificate-viewer/extensions/certificate_transparency_extension.js +13 -10
  49. package/dist/collection/components/certificate-viewer/extensions/crl_distribution_points_extension.js +11 -8
  50. package/dist/collection/components/certificate-viewer/extensions/crl_reason_extension.js +6 -3
  51. package/dist/collection/components/certificate-viewer/extensions/enroll_cert_type_extension.js +6 -3
  52. package/dist/collection/components/certificate-viewer/extensions/entrust_version_info_extension.js +7 -4
  53. package/dist/collection/components/certificate-viewer/extensions/extended_key_usage_extension.js +5 -2
  54. package/dist/collection/components/certificate-viewer/extensions/general_name_part.js +55 -52
  55. package/dist/collection/components/certificate-viewer/extensions/index.js +112 -109
  56. package/dist/collection/components/certificate-viewer/extensions/info_access_syntax_extension.js +9 -6
  57. package/dist/collection/components/certificate-viewer/extensions/key_usage_extension.js +6 -3
  58. package/dist/collection/components/certificate-viewer/extensions/lei_extension.js +6 -3
  59. package/dist/collection/components/certificate-viewer/extensions/lei_role_extennsion.js +6 -3
  60. package/dist/collection/components/certificate-viewer/extensions/logotype_extension.js +49 -46
  61. package/dist/collection/components/certificate-viewer/extensions/name_constraints_extension.js +8 -5
  62. package/dist/collection/components/certificate-viewer/extensions/netscape_cert_type_extension.js +6 -3
  63. package/dist/collection/components/certificate-viewer/extensions/netscape_comment_extension.js +6 -3
  64. package/dist/collection/components/certificate-viewer/extensions/policy_constraints_extension.js +7 -4
  65. package/dist/collection/components/certificate-viewer/extensions/policy_mappings_extension.js +9 -6
  66. package/dist/collection/components/certificate-viewer/extensions/private_key_usage_period_extension.js +7 -4
  67. package/dist/collection/components/certificate-viewer/extensions/qc_statements_extension.js +9 -6
  68. package/dist/collection/components/certificate-viewer/extensions/subject_alternative_name_extension.js +5 -2
  69. package/dist/collection/components/certificate-viewer/extensions/subject_directory_attributes_extension.js +9 -6
  70. package/dist/collection/components/certificate-viewer/extensions/subject_key_identifier_extension.js +18 -15
  71. package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +8 -5
  72. package/dist/collection/components/certificate-viewer/extensions/tn_auth_list_extension.js +10 -7
  73. package/dist/collection/components/certificate-viewer/get_string_by_oid.js +8 -5
  74. package/dist/collection/components/certificate-viewer/issuer_name.js +9 -6
  75. package/dist/collection/components/certificate-viewer/miscellaneous.js +29 -26
  76. package/dist/collection/components/certificate-viewer/public_key.js +31 -28
  77. package/dist/collection/components/certificate-viewer/row.js +35 -32
  78. package/dist/collection/components/certificate-viewer/signature.js +12 -9
  79. package/dist/collection/components/certificate-viewer/subject_name.js +8 -5
  80. package/dist/collection/components/certificate-viewer/thumbprints.js +15 -12
  81. package/dist/collection/components/certificates-viewer/certificates-viewer.css +1 -19
  82. package/dist/collection/components/certificates-viewer/certificates-viewer.js +384 -381
  83. package/dist/collection/components/circular-progress/circular-progress.css +2 -24
  84. package/dist/collection/components/circular-progress/circular-progress.js +73 -70
  85. package/dist/collection/components/csr-viewer/csr-viewer.js +197 -188
  86. package/dist/collection/components/highlight-words/highlight-words.js +56 -53
  87. package/dist/collection/components/link/link.css +1 -3
  88. package/dist/collection/components/link/link.js +60 -57
  89. package/dist/collection/components/text-hider/text-hider.js +75 -72
  90. package/dist/collection/components/typography/typography.css +1 -3
  91. package/dist/collection/components/typography/typography.js +126 -123
  92. package/dist/collection/constants/logs.js +79 -76
  93. package/dist/collection/constants/oids.js +2301 -2298
  94. package/dist/collection/crypto/asn_data.js +33 -32
  95. package/dist/collection/crypto/attribute.js +52 -49
  96. package/dist/collection/crypto/csr.js +64 -61
  97. package/dist/collection/crypto/extension.js +126 -123
  98. package/dist/collection/crypto/index.js +3 -0
  99. package/dist/collection/crypto/name.js +33 -32
  100. package/dist/collection/crypto/provider.js +28 -25
  101. package/dist/collection/crypto/utils.js +24 -21
  102. package/dist/collection/crypto/x509_attribute_certificate.js +61 -58
  103. package/dist/collection/crypto/x509_certificate.js +107 -104
  104. package/dist/collection/index.js +5 -1
  105. package/dist/collection/utils/date_formatter.js +19 -16
  106. package/dist/collection/utils/download.js +18 -15
  107. package/dist/collection/utils/download_from_buffer.js +30 -25
  108. package/dist/collection/utils/history.js +5 -2
  109. package/dist/collection/utils/index.js +3 -0
  110. package/dist/collection/utils/is_link.js +4 -1
  111. package/dist/collection/utils/l10n.js +28 -25
  112. package/dist/collection/utils/parse_hash.js +16 -13
  113. package/dist/collection/utils/query_stringify.js +12 -9
  114. package/dist/collection/utils/read_file.js +43 -40
  115. package/dist/collection/utils/third_party_links.js +3 -0
  116. package/dist/collection/utils/validator.js +15 -12
  117. package/dist/esm/_commonjsHelpers-bfbd2ad8.js +20 -0
  118. package/dist/esm/{download-1580501c.js → certification_request-48e8b956.js} +2916 -3351
  119. package/dist/esm/{dom-91ed8d21.js → dom-f1b08a97.js} +4 -1
  120. package/dist/esm/download-cf68ac2c.js +434 -0
  121. package/dist/esm/{index-5ef692cc.js → index-bbd484d9.js} +278 -624
  122. package/dist/esm/index.js +5 -0
  123. package/dist/esm/{l10n-c8cf6930.js → l10n-ead9928b.js} +71 -86
  124. package/dist/esm/{loader.mjs → loader.js} +11 -2
  125. package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +1425 -1390
  126. package/dist/esm/peculiar-certificate-summary_3.entry.js +66 -62
  127. package/dist/esm/peculiar-certificates-viewer.entry.js +222 -217
  128. package/dist/esm/peculiar.js +73 -0
  129. package/dist/esm/polyfills/css-shim.js +1 -1
  130. package/dist/esm/polyfills/index.js +2 -2
  131. package/dist/esm-es5/_commonjsHelpers-bfbd2ad8.js +4 -0
  132. package/dist/esm-es5/certification_request-48e8b956.js +89 -0
  133. package/dist/esm-es5/dom-f1b08a97.js +24 -0
  134. package/dist/esm-es5/download-cf68ac2c.js +18 -0
  135. package/dist/esm-es5/index-bbd484d9.js +5 -0
  136. package/dist/esm-es5/index.js +4 -0
  137. package/dist/esm-es5/l10n-ead9928b.js +39 -0
  138. package/dist/esm-es5/loader.js +4 -0
  139. package/dist/esm-es5/peculiar-attribute-certificate-viewer_9.entry.js +198 -1907
  140. package/dist/esm-es5/peculiar-certificate-summary_3.entry.js +4 -83
  141. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +4 -290
  142. package/dist/esm-es5/peculiar.js +4 -0
  143. package/dist/index.cjs.js +1 -0
  144. package/dist/index.js +1 -1
  145. package/dist/peculiar/index.esm.js +4 -0
  146. package/dist/peculiar/p-047b12d9.system.js +89 -0
  147. package/dist/peculiar/p-13e9d17d.system.entry.js +460 -0
  148. package/dist/peculiar/p-29cdd256.system.js +18 -0
  149. package/dist/peculiar/{p-75076c56.system.js → p-3929074b.system.js} +18 -15
  150. package/dist/peculiar/p-452d69af.entry.js +113 -0
  151. package/dist/peculiar/p-4f52a24f.system.js +39 -0
  152. package/dist/peculiar/p-5f7fbf05.system.entry.js +4 -0
  153. package/dist/peculiar/p-82033e2e.system.entry.js +4 -0
  154. package/dist/peculiar/p-886e9c53.js +87 -0
  155. package/dist/peculiar/p-88fbaf05.system.js +4 -0
  156. package/dist/peculiar/p-8df391dc.system.js +4 -0
  157. package/dist/peculiar/p-9837be14.system.js +5 -0
  158. package/dist/peculiar/p-9ae6b1f8.entry.js +4 -0
  159. package/dist/peculiar/{p-3d1015c2.js → p-9f4ee110.js} +5 -2
  160. package/dist/peculiar/p-c774ec0b.js +18 -0
  161. package/dist/peculiar/p-d09b762f.js +33 -0
  162. package/dist/peculiar/p-d0b55fbb.js +4 -0
  163. package/dist/peculiar/p-e5f99586.entry.js +4 -0
  164. package/dist/peculiar/p-ee0e2707.system.js +4 -0
  165. package/dist/peculiar/p-f7683ba5.js +5 -0
  166. package/dist/peculiar/peculiar.esm.js +4 -1
  167. package/dist/peculiar/peculiar.js +1 -3
  168. package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +56 -56
  169. package/dist/types/components/attribute-certificate-viewer/holder.d.ts +1 -1
  170. package/dist/types/components/attribute-certificate-viewer/issuer.d.ts +1 -1
  171. package/dist/types/components/button/button.d.ts +17 -17
  172. package/dist/types/components/button-split/button-split.d.ts +10 -10
  173. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +16 -16
  174. package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -4
  175. package/dist/types/components/certificate-viewer/attributes/activity_description_attribute.d.ts +1 -1
  176. package/dist/types/components/certificate-viewer/attributes/as_string_attribute.d.ts +1 -1
  177. package/dist/types/components/certificate-viewer/attributes/basic_attribute.d.ts +1 -1
  178. package/dist/types/components/certificate-viewer/attributes/challenge_password_attribute.d.ts +1 -1
  179. package/dist/types/components/certificate-viewer/attributes/index.d.ts +1 -1
  180. package/dist/types/components/certificate-viewer/attributes/insurance_value_attribute.d.ts +1 -1
  181. package/dist/types/components/certificate-viewer/attributes/name_attribute.d.ts +1 -1
  182. package/dist/types/components/certificate-viewer/attributes/name_part.d.ts +1 -1
  183. package/dist/types/components/certificate-viewer/attributes/type_relationship_attribute.d.ts +1 -1
  184. package/dist/types/components/certificate-viewer/attributes/unstructured_name_attribute.d.ts +1 -1
  185. package/dist/types/components/certificate-viewer/attributes/valuation_ranking_attribute.d.ts +1 -1
  186. package/dist/types/components/certificate-viewer/attributes/web_gdpr_attribute.d.ts +1 -1
  187. package/dist/types/components/certificate-viewer/basic_information.d.ts +6 -6
  188. package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +66 -66
  189. package/dist/types/components/certificate-viewer/extensions/archive_rev_info_extension.d.ts +1 -1
  190. package/dist/types/components/certificate-viewer/extensions/as_string_extension.d.ts +1 -1
  191. package/dist/types/components/certificate-viewer/extensions/authority_key_identifier_extension.d.ts +1 -1
  192. package/dist/types/components/certificate-viewer/extensions/basic_constraints_extension.d.ts +1 -1
  193. package/dist/types/components/certificate-viewer/extensions/basic_extension.d.ts +1 -1
  194. package/dist/types/components/certificate-viewer/extensions/biometric_syntax_extension.d.ts +1 -1
  195. package/dist/types/components/certificate-viewer/extensions/ca_version_extension.d.ts +1 -1
  196. package/dist/types/components/certificate-viewer/extensions/certificate_policies_extension.d.ts +1 -1
  197. package/dist/types/components/certificate-viewer/extensions/certificate_template_extension.d.ts +1 -1
  198. package/dist/types/components/certificate-viewer/extensions/certificate_transparency_extension.d.ts +1 -1
  199. package/dist/types/components/certificate-viewer/extensions/crl_distribution_points_extension.d.ts +1 -1
  200. package/dist/types/components/certificate-viewer/extensions/crl_reason_extension.d.ts +1 -1
  201. package/dist/types/components/certificate-viewer/extensions/enroll_cert_type_extension.d.ts +1 -1
  202. package/dist/types/components/certificate-viewer/extensions/entrust_version_info_extension.d.ts +1 -1
  203. package/dist/types/components/certificate-viewer/extensions/extended_key_usage_extension.d.ts +1 -1
  204. package/dist/types/components/certificate-viewer/extensions/general_name_part.d.ts +1 -1
  205. package/dist/types/components/certificate-viewer/extensions/index.d.ts +2 -2
  206. package/dist/types/components/certificate-viewer/extensions/info_access_syntax_extension.d.ts +1 -1
  207. package/dist/types/components/certificate-viewer/extensions/key_usage_extension.d.ts +1 -1
  208. package/dist/types/components/certificate-viewer/extensions/lei_extension.d.ts +1 -1
  209. package/dist/types/components/certificate-viewer/extensions/lei_role_extennsion.d.ts +1 -1
  210. package/dist/types/components/certificate-viewer/extensions/logotype_extension.d.ts +1 -1
  211. package/dist/types/components/certificate-viewer/extensions/name_constraints_extension.d.ts +1 -1
  212. package/dist/types/components/certificate-viewer/extensions/netscape_cert_type_extension.d.ts +1 -1
  213. package/dist/types/components/certificate-viewer/extensions/netscape_comment_extension.d.ts +1 -1
  214. package/dist/types/components/certificate-viewer/extensions/policy_constraints_extension.d.ts +1 -1
  215. package/dist/types/components/certificate-viewer/extensions/policy_mappings_extension.d.ts +1 -1
  216. package/dist/types/components/certificate-viewer/extensions/private_key_usage_period_extension.d.ts +1 -1
  217. package/dist/types/components/certificate-viewer/extensions/qc_statements_extension.d.ts +1 -1
  218. package/dist/types/components/certificate-viewer/extensions/subject_alternative_name_extension.d.ts +1 -1
  219. package/dist/types/components/certificate-viewer/extensions/subject_directory_attributes_extension.d.ts +1 -1
  220. package/dist/types/components/certificate-viewer/extensions/subject_key_identifier_extension.d.ts +1 -1
  221. package/dist/types/components/certificate-viewer/extensions/timestamp_extension.d.ts +1 -1
  222. package/dist/types/components/certificate-viewer/extensions/tn_auth_list_extension.d.ts +1 -1
  223. package/dist/types/components/certificate-viewer/issuer_name.d.ts +2 -2
  224. package/dist/types/components/certificate-viewer/miscellaneous.d.ts +1 -1
  225. package/dist/types/components/certificate-viewer/public_key.d.ts +1 -1
  226. package/dist/types/components/certificate-viewer/row.d.ts +7 -7
  227. package/dist/types/components/certificate-viewer/signature.d.ts +1 -1
  228. package/dist/types/components/certificate-viewer/subject_name.d.ts +1 -1
  229. package/dist/types/components/certificate-viewer/thumbprints.d.ts +1 -1
  230. package/dist/types/components/certificate-viewer/types.d.ts +26 -0
  231. package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +64 -64
  232. package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
  233. package/dist/types/components/csr-viewer/csr-viewer.d.ts +45 -45
  234. package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
  235. package/dist/types/components/link/link.d.ts +6 -6
  236. package/dist/types/components/text-hider/text-hider.d.ts +4 -4
  237. package/dist/types/components/typography/typography.d.ts +18 -18
  238. package/dist/types/components.d.ts +11 -3
  239. package/dist/types/constants/logs.d.ts +76 -76
  240. package/dist/types/constants/oids.d.ts +2293 -2293
  241. package/dist/types/crypto/asn_data.d.ts +6 -6
  242. package/dist/types/crypto/attribute.d.ts +3 -3
  243. package/dist/types/crypto/csr.d.ts +19 -19
  244. package/dist/types/crypto/extension.d.ts +3 -3
  245. package/dist/types/crypto/name.d.ts +7 -7
  246. package/dist/types/crypto/provider.d.ts +15 -15
  247. package/dist/types/crypto/x509_attribute_certificate.d.ts +22 -22
  248. package/dist/types/crypto/x509_certificate.d.ts +28 -28
  249. package/dist/types/index.d.ts +2 -1
  250. package/dist/types/interface.d.ts +3 -0
  251. package/dist/types/stencil-public-runtime.d.ts +230 -217
  252. package/dist/types/utils/download.d.ts +8 -8
  253. package/dist/types/utils/download_from_buffer.d.ts +3 -3
  254. package/dist/types/utils/l10n.d.ts +43 -43
  255. package/dist/types/utils/read_file.d.ts +7 -7
  256. package/loader/cdn.js +3 -1
  257. package/loader/index.cjs.js +3 -1
  258. package/loader/index.d.ts +0 -1
  259. package/loader/index.es2017.js +5 -0
  260. package/loader/{index.mjs → index.js} +4 -2
  261. package/loader/package.json +4 -5
  262. package/package.json +32 -33
  263. package/dist/cjs/css-shim-1b988199.js +0 -6
  264. package/dist/cjs/patch-15ea31af.js +0 -112
  265. package/dist/cjs/shadow-css-376763e9.js +0 -385
  266. package/dist/esm/css-shim-5ce2b5c4.js +0 -4
  267. package/dist/esm/index.mjs +0 -1
  268. package/dist/esm/patch-f8a17185.js +0 -109
  269. package/dist/esm/peculiar.mjs +0 -6
  270. package/dist/esm/shadow-css-95922619.js +0 -383
  271. package/dist/esm-es5/css-shim-5ce2b5c4.js +0 -122
  272. package/dist/esm-es5/dom-91ed8d21.js +0 -468
  273. package/dist/esm-es5/download-1580501c.js +0 -12701
  274. package/dist/esm-es5/index-5ef692cc.js +0 -1839
  275. package/dist/esm-es5/index.mjs +0 -0
  276. package/dist/esm-es5/l10n-c8cf6930.js +0 -758
  277. package/dist/esm-es5/loader.mjs +0 -10
  278. package/dist/esm-es5/patch-f8a17185.js +0 -106
  279. package/dist/esm-es5/peculiar.mjs +0 -5
  280. package/dist/esm-es5/shadow-css-95922619.js +0 -408
  281. package/dist/index.mjs +0 -1
  282. package/dist/peculiar/p-0ad0b6e8.js +0 -1
  283. package/dist/peculiar/p-198d9121.js +0 -1
  284. package/dist/peculiar/p-294c4ef9.entry.js +0 -1
  285. package/dist/peculiar/p-344c2502.system.entry.js +0 -1
  286. package/dist/peculiar/p-4b7cd42f.js +0 -12
  287. package/dist/peculiar/p-50ea2036.system.js +0 -1
  288. package/dist/peculiar/p-557d912f.system.js +0 -1
  289. package/dist/peculiar/p-6639fba3.system.js +0 -100
  290. package/dist/peculiar/p-7c7cd1d9.js +0 -100
  291. package/dist/peculiar/p-9351b95f.system.entry.js +0 -457
  292. package/dist/peculiar/p-983b5210.system.entry.js +0 -1
  293. package/dist/peculiar/p-9f815f76.system.js +0 -1
  294. package/dist/peculiar/p-aa0a9b36.system.js +0 -1
  295. package/dist/peculiar/p-ad2ab9ac.entry.js +0 -110
  296. package/dist/peculiar/p-bd1f9066.system.js +0 -36
  297. package/dist/peculiar/p-bd949790.js +0 -1
  298. package/dist/peculiar/p-cf1841f8.js +0 -30
  299. package/dist/peculiar/p-efc86dbf.entry.js +0 -1
  300. package/dist/peculiar/p-fb53799e.system.js +0 -1
  301. package/dist/peculiar/p-fdad110e.system.js +0 -13
  302. package/dist/peculiar.js +0 -30
  303. package/loader/index.es2017.mjs +0 -3
  304. package/loader/node-main.js +0 -3
@@ -1,10 +1,15 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
1
4
  'use strict';
2
5
 
3
6
  Object.defineProperty(exports, '__esModule', { value: true });
4
7
 
5
- const index = require('./index-2973f90a.js');
6
- const l10n = require('./l10n-e971a5ac.js');
7
- const download = require('./download-aed99556.js');
8
+ const index = require('./index-064e95c7.js');
9
+ const certification_request = require('./certification_request-96951e7b.js');
10
+ const download = require('./download-5e7d5455.js');
11
+ const l10n = require('./l10n-2e7def18.js');
12
+ require('./_commonjsHelpers-cb1f949a.js');
8
13
 
9
14
  /**
10
15
  * @license
@@ -25,17 +30,17 @@ const download = require('./download-aed99556.js');
25
30
  * ```
26
31
  */
27
32
  function readAsBinaryString(file) {
28
- return new Promise((resolve, reject) => {
29
- const reader = new FileReader();
30
- reader.onload = () => resolve({
31
- value: reader.result,
32
- fileName: file.name,
33
- fileSize: file.size,
34
- sourceMime: file.type,
35
- });
36
- reader.onerror = () => reject(reader.error);
37
- reader.readAsBinaryString(file);
33
+ return new Promise((resolve, reject) => {
34
+ const reader = new FileReader();
35
+ reader.onload = () => resolve({
36
+ value: reader.result,
37
+ fileName: file.name,
38
+ fileSize: file.size,
39
+ sourceMime: file.type,
38
40
  });
41
+ reader.onerror = () => reject(reader.error);
42
+ reader.readAsBinaryString(file);
43
+ });
39
44
  }
40
45
 
41
46
  /**
@@ -45,57 +50,57 @@ function readAsBinaryString(file) {
45
50
  * This source code is licensed under the MIT license found in the
46
51
  * LICENSE file in the root directory of this source tree.
47
52
  */
48
- class Attribute extends download.AsnData {
49
- constructor(raw) {
50
- super(raw, download.Attribute);
51
- const asnExtnValue = this.getAsnExtnValue();
52
- switch (this.asn.type) {
53
- case download.id_DomainNameBeneficiary:
54
- this.value = download.AsnParser.parse(asnExtnValue, download.DomainNameBeneficiary);
55
- break;
56
- case download.id_DomainNameLegalRepresentative:
57
- this.value = download.AsnParser.parse(asnExtnValue, download.DomainNameLegalRepresentative);
58
- break;
59
- case download.id_DomainNameOwner:
60
- this.value = download.AsnParser.parse(asnExtnValue, download.DomainNameOwner);
61
- break;
62
- case download.id_DomainNameTechnicalOperator:
63
- this.value = download.AsnParser.parse(asnExtnValue, download.DomainNameTechnicalOperator);
64
- break;
65
- case download.id_TypeRelationship:
66
- this.value = download.AsnParser.parse(asnExtnValue, download.TypeRelationship);
67
- break;
68
- case download.id_ActivityDescription:
69
- this.value = download.AsnParser.parse(asnExtnValue, download.ActivityDescription);
70
- break;
71
- case download.id_WebGDPR:
72
- this.value = download.AsnParser.parse(asnExtnValue, download.WebGDPR);
73
- break;
74
- case download.id_InsuranceValue:
75
- this.value = download.AsnParser.parse(asnExtnValue, download.InsuranceValue);
76
- break;
77
- case download.id_ValuationRanking:
78
- this.value = download.AsnParser.parse(asnExtnValue, download.ValuationRanking);
79
- break;
80
- case download.id_pkcs9_at_challengePassword:
81
- this.value = download.AsnParser.parse(asnExtnValue, download.ChallengePassword);
82
- break;
83
- case download.id_pkcs9_at_unstructuredName:
84
- this.value = download.AsnParser.parse(asnExtnValue, download.UnstructuredName);
85
- break;
86
- case download.id_pkcs9_at_extensionRequest: {
87
- const extensionRequest = download.AsnParser.parse(asnExtnValue, download.ExtensionRequest);
88
- this.value = extensionRequest
89
- .map((e) => new download.Extension(download.AsnConvert.serialize(e)));
90
- break;
91
- }
92
- default:
93
- this.value = download.build_2.ToHex(asnExtnValue);
94
- }
95
- }
96
- getAsnExtnValue() {
97
- return this.asn.values[0];
98
- }
53
+ class Attribute extends certification_request.AsnData {
54
+ constructor(raw) {
55
+ super(raw, certification_request.Attribute);
56
+ const asnExtnValue = this.getAsnExtnValue();
57
+ switch (this.asn.type) {
58
+ case certification_request.id_DomainNameBeneficiary:
59
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.DomainNameBeneficiary);
60
+ break;
61
+ case certification_request.id_DomainNameLegalRepresentative:
62
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.DomainNameLegalRepresentative);
63
+ break;
64
+ case certification_request.id_DomainNameOwner:
65
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.DomainNameOwner);
66
+ break;
67
+ case certification_request.id_DomainNameTechnicalOperator:
68
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.DomainNameTechnicalOperator);
69
+ break;
70
+ case certification_request.id_TypeRelationship:
71
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.TypeRelationship);
72
+ break;
73
+ case certification_request.id_ActivityDescription:
74
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.ActivityDescription);
75
+ break;
76
+ case certification_request.id_WebGDPR:
77
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.WebGDPR);
78
+ break;
79
+ case certification_request.id_InsuranceValue:
80
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.InsuranceValue);
81
+ break;
82
+ case certification_request.id_ValuationRanking:
83
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.ValuationRanking);
84
+ break;
85
+ case certification_request.id_pkcs9_at_challengePassword:
86
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.ChallengePassword);
87
+ break;
88
+ case certification_request.id_pkcs9_at_unstructuredName:
89
+ this.value = certification_request.AsnParser.parse(asnExtnValue, certification_request.UnstructuredName);
90
+ break;
91
+ case certification_request.id_pkcs9_at_extensionRequest: {
92
+ const extensionRequest = certification_request.AsnParser.parse(asnExtnValue, certification_request.ExtensionRequest);
93
+ this.value = extensionRequest
94
+ .map((e) => new certification_request.Extension(certification_request.AsnConvert.serialize(e)));
95
+ break;
96
+ }
97
+ default:
98
+ this.value = download.build.Convert.ToHex(asnExtnValue);
99
+ }
100
+ }
101
+ getAsnExtnValue() {
102
+ return this.asn.values[0];
103
+ }
99
104
  }
100
105
 
101
106
  /**
@@ -105,71 +110,71 @@ class Attribute extends download.AsnData {
105
110
  * This source code is licensed under the MIT license found in the
106
111
  * LICENSE file in the root directory of this source tree.
107
112
  */
108
- class X509AttributeCertificate extends download.AsnData {
109
- constructor(raw) {
110
- var _a;
111
- super(download.certificateRawToBuffer(raw), download.AttributeCertificate);
112
- this.thumbprints = {};
113
- this.type = 'X.509 Attribute Certificate';
114
- const { acinfo } = this.asn;
115
- this.serialNumber = download.build_2.ToHex(acinfo.serialNumber);
116
- this.version = acinfo.version;
117
- const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;
118
- if (!notBefore) {
119
- throw new Error("Cannot get 'notBefore' value");
120
- }
121
- this.notBefore = notBefore;
122
- const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;
123
- if (!notAfter) {
124
- throw new Error("Cannot get 'notAfter' value");
125
- }
126
- this.notAfter = notAfter;
127
- this.validity = l10n.dateDiff(this.notBefore, this.notAfter);
128
- this.issuer = acinfo.issuer.v1Form || ((_a = acinfo.issuer.v2Form) === null || _a === void 0 ? void 0 : _a.issuerName);
129
- this.holder = acinfo.holder;
130
- }
131
- get signature() {
132
- const { signatureValue, signatureAlgorithm } = this.asn;
133
- return {
134
- value: signatureValue,
135
- algorithm: signatureAlgorithm.algorithm,
136
- };
137
- }
138
- parseExtensions() {
139
- const { acinfo } = this.asn;
140
- if (acinfo.extensions) {
141
- this.extensions = acinfo.extensions
142
- .map((e) => new download.Extension(download.AsnConvert.serialize(e)));
143
- }
144
- }
145
- parseAttributes() {
146
- const { acinfo } = this.asn;
147
- if (acinfo.attributes) {
148
- this.attributes = acinfo.attributes
149
- .map((e) => new Attribute(download.AsnConvert.serialize(e)));
150
- }
151
- }
152
- async getThumbprint(algorithm = 'SHA-1') {
153
- try {
154
- const thumbprint = await download.getCertificateThumbprint(algorithm, this.raw);
155
- this.thumbprints[algorithm['name'] || algorithm] = download.build_2.ToHex(thumbprint);
156
- }
157
- catch (error) {
158
- console.error('Error thumbprint get:', error);
159
- }
160
- }
161
- exportAsBase64() {
162
- return download.build_2.ToBase64(this.raw);
163
- }
164
- exportAsHexFormatted() {
165
- return download.hexFormat(download.build_2.ToHex(this.raw));
166
- }
167
- exportAsPemFormatted() {
168
- return `-----BEGIN ATTRIBUTE CERTIFICATE-----\n${download.base64Format(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`;
169
- }
170
- get commonName() {
171
- return `attribute-certificate-${this.thumbprints['SHA-1']}`;
172
- }
113
+ class X509AttributeCertificate extends certification_request.AsnData {
114
+ constructor(raw) {
115
+ var _a;
116
+ super(certification_request.certificateRawToBuffer(raw), certification_request.AttributeCertificate);
117
+ this.thumbprints = {};
118
+ this.type = 'X.509 Attribute Certificate';
119
+ const { acinfo } = this.asn;
120
+ this.serialNumber = download.build.Convert.ToHex(acinfo.serialNumber);
121
+ this.version = acinfo.version;
122
+ const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;
123
+ if (!notBefore) {
124
+ throw new Error("Cannot get 'notBefore' value");
125
+ }
126
+ this.notBefore = notBefore;
127
+ const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;
128
+ if (!notAfter) {
129
+ throw new Error("Cannot get 'notAfter' value");
130
+ }
131
+ this.notAfter = notAfter;
132
+ this.validity = l10n.dateDiff(this.notBefore, this.notAfter);
133
+ this.issuer = acinfo.issuer.v1Form || ((_a = acinfo.issuer.v2Form) === null || _a === void 0 ? void 0 : _a.issuerName);
134
+ this.holder = acinfo.holder;
135
+ }
136
+ get signature() {
137
+ const { signatureValue, signatureAlgorithm } = this.asn;
138
+ return {
139
+ value: signatureValue,
140
+ algorithm: signatureAlgorithm.algorithm,
141
+ };
142
+ }
143
+ parseExtensions() {
144
+ const { acinfo } = this.asn;
145
+ if (acinfo.extensions) {
146
+ this.extensions = acinfo.extensions
147
+ .map((e) => new certification_request.Extension(certification_request.AsnConvert.serialize(e)));
148
+ }
149
+ }
150
+ parseAttributes() {
151
+ const { acinfo } = this.asn;
152
+ if (acinfo.attributes) {
153
+ this.attributes = acinfo.attributes
154
+ .map((e) => new Attribute(certification_request.AsnConvert.serialize(e)));
155
+ }
156
+ }
157
+ async getThumbprint(algorithm = 'SHA-1') {
158
+ try {
159
+ const thumbprint = await certification_request.getCertificateThumbprint(algorithm, this.raw);
160
+ this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
161
+ }
162
+ catch (error) {
163
+ console.error('Error thumbprint get:', error);
164
+ }
165
+ }
166
+ exportAsBase64() {
167
+ return download.build.Convert.ToBase64(this.raw);
168
+ }
169
+ exportAsHexFormatted() {
170
+ return certification_request.hexFormat(download.build.Convert.ToHex(this.raw));
171
+ }
172
+ exportAsPemFormatted() {
173
+ return `-----BEGIN ATTRIBUTE CERTIFICATE-----\n${certification_request.base64Format(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`;
174
+ }
175
+ get commonName() {
176
+ return `attribute-certificate-${this.thumbprints['SHA-1']}`;
177
+ }
173
178
  }
174
179
 
175
180
  /**
@@ -179,75 +184,75 @@ class X509AttributeCertificate extends download.AsnData {
179
184
  * This source code is licensed under the MIT license found in the
180
185
  * LICENSE file in the root directory of this source tree.
181
186
  */
182
- class CSR extends download.AsnData {
183
- constructor(raw) {
184
- super(download.certificateRawToBuffer(raw), download.CertificationRequest);
185
- this.thumbprints = {};
186
- this.type = 'PKCS#10 Certificate Request';
187
- const { certificationRequestInfo } = this.asn;
188
- this.subject = new download.Name(certificationRequestInfo.subject).toJSON();
189
- this.version = certificationRequestInfo.version;
190
- }
191
- get publicKey() {
192
- const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;
193
- let params;
194
- if (algorithm.algorithm === download.id_ecPublicKey && algorithm.parameters) {
195
- params = download.AsnConvert.parse(algorithm.parameters, download.ECParameters);
196
- }
197
- if (algorithm.algorithm === download.id_rsaEncryption) {
198
- params = download.AsnConvert.parse(subjectPublicKey, download.RSAPublicKey);
199
- }
200
- const spki = download.AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);
201
- return {
202
- params,
203
- value: spki,
204
- algorithm: algorithm.algorithm,
205
- };
187
+ class CSR extends certification_request.AsnData {
188
+ constructor(raw) {
189
+ super(certification_request.certificateRawToBuffer(raw), certification_request.CertificationRequest);
190
+ this.thumbprints = {};
191
+ this.type = 'PKCS#10 Certificate Request';
192
+ const { certificationRequestInfo } = this.asn;
193
+ this.subject = new certification_request.Name(certificationRequestInfo.subject).toJSON();
194
+ this.version = certificationRequestInfo.version;
195
+ }
196
+ get publicKey() {
197
+ const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;
198
+ let params;
199
+ if (algorithm.algorithm === certification_request.id_ecPublicKey && algorithm.parameters) {
200
+ params = certification_request.AsnConvert.parse(algorithm.parameters, certification_request.ECParameters);
206
201
  }
207
- get signature() {
208
- const { signature, signatureAlgorithm } = this.asn;
209
- return {
210
- value: signature,
211
- algorithm: signatureAlgorithm.algorithm,
212
- };
213
- }
214
- get commonName() {
215
- if (!this.subject) {
216
- return '';
217
- }
218
- for (let i = 0; i < this.subject.length; i += 1) {
219
- const name = this.subject[i];
220
- if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {
221
- return name.value;
222
- }
223
- }
224
- return '';
225
- }
226
- async getThumbprint(algorithm = 'SHA-1') {
227
- try {
228
- const thumbprint = await download.getCertificateThumbprint(algorithm, this.raw);
229
- this.thumbprints[algorithm['name'] || algorithm] = download.build_2.ToHex(thumbprint);
230
- }
231
- catch (error) {
232
- console.error('Error thumbprint get:', error);
233
- }
234
- }
235
- parseAttributes() {
236
- const { certificationRequestInfo } = this.asn;
237
- if (certificationRequestInfo.attributes) {
238
- this.attributes = certificationRequestInfo.attributes
239
- .map((e) => new Attribute(download.AsnConvert.serialize(e)));
240
- }
241
- }
242
- exportAsBase64() {
243
- return download.build_2.ToBase64(this.raw);
244
- }
245
- exportAsHexFormatted() {
246
- return download.hexFormat(download.build_2.ToHex(this.raw));
247
- }
248
- exportAsPemFormatted() {
249
- return `-----BEGIN CERTIFICATE REQUEST-----\n${download.base64Format(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`;
202
+ if (algorithm.algorithm === certification_request.id_rsaEncryption) {
203
+ params = certification_request.AsnConvert.parse(subjectPublicKey, certification_request.RSAPublicKey);
250
204
  }
205
+ const spki = certification_request.AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);
206
+ return {
207
+ params,
208
+ value: spki,
209
+ algorithm: algorithm.algorithm,
210
+ };
211
+ }
212
+ get signature() {
213
+ const { signature, signatureAlgorithm } = this.asn;
214
+ return {
215
+ value: signature,
216
+ algorithm: signatureAlgorithm.algorithm,
217
+ };
218
+ }
219
+ get commonName() {
220
+ if (!this.subject) {
221
+ return '';
222
+ }
223
+ for (let i = 0; i < this.subject.length; i += 1) {
224
+ const name = this.subject[i];
225
+ if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {
226
+ return name.value;
227
+ }
228
+ }
229
+ return '';
230
+ }
231
+ async getThumbprint(algorithm = 'SHA-1') {
232
+ try {
233
+ const thumbprint = await certification_request.getCertificateThumbprint(algorithm, this.raw);
234
+ this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
235
+ }
236
+ catch (error) {
237
+ console.error('Error thumbprint get:', error);
238
+ }
239
+ }
240
+ parseAttributes() {
241
+ const { certificationRequestInfo } = this.asn;
242
+ if (certificationRequestInfo.attributes) {
243
+ this.attributes = certificationRequestInfo.attributes
244
+ .map((e) => new Attribute(certification_request.AsnConvert.serialize(e)));
245
+ }
246
+ }
247
+ exportAsBase64() {
248
+ return download.build.Convert.ToBase64(this.raw);
249
+ }
250
+ exportAsHexFormatted() {
251
+ return certification_request.hexFormat(download.build.Convert.ToHex(this.raw));
252
+ }
253
+ exportAsPemFormatted() {
254
+ return `-----BEGIN CERTIFICATE REQUEST-----\n${certification_request.base64Format(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`;
255
+ }
251
256
  }
252
257
 
253
258
  /**
@@ -258,11 +263,11 @@ class CSR extends download.AsnData {
258
263
  * LICENSE file in the root directory of this source tree.
259
264
  */
260
265
  function getStringByOID(value) {
261
- const oid = download.OIDs[value];
262
- if (oid) {
263
- return `${oid} (${value})`;
264
- }
265
- return value;
266
+ const oid = certification_request.OIDs[value];
267
+ if (oid) {
268
+ return `${oid} (${value})`;
269
+ }
270
+ return value;
266
271
  }
267
272
 
268
273
  /**
@@ -273,7 +278,7 @@ function getStringByOID(value) {
273
278
  * LICENSE file in the root directory of this source tree.
274
279
  */
275
280
  function isLink(value) {
276
- return value.indexOf('http') === 0;
281
+ return value.indexOf('http') === 0;
277
282
  }
278
283
 
279
284
  /**
@@ -284,40 +289,40 @@ function isLink(value) {
284
289
  * LICENSE file in the root directory of this source tree.
285
290
  */
286
291
  const RowTitle = (props) => {
287
- const { value } = props;
288
- if (!value) {
289
- return null;
290
- }
291
- return (index.h("tr", { class: "title" },
292
- index.h("td", { colSpan: 2 },
293
- index.h("peculiar-typography", { type: "h6" }, value))));
292
+ const { value } = props;
293
+ if (!value) {
294
+ return null;
295
+ }
296
+ return (index.h("tr", { class: "title" },
297
+ index.h("td", { colSpan: 2 },
298
+ index.h("peculiar-typography", { type: "h6" }, value))));
294
299
  };
295
300
  const RowValue = (props) => {
296
- const { name, value, monospace, collapse, href, extraValue, } = props;
297
- if (!name) {
298
- return null;
299
- }
300
- if (value === undefined || value === null) {
301
- return null;
302
- }
303
- let elementValue;
304
- if (collapse) {
305
- elementValue = (index.h("peculiar-text-hider", null, value));
306
- }
307
- else {
308
- elementValue = value;
309
- }
310
- const hasValue = !!value.toString();
311
- return (index.h("tr", null,
312
- index.h("td", { colSpan: hasValue ? 1 : 2 },
313
- index.h("peculiar-typography", { color: "grey_5" },
314
- name,
315
- hasValue ? ':' : '')),
316
- hasValue && (index.h("td", { class: {
317
- monospace,
318
- } }, (isLink(value.toString()) || href) ? (index.h("peculiar-link", { href: href || value.toString() }, value)) : (index.h("peculiar-typography", { monospace: monospace },
319
- elementValue,
320
- extraValue))))));
301
+ const { name, value, monospace, collapse, href, extraValue, } = props;
302
+ if (!name) {
303
+ return null;
304
+ }
305
+ if (value === undefined || value === null) {
306
+ return null;
307
+ }
308
+ let elementValue;
309
+ if (collapse) {
310
+ elementValue = (index.h("peculiar-text-hider", null, value));
311
+ }
312
+ else {
313
+ elementValue = value;
314
+ }
315
+ const hasValue = !!value.toString();
316
+ return (index.h("tr", null,
317
+ index.h("td", { colSpan: hasValue ? 1 : 2 },
318
+ index.h("peculiar-typography", { color: "grey_5" },
319
+ name,
320
+ hasValue ? ':' : '')),
321
+ hasValue && (index.h("td", { class: {
322
+ monospace,
323
+ } }, (isLink(value.toString()) || href) ? (index.h("peculiar-link", { href: href || value.toString() }, value)) : (index.h("peculiar-typography", { monospace: monospace },
324
+ elementValue,
325
+ extraValue))))));
321
326
  };
322
327
 
323
328
  /**
@@ -328,15 +333,15 @@ const RowValue = (props) => {
328
333
  * LICENSE file in the root directory of this source tree.
329
334
  */
330
335
  const Signature = (props) => {
331
- const { signature } = props;
332
- if (!signature) {
333
- return null;
334
- }
335
- return [
336
- index.h(RowTitle, { value: l10n.l10n.getString('signature') }),
337
- index.h(RowValue, { name: l10n.l10n.getString('algorithm'), value: getStringByOID(signature.algorithm) }),
338
- index.h(RowValue, { name: l10n.l10n.getString('value'), value: download.build_2.ToHex(signature.value), monospace: true, collapse: true }),
339
- ];
336
+ const { signature } = props;
337
+ if (!signature) {
338
+ return null;
339
+ }
340
+ return [
341
+ index.h(RowTitle, { value: l10n.l10n.getString('signature') }),
342
+ index.h(RowValue, { name: l10n.l10n.getString('algorithm'), value: getStringByOID(signature.algorithm) }),
343
+ index.h(RowValue, { name: l10n.l10n.getString('value'), value: download.build.Convert.ToHex(signature.value), monospace: true, collapse: true }),
344
+ ];
340
345
  };
341
346
 
342
347
  /**
@@ -347,14 +352,14 @@ const Signature = (props) => {
347
352
  * LICENSE file in the root directory of this source tree.
348
353
  */
349
354
  const BasicAttribute = (props, children) => {
350
- const { attribute } = props;
351
- return ([
352
- index.h(RowValue, { name: "Name", value: getStringByOID(attribute.asn.type) }),
353
- children,
354
- index.h("tr", null,
355
- index.h("td", { colSpan: 2, class: "divider" },
356
- index.h("span", { class: "bg_fill" }))),
357
- ]);
355
+ const { attribute } = props;
356
+ return ([
357
+ index.h(RowValue, { name: "Name", value: getStringByOID(attribute.asn.type) }),
358
+ children,
359
+ index.h("tr", null,
360
+ index.h("td", { colSpan: 2, class: "divider" },
361
+ index.h("span", { class: "bg_fill" }))),
362
+ ]);
358
363
  };
359
364
 
360
365
  /**
@@ -365,11 +370,11 @@ const BasicAttribute = (props, children) => {
365
370
  * LICENSE file in the root directory of this source tree.
366
371
  */
367
372
  const NamePart = (props) => {
368
- const { name } = props;
369
- if (!name) {
370
- return null;
371
- }
372
- return name.map((relativeDistinguishedName) => (relativeDistinguishedName.map((attributeTypeAndValue) => (index.h(RowValue, { name: download.OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() })))));
373
+ const { name } = props;
374
+ if (!name) {
375
+ return null;
376
+ }
377
+ return name.map((relativeDistinguishedName) => (relativeDistinguishedName.map((attributeTypeAndValue) => (index.h(RowValue, { name: certification_request.OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() })))));
373
378
  };
374
379
 
375
380
  /**
@@ -380,9 +385,9 @@ const NamePart = (props) => {
380
385
  * LICENSE file in the root directory of this source tree.
381
386
  */
382
387
  const NameAttribute = (props) => {
383
- const { attribute } = props;
384
- return (index.h(BasicAttribute, { attribute: attribute },
385
- index.h(NamePart, { name: attribute.value })));
388
+ const { attribute } = props;
389
+ return (index.h(BasicAttribute, { attribute: attribute },
390
+ index.h(NamePart, { name: attribute.value })));
386
391
  };
387
392
 
388
393
  /**
@@ -393,62 +398,62 @@ const NameAttribute = (props) => {
393
398
  * LICENSE file in the root directory of this source tree.
394
399
  */
395
400
  const names = {
396
- otherName: 'Other Name',
397
- rfc822Name: 'RFC 822 Name',
398
- dNSName: 'DNS Name',
399
- x400Address: 'X400 Address',
400
- directoryName: 'Directory Name',
401
- ediPartyName: 'Edi Party Name ',
402
- uniformResourceIdentifier: 'URI',
403
- iPAddress: 'IP Address',
404
- registeredID: 'Registered ID',
401
+ otherName: 'Other Name',
402
+ rfc822Name: 'RFC 822 Name',
403
+ dNSName: 'DNS Name',
404
+ x400Address: 'X400 Address',
405
+ directoryName: 'Directory Name',
406
+ ediPartyName: 'Edi Party Name ',
407
+ uniformResourceIdentifier: 'URI',
408
+ iPAddress: 'IP Address',
409
+ registeredID: 'Registered ID',
405
410
  };
406
411
  const GeneralNamePart = (props) => {
407
- const { generalName, getDNSNameLink, getIPAddressLink } = props;
408
- if (!generalName) {
409
- return null;
410
- }
411
- return Object.keys(generalName).map((name) => {
412
- const value = generalName[name];
413
- if (value instanceof download.Name$1) {
414
- return [
415
- index.h(RowValue, { name: names[name] || name, value: "" }),
416
- value.map((relativeDistinguishedName) => (relativeDistinguishedName.map((attributeTypeAndValue) => (index.h(RowValue, { name: download.OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() }))))),
417
- ];
418
- }
419
- if (value instanceof download.OtherName) {
420
- try {
421
- const text = download.AsnParser.parse(value.value, download.DisplayText);
422
- return (index.h(RowValue, { name: download.OIDs[value.typeId] || value.typeId, value: text.toString() }));
423
- }
424
- catch (error) {
425
- //
426
- }
427
- try {
428
- const text = download.AsnParser.parse(value.value, download.UserNotice);
429
- if (text.explicitText) {
430
- return (index.h(RowValue, { name: download.OIDs[value.typeId] || value.typeId, value: text.explicitText.toString() }));
431
- }
432
- }
433
- catch (error) {
434
- //
435
- }
436
- return (index.h(RowValue, { name: download.OIDs[value.typeId] || value.typeId, value: download.build_2.ToHex(value.value), monospace: true }));
437
- }
438
- if (download.build_1.isBufferSource(value)) {
439
- return (index.h(RowValue, { name: names[name] || name, value: download.build_2.ToString(value) }));
440
- }
441
- if (value instanceof download.EDIPartyName) {
442
- return (index.h(RowValue, { name: names[name] || name, value: download.build_2.ToString(value.partyName) }));
443
- }
444
- if (name === 'dNSName') {
445
- return (index.h(RowValue, { name: names[name] || name, value: value, href: getDNSNameLink(value) }));
446
- }
447
- if (name === 'iPAddress') {
448
- return (index.h(RowValue, { name: names[name] || name, value: value, href: getIPAddressLink(value) }));
412
+ const { generalName, getDNSNameLink, getIPAddressLink } = props;
413
+ if (!generalName) {
414
+ return null;
415
+ }
416
+ return Object.keys(generalName).map((name) => {
417
+ const value = generalName[name];
418
+ if (value instanceof certification_request.Name$1) {
419
+ return [
420
+ index.h(RowValue, { name: names[name] || name, value: "" }),
421
+ value.map((relativeDistinguishedName) => (relativeDistinguishedName.map((attributeTypeAndValue) => (index.h(RowValue, { name: certification_request.OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() }))))),
422
+ ];
423
+ }
424
+ if (value instanceof certification_request.OtherName) {
425
+ try {
426
+ const text = certification_request.AsnParser.parse(value.value, certification_request.DisplayText);
427
+ return (index.h(RowValue, { name: certification_request.OIDs[value.typeId] || value.typeId, value: text.toString() }));
428
+ }
429
+ catch (error) {
430
+ //
431
+ }
432
+ try {
433
+ const text = certification_request.AsnParser.parse(value.value, certification_request.UserNotice);
434
+ if (text.explicitText) {
435
+ return (index.h(RowValue, { name: certification_request.OIDs[value.typeId] || value.typeId, value: text.explicitText.toString() }));
449
436
  }
450
- return (index.h(RowValue, { name: names[name] || name, value: value }));
451
- });
437
+ }
438
+ catch (error) {
439
+ //
440
+ }
441
+ return (index.h(RowValue, { name: certification_request.OIDs[value.typeId] || value.typeId, value: download.build.Convert.ToHex(value.value), monospace: true }));
442
+ }
443
+ if (download.build.BufferSourceConverter.isBufferSource(value)) {
444
+ return (index.h(RowValue, { name: names[name] || name, value: download.build.Convert.ToString(value) }));
445
+ }
446
+ if (value instanceof certification_request.EDIPartyName) {
447
+ return (index.h(RowValue, { name: names[name] || name, value: download.build.Convert.ToString(value.partyName) }));
448
+ }
449
+ if (name === 'dNSName') {
450
+ return (index.h(RowValue, { name: names[name] || name, value: value, href: getDNSNameLink(value) }));
451
+ }
452
+ if (name === 'iPAddress') {
453
+ return (index.h(RowValue, { name: names[name] || name, value: value, href: getIPAddressLink(value) }));
454
+ }
455
+ return (index.h(RowValue, { name: names[name] || name, value: value }));
456
+ });
452
457
  };
453
458
 
454
459
  /**
@@ -459,14 +464,14 @@ const GeneralNamePart = (props) => {
459
464
  * LICENSE file in the root directory of this source tree.
460
465
  */
461
466
  const ActivityDescriptionAttribute = (props) => {
462
- const { attribute } = props;
463
- return (index.h(BasicAttribute, { attribute: attribute },
464
- index.h(RowValue, { name: "Code Authority", value: "" }),
465
- index.h(GeneralNamePart, { generalName: attribute.value.codeAuthority, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
466
- index.h(RowValue, { name: "Code Id", value: "" }),
467
- index.h(GeneralNamePart, { generalName: attribute.value.codeId, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
468
- index.h(RowValue, { name: "Short Name", value: attribute.value.shortName }),
469
- index.h(RowValue, { name: "Short Description", value: attribute.value.shortDescription })));
467
+ const { attribute } = props;
468
+ return (index.h(BasicAttribute, { attribute: attribute },
469
+ index.h(RowValue, { name: "Code Authority", value: "" }),
470
+ index.h(GeneralNamePart, { generalName: attribute.value.codeAuthority, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
471
+ index.h(RowValue, { name: "Code Id", value: "" }),
472
+ index.h(GeneralNamePart, { generalName: attribute.value.codeId, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
473
+ index.h(RowValue, { name: "Short Name", value: attribute.value.shortName }),
474
+ index.h(RowValue, { name: "Short Description", value: attribute.value.shortDescription })));
470
475
  };
471
476
 
472
477
  /**
@@ -477,16 +482,16 @@ const ActivityDescriptionAttribute = (props) => {
477
482
  * LICENSE file in the root directory of this source tree.
478
483
  */
479
484
  const WebGdprAttribute = (props) => {
480
- const { attribute } = props;
481
- return (index.h(BasicAttribute, { attribute: attribute },
482
- index.h(RowValue, { name: "Assessment Authority", value: "" }),
483
- index.h(GeneralNamePart, { generalName: attribute.value.assessmentAuthority, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
484
- index.h(RowValue, { name: "Assessment Location", value: "" }),
485
- index.h(GeneralNamePart, { generalName: attribute.value.assessmentLocation, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
486
- index.h(RowValue, { name: "Assessment Ref", value: "" }),
487
- index.h(GeneralNamePart, { generalName: attribute.value.assessmentRef, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
488
- index.h(RowValue, { name: "Data Storage Territory", value: attribute.value.dataStorageTerritory }),
489
- index.h(RowValue, { name: "Description", value: attribute.value.description })));
485
+ const { attribute } = props;
486
+ return (index.h(BasicAttribute, { attribute: attribute },
487
+ index.h(RowValue, { name: "Assessment Authority", value: "" }),
488
+ index.h(GeneralNamePart, { generalName: attribute.value.assessmentAuthority, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
489
+ index.h(RowValue, { name: "Assessment Location", value: "" }),
490
+ index.h(GeneralNamePart, { generalName: attribute.value.assessmentLocation, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
491
+ index.h(RowValue, { name: "Assessment Ref", value: "" }),
492
+ index.h(GeneralNamePart, { generalName: attribute.value.assessmentRef, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
493
+ index.h(RowValue, { name: "Data Storage Territory", value: attribute.value.dataStorageTerritory }),
494
+ index.h(RowValue, { name: "Description", value: attribute.value.description })));
490
495
  };
491
496
 
492
497
  /**
@@ -497,10 +502,10 @@ const WebGdprAttribute = (props) => {
497
502
  * LICENSE file in the root directory of this source tree.
498
503
  */
499
504
  const InsuranceValueAttribute = (props) => {
500
- const { attribute } = props;
501
- const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;
502
- return (index.h(BasicAttribute, { attribute: attribute },
503
- index.h(RowValue, { name: "Value", value: value })));
505
+ const { attribute } = props;
506
+ const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;
507
+ return (index.h(BasicAttribute, { attribute: attribute },
508
+ index.h(RowValue, { name: "Value", value: value })));
504
509
  };
505
510
 
506
511
  /**
@@ -511,8 +516,8 @@ const InsuranceValueAttribute = (props) => {
511
516
  * LICENSE file in the root directory of this source tree.
512
517
  */
513
518
  const TypeRelationshipAttribute = (props) => {
514
- const { attribute } = props;
515
- return (index.h(BasicAttribute, { attribute: attribute }, Object.keys(attribute.value).map((keyName) => (index.h(RowValue, { name: keyName, value: attribute.value[keyName].toNumber() ? 'YES' : 'NO' })))));
519
+ const { attribute } = props;
520
+ return (index.h(BasicAttribute, { attribute: attribute }, Object.keys(attribute.value).map((keyName) => (index.h(RowValue, { name: keyName, value: attribute.value[keyName].toNumber() ? 'YES' : 'NO' })))));
516
521
  };
517
522
 
518
523
  /**
@@ -523,23 +528,23 @@ const TypeRelationshipAttribute = (props) => {
523
528
  * LICENSE file in the root directory of this source tree.
524
529
  */
525
530
  const getValueRank = (value) => {
526
- let ratio = 1;
527
- if (value / 100 > 1) {
528
- ratio = 100;
529
- }
530
- else if (value / 10 > 1) {
531
- ratio = 10;
532
- }
533
- return `${value}/${5 * ratio}`;
531
+ let ratio = 1;
532
+ if (value / 100 > 1) {
533
+ ratio = 100;
534
+ }
535
+ else if (value / 10 > 1) {
536
+ ratio = 10;
537
+ }
538
+ return `${value}/${5 * ratio}`;
534
539
  };
535
540
  const ValuationRankingAttribute = (props) => {
536
- const { attribute } = props;
537
- const values = Object.keys(attribute.value).map((keyName) => ([
538
- getValueRank(attribute.value[keyName]),
539
- index.h("br", null),
540
- ]));
541
- return (index.h(BasicAttribute, { attribute: attribute },
542
- index.h(RowValue, { name: "Value", value: values })));
541
+ const { attribute } = props;
542
+ const values = Object.keys(attribute.value).map((keyName) => ([
543
+ getValueRank(attribute.value[keyName]),
544
+ index.h("br", null),
545
+ ]));
546
+ return (index.h(BasicAttribute, { attribute: attribute },
547
+ index.h(RowValue, { name: "Value", value: values })));
543
548
  };
544
549
 
545
550
  /**
@@ -550,9 +555,9 @@ const ValuationRankingAttribute = (props) => {
550
555
  * LICENSE file in the root directory of this source tree.
551
556
  */
552
557
  const AsStringAttribute = (props) => {
553
- const { attribute } = props;
554
- return (index.h(BasicAttribute, { attribute: attribute },
555
- index.h(RowValue, { name: "Value", value: attribute.value, monospace: true })));
558
+ const { attribute } = props;
559
+ return (index.h(BasicAttribute, { attribute: attribute },
560
+ index.h(RowValue, { name: "Value", value: attribute.value, monospace: true })));
556
561
  };
557
562
 
558
563
  /**
@@ -563,9 +568,9 @@ const AsStringAttribute = (props) => {
563
568
  * LICENSE file in the root directory of this source tree.
564
569
  */
565
570
  const UnstructuredNameAttribute = (props) => {
566
- const { attribute } = props;
567
- return (index.h(BasicAttribute, { attribute: attribute },
568
- index.h(RowValue, { name: "Value", value: attribute.value.utf8String })));
571
+ const { attribute } = props;
572
+ return (index.h(BasicAttribute, { attribute: attribute },
573
+ index.h(RowValue, { name: "Value", value: attribute.value.utf8String })));
569
574
  };
570
575
 
571
576
  /**
@@ -576,9 +581,9 @@ const UnstructuredNameAttribute = (props) => {
576
581
  * LICENSE file in the root directory of this source tree.
577
582
  */
578
583
  const ChallengePasswordAttribute = (props) => {
579
- const { attribute } = props;
580
- return (index.h(BasicAttribute, { attribute: attribute },
581
- index.h(RowValue, { name: "Value", value: attribute.value.toString() })));
584
+ const { attribute } = props;
585
+ return (index.h(BasicAttribute, { attribute: attribute },
586
+ index.h(RowValue, { name: "Value", value: attribute.value.toString() })));
582
587
  };
583
588
 
584
589
  /**
@@ -589,49 +594,49 @@ const ChallengePasswordAttribute = (props) => {
589
594
  * LICENSE file in the root directory of this source tree.
590
595
  */
591
596
  const Attributes = (props) => {
592
- const { attributes } = props;
593
- if (!attributes || !attributes.length) {
597
+ const { attributes } = props;
598
+ if (!attributes || !attributes.length) {
599
+ return null;
600
+ }
601
+ return ([
602
+ index.h(RowTitle, { value: "Attributes" }),
603
+ attributes.map((attribute) => {
604
+ try {
605
+ if (attribute.value instanceof certification_request.Name$1) {
606
+ return (index.h(NameAttribute, { attribute: attribute }));
607
+ }
608
+ if (attribute.value instanceof certification_request.ActivityDescription) {
609
+ return (index.h(ActivityDescriptionAttribute, { attribute: attribute }));
610
+ }
611
+ if (attribute.value instanceof certification_request.WebGDPR) {
612
+ return (index.h(WebGdprAttribute, { attribute: attribute }));
613
+ }
614
+ if (attribute.value instanceof certification_request.InsuranceValue) {
615
+ return (index.h(InsuranceValueAttribute, { attribute: attribute }));
616
+ }
617
+ if (attribute.value instanceof certification_request.TypeRelationship) {
618
+ return (index.h(TypeRelationshipAttribute, { attribute: attribute }));
619
+ }
620
+ if (attribute.value instanceof certification_request.ValuationRanking) {
621
+ return (index.h(ValuationRankingAttribute, { attribute: attribute }));
622
+ }
623
+ if (attribute.value instanceof certification_request.UnstructuredName) {
624
+ return (index.h(UnstructuredNameAttribute, { attribute: attribute }));
625
+ }
626
+ if (attribute.value instanceof certification_request.ChallengePassword) {
627
+ return (index.h(ChallengePasswordAttribute, { attribute: attribute }));
628
+ }
629
+ if (typeof attribute.value === 'string') {
630
+ return (index.h(AsStringAttribute, { attribute: attribute }));
631
+ }
632
+ return (index.h(BasicAttribute, { attribute: attribute }));
633
+ }
634
+ catch (error) {
635
+ console.error('Error render attribute:', attribute.asn.type);
594
636
  return null;
595
- }
596
- return ([
597
- index.h(RowTitle, { value: "Attributes" }),
598
- attributes.map((attribute) => {
599
- try {
600
- if (attribute.value instanceof download.Name$1) {
601
- return (index.h(NameAttribute, { attribute: attribute }));
602
- }
603
- if (attribute.value instanceof download.ActivityDescription) {
604
- return (index.h(ActivityDescriptionAttribute, { attribute: attribute }));
605
- }
606
- if (attribute.value instanceof download.WebGDPR) {
607
- return (index.h(WebGdprAttribute, { attribute: attribute }));
608
- }
609
- if (attribute.value instanceof download.InsuranceValue) {
610
- return (index.h(InsuranceValueAttribute, { attribute: attribute }));
611
- }
612
- if (attribute.value instanceof download.TypeRelationship) {
613
- return (index.h(TypeRelationshipAttribute, { attribute: attribute }));
614
- }
615
- if (attribute.value instanceof download.ValuationRanking) {
616
- return (index.h(ValuationRankingAttribute, { attribute: attribute }));
617
- }
618
- if (attribute.value instanceof download.UnstructuredName) {
619
- return (index.h(UnstructuredNameAttribute, { attribute: attribute }));
620
- }
621
- if (attribute.value instanceof download.ChallengePassword) {
622
- return (index.h(ChallengePasswordAttribute, { attribute: attribute }));
623
- }
624
- if (typeof attribute.value === 'string') {
625
- return (index.h(AsStringAttribute, { attribute: attribute }));
626
- }
627
- return (index.h(BasicAttribute, { attribute: attribute }));
628
- }
629
- catch (error) {
630
- console.error('Error render attribute:', attribute.asn.type);
631
- return null;
632
- }
633
- }),
634
- ]);
637
+ }
638
+ }),
639
+ ]);
635
640
  };
636
641
 
637
642
  /**
@@ -642,18 +647,18 @@ const Attributes = (props) => {
642
647
  * LICENSE file in the root directory of this source tree.
643
648
  */
644
649
  const Thumbprints = (props) => {
645
- const { thumbprints } = props;
646
- if (!thumbprints) {
647
- return null;
648
- }
649
- const keys = Object.keys(thumbprints);
650
- if (!keys.length) {
651
- return null;
652
- }
653
- return [
654
- index.h(RowTitle, { value: l10n.l10n.getString('fingerprints') }),
655
- keys.map((name) => (index.h(RowValue, { name: name, value: thumbprints[name], monospace: true }))),
656
- ];
650
+ const { thumbprints } = props;
651
+ if (!thumbprints) {
652
+ return null;
653
+ }
654
+ const keys = Object.keys(thumbprints);
655
+ if (!keys.length) {
656
+ return null;
657
+ }
658
+ return [
659
+ index.h(RowTitle, { value: l10n.l10n.getString('fingerprints') }),
660
+ keys.map((name) => (index.h(RowValue, { name: name, value: thumbprints[name], monospace: true }))),
661
+ ];
657
662
  };
658
663
 
659
664
  /**
@@ -664,15 +669,15 @@ const Thumbprints = (props) => {
664
669
  * LICENSE file in the root directory of this source tree.
665
670
  */
666
671
  const BasicExtension = (props, children) => {
667
- const { extension } = props;
668
- return ([
669
- index.h(RowValue, { name: "Name", value: getStringByOID(extension.asn.extnID) }),
670
- index.h(RowValue, { name: "Critical", value: extension.asn.critical ? 'YES' : 'NO' }),
671
- children,
672
- index.h("tr", null,
673
- index.h("td", { colSpan: 2, class: "divider" },
674
- index.h("span", { class: "bg_fill" }))),
675
- ]);
672
+ const { extension } = props;
673
+ return ([
674
+ index.h(RowValue, { name: "Name", value: getStringByOID(extension.asn.extnID) }),
675
+ index.h(RowValue, { name: "Critical", value: extension.asn.critical ? 'YES' : 'NO' }),
676
+ children,
677
+ index.h("tr", null,
678
+ index.h("td", { colSpan: 2, class: "divider" },
679
+ index.h("span", { class: "bg_fill" }))),
680
+ ]);
676
681
  };
677
682
 
678
683
  /**
@@ -683,9 +688,9 @@ const BasicExtension = (props, children) => {
683
688
  * LICENSE file in the root directory of this source tree.
684
689
  */
685
690
  const KeyUsageExtension = (props) => {
686
- const { extension } = props;
687
- return (index.h(BasicExtension, { extension: extension },
688
- index.h(RowValue, { name: "Usage", value: extension.value.toJSON().join(', ') })));
691
+ const { extension } = props;
692
+ return (index.h(BasicExtension, { extension: extension },
693
+ index.h(RowValue, { name: "Usage", value: extension.value.toJSON().join(', ') })));
689
694
  };
690
695
 
691
696
  /**
@@ -696,10 +701,10 @@ const KeyUsageExtension = (props) => {
696
701
  * LICENSE file in the root directory of this source tree.
697
702
  */
698
703
  const BasicConstraintsExtension = (props) => {
699
- const { extension } = props;
700
- return (index.h(BasicExtension, { extension: extension },
701
- index.h(RowValue, { name: "Certificate Authority", value: extension.value.cA ? 'YES' : 'NO' }),
702
- index.h(RowValue, { name: "Path Length Constraint", value: extension.value.pathLenConstraint })));
704
+ const { extension } = props;
705
+ return (index.h(BasicExtension, { extension: extension },
706
+ index.h(RowValue, { name: "Certificate Authority", value: extension.value.cA ? 'YES' : 'NO' }),
707
+ index.h(RowValue, { name: "Path Length Constraint", value: extension.value.pathLenConstraint })));
703
708
  };
704
709
 
705
710
  /**
@@ -710,8 +715,8 @@ const BasicConstraintsExtension = (props) => {
710
715
  * LICENSE file in the root directory of this source tree.
711
716
  */
712
717
  const ExtendedKeyUsageExtension = (props) => {
713
- const { extension } = props;
714
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((usage, arrayIndex) => (index.h(RowValue, { name: `Purpose #${arrayIndex + 1}`, value: getStringByOID(usage) })))));
718
+ const { extension } = props;
719
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((usage, arrayIndex) => (index.h(RowValue, { name: `Purpose #${arrayIndex + 1}`, value: getStringByOID(usage) })))));
715
720
  };
716
721
 
717
722
  /**
@@ -722,21 +727,21 @@ const ExtendedKeyUsageExtension = (props) => {
722
727
  * LICENSE file in the root directory of this source tree.
723
728
  */
724
729
  const SubjectKeyIdentifierExtension = (props) => {
725
- const { extension, getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink } = props;
726
- const keyId = download.build_2.ToHex(extension.value.buffer);
727
- const childrenLink = getSubjectKeyIdChildrenLink(keyId);
728
- const siblingsLink = getSubjectKeyIdSiblingsLink(keyId);
729
- return (index.h(BasicExtension, { extension: extension },
730
- index.h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
731
- childrenLink && (index.h("span", null,
732
- "\u00A0[",
733
- index.h("peculiar-link", { href: childrenLink }, "children"),
734
- "]")),
735
- siblingsLink && (index.h("span", null,
736
- "\u00A0[",
737
- index.h("peculiar-link", { href: siblingsLink }, "siblings"),
738
- "]")),
739
- ] })));
730
+ const { extension, getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink } = props;
731
+ const keyId = download.build.Convert.ToHex(extension.value.buffer);
732
+ const childrenLink = getSubjectKeyIdChildrenLink(keyId);
733
+ const siblingsLink = getSubjectKeyIdSiblingsLink(keyId);
734
+ return (index.h(BasicExtension, { extension: extension },
735
+ index.h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
736
+ childrenLink && (index.h("span", null,
737
+ "\u00A0[",
738
+ index.h("peculiar-link", { href: childrenLink }, "children"),
739
+ "]")),
740
+ siblingsLink && (index.h("span", null,
741
+ "\u00A0[",
742
+ index.h("peculiar-link", { href: siblingsLink }, "siblings"),
743
+ "]")),
744
+ ] })));
740
745
  };
741
746
 
742
747
  /**
@@ -747,21 +752,21 @@ const SubjectKeyIdentifierExtension = (props) => {
747
752
  * LICENSE file in the root directory of this source tree.
748
753
  */
749
754
  const AuthorityKeyIdentifierExtension = (props) => {
750
- const { extension, getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink } = props;
751
- const keyId = download.build_2.ToHex(extension.value.keyIdentifier.buffer);
752
- const parentLink = getAuthKeyIdParentLink(keyId);
753
- const siblingsLink = getAuthKeyIdSiblingsLink(keyId);
754
- return (index.h(BasicExtension, { extension: extension },
755
- index.h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
756
- parentLink && (index.h("span", null,
757
- "\u00A0[",
758
- index.h("peculiar-link", { href: parentLink }, "parents"),
759
- "]")),
760
- siblingsLink && (index.h("span", null,
761
- "\u00A0[",
762
- index.h("peculiar-link", { href: siblingsLink }, "siblings"),
763
- "]")),
764
- ] })));
755
+ const { extension, getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink } = props;
756
+ const keyId = download.build.Convert.ToHex(extension.value.keyIdentifier.buffer);
757
+ const parentLink = getAuthKeyIdParentLink(keyId);
758
+ const siblingsLink = getAuthKeyIdSiblingsLink(keyId);
759
+ return (index.h(BasicExtension, { extension: extension },
760
+ index.h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
761
+ parentLink && (index.h("span", null,
762
+ "\u00A0[",
763
+ index.h("peculiar-link", { href: parentLink }, "parents"),
764
+ "]")),
765
+ siblingsLink && (index.h("span", null,
766
+ "\u00A0[",
767
+ index.h("peculiar-link", { href: siblingsLink }, "siblings"),
768
+ "]")),
769
+ ] })));
765
770
  };
766
771
 
767
772
  /**
@@ -772,14 +777,14 @@ const AuthorityKeyIdentifierExtension = (props) => {
772
777
  * LICENSE file in the root directory of this source tree.
773
778
  */
774
779
  const CRLDistributionPointsExtension = (props) => {
775
- const { extension } = props;
776
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((point) => {
777
- var _a, _b;
778
- return ([
779
- (_a = point.distributionPoint) === null || _a === void 0 ? void 0 : _a.fullName.map((gn) => (index.h(GeneralNamePart, Object.assign({ generalName: gn }, props)))),
780
- (_b = point.cRLIssuer) === null || _b === void 0 ? void 0 : _b.map((gn) => (index.h(GeneralNamePart, Object.assign({ generalName: gn }, props)))),
781
- ]);
782
- })));
780
+ const { extension } = props;
781
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((point) => {
782
+ var _a, _b;
783
+ return ([
784
+ (_a = point.distributionPoint) === null || _a === void 0 ? void 0 : _a.fullName.map((gn) => (index.h(GeneralNamePart, Object.assign({ generalName: gn }, props)))),
785
+ (_b = point.cRLIssuer) === null || _b === void 0 ? void 0 : _b.map((gn) => (index.h(GeneralNamePart, Object.assign({ generalName: gn }, props)))),
786
+ ]);
787
+ })));
783
788
  };
784
789
 
785
790
  /**
@@ -790,12 +795,12 @@ const CRLDistributionPointsExtension = (props) => {
790
795
  * LICENSE file in the root directory of this source tree.
791
796
  */
792
797
  const InfoAccessSyntaxExtension = (props) => {
793
- const { extension } = props;
794
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((description, arrayIndex) => ([
795
- index.h(RowValue, { name: `Description #${arrayIndex + 1}`, value: "" }),
796
- index.h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }),
797
- index.h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props)),
798
- ]))));
798
+ const { extension } = props;
799
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((description, arrayIndex) => ([
800
+ index.h(RowValue, { name: `Description #${arrayIndex + 1}`, value: "" }),
801
+ index.h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }),
802
+ index.h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props)),
803
+ ]))));
799
804
  };
800
805
 
801
806
  /**
@@ -806,8 +811,8 @@ const InfoAccessSyntaxExtension = (props) => {
806
811
  * LICENSE file in the root directory of this source tree.
807
812
  */
808
813
  const SubjectAlternativeNameExtension = (props) => {
809
- const { extension } = props;
810
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((gn) => (index.h(GeneralNamePart, Object.assign({ generalName: gn }, props))))));
814
+ const { extension } = props;
815
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((gn) => (index.h(GeneralNamePart, Object.assign({ generalName: gn }, props))))));
811
816
  };
812
817
 
813
818
  /**
@@ -818,31 +823,31 @@ const SubjectAlternativeNameExtension = (props) => {
818
823
  * LICENSE file in the root directory of this source tree.
819
824
  */
820
825
  const CertificatePoliciesExtension = (props) => {
821
- const { extension } = props;
822
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((policy, arrayIndex) => {
823
- var _a;
824
- return ([
825
- index.h(RowValue, { name: `Policy #${arrayIndex + 1}`, value: "" }),
826
- index.h(RowValue, { name: "ID", value: getStringByOID(policy.policyIdentifier) }),
827
- (_a = policy.policyQualifiers) === null || _a === void 0 ? void 0 : _a.map((qualifierInfo, indexInfo) => {
828
- const data = [
829
- index.h(RowValue, { name: `Qualifier #${arrayIndex + 1}.${indexInfo + 1}`, value: "" }),
830
- index.h(RowValue, { name: "ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
831
- ];
832
- if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
833
- const value = download.AsnParser.parse(qualifierInfo.qualifier, download.DisplayText);
834
- data.push(index.h(RowValue, { name: "Value", value: value.toString() }));
835
- }
836
- if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
837
- const value = download.AsnParser.parse(qualifierInfo.qualifier, download.UserNotice);
838
- if (value.explicitText) {
839
- data.push(index.h(RowValue, { name: "Value", value: value.explicitText.toString() }));
840
- }
841
- }
842
- return data;
843
- }),
844
- ]);
845
- })));
826
+ const { extension } = props;
827
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((policy, arrayIndex) => {
828
+ var _a;
829
+ return ([
830
+ index.h(RowValue, { name: `Policy #${arrayIndex + 1}`, value: "" }),
831
+ index.h(RowValue, { name: "ID", value: getStringByOID(policy.policyIdentifier) }),
832
+ (_a = policy.policyQualifiers) === null || _a === void 0 ? void 0 : _a.map((qualifierInfo, indexInfo) => {
833
+ const data = [
834
+ index.h(RowValue, { name: `Qualifier #${arrayIndex + 1}.${indexInfo + 1}`, value: "" }),
835
+ index.h(RowValue, { name: "ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
836
+ ];
837
+ if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
838
+ const value = certification_request.AsnParser.parse(qualifierInfo.qualifier, certification_request.DisplayText);
839
+ data.push(index.h(RowValue, { name: "Value", value: value.toString() }));
840
+ }
841
+ if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
842
+ const value = certification_request.AsnParser.parse(qualifierInfo.qualifier, certification_request.UserNotice);
843
+ if (value.explicitText) {
844
+ data.push(index.h(RowValue, { name: "Value", value: value.explicitText.toString() }));
845
+ }
846
+ }
847
+ return data;
848
+ }),
849
+ ]);
850
+ })));
846
851
  };
847
852
 
848
853
  /**
@@ -853,82 +858,82 @@ const CertificatePoliciesExtension = (props) => {
853
858
  * LICENSE file in the root directory of this source tree.
854
859
  */
855
860
  const logs = {
856
- '9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5': 'Akamai CT',
857
- '39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9': 'Alpha CT',
858
- a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638: 'CNNIC CT',
859
- cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900: 'Certly.IO',
860
- '1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4': 'Cloudflare “Nimbus2017”',
861
- db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64: 'Cloudflare “Nimbus2018”',
862
- '747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56': 'Cloudflare “Nimbus2019”',
863
- '5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558': 'Cloudflare “Nimbus2020”',
864
- '4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8': 'Cloudflare “Nimbus2021”',
865
- '41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6': 'Cloudflare “Nimbus2022”',
866
- '7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52': 'Cloudflare “Nimbus2023”',
867
- '6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5': 'DigiCert Nessie2018',
868
- fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c: 'DigiCert Nessie2019',
869
- c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565: 'DigiCert Nessie2020',
870
- eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9: 'DigiCert Nessie2021',
871
- '51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5': 'DigiCert Nessie2022',
872
- b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a: 'DigiCert Nessie2023',
873
- '5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd': 'DigiCert Server',
874
- '8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f': 'DigiCert Server 2',
875
- c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360: 'DigiCert Yeti2018',
876
- e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe: 'DigiCert Yeti2019',
877
- f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273: 'DigiCert Yeti2020',
878
- '5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca': 'DigiCert Yeti2021',
879
- '2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02': 'DigiCert Yeti2022',
880
- '35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c': 'DigiCert Yeti2023',
881
- '717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668': 'GDCA 1',
882
- '14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a': 'GDCA 2',
883
- c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa: 'GDCA CT #1',
884
- '924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01': 'GDCA CT #2',
885
- fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28: 'Google “Argon2017”',
886
- a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25: 'Google “Argon2018”',
887
- '63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d': 'Google “Argon2019”',
888
- b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e: 'Google “Argon2020”',
889
- f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3: 'Google “Argon2021”',
890
- '2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784': 'Google “Argon2022”',
891
- '68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4': 'Google “Aviator”',
892
- c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6: 'Google “Crucible”',
893
- '1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb': 'Google “Daedalus”',
894
- '293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478': 'Google “Icarus”',
895
- a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10: 'Google “Pilot”',
896
- ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb: 'Google “Rocketeer”',
897
- bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185: 'Google “Skydiver”',
898
- '52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03': 'Google “Solera2018”',
899
- '0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00': 'Google “Solera2019”',
900
- '1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7': 'Google “Solera2020”',
901
- a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7: 'Google “Solera2021”',
902
- '697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3': 'Google “Solera2022”',
903
- a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681: 'Google “Submariner”',
904
- b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77: 'Google “Testtube”',
905
- b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e: 'Google “Xenon2018”',
906
- '084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0': 'Google “Xenon2019”',
907
- '07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c': 'Google “Xenon2020”',
908
- '7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7': 'Google “Xenon2021”',
909
- '46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47': 'Google “Xenon2022”',
910
- '7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3': 'Izenpe',
911
- '8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566': 'Izenpe “Argi”',
912
- '296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd': 'Let“s Encrypt ”Clicky”',
913
- '537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440': 'Nordu “flimsy”',
914
- aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd: 'Nordu “plausible”',
915
- e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273: 'PuChuangSiDa CT',
916
- cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6: 'SHECA CT 1',
917
- '32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623': 'SHECA CT 2',
918
- db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98: 'Sectigo (Comodo) “Dodo” CT',
919
- '6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913': 'Sectigo (Comodo) “Mammoth” CT',
920
- '5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c': 'Sectigo (Comodo) “Sabre” CT',
921
- '34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef': 'StartCom',
922
- ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc: 'Symantec',
923
- a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2: 'Symantec Deneb',
924
- '15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f': 'Symantec “Sirius”',
925
- bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5: 'Symantec “Vega”',
926
- b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b: 'Up In The Air “Behind the Sofa”',
927
- ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d: 'Venafi',
928
- '03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b': 'Venafi Gen2 CT',
929
- '41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263': 'WoSign',
930
- '63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7': 'WoSign 2',
931
- '9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b': 'WoSign CT #1',
861
+ '9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5': 'Akamai CT',
862
+ '39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9': 'Alpha CT',
863
+ a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638: 'CNNIC CT',
864
+ cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900: 'Certly.IO',
865
+ '1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4': 'Cloudflare “Nimbus2017”',
866
+ db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64: 'Cloudflare “Nimbus2018”',
867
+ '747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56': 'Cloudflare “Nimbus2019”',
868
+ '5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558': 'Cloudflare “Nimbus2020”',
869
+ '4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8': 'Cloudflare “Nimbus2021”',
870
+ '41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6': 'Cloudflare “Nimbus2022”',
871
+ '7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52': 'Cloudflare “Nimbus2023”',
872
+ '6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5': 'DigiCert Nessie2018',
873
+ fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c: 'DigiCert Nessie2019',
874
+ c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565: 'DigiCert Nessie2020',
875
+ eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9: 'DigiCert Nessie2021',
876
+ '51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5': 'DigiCert Nessie2022',
877
+ b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a: 'DigiCert Nessie2023',
878
+ '5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd': 'DigiCert Server',
879
+ '8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f': 'DigiCert Server 2',
880
+ c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360: 'DigiCert Yeti2018',
881
+ e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe: 'DigiCert Yeti2019',
882
+ f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273: 'DigiCert Yeti2020',
883
+ '5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca': 'DigiCert Yeti2021',
884
+ '2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02': 'DigiCert Yeti2022',
885
+ '35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c': 'DigiCert Yeti2023',
886
+ '717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668': 'GDCA 1',
887
+ '14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a': 'GDCA 2',
888
+ c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa: 'GDCA CT #1',
889
+ '924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01': 'GDCA CT #2',
890
+ fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28: 'Google “Argon2017”',
891
+ a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25: 'Google “Argon2018”',
892
+ '63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d': 'Google “Argon2019”',
893
+ b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e: 'Google “Argon2020”',
894
+ f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3: 'Google “Argon2021”',
895
+ '2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784': 'Google “Argon2022”',
896
+ '68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4': 'Google “Aviator”',
897
+ c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6: 'Google “Crucible”',
898
+ '1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb': 'Google “Daedalus”',
899
+ '293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478': 'Google “Icarus”',
900
+ a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10: 'Google “Pilot”',
901
+ ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb: 'Google “Rocketeer”',
902
+ bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185: 'Google “Skydiver”',
903
+ '52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03': 'Google “Solera2018”',
904
+ '0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00': 'Google “Solera2019”',
905
+ '1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7': 'Google “Solera2020”',
906
+ a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7: 'Google “Solera2021”',
907
+ '697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3': 'Google “Solera2022”',
908
+ a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681: 'Google “Submariner”',
909
+ b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77: 'Google “Testtube”',
910
+ b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e: 'Google “Xenon2018”',
911
+ '084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0': 'Google “Xenon2019”',
912
+ '07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c': 'Google “Xenon2020”',
913
+ '7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7': 'Google “Xenon2021”',
914
+ '46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47': 'Google “Xenon2022”',
915
+ '7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3': 'Izenpe',
916
+ '8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566': 'Izenpe “Argi”',
917
+ '296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd': 'Let“s Encrypt ”Clicky”',
918
+ '537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440': 'Nordu “flimsy”',
919
+ aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd: 'Nordu “plausible”',
920
+ e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273: 'PuChuangSiDa CT',
921
+ cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6: 'SHECA CT 1',
922
+ '32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623': 'SHECA CT 2',
923
+ db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98: 'Sectigo (Comodo) “Dodo” CT',
924
+ '6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913': 'Sectigo (Comodo) “Mammoth” CT',
925
+ '5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c': 'Sectigo (Comodo) “Sabre” CT',
926
+ '34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef': 'StartCom',
927
+ ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc: 'Symantec',
928
+ a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2: 'Symantec Deneb',
929
+ '15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f': 'Symantec “Sirius”',
930
+ bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5: 'Symantec “Vega”',
931
+ b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b: 'Up In The Air “Behind the Sofa”',
932
+ ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d: 'Venafi',
933
+ '03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b': 'Venafi Gen2 CT',
934
+ '41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263': 'WoSign',
935
+ '63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7': 'WoSign 2',
936
+ '9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b': 'WoSign CT #1',
932
937
  };
933
938
 
934
939
  /**
@@ -939,16 +944,16 @@ const logs = {
939
944
  * LICENSE file in the root directory of this source tree.
940
945
  */
941
946
  const CertificateTransparencyExtension = (props) => {
942
- const { extension } = props;
943
- return (index.h(BasicExtension, { extension: extension }, extension.value.toJSON().map((signedCertificateTimestamp, arrayIndex) => ([
944
- index.h(RowValue, { name: `SCT #${arrayIndex + 1}`, value: "" }),
945
- index.h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }),
946
- index.h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }),
947
- index.h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }),
948
- index.h(RowValue, { name: "Timestamp", value: l10n.dateShort(signedCertificateTimestamp.timestamp) }),
949
- index.h(RowValue, { name: "Signature Algorithm", value: `${signedCertificateTimestamp.hashAlgorithm} ${signedCertificateTimestamp.signatureAlgorithm}`.toUpperCase() }),
950
- index.h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true }),
951
- ]))));
947
+ const { extension } = props;
948
+ return (index.h(BasicExtension, { extension: extension }, extension.value.toJSON().map((signedCertificateTimestamp, arrayIndex) => ([
949
+ index.h(RowValue, { name: `SCT #${arrayIndex + 1}`, value: "" }),
950
+ index.h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }),
951
+ index.h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }),
952
+ index.h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }),
953
+ index.h(RowValue, { name: "Timestamp", value: l10n.dateShort(signedCertificateTimestamp.timestamp) }),
954
+ index.h(RowValue, { name: "Signature Algorithm", value: `${signedCertificateTimestamp.hashAlgorithm} ${signedCertificateTimestamp.signatureAlgorithm}`.toUpperCase() }),
955
+ index.h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true }),
956
+ ]))));
952
957
  };
953
958
 
954
959
  /**
@@ -959,11 +964,11 @@ const CertificateTransparencyExtension = (props) => {
959
964
  * LICENSE file in the root directory of this source tree.
960
965
  */
961
966
  const NameConstraintsExtension = (props) => {
962
- var _a, _b;
963
- const { extension } = props;
964
- return (index.h(BasicExtension, { extension: extension }, (_a = extension.value.excludedSubtrees) === null || _a === void 0 ? void 0 :
965
- _a.map((generalSubtree) => (index.h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props)))), (_b = extension.value.permittedSubtrees) === null || _b === void 0 ? void 0 :
966
- _b.map((generalSubtree) => (index.h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props))))));
967
+ var _a, _b;
968
+ const { extension } = props;
969
+ return (index.h(BasicExtension, { extension: extension }, (_a = extension.value.excludedSubtrees) === null || _a === void 0 ? void 0 :
970
+ _a.map((generalSubtree) => (index.h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props)))), (_b = extension.value.permittedSubtrees) === null || _b === void 0 ? void 0 :
971
+ _b.map((generalSubtree) => (index.h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props))))));
967
972
  };
968
973
 
969
974
  /**
@@ -974,11 +979,11 @@ const NameConstraintsExtension = (props) => {
974
979
  * LICENSE file in the root directory of this source tree.
975
980
  */
976
981
  const CertificateTemplateExtension = (props) => {
977
- const { extension } = props;
978
- return (index.h(BasicExtension, { extension: extension },
979
- index.h(RowValue, { name: "Template ID", value: extension.value.templateID }),
980
- index.h(RowValue, { name: "Template Major Version", value: extension.value.templateMajorVersion }),
981
- index.h(RowValue, { name: "Template Minor Version", value: extension.value.templateMinorVersion })));
982
+ const { extension } = props;
983
+ return (index.h(BasicExtension, { extension: extension },
984
+ index.h(RowValue, { name: "Template ID", value: extension.value.templateID }),
985
+ index.h(RowValue, { name: "Template Major Version", value: extension.value.templateMajorVersion }),
986
+ index.h(RowValue, { name: "Template Minor Version", value: extension.value.templateMinorVersion })));
982
987
  };
983
988
 
984
989
  /**
@@ -989,9 +994,9 @@ const CertificateTemplateExtension = (props) => {
989
994
  * LICENSE file in the root directory of this source tree.
990
995
  */
991
996
  const EnrollCertTypeChoiceExtension = (props) => {
992
- const { extension } = props;
993
- return (index.h(BasicExtension, { extension: extension },
994
- index.h(RowValue, { name: "Name", value: extension.value.toString() })));
997
+ const { extension } = props;
998
+ return (index.h(BasicExtension, { extension: extension },
999
+ index.h(RowValue, { name: "Name", value: extension.value.toString() })));
995
1000
  };
996
1001
 
997
1002
  /**
@@ -1002,11 +1007,11 @@ const EnrollCertTypeChoiceExtension = (props) => {
1002
1007
  * LICENSE file in the root directory of this source tree.
1003
1008
  */
1004
1009
  const CaVersionExtension = (props) => {
1005
- const { extension } = props;
1006
- const version = extension.value.getVersion();
1007
- return (index.h(BasicExtension, { extension: extension },
1008
- index.h(RowValue, { name: "Certificate Index", value: version.certificateIndex }),
1009
- index.h(RowValue, { name: "Key Index", value: version.keyIndex })));
1010
+ const { extension } = props;
1011
+ const version = extension.value.getVersion();
1012
+ return (index.h(BasicExtension, { extension: extension },
1013
+ index.h(RowValue, { name: "Certificate Index", value: version.certificateIndex }),
1014
+ index.h(RowValue, { name: "Key Index", value: version.keyIndex })));
1010
1015
  };
1011
1016
 
1012
1017
  /**
@@ -1017,12 +1022,12 @@ const CaVersionExtension = (props) => {
1017
1022
  * LICENSE file in the root directory of this source tree.
1018
1023
  */
1019
1024
  const QCStatementsExtension = (props) => {
1020
- const { extension } = props;
1021
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((statement, arrayIndex) => ([
1022
- index.h(RowValue, { name: `Statement #${arrayIndex + 1}`, value: "" }),
1023
- index.h(RowValue, { name: "ID", value: getStringByOID(statement.statementId) }),
1024
- index.h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ? download.build_2.ToHex(statement.statementInfo) : null, monospace: true }),
1025
- ]))));
1025
+ const { extension } = props;
1026
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((statement, arrayIndex) => ([
1027
+ index.h(RowValue, { name: `Statement #${arrayIndex + 1}`, value: "" }),
1028
+ index.h(RowValue, { name: "ID", value: getStringByOID(statement.statementId) }),
1029
+ index.h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ? download.build.Convert.ToHex(statement.statementInfo) : null, monospace: true }),
1030
+ ]))));
1026
1031
  };
1027
1032
 
1028
1033
  /**
@@ -1033,9 +1038,9 @@ const QCStatementsExtension = (props) => {
1033
1038
  * LICENSE file in the root directory of this source tree.
1034
1039
  */
1035
1040
  const NetscapeCommentExtension = (props) => {
1036
- const { extension } = props;
1037
- return (index.h(BasicExtension, { extension: extension },
1038
- index.h(RowValue, { name: "Comment", value: extension.value.value })));
1041
+ const { extension } = props;
1042
+ return (index.h(BasicExtension, { extension: extension },
1043
+ index.h(RowValue, { name: "Comment", value: extension.value.value })));
1039
1044
  };
1040
1045
 
1041
1046
  /**
@@ -1046,9 +1051,9 @@ const NetscapeCommentExtension = (props) => {
1046
1051
  * LICENSE file in the root directory of this source tree.
1047
1052
  */
1048
1053
  const NetscapeCertTypeExtension = (props) => {
1049
- const { extension } = props;
1050
- return (index.h(BasicExtension, { extension: extension },
1051
- index.h(RowValue, { name: "Type", value: extension.value.toJSON().join(', ') })));
1054
+ const { extension } = props;
1055
+ return (index.h(BasicExtension, { extension: extension },
1056
+ index.h(RowValue, { name: "Type", value: extension.value.toJSON().join(', ') })));
1052
1057
  };
1053
1058
 
1054
1059
  /**
@@ -1059,9 +1064,9 @@ const NetscapeCertTypeExtension = (props) => {
1059
1064
  * LICENSE file in the root directory of this source tree.
1060
1065
  */
1061
1066
  const LeiRoleExtension = (props) => {
1062
- const { extension } = props;
1063
- return (index.h(BasicExtension, { extension: extension },
1064
- index.h(RowValue, { name: "Role", value: extension.value.text })));
1067
+ const { extension } = props;
1068
+ return (index.h(BasicExtension, { extension: extension },
1069
+ index.h(RowValue, { name: "Role", value: extension.value.text })));
1065
1070
  };
1066
1071
 
1067
1072
  /**
@@ -1072,9 +1077,9 @@ const LeiRoleExtension = (props) => {
1072
1077
  * LICENSE file in the root directory of this source tree.
1073
1078
  */
1074
1079
  const LeiExtension = (props) => {
1075
- const { extension, getLEILink } = props;
1076
- return (index.h(BasicExtension, { extension: extension },
1077
- index.h(RowValue, { name: "Identifier", value: extension.value.text, href: getLEILink(extension.value.text) })));
1080
+ const { extension, getLEILink } = props;
1081
+ return (index.h(BasicExtension, { extension: extension },
1082
+ index.h(RowValue, { name: "Identifier", value: extension.value.text, href: getLEILink(extension.value.text) })));
1078
1083
  };
1079
1084
 
1080
1085
  /**
@@ -1085,11 +1090,11 @@ const LeiExtension = (props) => {
1085
1090
  * LICENSE file in the root directory of this source tree.
1086
1091
  */
1087
1092
  const TimestampExtension = (props) => {
1088
- const { extension } = props;
1089
- return (index.h(BasicExtension, { extension: extension },
1090
- index.h(RowValue, { name: "Version", value: extension.value.version }),
1091
- index.h(GeneralNamePart, Object.assign({ generalName: extension.value.location }, props)),
1092
- index.h(RowValue, { name: "Requires Auth", value: extension.value.requiresAuth ? 'YES' : 'NO' })));
1093
+ const { extension } = props;
1094
+ return (index.h(BasicExtension, { extension: extension },
1095
+ index.h(RowValue, { name: "Version", value: extension.value.version }),
1096
+ index.h(GeneralNamePart, Object.assign({ generalName: extension.value.location }, props)),
1097
+ index.h(RowValue, { name: "Requires Auth", value: extension.value.requiresAuth ? 'YES' : 'NO' })));
1093
1098
  };
1094
1099
 
1095
1100
  /**
@@ -1100,9 +1105,9 @@ const TimestampExtension = (props) => {
1100
1105
  * LICENSE file in the root directory of this source tree.
1101
1106
  */
1102
1107
  const ArchiveRevInfoExtension = (props) => {
1103
- const { extension } = props;
1104
- return (index.h(BasicExtension, { extension: extension },
1105
- index.h(RowValue, { name: "Version", value: extension.value.version })));
1108
+ const { extension } = props;
1109
+ return (index.h(BasicExtension, { extension: extension },
1110
+ index.h(RowValue, { name: "Version", value: extension.value.version })));
1106
1111
  };
1107
1112
 
1108
1113
  /**
@@ -1113,9 +1118,9 @@ const ArchiveRevInfoExtension = (props) => {
1113
1118
  * LICENSE file in the root directory of this source tree.
1114
1119
  */
1115
1120
  const CRLReasonExtension = (props) => {
1116
- const { extension } = props;
1117
- return (index.h(BasicExtension, { extension: extension },
1118
- index.h(RowValue, { name: "Reason", value: extension.value.toJSON() })));
1121
+ const { extension } = props;
1122
+ return (index.h(BasicExtension, { extension: extension },
1123
+ index.h(RowValue, { name: "Reason", value: extension.value.toJSON() })));
1119
1124
  };
1120
1125
 
1121
1126
  /**
@@ -1126,7 +1131,7 @@ const CRLReasonExtension = (props) => {
1126
1131
  * LICENSE file in the root directory of this source tree.
1127
1132
  */
1128
1133
  function getAttributeValue(attribute) {
1129
- return download.build_2.ToString(attribute.values[0]);
1134
+ return download.build.Convert.ToString(attribute.values[0]);
1130
1135
  }
1131
1136
 
1132
1137
  /**
@@ -1137,12 +1142,12 @@ function getAttributeValue(attribute) {
1137
1142
  * LICENSE file in the root directory of this source tree.
1138
1143
  */
1139
1144
  const SubjectDirectoryAttributesExtension = (props) => {
1140
- const { extension } = props;
1141
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((attribute, arrayIndex) => ([
1142
- index.h(RowValue, { name: `Attribute #${arrayIndex + 1}`, value: "" }),
1143
- index.h(RowValue, { name: "Type", value: getStringByOID(attribute.type) }),
1144
- index.h(RowValue, { name: "Value", value: getAttributeValue(attribute) }),
1145
- ]))));
1145
+ const { extension } = props;
1146
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((attribute, arrayIndex) => ([
1147
+ index.h(RowValue, { name: `Attribute #${arrayIndex + 1}`, value: "" }),
1148
+ index.h(RowValue, { name: "Type", value: getStringByOID(attribute.type) }),
1149
+ index.h(RowValue, { name: "Value", value: getAttributeValue(attribute) }),
1150
+ ]))));
1146
1151
  };
1147
1152
 
1148
1153
  /**
@@ -1153,9 +1158,9 @@ const SubjectDirectoryAttributesExtension = (props) => {
1153
1158
  * LICENSE file in the root directory of this source tree.
1154
1159
  */
1155
1160
  const AsStringExtension = (props) => {
1156
- const { extension } = props;
1157
- return (index.h(BasicExtension, { extension: extension },
1158
- index.h(RowValue, { name: "Value", value: extension.value, monospace: true })));
1161
+ const { extension } = props;
1162
+ return (index.h(BasicExtension, { extension: extension },
1163
+ index.h(RowValue, { name: "Value", value: extension.value, monospace: true })));
1159
1164
  };
1160
1165
 
1161
1166
  /**
@@ -1166,10 +1171,10 @@ const AsStringExtension = (props) => {
1166
1171
  * LICENSE file in the root directory of this source tree.
1167
1172
  */
1168
1173
  const PrivateKeyUsagePeriodExtension = (props) => {
1169
- const { extension } = props;
1170
- return (index.h(BasicExtension, { extension: extension },
1171
- index.h(RowValue, { name: "Not Before", value: l10n.dateShort(extension.value.notBefore) }),
1172
- index.h(RowValue, { name: "Not After", value: l10n.dateShort(extension.value.notAfter) })));
1174
+ const { extension } = props;
1175
+ return (index.h(BasicExtension, { extension: extension },
1176
+ index.h(RowValue, { name: "Not Before", value: l10n.dateShort(extension.value.notBefore) }),
1177
+ index.h(RowValue, { name: "Not After", value: l10n.dateShort(extension.value.notAfter) })));
1173
1178
  };
1174
1179
 
1175
1180
  /**
@@ -1180,10 +1185,10 @@ const PrivateKeyUsagePeriodExtension = (props) => {
1180
1185
  * LICENSE file in the root directory of this source tree.
1181
1186
  */
1182
1187
  const EntrustVersionInfoExtension = (props) => {
1183
- const { extension } = props;
1184
- return (index.h(BasicExtension, { extension: extension },
1185
- index.h(RowValue, { name: "Version", value: extension.value.entrustVers }),
1186
- index.h(RowValue, { name: "Info Flags", value: extension.value.entrustInfoFlags.toJSON().join(', ') })));
1188
+ const { extension } = props;
1189
+ return (index.h(BasicExtension, { extension: extension },
1190
+ index.h(RowValue, { name: "Version", value: extension.value.entrustVers }),
1191
+ index.h(RowValue, { name: "Info Flags", value: extension.value.entrustInfoFlags.toJSON().join(', ') })));
1187
1192
  };
1188
1193
 
1189
1194
  /**
@@ -1194,15 +1199,15 @@ const EntrustVersionInfoExtension = (props) => {
1194
1199
  * LICENSE file in the root directory of this source tree.
1195
1200
  */
1196
1201
  const BiometricSyntaxExtension = (props) => {
1197
- const { extension } = props;
1198
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((data, arrayIndex) => ([
1199
- index.h(RowValue, { name: `Biometric #${arrayIndex + 1}`, value: "" }),
1200
- index.h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
1201
- index.h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
1202
- index.h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
1203
- index.h(RowValue, { name: "Hash", value: download.build_2.ToHex(data.biometricDataHash.buffer), monospace: true }),
1204
- index.h(RowValue, { name: "Source Uri", value: data.sourceDataUri }),
1205
- ]))));
1202
+ const { extension } = props;
1203
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((data, arrayIndex) => ([
1204
+ index.h(RowValue, { name: `Biometric #${arrayIndex + 1}`, value: "" }),
1205
+ index.h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
1206
+ index.h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
1207
+ index.h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
1208
+ index.h(RowValue, { name: "Hash", value: download.build.Convert.ToHex(data.biometricDataHash.buffer), monospace: true }),
1209
+ index.h(RowValue, { name: "Source Uri", value: data.sourceDataUri }),
1210
+ ]))));
1206
1211
  };
1207
1212
 
1208
1213
  /**
@@ -1213,52 +1218,52 @@ const BiometricSyntaxExtension = (props) => {
1213
1218
  * LICENSE file in the root directory of this source tree.
1214
1219
  */
1215
1220
  const LogotypeExtension = (props) => {
1216
- const { extension } = props;
1217
- const renderImage = (image) => {
1218
- if (!image) {
1219
- return null;
1220
- }
1221
- return image.map((img) => {
1222
- const { imageDetails } = img;
1223
- return [
1224
- index.h(RowValue, { name: "Image Type", value: imageDetails.mediaType }),
1225
- index.h(RowValue, { name: "Image Hash", value: download.build_2.ToHex(imageDetails.logotypeHash[0].hashValue), monospace: true }),
1226
- index.h(RowValue, { name: "Image URL", value: imageDetails.logotypeURI[0], monospace: true, collapse: true }),
1227
- index.h(RowValue, { name: "Image Hash Algorithm", value: getStringByOID(imageDetails.logotypeHash[0].hashAlg.algorithm) }),
1228
- ];
1229
- });
1230
- };
1231
- const renderAudio = (audio) => {
1232
- if (!audio) {
1233
- return null;
1234
- }
1235
- return audio.map((aud) => {
1236
- const { audioDetails } = aud;
1237
- return [
1238
- index.h(RowValue, { name: "Audio Type", value: audioDetails.mediaType }),
1239
- index.h(RowValue, { name: "Audio Hash", value: download.build_2.ToHex(audioDetails.logotypeHash[0].hashValue), monospace: true }),
1240
- index.h(RowValue, { name: "Audio URL", value: audioDetails.logotypeURI[0], monospace: true, collapse: true }),
1241
- index.h(RowValue, { name: "Audio Hash Algorithm", value: getStringByOID(audioDetails.logotypeHash[0].hashAlg.algorithm) }),
1242
- ];
1243
- });
1244
- };
1245
- const renderLogo = (title, info) => {
1246
- if (!info || !info.direct) {
1247
- return null;
1248
- }
1249
- const { image, audio } = info.direct;
1250
- return [
1251
- index.h(RowValue, { name: "Type", value: title }),
1252
- renderImage(image),
1253
- renderAudio(audio),
1254
- index.h("tr", null,
1255
- index.h("td", null),
1256
- index.h("td", null)),
1257
- ];
1258
- };
1259
- return (index.h(BasicExtension, { extension: extension },
1260
- renderLogo('Subject', extension.value.subjectLogo),
1261
- renderLogo('Issuer', extension.value.issuerLogo)));
1221
+ const { extension } = props;
1222
+ const renderImage = (image) => {
1223
+ if (!image) {
1224
+ return null;
1225
+ }
1226
+ return image.map((img) => {
1227
+ const { imageDetails } = img;
1228
+ return [
1229
+ index.h(RowValue, { name: "Image Type", value: imageDetails.mediaType }),
1230
+ index.h(RowValue, { name: "Image Hash", value: download.build.Convert.ToHex(imageDetails.logotypeHash[0].hashValue), monospace: true }),
1231
+ index.h(RowValue, { name: "Image URL", value: imageDetails.logotypeURI[0], monospace: true, collapse: true }),
1232
+ index.h(RowValue, { name: "Image Hash Algorithm", value: getStringByOID(imageDetails.logotypeHash[0].hashAlg.algorithm) }),
1233
+ ];
1234
+ });
1235
+ };
1236
+ const renderAudio = (audio) => {
1237
+ if (!audio) {
1238
+ return null;
1239
+ }
1240
+ return audio.map((aud) => {
1241
+ const { audioDetails } = aud;
1242
+ return [
1243
+ index.h(RowValue, { name: "Audio Type", value: audioDetails.mediaType }),
1244
+ index.h(RowValue, { name: "Audio Hash", value: download.build.Convert.ToHex(audioDetails.logotypeHash[0].hashValue), monospace: true }),
1245
+ index.h(RowValue, { name: "Audio URL", value: audioDetails.logotypeURI[0], monospace: true, collapse: true }),
1246
+ index.h(RowValue, { name: "Audio Hash Algorithm", value: getStringByOID(audioDetails.logotypeHash[0].hashAlg.algorithm) }),
1247
+ ];
1248
+ });
1249
+ };
1250
+ const renderLogo = (title, info) => {
1251
+ if (!info || !info.direct) {
1252
+ return null;
1253
+ }
1254
+ const { image, audio } = info.direct;
1255
+ return [
1256
+ index.h(RowValue, { name: "Type", value: title }),
1257
+ renderImage(image),
1258
+ renderAudio(audio),
1259
+ index.h("tr", null,
1260
+ index.h("td", null),
1261
+ index.h("td", null)),
1262
+ ];
1263
+ };
1264
+ return (index.h(BasicExtension, { extension: extension },
1265
+ renderLogo('Subject', extension.value.subjectLogo),
1266
+ renderLogo('Issuer', extension.value.issuerLogo)));
1262
1267
  };
1263
1268
 
1264
1269
  /**
@@ -1269,13 +1274,13 @@ const LogotypeExtension = (props) => {
1269
1274
  * LICENSE file in the root directory of this source tree.
1270
1275
  */
1271
1276
  const TNAuthListExtension = (props) => {
1272
- const { extension } = props;
1273
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((entry, arrayIndex) => ([
1274
- index.h(RowValue, { name: `Entry #${arrayIndex + 1}`, value: "" }),
1275
- index.h(RowValue, { name: "SPC", value: entry.spc }),
1276
- index.h(RowValue, { name: "Range", value: entry.range ? `start=${entry.range.start} count==${entry.range.count}` : null }),
1277
- index.h(RowValue, { name: "One", value: entry.one }),
1278
- ]))));
1277
+ const { extension } = props;
1278
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((entry, arrayIndex) => ([
1279
+ index.h(RowValue, { name: `Entry #${arrayIndex + 1}`, value: "" }),
1280
+ index.h(RowValue, { name: "SPC", value: entry.spc }),
1281
+ index.h(RowValue, { name: "Range", value: entry.range ? `start=${entry.range.start} count==${entry.range.count}` : null }),
1282
+ index.h(RowValue, { name: "One", value: entry.one }),
1283
+ ]))));
1279
1284
  };
1280
1285
 
1281
1286
  /**
@@ -1286,10 +1291,10 @@ const TNAuthListExtension = (props) => {
1286
1291
  * LICENSE file in the root directory of this source tree.
1287
1292
  */
1288
1293
  const PolicyConstraintsExtension = (props) => {
1289
- const { extension } = props;
1290
- return (index.h(BasicExtension, { extension: extension },
1291
- extension.value.requireExplicitPolicy && (index.h(RowValue, { name: "Require Explicit Policy", value: download.AsnIntegerArrayBufferConverter.toASN(extension.value.requireExplicitPolicy).valueBlock.toString() })),
1292
- extension.value.inhibitPolicyMapping && (index.h(RowValue, { name: "Inhibit Policy Mapping", value: download.AsnIntegerArrayBufferConverter.toASN(extension.value.inhibitPolicyMapping).valueBlock.toString() }))));
1294
+ const { extension } = props;
1295
+ return (index.h(BasicExtension, { extension: extension },
1296
+ extension.value.requireExplicitPolicy && (index.h(RowValue, { name: "Require Explicit Policy", value: certification_request.AsnIntegerArrayBufferConverter.toASN(extension.value.requireExplicitPolicy).valueBlock.toString() })),
1297
+ extension.value.inhibitPolicyMapping && (index.h(RowValue, { name: "Inhibit Policy Mapping", value: certification_request.AsnIntegerArrayBufferConverter.toASN(extension.value.inhibitPolicyMapping).valueBlock.toString() }))));
1293
1298
  };
1294
1299
 
1295
1300
  /**
@@ -1300,12 +1305,12 @@ const PolicyConstraintsExtension = (props) => {
1300
1305
  * LICENSE file in the root directory of this source tree.
1301
1306
  */
1302
1307
  const PolicyMappingsExtension = (props) => {
1303
- const { extension } = props;
1304
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((policy, arrayIndex) => ([
1305
- index.h(RowValue, { name: `Policy #${arrayIndex + 1}`, value: "" }),
1306
- index.h(RowValue, { name: "Issuer Domain", value: getStringByOID(policy.issuerDomainPolicy) }),
1307
- index.h(RowValue, { name: "Subject Domain", value: getStringByOID(policy.subjectDomainPolicy) }),
1308
- ]))));
1308
+ const { extension } = props;
1309
+ return (index.h(BasicExtension, { extension: extension }, extension.value.map((policy, arrayIndex) => ([
1310
+ index.h(RowValue, { name: `Policy #${arrayIndex + 1}`, value: "" }),
1311
+ index.h(RowValue, { name: "Issuer Domain", value: getStringByOID(policy.issuerDomainPolicy) }),
1312
+ index.h(RowValue, { name: "Subject Domain", value: getStringByOID(policy.subjectDomainPolicy) }),
1313
+ ]))));
1309
1314
  };
1310
1315
 
1311
1316
  /**
@@ -1316,116 +1321,116 @@ const PolicyMappingsExtension = (props) => {
1316
1321
  * LICENSE file in the root directory of this source tree.
1317
1322
  */
1318
1323
  const Extensions = (props) => {
1319
- const { extensions, title } = props;
1320
- if (!extensions || !extensions.length) {
1324
+ const { extensions, title } = props;
1325
+ if (!extensions || !extensions.length) {
1326
+ return null;
1327
+ }
1328
+ return ([
1329
+ index.h(RowTitle, { value: title || 'Extensions' }),
1330
+ extensions.map((extension) => {
1331
+ try {
1332
+ if (extension.value instanceof certification_request.KeyUsage) {
1333
+ return (index.h(KeyUsageExtension, { extension: extension }));
1334
+ }
1335
+ if (extension.value instanceof certification_request.BasicConstraints) {
1336
+ return (index.h(BasicConstraintsExtension, { extension: extension }));
1337
+ }
1338
+ if (extension.value instanceof certification_request.ExtendedKeyUsage) {
1339
+ return (index.h(ExtendedKeyUsageExtension, { extension: extension }));
1340
+ }
1341
+ if (extension.value instanceof certification_request.SubjectKeyIdentifier) {
1342
+ return (index.h(SubjectKeyIdentifierExtension, Object.assign({ extension: extension }, props)));
1343
+ }
1344
+ if (extension.value instanceof certification_request.AuthorityKeyIdentifier) {
1345
+ return (index.h(AuthorityKeyIdentifierExtension, Object.assign({ extension: extension }, props)));
1346
+ }
1347
+ if (extension.value instanceof certification_request.CRLDistributionPoints) {
1348
+ return (index.h(CRLDistributionPointsExtension, Object.assign({ extension: extension }, props)));
1349
+ }
1350
+ if (extension.value instanceof certification_request.AuthorityInfoAccessSyntax
1351
+ || extension.value instanceof certification_request.SubjectInfoAccessSyntax) {
1352
+ return (index.h(InfoAccessSyntaxExtension, Object.assign({ extension: extension }, props)));
1353
+ }
1354
+ if (extension.value instanceof certification_request.SubjectAlternativeName) {
1355
+ return (index.h(SubjectAlternativeNameExtension, Object.assign({ extension: extension }, props)));
1356
+ }
1357
+ if (extension.value instanceof certification_request.CertificatePolicies) {
1358
+ return (index.h(CertificatePoliciesExtension, { extension: extension }));
1359
+ }
1360
+ if (extension.value instanceof certification_request.CertificateTransparency) {
1361
+ return (index.h(CertificateTransparencyExtension, { extension: extension }));
1362
+ }
1363
+ if (extension.value instanceof certification_request.NameConstraints) {
1364
+ return (index.h(NameConstraintsExtension, Object.assign({ extension: extension }, props)));
1365
+ }
1366
+ if (extension.value instanceof certification_request.CertificateTemplate) {
1367
+ return (index.h(CertificateTemplateExtension, { extension: extension }));
1368
+ }
1369
+ if (extension.value instanceof certification_request.EnrollCertTypeChoice) {
1370
+ return (index.h(EnrollCertTypeChoiceExtension, { extension: extension }));
1371
+ }
1372
+ if (extension.value instanceof certification_request.CaVersion) {
1373
+ return (index.h(CaVersionExtension, { extension: extension }));
1374
+ }
1375
+ if (extension.value instanceof certification_request.QCStatements) {
1376
+ return (index.h(QCStatementsExtension, { extension: extension }));
1377
+ }
1378
+ if (extension.value instanceof certification_request.NetscapeComment) {
1379
+ return (index.h(NetscapeCommentExtension, { extension: extension }));
1380
+ }
1381
+ if (extension.value instanceof certification_request.NetscapeCertType) {
1382
+ return (index.h(NetscapeCertTypeExtension, { extension: extension }));
1383
+ }
1384
+ if (extension.value instanceof certification_request.LeiRole) {
1385
+ return (index.h(LeiRoleExtension, { extension: extension }));
1386
+ }
1387
+ if (extension.value instanceof certification_request.LeiChoice) {
1388
+ return (index.h(LeiExtension, Object.assign({ extension: extension }, props)));
1389
+ }
1390
+ if (extension.value instanceof certification_request.Timestamp) {
1391
+ return (index.h(TimestampExtension, Object.assign({ extension: extension }, props)));
1392
+ }
1393
+ if (extension.value instanceof certification_request.ArchiveRevInfo) {
1394
+ return (index.h(ArchiveRevInfoExtension, { extension: extension }));
1395
+ }
1396
+ if (extension.value instanceof certification_request.CRLReason) {
1397
+ return (index.h(CRLReasonExtension, { extension: extension }));
1398
+ }
1399
+ if (extension.value instanceof certification_request.SubjectDirectoryAttributes) {
1400
+ return (index.h(SubjectDirectoryAttributesExtension, { extension: extension }));
1401
+ }
1402
+ if (extension.value instanceof certification_request.PrivateKeyUsagePeriod) {
1403
+ return (index.h(PrivateKeyUsagePeriodExtension, { extension: extension }));
1404
+ }
1405
+ if (extension.value instanceof certification_request.EntrustVersionInfo) {
1406
+ return (index.h(EntrustVersionInfoExtension, { extension: extension }));
1407
+ }
1408
+ if (extension.value instanceof certification_request.BiometricSyntax) {
1409
+ return (index.h(BiometricSyntaxExtension, { extension: extension }));
1410
+ }
1411
+ if (extension.value instanceof certification_request.LogotypeExtn) {
1412
+ return (index.h(LogotypeExtension, { extension: extension }));
1413
+ }
1414
+ if (extension.value instanceof certification_request.TNAuthorizationList) {
1415
+ return (index.h(TNAuthListExtension, { extension: extension }));
1416
+ }
1417
+ if (extension.value instanceof certification_request.PolicyConstraints) {
1418
+ return (index.h(PolicyConstraintsExtension, { extension: extension }));
1419
+ }
1420
+ if (extension.value instanceof certification_request.PolicyMappings) {
1421
+ return (index.h(PolicyMappingsExtension, { extension: extension }));
1422
+ }
1423
+ if (typeof extension.value === 'string') {
1424
+ return (index.h(AsStringExtension, { extension: extension }));
1425
+ }
1426
+ return (index.h(BasicExtension, { extension: extension }));
1427
+ }
1428
+ catch (error) {
1429
+ console.error('Error render extension:', extension.asn.extnID);
1321
1430
  return null;
1322
- }
1323
- return ([
1324
- index.h(RowTitle, { value: title || 'Extensions' }),
1325
- extensions.map((extension) => {
1326
- try {
1327
- if (extension.value instanceof download.KeyUsage) {
1328
- return (index.h(KeyUsageExtension, { extension: extension }));
1329
- }
1330
- if (extension.value instanceof download.BasicConstraints) {
1331
- return (index.h(BasicConstraintsExtension, { extension: extension }));
1332
- }
1333
- if (extension.value instanceof download.ExtendedKeyUsage) {
1334
- return (index.h(ExtendedKeyUsageExtension, { extension: extension }));
1335
- }
1336
- if (extension.value instanceof download.SubjectKeyIdentifier) {
1337
- return (index.h(SubjectKeyIdentifierExtension, Object.assign({ extension: extension }, props)));
1338
- }
1339
- if (extension.value instanceof download.AuthorityKeyIdentifier) {
1340
- return (index.h(AuthorityKeyIdentifierExtension, Object.assign({ extension: extension }, props)));
1341
- }
1342
- if (extension.value instanceof download.CRLDistributionPoints) {
1343
- return (index.h(CRLDistributionPointsExtension, Object.assign({ extension: extension }, props)));
1344
- }
1345
- if (extension.value instanceof download.AuthorityInfoAccessSyntax
1346
- || extension.value instanceof download.SubjectInfoAccessSyntax) {
1347
- return (index.h(InfoAccessSyntaxExtension, Object.assign({ extension: extension }, props)));
1348
- }
1349
- if (extension.value instanceof download.SubjectAlternativeName) {
1350
- return (index.h(SubjectAlternativeNameExtension, Object.assign({ extension: extension }, props)));
1351
- }
1352
- if (extension.value instanceof download.CertificatePolicies) {
1353
- return (index.h(CertificatePoliciesExtension, { extension: extension }));
1354
- }
1355
- if (extension.value instanceof download.CertificateTransparency) {
1356
- return (index.h(CertificateTransparencyExtension, { extension: extension }));
1357
- }
1358
- if (extension.value instanceof download.NameConstraints) {
1359
- return (index.h(NameConstraintsExtension, Object.assign({ extension: extension }, props)));
1360
- }
1361
- if (extension.value instanceof download.CertificateTemplate) {
1362
- return (index.h(CertificateTemplateExtension, { extension: extension }));
1363
- }
1364
- if (extension.value instanceof download.EnrollCertTypeChoice) {
1365
- return (index.h(EnrollCertTypeChoiceExtension, { extension: extension }));
1366
- }
1367
- if (extension.value instanceof download.CaVersion) {
1368
- return (index.h(CaVersionExtension, { extension: extension }));
1369
- }
1370
- if (extension.value instanceof download.QCStatements) {
1371
- return (index.h(QCStatementsExtension, { extension: extension }));
1372
- }
1373
- if (extension.value instanceof download.NetscapeComment) {
1374
- return (index.h(NetscapeCommentExtension, { extension: extension }));
1375
- }
1376
- if (extension.value instanceof download.NetscapeCertType) {
1377
- return (index.h(NetscapeCertTypeExtension, { extension: extension }));
1378
- }
1379
- if (extension.value instanceof download.LeiRole) {
1380
- return (index.h(LeiRoleExtension, { extension: extension }));
1381
- }
1382
- if (extension.value instanceof download.LeiChoice) {
1383
- return (index.h(LeiExtension, Object.assign({ extension: extension }, props)));
1384
- }
1385
- if (extension.value instanceof download.Timestamp) {
1386
- return (index.h(TimestampExtension, Object.assign({ extension: extension }, props)));
1387
- }
1388
- if (extension.value instanceof download.ArchiveRevInfo) {
1389
- return (index.h(ArchiveRevInfoExtension, { extension: extension }));
1390
- }
1391
- if (extension.value instanceof download.CRLReason) {
1392
- return (index.h(CRLReasonExtension, { extension: extension }));
1393
- }
1394
- if (extension.value instanceof download.SubjectDirectoryAttributes) {
1395
- return (index.h(SubjectDirectoryAttributesExtension, { extension: extension }));
1396
- }
1397
- if (extension.value instanceof download.PrivateKeyUsagePeriod) {
1398
- return (index.h(PrivateKeyUsagePeriodExtension, { extension: extension }));
1399
- }
1400
- if (extension.value instanceof download.EntrustVersionInfo) {
1401
- return (index.h(EntrustVersionInfoExtension, { extension: extension }));
1402
- }
1403
- if (extension.value instanceof download.BiometricSyntax) {
1404
- return (index.h(BiometricSyntaxExtension, { extension: extension }));
1405
- }
1406
- if (extension.value instanceof download.LogotypeExtn) {
1407
- return (index.h(LogotypeExtension, { extension: extension }));
1408
- }
1409
- if (extension.value instanceof download.TNAuthorizationList) {
1410
- return (index.h(TNAuthListExtension, { extension: extension }));
1411
- }
1412
- if (extension.value instanceof download.PolicyConstraints) {
1413
- return (index.h(PolicyConstraintsExtension, { extension: extension }));
1414
- }
1415
- if (extension.value instanceof download.PolicyMappings) {
1416
- return (index.h(PolicyMappingsExtension, { extension: extension }));
1417
- }
1418
- if (typeof extension.value === 'string') {
1419
- return (index.h(AsStringExtension, { extension: extension }));
1420
- }
1421
- return (index.h(BasicExtension, { extension: extension }));
1422
- }
1423
- catch (error) {
1424
- console.error('Error render extension:', extension.asn.extnID);
1425
- return null;
1426
- }
1427
- }),
1428
- ]);
1431
+ }
1432
+ }),
1433
+ ]);
1429
1434
  };
1430
1435
 
1431
1436
  /**
@@ -1436,16 +1441,16 @@ const Extensions = (props) => {
1436
1441
  * LICENSE file in the root directory of this source tree.
1437
1442
  */
1438
1443
  const BasicInformation = (props) => {
1439
- const { serialNumber, version, validity, notBefore, notAfter, type, } = props;
1440
- return [
1441
- index.h(RowTitle, { value: l10n.l10n.getString('basicInformation') }),
1442
- index.h(RowValue, { name: l10n.l10n.getString('type'), value: type }),
1443
- index.h(RowValue, { name: l10n.l10n.getString('serialNumber'), value: serialNumber, monospace: true }),
1444
- index.h(RowValue, { name: l10n.l10n.getString('version'), value: version }),
1445
- index.h(RowValue, { name: l10n.l10n.getString('validity'), value: validity }),
1446
- index.h(RowValue, { name: l10n.l10n.getString('issued'), value: notBefore ? l10n.dateShort(notBefore) : undefined }),
1447
- index.h(RowValue, { name: l10n.l10n.getString('expired'), value: notAfter ? l10n.dateShort(notAfter) : undefined }),
1448
- ];
1444
+ const { serialNumber, version, validity, notBefore, notAfter, type, } = props;
1445
+ return [
1446
+ index.h(RowTitle, { value: l10n.l10n.getString('basicInformation') }),
1447
+ index.h(RowValue, { name: l10n.l10n.getString('type'), value: type }),
1448
+ index.h(RowValue, { name: l10n.l10n.getString('serialNumber'), value: serialNumber, monospace: true }),
1449
+ index.h(RowValue, { name: l10n.l10n.getString('version'), value: version }),
1450
+ index.h(RowValue, { name: l10n.l10n.getString('validity'), value: validity }),
1451
+ index.h(RowValue, { name: l10n.l10n.getString('issued'), value: notBefore ? l10n.dateShort(notBefore) : undefined }),
1452
+ index.h(RowValue, { name: l10n.l10n.getString('expired'), value: notAfter ? l10n.dateShort(notAfter) : undefined }),
1453
+ ];
1449
1454
  };
1450
1455
 
1451
1456
  /**
@@ -1456,36 +1461,36 @@ const BasicInformation = (props) => {
1456
1461
  * LICENSE file in the root directory of this source tree.
1457
1462
  */
1458
1463
  function downloadCertificateAsPem(certificate) {
1459
- if (certificate instanceof CSR) {
1460
- download.Download.certificateRequest.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
1461
- }
1462
- else {
1463
- download.Download.certificate.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
1464
- }
1464
+ if (certificate instanceof CSR) {
1465
+ download.Download.pkcs10.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
1466
+ }
1467
+ else {
1468
+ download.Download.x509.asPEM(certificate.exportAsPemFormatted(), certificate.commonName);
1469
+ }
1465
1470
  }
1466
1471
  function downloadCertificateAsDer(certificate) {
1467
- if (certificate instanceof CSR) {
1468
- download.Download.certificateRequest.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
1469
- }
1470
- else {
1471
- download.Download.certificate.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
1472
- }
1472
+ if (certificate instanceof CSR) {
1473
+ download.Download.pkcs10.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
1474
+ }
1475
+ else {
1476
+ download.Download.x509.asDER(certificate.exportAsHexFormatted(), certificate.commonName);
1477
+ }
1473
1478
  }
1474
1479
  const Miscellaneous = (props) => {
1475
- const { certificate } = props;
1476
- return [
1477
- index.h(RowTitle, { value: l10n.l10n.getString('miscellaneous') }),
1478
- index.h("tr", null,
1479
- index.h("td", { class: "vertical_align_middle" },
1480
- index.h("peculiar-typography", { color: "grey_5" },
1481
- l10n.l10n.getString('download'),
1482
- ":")),
1483
- index.h("td", null,
1484
- index.h("peculiar-button-split", { onClick: downloadCertificateAsPem.bind(undefined, certificate), actions: [{
1485
- text: l10n.l10n.getString('download.der'),
1486
- onClick: downloadCertificateAsDer.bind(undefined, certificate),
1487
- }] }, l10n.l10n.getString('download.pem')))),
1488
- ];
1480
+ const { certificate } = props;
1481
+ return [
1482
+ index.h(RowTitle, { value: l10n.l10n.getString('miscellaneous') }),
1483
+ index.h("tr", null,
1484
+ index.h("td", { class: "vertical_align_middle" },
1485
+ index.h("peculiar-typography", { color: "grey_5" },
1486
+ l10n.l10n.getString('download'),
1487
+ ":")),
1488
+ index.h("td", null,
1489
+ index.h("peculiar-button-split", { onClick: downloadCertificateAsPem.bind(undefined, certificate), actions: [{
1490
+ text: l10n.l10n.getString('download.der'),
1491
+ onClick: downloadCertificateAsDer.bind(undefined, certificate),
1492
+ }] }, l10n.l10n.getString('download.pem')))),
1493
+ ];
1489
1494
  };
1490
1495
 
1491
1496
  /**
@@ -1507,14 +1512,14 @@ const getIPAddressLink = (ipAddress) => `https://search.censys.io/search?resourc
1507
1512
  * LICENSE file in the root directory of this source tree.
1508
1513
  */
1509
1514
  const Issuer = (props) => {
1510
- const { issuer } = props;
1511
- if (!issuer) {
1512
- return null;
1513
- }
1514
- return [
1515
- index.h(RowTitle, { value: l10n.l10n.getString('issuer') }),
1516
- issuer.map((item) => (index.h(GeneralNamePart, { generalName: item, getDNSNameLink: () => '', getIPAddressLink: () => '' }))),
1517
- ];
1515
+ const { issuer } = props;
1516
+ if (!issuer) {
1517
+ return null;
1518
+ }
1519
+ return [
1520
+ index.h(RowTitle, { value: l10n.l10n.getString('issuer') }),
1521
+ issuer.map((item) => (index.h(GeneralNamePart, { generalName: item, getDNSNameLink: () => '', getIPAddressLink: () => '' }))),
1522
+ ];
1518
1523
  };
1519
1524
 
1520
1525
  /**
@@ -1525,297 +1530,309 @@ const Issuer = (props) => {
1525
1530
  * LICENSE file in the root directory of this source tree.
1526
1531
  */
1527
1532
  const Holder = (props) => {
1528
- const { holder } = props;
1529
- if (!holder) {
1530
- return null;
1531
- }
1532
- const { baseCertificateID, objectDigestInfo } = holder;
1533
- return [
1534
- index.h(RowTitle, { value: l10n.l10n.getString('holder') }),
1535
- baseCertificateID && ([
1536
- baseCertificateID.issuer.map((item) => (index.h(GeneralNamePart, { generalName: item, getDNSNameLink: () => '', getIPAddressLink: () => '' }))),
1537
- index.h("tr", null,
1538
- index.h("td", null),
1539
- index.h("td", null)),
1540
- index.h(RowValue, { name: l10n.l10n.getString('serialNumber'), value: download.build_2.ToHex(baseCertificateID.serial), monospace: true }),
1541
- index.h("tr", null,
1542
- index.h("td", null),
1543
- index.h("td", null)),
1544
- ]),
1545
- objectDigestInfo && ([
1546
- index.h(RowValue, { name: l10n.l10n.getString('digestInfo'), value: "" }),
1547
- index.h(RowValue, { name: l10n.l10n.getString('algorithm'), value: getStringByOID(objectDigestInfo.digestAlgorithm.algorithm) }),
1548
- index.h(RowValue, { name: l10n.l10n.getString('value'), value: download.build_2.ToHex(objectDigestInfo.objectDigest), monospace: true }),
1549
- index.h(RowValue, { name: l10n.l10n.getString('type'), value: objectDigestInfo.digestedObjectType }),
1550
- ]),
1551
- ];
1533
+ const { holder } = props;
1534
+ if (!holder) {
1535
+ return null;
1536
+ }
1537
+ const { baseCertificateID, objectDigestInfo } = holder;
1538
+ return [
1539
+ index.h(RowTitle, { value: l10n.l10n.getString('holder') }),
1540
+ baseCertificateID && ([
1541
+ baseCertificateID.issuer.map((item) => (index.h(GeneralNamePart, { generalName: item, getDNSNameLink: () => '', getIPAddressLink: () => '' }))),
1542
+ index.h("tr", null,
1543
+ index.h("td", null),
1544
+ index.h("td", null)),
1545
+ index.h(RowValue, { name: l10n.l10n.getString('serialNumber'), value: download.build.Convert.ToHex(baseCertificateID.serial), monospace: true }),
1546
+ index.h("tr", null,
1547
+ index.h("td", null),
1548
+ index.h("td", null)),
1549
+ ]),
1550
+ objectDigestInfo && ([
1551
+ index.h(RowValue, { name: l10n.l10n.getString('digestInfo'), value: "" }),
1552
+ index.h(RowValue, { name: l10n.l10n.getString('algorithm'), value: getStringByOID(objectDigestInfo.digestAlgorithm.algorithm) }),
1553
+ index.h(RowValue, { name: l10n.l10n.getString('value'), value: download.build.Convert.ToHex(objectDigestInfo.objectDigest), monospace: true }),
1554
+ index.h(RowValue, { name: l10n.l10n.getString('type'), value: objectDigestInfo.digestedObjectType }),
1555
+ ]),
1556
+ ];
1552
1557
  };
1553
1558
 
1554
- const certificateViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
1559
+ const certificateViewerCss$2 = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
1555
1560
 
1556
1561
  const AttributeCertificateViewer = class {
1557
- constructor(hostRef) {
1558
- index.registerInstance(this, hostRef);
1559
- this.isDecodeInProcess = true;
1560
- this.getAuthKeyIdParentLink = (value) => { var _a; return (_a = this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
1561
- this.getAuthKeyIdSiblingsLink = (value) => { var _a; return (_a = this.authKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
1562
- this.getSubjectKeyIdChildrenLink = (value) => { var _a; return (_a = this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
1563
- this.getSubjectKeyIdSiblingsLink = (value) => { var _a; return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
1564
- }
1565
- componentWillLoad() {
1566
- this.decodeCertificate(this.certificate);
1567
- }
1568
- async decodeCertificate(certificate) {
1569
- this.isDecodeInProcess = true;
1570
- try {
1571
- if (certificate instanceof X509AttributeCertificate) {
1572
- this.certificateDecoded = certificate;
1573
- }
1574
- else if (typeof certificate === 'string') {
1575
- this.certificateDecoded = new X509AttributeCertificate(certificate);
1576
- }
1577
- else {
1578
- return;
1579
- }
1580
- this.certificateDecoded.parseExtensions();
1581
- this.certificateDecoded.parseAttributes();
1582
- await this.certificateDecoded.getThumbprint('SHA-1');
1583
- await this.certificateDecoded.getThumbprint('SHA-256');
1584
- }
1585
- catch (error) {
1586
- this.certificateDecodeError = error;
1587
- console.error('Error certificate parse:', error);
1588
- }
1589
- this.isDecodeInProcess = false;
1590
- }
1591
- /**
1592
- * Rerun decodeCertificate if previuos value not equal current value
1593
- */
1594
- watchCertificateAndDecode(newValue, oldValue) {
1595
- if (typeof newValue === 'string' && typeof oldValue === 'string') {
1596
- if (newValue !== oldValue) {
1597
- this.decodeCertificate(newValue);
1598
- }
1599
- return;
1600
- }
1601
- if (newValue instanceof X509AttributeCertificate
1602
- && oldValue instanceof X509AttributeCertificate) {
1603
- if (newValue.serialNumber !== oldValue.serialNumber) {
1604
- this.decodeCertificate(newValue);
1605
- }
1606
- }
1607
- }
1608
- // eslint-disable-next-line class-methods-use-this
1609
- renderErrorState() {
1610
- return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this attribute certificate.")));
1611
- }
1612
- // eslint-disable-next-line class-methods-use-this
1613
- renderEmptyState() {
1614
- return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no attribute certificate available.")));
1615
- }
1616
- render() {
1617
- if (this.certificateDecodeError) {
1618
- return this.renderErrorState();
1619
- }
1620
- if (!this.certificateDecoded) {
1621
- return this.renderEmptyState();
1622
- }
1623
- return (index.h(index.Host, null, index.h("table", null, index.h(BasicInformation, Object.assign({}, this.certificateDecoded)), index.h(Issuer, { issuer: this.certificateDecoded.issuer }), index.h(Holder, { holder: this.certificateDecoded.holder }), index.h(Signature, { signature: this.certificateDecoded.signature }), index.h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), index.h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), index.h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (index.h(Miscellaneous, { certificate: this.certificateDecoded })))));
1624
- }
1625
- static get watchers() { return {
1626
- "certificate": ["watchCertificateAndDecode"]
1627
- }; }
1628
- };
1629
- AttributeCertificateViewer.style = certificateViewerCss;
1562
+ constructor(hostRef) {
1563
+ index.registerInstance(this, hostRef);
1564
+ this.isDecodeInProcess = true;
1565
+ this.getAuthKeyIdParentLink = (value) => {
1566
+ var _a;
1567
+ return (_a = this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value);
1568
+ };
1569
+ this.getAuthKeyIdSiblingsLink = (value) => {
1570
+ var _a;
1571
+ return (_a = this.authKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value);
1572
+ };
1573
+ this.getSubjectKeyIdChildrenLink = (value) => {
1574
+ var _a;
1575
+ return (_a = this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
1576
+ };
1577
+ this.getSubjectKeyIdSiblingsLink = (value) => {
1578
+ var _a;
1579
+ return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
1580
+ };
1581
+ }
1582
+ componentWillLoad() {
1583
+ this.decodeCertificate(this.certificate);
1584
+ }
1585
+ async decodeCertificate(certificate) {
1586
+ this.isDecodeInProcess = true;
1587
+ try {
1588
+ if (certificate instanceof X509AttributeCertificate) {
1589
+ this.certificateDecoded = certificate;
1590
+ }
1591
+ else if (typeof certificate === 'string') {
1592
+ this.certificateDecoded = new X509AttributeCertificate(certificate);
1593
+ }
1594
+ else {
1595
+ return;
1596
+ }
1597
+ this.certificateDecoded.parseExtensions();
1598
+ this.certificateDecoded.parseAttributes();
1599
+ await this.certificateDecoded.getThumbprint('SHA-1');
1600
+ await this.certificateDecoded.getThumbprint('SHA-256');
1601
+ }
1602
+ catch (error) {
1603
+ this.certificateDecodeError = error;
1604
+ console.error('Error certificate parse:', error);
1605
+ }
1606
+ this.isDecodeInProcess = false;
1607
+ }
1608
+ /**
1609
+ * Rerun decodeCertificate if previuos value not equal current value
1610
+ */
1611
+ watchCertificateAndDecode(newValue, oldValue) {
1612
+ if (typeof newValue === 'string' && typeof oldValue === 'string') {
1613
+ if (newValue !== oldValue) {
1614
+ this.decodeCertificate(newValue);
1615
+ }
1616
+ return;
1617
+ }
1618
+ if (newValue instanceof X509AttributeCertificate
1619
+ && oldValue instanceof X509AttributeCertificate) {
1620
+ if (newValue.serialNumber !== oldValue.serialNumber) {
1621
+ this.decodeCertificate(newValue);
1622
+ }
1623
+ }
1624
+ }
1625
+ // eslint-disable-next-line class-methods-use-this
1626
+ renderErrorState() {
1627
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this attribute certificate.")));
1628
+ }
1629
+ // eslint-disable-next-line class-methods-use-this
1630
+ renderEmptyState() {
1631
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no attribute certificate available.")));
1632
+ }
1633
+ render() {
1634
+ if (this.certificateDecodeError) {
1635
+ return this.renderErrorState();
1636
+ }
1637
+ if (!this.certificateDecoded) {
1638
+ return this.renderEmptyState();
1639
+ }
1640
+ return (index.h(index.Host, null, index.h("table", null, index.h(BasicInformation, Object.assign({}, this.certificateDecoded)), index.h(Issuer, { issuer: this.certificateDecoded.issuer }), index.h(Holder, { holder: this.certificateDecoded.holder }), index.h(Signature, { signature: this.certificateDecoded.signature }), index.h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), index.h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), index.h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (index.h(Miscellaneous, { certificate: this.certificateDecoded })))));
1641
+ }
1642
+ static get watchers() { return {
1643
+ "certificate": ["watchCertificateAndDecode"]
1644
+ }; }
1645
+ };
1646
+ AttributeCertificateViewer.style = certificateViewerCss$2;
1630
1647
 
1631
1648
  const buttonCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;width:auto;cursor:pointer;position:relative;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;--pv-button-padding-end:5px;--pv-button-padding-start:5px}.button{font-family:\"Open Sans\", \"Arial\", sans-serif;font-family:var(--pv-font-family);font-size:13px;font-size:var(--pv-font-size-b3);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;border-style:solid;border-width:1px;font-weight:400;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;vertical-align:middle;cursor:inherit;height:30px;line-height:30px;border-radius:2px;padding:0 5px;padding:0 var(--pv-button-padding-end) 0 var(--pv-button-padding-start)}.button::-moz-focus-inner{border:0}.button:focus{outline:none;-webkit-box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1);box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1)}.button[disabled]{opacity:0.5;cursor:not-allowed}.button_stroke{border-color:rgba(53, 132, 247, 0.3);border-color:rgba(var(--pv-color-primary-rgb), 0.3);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);background-color:transparent}.button_fill{border-color:#3584f7;border-color:rgba(var(--pv-color-primary-rgb), 1);background-color:#3584f7;background-color:rgba(var(--pv-color-primary-rgb), 1);color:white;color:rgba(var(--pv-color-light-rgb), 1)}.button_label{-webkit-transition:opacity 200ms;transition:opacity 200ms}.button:hover .button_label{opacity:0.7}";
1632
1649
 
1633
1650
  const Button = class {
1634
- constructor(hostRef) {
1635
- index.registerInstance(this, hostRef);
1636
- this.fill = 'stroke';
1637
- this.handleClick = (event) => {
1638
- if (this.disabled) {
1639
- event.preventDefault();
1640
- event.stopPropagation();
1641
- return;
1642
- }
1643
- if (this.onClick) {
1644
- this.onClick(event);
1645
- }
1646
- };
1647
- }
1648
- render() {
1649
- const isLink = !!this.href;
1650
- const TagType = isLink ? 'a' : 'button';
1651
- return (index.h(TagType, { class: {
1652
- button: true,
1653
- button_stroke: this.fill === 'stroke',
1654
- button_fill: this.fill === 'fill',
1655
- button_disabled: this.disabled,
1656
- }, disabled: this.disabled, type: !isLink && 'button', href: isLink && this.href, target: isLink && this.target ? this.target : null, rel: isLink && 'noreferrer noopener', onClick: this.handleClick, part: "base" }, index.h("span", { part: "label", class: "button_label" }, index.h("slot", null))));
1657
- }
1651
+ constructor(hostRef) {
1652
+ index.registerInstance(this, hostRef);
1653
+ this.fill = 'stroke';
1654
+ this.handleClick = (event) => {
1655
+ if (this.disabled) {
1656
+ event.preventDefault();
1657
+ event.stopPropagation();
1658
+ return;
1659
+ }
1660
+ if (this.onClick) {
1661
+ this.onClick(event);
1662
+ }
1663
+ };
1664
+ }
1665
+ render() {
1666
+ const isLink = !!this.href;
1667
+ const TagType = isLink ? 'a' : 'button';
1668
+ return (index.h(TagType, { class: {
1669
+ button: true,
1670
+ button_stroke: this.fill === 'stroke',
1671
+ button_fill: this.fill === 'fill',
1672
+ button_disabled: this.disabled,
1673
+ }, disabled: this.disabled, type: !isLink && 'button', href: isLink && this.href, target: isLink && this.target ? this.target : null, rel: isLink && 'noreferrer noopener', onClick: this.handleClick, part: "base" }, index.h("span", { part: "label", class: "button_label" }, index.h("slot", null))));
1674
+ }
1658
1675
  };
1659
1676
  Button.style = buttonCss;
1660
1677
 
1661
1678
  const buttonSplitCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;vertical-align:top;position:relative;white-space:nowrap;font-size:0}.button_split_icon{width:7px;height:5px;display:inline-block;vertical-align:middle}.button_split_with_icon{width:25px;border-bottom-left-radius:0;border-top-left-radius:0}.button_split_with_icon.m_open::part(base):before{position:fixed;width:100%;height:100%;top:0;left:0;content:\"\"}.button_split_action{width:100%}.button_split_container{position:absolute;bottom:calc(100% + 1px);left:0;width:100%;border-radius:2px;-webkit-box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);z-index:1}.button_split>peculiar-button:first-of-type::part(base){border-top-right-radius:0;border-bottom-right-radius:0}.button_split>peculiar-button:last-of-type::part(base){border-top-left-radius:0;border-bottom-left-radius:0}.button_split>peculiar-button:not(:first-child){margin-left:-1px}";
1662
1679
 
1663
1680
  const ButtonSplit = class {
1664
- constructor(hostRef) {
1665
- index.registerInstance(this, hostRef);
1666
- this.fill = 'stroke';
1667
- this.actions = [];
1668
- this.open = false;
1669
- this.onClickSplitButton = (event) => {
1670
- event.stopPropagation();
1671
- this.open = !this.open;
1672
- };
1673
- }
1674
- onClickActiveButton(action, event) {
1675
- this.open = false;
1676
- action(event);
1677
- }
1678
- renderActiveSplitState() {
1679
- if (!this.open) {
1680
- return null;
1681
- }
1682
- return (index.h("div", { class: "button_split_container" }, this.actions.map((action) => (index.h("peculiar-button", { fill: "fill", class: "button_split_action", onClick: this.onClickActiveButton.bind(this, action.onClick) }, action.text)))));
1683
- }
1684
- render() {
1685
- return (index.h("div", { class: {
1686
- button_split: true,
1687
- } }, index.h("peculiar-button", { fill: this.fill, onClick: this.onClick }, index.h("slot", null)), index.h("peculiar-button", { fill: this.fill, onClick: this.onClickSplitButton, class: {
1688
- button_split_with_icon: true,
1689
- m_open: this.open,
1690
- } }, index.h("svg", { viewBox: "0 0 7 5", xmlns: "http://www.w3.org/2000/svg", class: "button_split_icon" }, index.h("path", { fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z" }))), this.renderActiveSplitState()));
1691
- }
1681
+ constructor(hostRef) {
1682
+ index.registerInstance(this, hostRef);
1683
+ this.fill = 'stroke';
1684
+ this.actions = [];
1685
+ this.open = false;
1686
+ this.onClickSplitButton = (event) => {
1687
+ event.stopPropagation();
1688
+ this.open = !this.open;
1689
+ };
1690
+ }
1691
+ onClickActiveButton(action, event) {
1692
+ this.open = false;
1693
+ action(event);
1694
+ }
1695
+ renderActiveSplitState() {
1696
+ if (!this.open) {
1697
+ return null;
1698
+ }
1699
+ return (index.h("div", { class: "button_split_container" }, this.actions.map((action) => (index.h("peculiar-button", { fill: "fill", class: "button_split_action", onClick: this.onClickActiveButton.bind(this, action.onClick) }, action.text)))));
1700
+ }
1701
+ render() {
1702
+ return (index.h("div", { class: {
1703
+ button_split: true,
1704
+ } }, index.h("peculiar-button", { fill: this.fill, onClick: this.onClick }, index.h("slot", null)), index.h("peculiar-button", { fill: this.fill, onClick: this.onClickSplitButton, class: {
1705
+ button_split_with_icon: true,
1706
+ m_open: this.open,
1707
+ } }, index.h("svg", { viewBox: "0 0 7 5", xmlns: "http://www.w3.org/2000/svg", class: "button_split_icon" }, index.h("path", { fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z" }))), this.renderActiveSplitState()));
1708
+ }
1692
1709
  };
1693
1710
  ButtonSplit.style = buttonSplitCss;
1694
1711
 
1695
1712
  const certificateDecoderCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block;width:100%;font-size:0}.textarea{min-height:300px;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:14px;font-family:monospace;resize:vertical;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);font-size:14px;font-size:var(--pv-font-size-h7)}.controls{margin-top:10px}.button{position:relative}.button:not(:first-child){margin-left:10px}.viewer{margin-top:64px}.input_file{opacity:0;width:100%;height:100%;top:0;left:0;display:block;position:absolute}";
1696
1713
 
1697
1714
  const CertificateDecoder = class {
1698
- constructor(hostRef) {
1699
- index.registerInstance(this, hostRef);
1700
- this.onClickDecode = () => {
1701
- const { value } = this.inputPaste;
1702
- if (value) {
1703
- this.decode(value);
1704
- }
1705
- };
1706
- this.onClickExample = () => {
1707
- this.decode(this.certificateExample);
1708
- };
1709
- this.onClickClear = () => {
1710
- this.clearValue();
1711
- };
1712
- this.onChangeInputFile = async (e) => {
1713
- const element = e.target;
1714
- if (element.files) {
1715
- const file = await readAsBinaryString(element.files[0]);
1716
- if (typeof file.value === 'string') {
1717
- this.decode(file.value);
1718
- }
1719
- element.value = '';
1720
- }
1721
- };
1722
- this.onDropFile = async (e) => {
1723
- e.stopPropagation();
1724
- e.preventDefault();
1725
- const element = e.dataTransfer;
1726
- if (element.files) {
1727
- const file = await readAsBinaryString(element.files[0]);
1728
- if (typeof file.value === 'string') {
1729
- this.decode(file.value);
1730
- }
1731
- }
1732
- };
1733
- }
1734
- componentDidLoad() {
1735
- const parsedHash = l10n.history.parseHash(window.location.search);
1736
- if (parsedHash.cert) {
1737
- /**
1738
- * Prevent Stencil warning about re-render
1739
- */
1740
- setTimeout(() => this.decode(parsedHash.cert), 100);
1741
- }
1742
- }
1743
- clearValue() {
1744
- this.inputPaste.value = '';
1745
- this.certificateDecoded = null;
1746
- l10n.history.replace({ search: '' });
1747
- }
1748
- setValue(value) {
1749
- this.certificateDecoded = value;
1750
- this.inputPaste.value = value.exportAsPemFormatted();
1751
- l10n.history.replace({
1752
- search: l10n.history.queryStringify({
1753
- cert: value.exportAsBase64(),
1754
- }),
1755
- });
1756
- }
1757
- decode(certificate) {
1758
- const isPem = download.isPem(certificate);
1759
- const isX509Pem = download.isX509Pem(certificate);
1760
- const isPkcs10Pem = download.isPkcs10Pem(certificate);
1761
- const isX509AttributePem = download.isX509AttributePem(certificate);
1762
- let decoded;
1763
- let decodeError;
1764
- if (isPem && !(isX509Pem || isX509AttributePem || isPkcs10Pem)) {
1765
- this.clearValue();
1766
- alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
1767
- return;
1768
- }
1769
- try {
1770
- if (isX509Pem) {
1771
- decoded = new download.X509Certificate(certificate);
1772
- }
1773
- if (isX509AttributePem) {
1774
- decoded = new X509AttributeCertificate(certificate);
1775
- }
1776
- if (isPkcs10Pem) {
1777
- decoded = new CSR(certificate);
1778
- }
1779
- }
1780
- catch (error) {
1781
- decodeError = error;
1782
- }
1783
- if (!decoded) {
1784
- try {
1785
- decoded = new download.X509Certificate(certificate);
1786
- }
1787
- catch (error) {
1788
- decodeError = error;
1789
- }
1790
- }
1791
- if (!decoded) {
1792
- try {
1793
- decoded = new X509AttributeCertificate(certificate);
1794
- }
1795
- catch (error) {
1796
- decodeError = error;
1797
- }
1798
- }
1799
- if (!decoded) {
1800
- try {
1801
- decoded = new CSR(certificate);
1802
- }
1803
- catch (error) {
1804
- decodeError = error;
1805
- }
1806
- }
1807
- if (!decoded) {
1808
- this.clearValue();
1809
- console.log(decodeError);
1810
- alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
1715
+ constructor(hostRef) {
1716
+ index.registerInstance(this, hostRef);
1717
+ this.onClickDecode = () => {
1718
+ const { value } = this.inputPaste;
1719
+ if (value) {
1720
+ this.decode(value);
1721
+ }
1722
+ };
1723
+ this.onClickExample = () => {
1724
+ this.decode(this.certificateExample);
1725
+ };
1726
+ this.onClickClear = () => {
1727
+ this.clearValue();
1728
+ };
1729
+ this.onChangeInputFile = async (e) => {
1730
+ const element = e.target;
1731
+ if (element.files) {
1732
+ const file = await readAsBinaryString(element.files[0]);
1733
+ if (typeof file.value === 'string') {
1734
+ this.decode(file.value);
1811
1735
  }
1812
- else {
1813
- this.setValue(decoded);
1736
+ element.value = '';
1737
+ }
1738
+ };
1739
+ this.onDropFile = async (e) => {
1740
+ e.stopPropagation();
1741
+ e.preventDefault();
1742
+ const element = e.dataTransfer;
1743
+ if (element.files) {
1744
+ const file = await readAsBinaryString(element.files[0]);
1745
+ if (typeof file.value === 'string') {
1746
+ this.decode(file.value);
1814
1747
  }
1748
+ }
1749
+ };
1750
+ }
1751
+ componentDidLoad() {
1752
+ const parsedHash = l10n.history.parseHash(window.location.search);
1753
+ if (parsedHash.cert) {
1754
+ /**
1755
+ * Prevent Stencil warning about re-render
1756
+ */
1757
+ setTimeout(() => this.decode(parsedHash.cert), 100);
1758
+ }
1759
+ }
1760
+ clearValue() {
1761
+ this.inputPaste.value = '';
1762
+ this.certificateDecoded = null;
1763
+ l10n.history.replace({ search: '' });
1764
+ }
1765
+ setValue(value) {
1766
+ this.certificateDecoded = value;
1767
+ this.inputPaste.value = value.exportAsPemFormatted();
1768
+ l10n.history.replace({
1769
+ search: l10n.history.queryStringify({
1770
+ cert: value.exportAsBase64(),
1771
+ }),
1772
+ });
1773
+ }
1774
+ decode(certificate) {
1775
+ const isPem = certification_request.isPem(certificate);
1776
+ const isX509Pem = certification_request.isX509Pem(certificate);
1777
+ const isPkcs10Pem = certification_request.isPkcs10Pem(certificate);
1778
+ const isX509AttributePem = certification_request.isX509AttributePem(certificate);
1779
+ let decoded;
1780
+ let decodeError;
1781
+ if (isPem && !(isX509Pem || isX509AttributePem || isPkcs10Pem)) {
1782
+ this.clearValue();
1783
+ alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
1784
+ return;
1785
+ }
1786
+ try {
1787
+ if (isX509Pem) {
1788
+ decoded = new certification_request.X509Certificate(certificate);
1789
+ }
1790
+ if (isX509AttributePem) {
1791
+ decoded = new X509AttributeCertificate(certificate);
1792
+ }
1793
+ if (isPkcs10Pem) {
1794
+ decoded = new CSR(certificate);
1795
+ }
1796
+ }
1797
+ catch (error) {
1798
+ decodeError = error;
1799
+ }
1800
+ if (!decoded) {
1801
+ try {
1802
+ decoded = new certification_request.X509Certificate(certificate);
1803
+ }
1804
+ catch (error) {
1805
+ decodeError = error;
1806
+ }
1807
+ }
1808
+ if (!decoded) {
1809
+ try {
1810
+ decoded = new X509AttributeCertificate(certificate);
1811
+ }
1812
+ catch (error) {
1813
+ decodeError = error;
1814
+ }
1815
+ }
1816
+ if (!decoded) {
1817
+ try {
1818
+ decoded = new CSR(certificate);
1819
+ }
1820
+ catch (error) {
1821
+ decodeError = error;
1822
+ }
1823
+ }
1824
+ if (!decoded) {
1825
+ this.clearValue();
1826
+ console.log(decodeError);
1827
+ alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
1815
1828
  }
1816
- render() {
1817
- return (index.h(index.Host, null, index.h("textarea", { placeholder: "Certificate DER or PEM", class: "textarea", ref: (el) => { this.inputPaste = el; }, onDrop: this.onDropFile }), index.h("div", { class: "controls" }, index.h("peculiar-button", { fill: "fill", class: "button", onClick: this.onClickDecode }, "Decode"), index.h("peculiar-button", { class: "button" }, "Choose file", index.h("input", { type: "file", class: "input_file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,.csr,.req", onChange: this.onChangeInputFile, value: "" })), index.h("peculiar-button", { class: "button", onClick: this.onClickClear }, "Clear"), this.certificateExample && (index.h("peculiar-button", { class: "button", onClick: this.onClickExample }, "Example"))), this.certificateDecoded instanceof download.X509Certificate && (index.h("peculiar-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof X509AttributeCertificate && (index.h("peculiar-attribute-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof CSR && (index.h("peculiar-csr-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true }))));
1829
+ else {
1830
+ this.setValue(decoded);
1818
1831
  }
1832
+ }
1833
+ render() {
1834
+ return (index.h(index.Host, null, index.h("textarea", { placeholder: "Certificate DER or PEM", class: "textarea", ref: (el) => { this.inputPaste = el; }, onDrop: this.onDropFile }), index.h("div", { class: "controls" }, index.h("peculiar-button", { fill: "fill", class: "button", onClick: this.onClickDecode }, "Decode"), index.h("peculiar-button", { class: "button" }, "Choose file", index.h("input", { type: "file", class: "input_file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,.csr,.req", onChange: this.onChangeInputFile, value: "" })), index.h("peculiar-button", { class: "button", onClick: this.onClickClear }, "Clear"), this.certificateExample && (index.h("peculiar-button", { class: "button", onClick: this.onClickExample }, "Example"))), this.certificateDecoded instanceof certification_request.X509Certificate && (index.h("peculiar-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof X509AttributeCertificate && (index.h("peculiar-attribute-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof CSR && (index.h("peculiar-csr-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true }))));
1835
+ }
1819
1836
  };
1820
1837
  CertificateDecoder.style = certificateDecoderCss;
1821
1838
 
@@ -1827,39 +1844,39 @@ CertificateDecoder.style = certificateDecoderCss;
1827
1844
  * LICENSE file in the root directory of this source tree.
1828
1845
  */
1829
1846
  function getPublicKeyModulus(publicKey) {
1830
- var _a;
1831
- if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['modulus']) {
1832
- let length = publicKey.params['modulus'].byteLength;
1833
- if (length % 2) {
1834
- length -= 1;
1835
- }
1836
- return length * 8;
1837
- }
1838
- return null;
1847
+ var _a;
1848
+ if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['modulus']) {
1849
+ let length = publicKey.params['modulus'].byteLength;
1850
+ if (length % 2) {
1851
+ length -= 1;
1852
+ }
1853
+ return length * 8;
1854
+ }
1855
+ return null;
1839
1856
  }
1840
1857
  function getPublicKeyExponent(publicKey) {
1841
- var _a;
1842
- if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['publicExponent']) {
1843
- return publicKey.params['publicExponent'].byteLength === 3
1844
- ? 65537
1845
- : 3;
1846
- }
1847
- return null;
1858
+ var _a;
1859
+ if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['publicExponent']) {
1860
+ return publicKey.params['publicExponent'].byteLength === 3
1861
+ ? 65537
1862
+ : 3;
1863
+ }
1864
+ return null;
1848
1865
  }
1849
1866
  const PublicKey = (props) => {
1850
- var _a;
1851
- const { publicKey } = props;
1852
- if (!publicKey) {
1853
- return null;
1854
- }
1855
- return [
1856
- index.h(RowTitle, { value: l10n.l10n.getString('publicKeyInfo') }),
1857
- index.h(RowValue, { name: l10n.l10n.getString('algorithm'), value: getStringByOID(publicKey.algorithm) }),
1858
- index.h(RowValue, { name: l10n.l10n.getString('namedCurve'), value: getStringByOID((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['namedCurve']) }),
1859
- index.h(RowValue, { name: l10n.l10n.getString('exponent'), value: getPublicKeyExponent(publicKey) }),
1860
- index.h(RowValue, { name: l10n.l10n.getString('modulus'), value: getPublicKeyModulus(publicKey) }),
1861
- index.h(RowValue, { name: l10n.l10n.getString('value'), value: download.build_2.ToHex(publicKey.value), monospace: true, collapse: true }),
1862
- ];
1867
+ var _a;
1868
+ const { publicKey } = props;
1869
+ if (!publicKey) {
1870
+ return null;
1871
+ }
1872
+ return [
1873
+ index.h(RowTitle, { value: l10n.l10n.getString('publicKeyInfo') }),
1874
+ index.h(RowValue, { name: l10n.l10n.getString('algorithm'), value: getStringByOID(publicKey.algorithm) }),
1875
+ index.h(RowValue, { name: l10n.l10n.getString('namedCurve'), value: getStringByOID((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['namedCurve']) }),
1876
+ index.h(RowValue, { name: l10n.l10n.getString('exponent'), value: getPublicKeyExponent(publicKey) }),
1877
+ index.h(RowValue, { name: l10n.l10n.getString('modulus'), value: getPublicKeyModulus(publicKey) }),
1878
+ index.h(RowValue, { name: l10n.l10n.getString('value'), value: download.build.Convert.ToHex(publicKey.value), monospace: true, collapse: true }),
1879
+ ];
1863
1880
  };
1864
1881
 
1865
1882
  /**
@@ -1870,11 +1887,11 @@ const PublicKey = (props) => {
1870
1887
  * LICENSE file in the root directory of this source tree.
1871
1888
  */
1872
1889
  const SubjectName = (props) => {
1873
- const { name } = props;
1874
- return [
1875
- index.h(RowTitle, { value: l10n.l10n.getString('subjectName') }),
1876
- name.map((n) => (index.h(RowValue, { name: n.name || n.type, value: n.value }))),
1877
- ];
1890
+ const { name } = props;
1891
+ return [
1892
+ index.h(RowTitle, { value: l10n.l10n.getString('subjectName') }),
1893
+ name.map((n) => (index.h(RowValue, { name: n.name || n.type, value: n.value }))),
1894
+ ];
1878
1895
  };
1879
1896
 
1880
1897
  /**
@@ -1885,243 +1902,261 @@ const SubjectName = (props) => {
1885
1902
  * LICENSE file in the root directory of this source tree.
1886
1903
  */
1887
1904
  const IssuerName = (props) => {
1888
- const { name, issuerDnLink } = props;
1889
- const title = l10n.l10n.getString('issuerName');
1890
- return [
1891
- index.h(RowTitle, { value: issuerDnLink ? (index.h("peculiar-link", { href: issuerDnLink, type: "h6" }, title)) : title }),
1892
- name.map((n) => (index.h(RowValue, { name: n.name || n.type, value: n.value }))),
1893
- ];
1905
+ const { name, issuerDnLink } = props;
1906
+ const title = l10n.l10n.getString('issuerName');
1907
+ return [
1908
+ index.h(RowTitle, { value: issuerDnLink ? (index.h("peculiar-link", { href: issuerDnLink, type: "h6" }, title)) : title }),
1909
+ name.map((n) => (index.h(RowValue, { name: n.name || n.type, value: n.value }))),
1910
+ ];
1894
1911
  };
1895
1912
 
1896
1913
  const certificateViewerCss$1 = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
1897
1914
 
1898
1915
  const CertificateViewer = class {
1899
- constructor(hostRef) {
1900
- index.registerInstance(this, hostRef);
1901
- this.isDecodeInProcess = true;
1902
- this.getAuthKeyIdParentLink = (value) => { var _a; return (_a = this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
1903
- this.getAuthKeyIdSiblingsLink = (value) => { var _a; return (_a = this.authKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value); };
1904
- this.getSubjectKeyIdChildrenLink = (value) => { var _a; return (_a = this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
1905
- this.getSubjectKeyIdSiblingsLink = (value) => { var _a; return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
1906
- }
1907
- componentWillLoad() {
1908
- this.decodeCertificate(this.certificate);
1909
- }
1910
- async decodeCertificate(certificate) {
1911
- this.isDecodeInProcess = true;
1912
- try {
1913
- if (certificate instanceof download.X509Certificate) {
1914
- this.certificateDecoded = certificate;
1915
- }
1916
- else if (typeof certificate === 'string') {
1917
- this.certificateDecoded = new download.X509Certificate(certificate);
1918
- }
1919
- else {
1920
- return;
1921
- }
1922
- this.certificateDecoded.parseExtensions();
1923
- await this.certificateDecoded.getThumbprint('SHA-1');
1924
- await this.certificateDecoded.getThumbprint('SHA-256');
1925
- }
1926
- catch (error) {
1927
- this.certificateDecodeError = error;
1928
- console.error('Error certificate parse:', error);
1929
- }
1930
- this.isDecodeInProcess = false;
1931
- }
1932
- /**
1933
- * Rerun decodeCertificate if previuos value not equal current value
1934
- */
1935
- watchCertificateAndDecode(newValue, oldValue) {
1936
- if (typeof newValue === 'string' && typeof oldValue === 'string') {
1937
- if (newValue !== oldValue) {
1938
- this.decodeCertificate(newValue);
1939
- }
1940
- return;
1941
- }
1942
- if (newValue instanceof download.X509Certificate && oldValue instanceof download.X509Certificate) {
1943
- if (newValue.serialNumber !== oldValue.serialNumber) {
1944
- this.decodeCertificate(newValue);
1945
- }
1946
- }
1947
- }
1948
- getIssuerDnLink() {
1949
- return this.issuerDnLink;
1950
- }
1951
- // eslint-disable-next-line class-methods-use-this
1952
- renderErrorState() {
1953
- return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this certificate.")));
1954
- }
1955
- // eslint-disable-next-line class-methods-use-this
1956
- renderEmptyState() {
1957
- return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no certificate available.")));
1958
- }
1959
- render() {
1960
- if (this.certificateDecodeError) {
1961
- return this.renderErrorState();
1962
- }
1963
- if (!this.certificateDecoded) {
1964
- return this.renderEmptyState();
1965
- }
1966
- return (index.h(index.Host, { "data-view": this.view }, index.h("table", null, index.h(BasicInformation, Object.assign({}, this.certificateDecoded)), index.h(SubjectName, { name: this.certificateDecoded.subject }), index.h(IssuerName, { name: this.certificateDecoded.issuer, issuerDnLink: this.getIssuerDnLink() }), index.h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), index.h(Signature, { signature: this.certificateDecoded.signature }), index.h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), index.h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (index.h(Miscellaneous, { certificate: this.certificateDecoded })))));
1967
- }
1968
- static get watchers() { return {
1969
- "certificate": ["watchCertificateAndDecode"]
1970
- }; }
1916
+ constructor(hostRef) {
1917
+ index.registerInstance(this, hostRef);
1918
+ this.isDecodeInProcess = true;
1919
+ this.getAuthKeyIdParentLink = (value) => {
1920
+ var _a;
1921
+ return (_a = this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value);
1922
+ };
1923
+ this.getAuthKeyIdSiblingsLink = (value) => {
1924
+ var _a;
1925
+ return (_a = this.authKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value);
1926
+ };
1927
+ this.getSubjectKeyIdChildrenLink = (value) => {
1928
+ var _a;
1929
+ return (_a = this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
1930
+ };
1931
+ this.getSubjectKeyIdSiblingsLink = (value) => {
1932
+ var _a;
1933
+ return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
1934
+ };
1935
+ }
1936
+ componentWillLoad() {
1937
+ this.decodeCertificate(this.certificate);
1938
+ }
1939
+ async decodeCertificate(certificate) {
1940
+ this.isDecodeInProcess = true;
1941
+ try {
1942
+ if (certificate instanceof certification_request.X509Certificate) {
1943
+ this.certificateDecoded = certificate;
1944
+ }
1945
+ else if (typeof certificate === 'string') {
1946
+ this.certificateDecoded = new certification_request.X509Certificate(certificate);
1947
+ }
1948
+ else {
1949
+ return;
1950
+ }
1951
+ this.certificateDecoded.parseExtensions();
1952
+ await this.certificateDecoded.getThumbprint('SHA-1');
1953
+ await this.certificateDecoded.getThumbprint('SHA-256');
1954
+ }
1955
+ catch (error) {
1956
+ this.certificateDecodeError = error;
1957
+ console.error('Error certificate parse:', error);
1958
+ }
1959
+ this.isDecodeInProcess = false;
1960
+ }
1961
+ /**
1962
+ * Rerun decodeCertificate if previuos value not equal current value
1963
+ */
1964
+ watchCertificateAndDecode(newValue, oldValue) {
1965
+ if (typeof newValue === 'string' && typeof oldValue === 'string') {
1966
+ if (newValue !== oldValue) {
1967
+ this.decodeCertificate(newValue);
1968
+ }
1969
+ return;
1970
+ }
1971
+ if (newValue instanceof certification_request.X509Certificate && oldValue instanceof certification_request.X509Certificate) {
1972
+ if (newValue.serialNumber !== oldValue.serialNumber) {
1973
+ this.decodeCertificate(newValue);
1974
+ }
1975
+ }
1976
+ }
1977
+ getIssuerDnLink() {
1978
+ return this.issuerDnLink;
1979
+ }
1980
+ // eslint-disable-next-line class-methods-use-this
1981
+ renderErrorState() {
1982
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this certificate.")));
1983
+ }
1984
+ // eslint-disable-next-line class-methods-use-this
1985
+ renderEmptyState() {
1986
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no certificate available.")));
1987
+ }
1988
+ render() {
1989
+ if (this.certificateDecodeError) {
1990
+ return this.renderErrorState();
1991
+ }
1992
+ if (!this.certificateDecoded) {
1993
+ return this.renderEmptyState();
1994
+ }
1995
+ return (index.h(index.Host, { "data-view": this.view }, index.h("table", null, index.h(BasicInformation, Object.assign({}, this.certificateDecoded)), index.h(SubjectName, { name: this.certificateDecoded.subject }), index.h(IssuerName, { name: this.certificateDecoded.issuer, issuerDnLink: this.getIssuerDnLink() }), index.h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), index.h(Signature, { signature: this.certificateDecoded.signature }), index.h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), index.h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (index.h(Miscellaneous, { certificate: this.certificateDecoded })))));
1996
+ }
1997
+ static get watchers() { return {
1998
+ "certificate": ["watchCertificateAndDecode"]
1999
+ }; }
1971
2000
  };
1972
2001
  CertificateViewer.style = certificateViewerCss$1;
1973
2002
 
1974
- const certificateViewerCss$2 = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
2003
+ const certificateViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
1975
2004
 
1976
2005
  const CsrViewer = class {
1977
- constructor(hostRef) {
1978
- index.registerInstance(this, hostRef);
1979
- this.isDecodeInProcess = true;
1980
- this.getAuthKeyIdParentLink = (value) => value;
1981
- this.getAuthKeyIdSiblingsLink = (value) => value;
1982
- this.getSubjectKeyIdChildrenLink = (value) => { var _a; return (_a = this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
1983
- this.getSubjectKeyIdSiblingsLink = (value) => { var _a; return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value); };
1984
- }
1985
- componentWillLoad() {
1986
- this.decodeCertificate(this.certificate);
1987
- }
1988
- async decodeCertificate(certificate) {
1989
- this.isDecodeInProcess = true;
1990
- try {
1991
- if (certificate instanceof CSR) {
1992
- this.certificateDecoded = certificate;
1993
- }
1994
- else if (typeof certificate === 'string') {
1995
- this.certificateDecoded = new CSR(certificate);
1996
- }
1997
- else {
1998
- return;
1999
- }
2000
- this.certificateDecoded.parseAttributes();
2001
- await this.certificateDecoded.getThumbprint('SHA-1');
2002
- await this.certificateDecoded.getThumbprint('SHA-256');
2003
- }
2004
- catch (error) {
2005
- this.certificateDecodeError = error;
2006
- console.error('Error certificate parse:', error);
2007
- }
2008
- this.isDecodeInProcess = false;
2009
- }
2010
- /**
2011
- * Rerun decodeCertificate if previuos value not equal current value
2012
- */
2013
- watchCertificateAndDecode(newValue, oldValue) {
2014
- if (typeof newValue === 'string' && typeof oldValue === 'string') {
2015
- if (newValue !== oldValue) {
2016
- this.decodeCertificate(newValue);
2017
- }
2018
- return;
2019
- }
2020
- if (newValue instanceof CSR
2021
- && oldValue instanceof CSR) {
2022
- if (newValue.commonName !== oldValue.commonName) {
2023
- this.decodeCertificate(newValue);
2024
- }
2025
- }
2026
- }
2027
- // eslint-disable-next-line class-methods-use-this
2028
- renderErrorState() {
2029
- return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this certificate request.")));
2030
- }
2031
- // eslint-disable-next-line class-methods-use-this
2032
- renderEmptyState() {
2033
- return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no certificate request available.")));
2034
- }
2035
- getExtensionRequestAttribute() {
2036
- if (!this.certificateDecoded) {
2037
- return undefined;
2038
- }
2039
- return this.certificateDecoded.attributes
2040
- .find((attribute) => attribute.asn.type === '1.2.840.113549.1.9.14');
2041
- }
2042
- render() {
2043
- if (this.certificateDecodeError) {
2044
- return this.renderErrorState();
2045
- }
2046
- if (!this.certificateDecoded) {
2047
- return this.renderEmptyState();
2048
- }
2049
- const extensionRequestAttribute = this.getExtensionRequestAttribute();
2050
- return (index.h(index.Host, { "data-view": this.view }, index.h("table", null, index.h(BasicInformation, Object.assign({}, this.certificateDecoded)), index.h(SubjectName, { name: this.certificateDecoded.subject }), index.h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), index.h(Signature, { signature: this.certificateDecoded.signature }), index.h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), index.h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), index.h(Extensions, { extensions: extensionRequestAttribute === null || extensionRequestAttribute === void 0 ? void 0 : extensionRequestAttribute.value, title: "Extension Request", getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (index.h(Miscellaneous, { certificate: this.certificateDecoded })))));
2051
- }
2052
- static get watchers() { return {
2053
- "certificate": ["watchCertificateAndDecode"]
2054
- }; }
2055
- };
2056
- CsrViewer.style = certificateViewerCss$2;
2006
+ constructor(hostRef) {
2007
+ index.registerInstance(this, hostRef);
2008
+ this.isDecodeInProcess = true;
2009
+ this.getAuthKeyIdParentLink = (value) => value;
2010
+ this.getAuthKeyIdSiblingsLink = (value) => value;
2011
+ this.getSubjectKeyIdChildrenLink = (value) => {
2012
+ var _a;
2013
+ return (_a = this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
2014
+ };
2015
+ this.getSubjectKeyIdSiblingsLink = (value) => {
2016
+ var _a;
2017
+ return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
2018
+ };
2019
+ }
2020
+ componentWillLoad() {
2021
+ this.decodeCertificate(this.certificate);
2022
+ }
2023
+ async decodeCertificate(certificate) {
2024
+ this.isDecodeInProcess = true;
2025
+ try {
2026
+ if (certificate instanceof CSR) {
2027
+ this.certificateDecoded = certificate;
2028
+ }
2029
+ else if (typeof certificate === 'string') {
2030
+ this.certificateDecoded = new CSR(certificate);
2031
+ }
2032
+ else {
2033
+ return;
2034
+ }
2035
+ this.certificateDecoded.parseAttributes();
2036
+ await this.certificateDecoded.getThumbprint('SHA-1');
2037
+ await this.certificateDecoded.getThumbprint('SHA-256');
2038
+ }
2039
+ catch (error) {
2040
+ this.certificateDecodeError = error;
2041
+ console.error('Error certificate parse:', error);
2042
+ }
2043
+ this.isDecodeInProcess = false;
2044
+ }
2045
+ /**
2046
+ * Rerun decodeCertificate if previuos value not equal current value
2047
+ */
2048
+ watchCertificateAndDecode(newValue, oldValue) {
2049
+ if (typeof newValue === 'string' && typeof oldValue === 'string') {
2050
+ if (newValue !== oldValue) {
2051
+ this.decodeCertificate(newValue);
2052
+ }
2053
+ return;
2054
+ }
2055
+ if (newValue instanceof CSR
2056
+ && oldValue instanceof CSR) {
2057
+ if (newValue.commonName !== oldValue.commonName) {
2058
+ this.decodeCertificate(newValue);
2059
+ }
2060
+ }
2061
+ }
2062
+ // eslint-disable-next-line class-methods-use-this
2063
+ renderErrorState() {
2064
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this certificate request.")));
2065
+ }
2066
+ // eslint-disable-next-line class-methods-use-this
2067
+ renderEmptyState() {
2068
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no certificate request available.")));
2069
+ }
2070
+ getExtensionRequestAttribute() {
2071
+ if (!this.certificateDecoded) {
2072
+ return undefined;
2073
+ }
2074
+ return this.certificateDecoded.attributes
2075
+ .find((attribute) => attribute.asn.type === '1.2.840.113549.1.9.14');
2076
+ }
2077
+ render() {
2078
+ if (this.certificateDecodeError) {
2079
+ return this.renderErrorState();
2080
+ }
2081
+ if (!this.certificateDecoded) {
2082
+ return this.renderEmptyState();
2083
+ }
2084
+ const extensionRequestAttribute = this.getExtensionRequestAttribute();
2085
+ return (index.h(index.Host, { "data-view": this.view }, index.h("table", null, index.h(BasicInformation, Object.assign({}, this.certificateDecoded)), index.h(SubjectName, { name: this.certificateDecoded.subject }), index.h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), index.h(Signature, { signature: this.certificateDecoded.signature }), index.h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), index.h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), index.h(Extensions, { extensions: extensionRequestAttribute === null || extensionRequestAttribute === void 0 ? void 0 : extensionRequestAttribute.value, title: "Extension Request", getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (index.h(Miscellaneous, { certificate: this.certificateDecoded })))));
2086
+ }
2087
+ static get watchers() { return {
2088
+ "certificate": ["watchCertificateAndDecode"]
2089
+ }; }
2090
+ };
2091
+ CsrViewer.style = certificateViewerCss;
2057
2092
 
2058
2093
  const linkCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:inline-block}.link{font-family:\"Open Sans\", \"Arial\", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);font-weight:400;margin:0;padding:0;word-break:break-all}.link_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.link_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.link_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.link_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.link_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.link:hover{text-decoration:none}";
2059
2094
 
2060
2095
  const Link = class {
2061
- constructor(hostRef) {
2062
- index.registerInstance(this, hostRef);
2063
- /**
2064
- * Typography type.
2065
- */
2066
- this.type = 'b3';
2067
- }
2068
- render() {
2069
- return (index.h("a", { href: this.href, target: "_blank", rel: "noreferrer noopener", class: {
2070
- link: true,
2071
- [`link_type_${this.type || 'b3'}`]: true,
2072
- } }, index.h("slot", null)));
2073
- }
2096
+ constructor(hostRef) {
2097
+ index.registerInstance(this, hostRef);
2098
+ /**
2099
+ * Typography type.
2100
+ */
2101
+ this.type = 'b3';
2102
+ }
2103
+ render() {
2104
+ return (index.h("a", { href: this.href, target: "_blank", rel: "noreferrer noopener", class: {
2105
+ link: true,
2106
+ [`link_type_${this.type || 'b3'}`]: true,
2107
+ } }, index.h("slot", null)));
2108
+ }
2074
2109
  };
2075
2110
  Link.style = linkCss;
2076
2111
 
2077
2112
  const textHiderCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}.text{display:inline-block;width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.text.m_opened{white-space:initial}.action{vertical-align:top;display:inline-block;width:60px;text-align:right;position:relative;top:-6px}.button_action{width:30px}.expand_icon{width:7px;height:5px;display:inline-block}.m_opened .expand_icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}";
2078
2113
 
2079
2114
  const TextHider = class {
2080
- constructor(hostRef) {
2081
- index.registerInstance(this, hostRef);
2082
- this.textExpand = index.createEvent(this, "textExpand", 7);
2083
- this.opened = false;
2084
- }
2085
- textExpandHandler() {
2086
- this.opened = !this.opened;
2087
- }
2088
- render() {
2089
- return (index.h(index.Host, null, index.h("div", { class: "root" }, index.h("div", { class: {
2090
- text: true,
2091
- m_opened: this.opened,
2092
- } }, index.h("slot", null)), index.h("div", { class: "action" }, index.h("peculiar-button", { onClick: this.textExpand.emit, class: {
2093
- button_action: true,
2094
- m_opened: this.opened,
2095
- }, fill: this.opened ? 'fill' : 'stroke' }, index.h("svg", { viewBox: "0 0 7 5", xmlns: "http://www.w3.org/2000/svg", class: "expand_icon" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "currentColor", d: "M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z" })))))));
2096
- }
2115
+ constructor(hostRef) {
2116
+ index.registerInstance(this, hostRef);
2117
+ this.textExpand = index.createEvent(this, "textExpand", 7);
2118
+ this.opened = false;
2119
+ }
2120
+ textExpandHandler() {
2121
+ this.opened = !this.opened;
2122
+ }
2123
+ render() {
2124
+ return (index.h(index.Host, null, index.h("div", { class: "root" }, index.h("div", { class: {
2125
+ text: true,
2126
+ m_opened: this.opened,
2127
+ } }, index.h("slot", null)), index.h("div", { class: "action" }, index.h("peculiar-button", { onClick: this.textExpand.emit, class: {
2128
+ button_action: true,
2129
+ m_opened: this.opened,
2130
+ }, fill: this.opened ? 'fill' : 'stroke' }, index.h("svg", { viewBox: "0 0 7 5", xmlns: "http://www.w3.org/2000/svg", class: "expand_icon" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "currentColor", d: "M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z" })))))));
2131
+ }
2097
2132
  };
2098
2133
  TextHider.style = textHiderCss;
2099
2134
 
2100
2135
  const typographyCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block}.typography{font-family:\"Open Sans\", \"Arial\", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);font-weight:400;margin:0;padding:0;display:block}.typography_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.typography_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.typography_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.typography_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.typography_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.typography_color_dark{color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.typography_color_light{color:white;color:rgba(var(--pv-color-light-rgb), 1)}.typography_color_grey_3{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.typography_color_grey_5{color:#869196;color:rgba(var(--pv-color-grey_5-rgb), 1)}.typography_color_attention{color:#f7a831;color:rgba(var(--pv-color-attention-rgb), 1)}.typography_color_primary{color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1)}.typography_ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.typography_monospace{font-family:monospace}.typography_align_left{text-align:left}.typography_align_center{text-align:center}.typography_align_right{text-align:right}";
2101
2136
 
2102
2137
  const PeculiarTypography = class {
2103
- constructor(hostRef) {
2104
- index.registerInstance(this, hostRef);
2105
- /**
2106
- * Typography type.
2107
- */
2108
- this.type = 'b3';
2109
- /**
2110
- * Component color from theme.
2111
- */
2112
- this.color = 'dark';
2113
- }
2114
- render() {
2115
- const TagType = this.type && this.type.includes('h') ? this.type : 'p';
2116
- return (index.h(TagType, { class: {
2117
- typography: true,
2118
- [`typography_type_${this.type || 'b3'}`]: true,
2119
- [`typography_color_${this.color || 'dark'}`]: true,
2120
- [`typography_align_${this.align}`]: !!this.align,
2121
- typography_ellipsis: this.ellipsis,
2122
- typography_monospace: this.monospace,
2123
- } }, index.h("slot", null)));
2124
- }
2138
+ constructor(hostRef) {
2139
+ index.registerInstance(this, hostRef);
2140
+ /**
2141
+ * Typography type.
2142
+ */
2143
+ this.type = 'b3';
2144
+ /**
2145
+ * Component color from theme.
2146
+ */
2147
+ this.color = 'dark';
2148
+ }
2149
+ render() {
2150
+ const TagType = this.type && this.type.includes('h') ? this.type : 'p';
2151
+ return (index.h(TagType, { class: {
2152
+ typography: true,
2153
+ [`typography_type_${this.type || 'b3'}`]: true,
2154
+ [`typography_color_${this.color || 'dark'}`]: true,
2155
+ [`typography_align_${this.align}`]: !!this.align,
2156
+ typography_ellipsis: this.ellipsis,
2157
+ typography_monospace: this.monospace,
2158
+ } }, index.h("slot", null)));
2159
+ }
2125
2160
  };
2126
2161
  PeculiarTypography.style = typographyCss;
2127
2162