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