@peculiar/certificates-viewer 4.6.1 → 4.7.1-alpha.1

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 (252) hide show
  1. package/components/attribute-certificate-viewer.js +4 -2
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/attribute.js +2 -1
  4. package/components/attribute.js.map +1 -1
  5. package/components/certificate-chain-viewer.js +1 -1
  6. package/components/certificate-viewer.js +3 -2
  7. package/components/certificate-viewer.js.map +1 -1
  8. package/components/crl-viewer.js +4 -2
  9. package/components/crl-viewer.js.map +1 -1
  10. package/components/csr-viewer.js +3 -3
  11. package/components/csr-viewer.js.map +1 -1
  12. package/components/download.js +2 -12760
  13. package/components/download.js.map +1 -1
  14. package/components/index.js +2 -1
  15. package/components/index.js.map +1 -1
  16. package/components/index2.js +51 -2
  17. package/components/index2.js.map +1 -1
  18. package/components/issuer_name.js +2 -2
  19. package/components/link.js +14335 -0
  20. package/components/link.js.map +1 -0
  21. package/components/miscellaneous.js +96 -72
  22. package/components/miscellaneous.js.map +1 -1
  23. package/components/peculiar-certificate-decoder.js +32 -16
  24. package/components/peculiar-certificate-decoder.js.map +1 -1
  25. package/components/peculiar-certificates-viewer.js +2 -1
  26. package/components/peculiar-certificates-viewer.js.map +1 -1
  27. package/components/peculiar-ssh-certificate-viewer.d.ts +11 -0
  28. package/components/peculiar-ssh-certificate-viewer.js +12 -0
  29. package/components/peculiar-ssh-certificate-viewer.js.map +1 -0
  30. package/components/peculiar-text-hider.js +1 -32
  31. package/components/peculiar-text-hider.js.map +1 -1
  32. package/components/pkcs10_certificate_request.js +2 -6
  33. package/components/pkcs10_certificate_request.js.map +1 -1
  34. package/components/row.js +87 -0
  35. package/components/row.js.map +1 -0
  36. package/components/ssh-certificate-viewer.js +193 -0
  37. package/components/ssh-certificate-viewer.js.map +1 -0
  38. package/components/subject_name.js +2 -2
  39. package/components/text-hider.js +40 -0
  40. package/components/text-hider.js.map +1 -0
  41. package/dist/cjs/extension-D8YKlAu4.js +110 -0
  42. package/dist/cjs/extension-D8YKlAu4.js.map +1 -0
  43. package/dist/cjs/index.cjs.js +4 -4
  44. package/dist/cjs/loader.cjs.js +1 -1
  45. package/dist/cjs/{miscellaneous-DeBEwLDy.js → miscellaneous-DvVSM5KJ.js} +187 -186
  46. package/dist/cjs/{miscellaneous-DeBEwLDy.js.map → miscellaneous-DvVSM5KJ.js.map} +1 -1
  47. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.cjs.js.map +1 -0
  48. package/dist/cjs/{peculiar-attribute-certificate-viewer_4.cjs.entry.js → peculiar-attribute-certificate-viewer_5.cjs.entry.js} +240 -38
  49. package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -0
  50. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -20
  51. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  52. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  53. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -3
  54. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  55. package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
  56. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +23 -22
  57. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  58. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
  59. package/dist/cjs/peculiar.cjs.js +1 -1
  60. package/dist/cjs/pkcs10_certificate_request-BoHhadiA.js +146 -0
  61. package/dist/cjs/pkcs10_certificate_request-BoHhadiA.js.map +1 -0
  62. package/dist/cjs/{certification_request-CxHe71zR.js → ssh_certificate-s3-rwdMT.js} +1734 -126
  63. package/dist/cjs/ssh_certificate-s3-rwdMT.js.map +1 -0
  64. package/dist/cjs/{x509_certificate-CzplJQ0X.js → x509_certificate-DfXuxxZp.js} +29 -28
  65. package/dist/cjs/{x509_certificate-CzplJQ0X.js.map → x509_certificate-DfXuxxZp.js.map} +1 -1
  66. package/dist/cjs/{x509_crl-B7kFbLDV.js → x509_crl-CxJ2lyGX.js} +32 -31
  67. package/dist/cjs/{x509_crl-B7kFbLDV.js.map → x509_crl-CxJ2lyGX.js.map} +1 -1
  68. package/dist/collection/collection-manifest.json +1 -0
  69. package/dist/collection/components/certificate-decoder/certificate-decoder.js +10 -6
  70. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  71. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js +25 -0
  72. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js.map +1 -0
  73. package/dist/collection/components/certificate-details-parts/attributes/index.js +10 -1
  74. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
  75. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js +27 -0
  76. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js.map +1 -0
  77. package/dist/collection/components/csr-viewer/csr-viewer.js +2 -2
  78. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  79. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +29 -0
  80. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -0
  81. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js +26 -0
  82. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js.map +1 -0
  83. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js +26 -0
  84. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js.map +1 -0
  85. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +193 -0
  86. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -0
  87. package/dist/collection/constants/oids.js +2 -0
  88. package/dist/collection/constants/oids.js.map +1 -1
  89. package/dist/collection/crypto/attribute.js +2 -0
  90. package/dist/collection/crypto/attribute.js.map +1 -1
  91. package/dist/collection/crypto/index.js +1 -0
  92. package/dist/collection/crypto/index.js.map +1 -1
  93. package/dist/collection/crypto/pkcs10_certificate_request.js +0 -7
  94. package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
  95. package/dist/collection/crypto/ssh_certificate.js +68 -0
  96. package/dist/collection/crypto/ssh_certificate.js.map +1 -0
  97. package/dist/collection/locales/en.json +5 -1
  98. package/dist/esm/extension-oK2qpCU6.js +107 -0
  99. package/dist/esm/extension-oK2qpCU6.js.map +1 -0
  100. package/dist/esm/index.js +2 -2
  101. package/dist/esm/loader.js +1 -1
  102. package/dist/esm/{miscellaneous-bVeJt-6m.js → miscellaneous-DrmTXljc.js} +4 -3
  103. package/dist/{esm-es5/miscellaneous-bVeJt-6m.js.map → esm/miscellaneous-DrmTXljc.js.map} +1 -1
  104. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  105. package/dist/esm/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +215 -14
  106. package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  107. package/dist/esm/peculiar-certificate-decoder.entry.js +14 -9
  108. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  109. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -3
  110. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  111. package/dist/esm/peculiar-certificates-viewer.entry.js +3 -2
  112. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  113. package/dist/esm/peculiar.js +1 -1
  114. package/dist/esm/{pkcs10_certificate_request-CK8FH47X.js → pkcs10_certificate_request-Bdt_qA_g.js} +4 -8
  115. package/dist/esm/pkcs10_certificate_request-Bdt_qA_g.js.map +1 -0
  116. package/dist/esm/{certification_request-PeMaLTUD.js → ssh_certificate-Ct-r021h.js} +1682 -115
  117. package/dist/esm/ssh_certificate-Ct-r021h.js.map +1 -0
  118. package/dist/esm/{x509_certificate-CEEWtU_T.js → x509_certificate-5DEbrOA7.js} +4 -3
  119. package/dist/{esm-es5/x509_certificate-CEEWtU_T.js.map → esm/x509_certificate-5DEbrOA7.js.map} +1 -1
  120. package/dist/esm/{x509_crl-BcZd9KVn.js → x509_crl-CPgNUkh7.js} +5 -4
  121. package/dist/{esm-es5/x509_crl-BcZd9KVn.js.map → esm/x509_crl-CPgNUkh7.js.map} +1 -1
  122. package/dist/esm-es5/extension-oK2qpCU6.js +12 -0
  123. package/dist/esm-es5/extension-oK2qpCU6.js.map +1 -0
  124. package/dist/esm-es5/index.js +1 -1
  125. package/dist/esm-es5/loader.js +2 -2
  126. package/dist/esm-es5/{miscellaneous-bVeJt-6m.js → miscellaneous-DrmTXljc.js} +2 -2
  127. package/dist/{esm/miscellaneous-bVeJt-6m.js.map → esm-es5/miscellaneous-DrmTXljc.js.map} +1 -1
  128. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  129. package/dist/esm-es5/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +39 -4
  130. package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  131. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  132. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  133. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  134. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  135. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  136. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  137. package/dist/esm-es5/peculiar.js +1 -1
  138. package/dist/esm-es5/pkcs10_certificate_request-Bdt_qA_g.js +19 -0
  139. package/dist/esm-es5/pkcs10_certificate_request-Bdt_qA_g.js.map +1 -0
  140. package/dist/esm-es5/{certification_request-PeMaLTUD.js → ssh_certificate-Ct-r021h.js} +7 -14
  141. package/dist/esm-es5/ssh_certificate-Ct-r021h.js.map +1 -0
  142. package/dist/esm-es5/{x509_certificate-CEEWtU_T.js → x509_certificate-5DEbrOA7.js} +4 -4
  143. package/dist/{esm/x509_certificate-CEEWtU_T.js.map → esm-es5/x509_certificate-5DEbrOA7.js.map} +1 -1
  144. package/dist/esm-es5/{x509_crl-BcZd9KVn.js → x509_crl-CPgNUkh7.js} +2 -2
  145. package/dist/{esm/x509_crl-BcZd9KVn.js.map → esm-es5/x509_crl-CPgNUkh7.js.map} +1 -1
  146. package/dist/peculiar/index.esm.js +1 -1
  147. package/dist/peculiar/locales/en.json +5 -1
  148. package/dist/peculiar/{p-5479a530.entry.js → p-0b895a8e.entry.js} +2 -2
  149. package/dist/peculiar/{p-84f69023.system.entry.js → p-11434880.system.entry.js} +2 -2
  150. package/dist/peculiar/{p-C9sY8yng.system.js → p-2GQYAR0v.system.js} +3 -3
  151. package/dist/peculiar/{p-C9sY8yng.system.js.map → p-2GQYAR0v.system.js.map} +1 -1
  152. package/dist/peculiar/p-364fd32b.system.entry.js +5 -0
  153. package/dist/peculiar/{p-14fcbc5c.system.entry.js.map → p-364fd32b.system.entry.js.map} +1 -1
  154. package/dist/peculiar/p-5df0f22b.system.entry.js +146 -0
  155. package/dist/peculiar/p-5df0f22b.system.entry.js.map +1 -0
  156. package/dist/peculiar/p-62b723f6.entry.js +145 -0
  157. package/dist/peculiar/p-62b723f6.entry.js.map +1 -0
  158. package/dist/peculiar/p-83a53b4f.entry.js +5 -0
  159. package/dist/peculiar/{p-0de4837d.entry.js.map → p-83a53b4f.entry.js.map} +1 -1
  160. package/dist/peculiar/p-B2G7qjfV.js +369 -0
  161. package/dist/peculiar/{p-CGRNSrHk.js.map → p-B2G7qjfV.js.map} +1 -1
  162. package/dist/peculiar/{p-BypepohK.system.js.map → p-BCsPspKr.system.js.map} +1 -1
  163. package/dist/peculiar/p-BGASC3UX.system.js +1 -1
  164. package/dist/peculiar/p-BGIWeG8l.js +12 -0
  165. package/dist/peculiar/p-BGIWeG8l.js.map +1 -0
  166. package/dist/peculiar/{p-DRvp86xt.system.js → p-BQiABBi1.system.js} +5 -5
  167. package/dist/peculiar/{p-DRvp86xt.system.js.map → p-BQiABBi1.system.js.map} +1 -1
  168. package/dist/peculiar/{p-CezfC5i1.system.js → p-BeVuAzsd.system.js} +42 -42
  169. package/dist/peculiar/{p-CezfC5i1.system.js.map → p-BeVuAzsd.system.js.map} +1 -1
  170. package/dist/peculiar/{p-CZwhKPgb.system.js → p-C31rbtuG.system.js} +2 -2
  171. package/dist/peculiar/p-C31rbtuG.system.js.map +1 -0
  172. package/dist/peculiar/p-Ce-IF7_R.system.js.map +1 -0
  173. package/dist/peculiar/p-ClkgAXnd.system.js +135 -0
  174. package/dist/peculiar/p-ClkgAXnd.system.js.map +1 -0
  175. package/dist/peculiar/p-Ct-r021h.js +135 -0
  176. package/dist/peculiar/p-Ct-r021h.js.map +1 -0
  177. package/dist/peculiar/{p-BaebEpW0.system.js.map → p-CxtUQdcj.system.js.map} +1 -1
  178. package/dist/peculiar/{p-DrmgUhyv.js → p-D9qq15zG.js} +4 -4
  179. package/dist/peculiar/{p-DrmgUhyv.js.map → p-D9qq15zG.js.map} +1 -1
  180. package/dist/peculiar/{p-CjWRKsN-.js → p-DOpiv0-8.js} +3 -3
  181. package/dist/peculiar/{p-CjWRKsN-.js.map → p-DOpiv0-8.js.map} +1 -1
  182. package/dist/peculiar/p-IOtHTzYC.system.js +12 -0
  183. package/dist/peculiar/p-IOtHTzYC.system.js.map +1 -0
  184. package/dist/peculiar/p-LmKU8Smy.system.js.map +1 -0
  185. package/dist/peculiar/p-RWPI76Dh.js +19 -0
  186. package/dist/peculiar/p-RWPI76Dh.js.map +1 -0
  187. package/dist/peculiar/p-da9eb1e7.entry.js +5 -0
  188. package/dist/peculiar/p-da9eb1e7.entry.js.map +1 -0
  189. package/dist/peculiar/p-fd98bb82.system.entry.js +5 -0
  190. package/dist/peculiar/p-fd98bb82.system.entry.js.map +1 -0
  191. package/dist/peculiar/{p-J1t5v5N3.system.js → p-zQwWLfga.system.js} +4 -4
  192. package/dist/peculiar/p-zQwWLfga.system.js.map +1 -0
  193. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.esm.js.map +1 -0
  194. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  195. package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -1
  196. package/dist/peculiar/peculiar-certificates-viewer.entry.esm.js.map +1 -1
  197. package/dist/peculiar/peculiar.esm.js +1 -1
  198. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +4 -4
  199. package/dist/types/components/certificate-details-parts/attributes/extension_request_attribute.d.ts +15 -0
  200. package/dist/types/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.d.ts +15 -0
  201. package/dist/types/components/ssh-certificate-viewer/-components/basic_information.d.ts +21 -0
  202. package/dist/types/components/ssh-certificate-viewer/-components/public_key.d.ts +14 -0
  203. package/dist/types/components/ssh-certificate-viewer/-components/signature_key.d.ts +14 -0
  204. package/dist/types/components/ssh-certificate-viewer/ssh-certificate-viewer.d.ts +43 -0
  205. package/dist/types/components.d.ts +43 -0
  206. package/dist/types/constants/oids.d.ts +2 -0
  207. package/dist/types/crypto/attribute.d.ts +2 -0
  208. package/dist/types/crypto/index.d.ts +1 -0
  209. package/dist/types/crypto/pkcs10_certificate_request.d.ts +0 -2
  210. package/dist/types/crypto/ssh_certificate.d.ts +28 -0
  211. package/dist/types/utils/l10n.d.ts +4 -0
  212. package/hydrate/index.js +1908 -33
  213. package/hydrate/index.mjs +1908 -33
  214. package/package.json +4 -2
  215. package/dist/cjs/certification_request-CxHe71zR.js.map +0 -1
  216. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +0 -1
  217. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +0 -1
  218. package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js +0 -150
  219. package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js.map +0 -1
  220. package/dist/esm/certification_request-PeMaLTUD.js.map +0 -1
  221. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  222. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  223. package/dist/esm/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
  224. package/dist/esm-es5/certification_request-PeMaLTUD.js.map +0 -1
  225. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  226. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  227. package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js +0 -19
  228. package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
  229. package/dist/peculiar/p-00d6f11f.system.entry.js +0 -111
  230. package/dist/peculiar/p-00d6f11f.system.entry.js.map +0 -1
  231. package/dist/peculiar/p-0de4837d.entry.js +0 -5
  232. package/dist/peculiar/p-14fcbc5c.system.entry.js +0 -5
  233. package/dist/peculiar/p-315805ce.entry.js +0 -5
  234. package/dist/peculiar/p-315805ce.entry.js.map +0 -1
  235. package/dist/peculiar/p-591a9019.system.entry.js +0 -5
  236. package/dist/peculiar/p-591a9019.system.entry.js.map +0 -1
  237. package/dist/peculiar/p-BipKYW6e.system.js +0 -142
  238. package/dist/peculiar/p-BipKYW6e.system.js.map +0 -1
  239. package/dist/peculiar/p-BloT0Xj9.system.js.map +0 -1
  240. package/dist/peculiar/p-CGRNSrHk.js +0 -369
  241. package/dist/peculiar/p-CZwhKPgb.system.js.map +0 -1
  242. package/dist/peculiar/p-D1eNnGDF.js +0 -19
  243. package/dist/peculiar/p-D1eNnGDF.js.map +0 -1
  244. package/dist/peculiar/p-ITVWR0oT.system.js.map +0 -1
  245. package/dist/peculiar/p-J1t5v5N3.system.js.map +0 -1
  246. package/dist/peculiar/p-PeMaLTUD.js +0 -142
  247. package/dist/peculiar/p-PeMaLTUD.js.map +0 -1
  248. package/dist/peculiar/p-c8b3766a.entry.js +0 -110
  249. package/dist/peculiar/p-c8b3766a.entry.js.map +0 -1
  250. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +0 -1
  251. /package/dist/peculiar/{p-5479a530.entry.js.map → p-0b895a8e.entry.js.map} +0 -0
  252. /package/dist/peculiar/{p-84f69023.system.entry.js.map → p-11434880.system.entry.js.map} +0 -0
package/hydrate/index.mjs CHANGED
@@ -9987,6 +9987,10 @@ const crlEntryExtensions = "CRL Entry Extensions";
9987
9987
  const previewCertificate = "Preview certificate";
9988
9988
  const viewDetails = "View details";
9989
9989
  const downloadOptions = "Download options";
9990
+ const keyId = "Key ID";
9991
+ const principals = "Principals";
9992
+ const criticalOptions = "Critical Options";
9993
+ const signingCA = "Signing CA";
9990
9994
  var en = {
9991
9995
  basicInformation: basicInformation,
9992
9996
  subjectName: subjectName,
@@ -10034,7 +10038,11 @@ var en = {
10034
10038
  crlEntryExtensions: crlEntryExtensions,
10035
10039
  previewCertificate: previewCertificate,
10036
10040
  viewDetails: viewDetails,
10037
- downloadOptions: downloadOptions
10041
+ downloadOptions: downloadOptions,
10042
+ keyId: keyId,
10043
+ principals: principals,
10044
+ criticalOptions: criticalOptions,
10045
+ signingCA: signingCA
10038
10046
  };
10039
10047
 
10040
10048
  /**
@@ -11400,6 +11408,7 @@ const OIDs = {
11400
11408
  '1.3.6.1.4.1.16334.509.2.3': 'Ngc Class3',
11401
11409
  '1.3.6.1.4.1.17326.10.8.12.1.2': 'Camerfirma EV policy',
11402
11410
  '1.3.6.1.4.1.17326.10.14.2.1.2': 'Camerfirma EV policy',
11411
+ '1.3.6.1.4.1.22112.2.1': 'Private Key Possession Statement',
11403
11412
  '1.3.6.1.4.1.22234.2.5.2.3.1': 'Cert Plus EV policy',
11404
11413
  '1.3.6.1.4.1.23223.1.1.1': 'Start Com EV policy',
11405
11414
  '1.3.6.1.4.1.23629.1.4.2.1.1': 'Safenet Usage Limit',
@@ -11793,6 +11802,7 @@ const OIDs = {
11793
11802
  '1.3.132.0.37': 'Sect409r1',
11794
11803
  '1.3.132.0.38': 'Sect571k1',
11795
11804
  '1.3.132.0.39': 'Sect571r1',
11805
+ '1.3.132.1.12': 'ECDH',
11796
11806
  '1.3.133.16.840.9.84': 'x984',
11797
11807
  '1.3.133.16.840.9.84.0': 'x984 Module',
11798
11808
  '1.3.133.16.840.9.84.0.1': 'x984 Biometrics',
@@ -12570,13 +12580,13 @@ function camelCaseToWords(value) {
12570
12580
  * This source code is licensed under the MIT license found in the
12571
12581
  * LICENSE file in the root directory of this source tree.
12572
12582
  */
12573
- var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12583
+ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12574
12584
  if (kind === "m") throw new TypeError("Private method is not writable");
12575
12585
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12576
12586
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
12577
12587
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12578
12588
  };
12579
- var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12589
+ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12580
12590
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12581
12591
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12582
12592
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12586,15 +12596,15 @@ class Name {
12586
12596
  constructor(data) {
12587
12597
  _Name_asn.set(this, new Name$1());
12588
12598
  if (BufferSourceConverter.isBufferSource(data)) {
12589
- __classPrivateFieldSet$1(this, _Name_asn, AsnParser.parse(data, Name$1), "f");
12599
+ __classPrivateFieldSet$2(this, _Name_asn, AsnParser.parse(data, Name$1), "f");
12590
12600
  }
12591
12601
  else {
12592
- __classPrivateFieldSet$1(this, _Name_asn, data, "f");
12602
+ __classPrivateFieldSet$2(this, _Name_asn, data, "f");
12593
12603
  }
12594
12604
  }
12595
12605
  toJSON() {
12596
12606
  const res = [];
12597
- __classPrivateFieldGet$1(this, _Name_asn, "f").forEach((o) => (o.forEach((a) => {
12607
+ __classPrivateFieldGet$2(this, _Name_asn, "f").forEach((o) => (o.forEach((a) => {
12598
12608
  res.push({
12599
12609
  type: a.type,
12600
12610
  name: OIDs[a.type],
@@ -14158,13 +14168,13 @@ __decorate([
14158
14168
  * This source code is licensed under the MIT license found in the
14159
14169
  * LICENSE file in the root directory of this source tree.
14160
14170
  */
14161
- var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14171
+ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14162
14172
  if (kind === "m") throw new TypeError("Private method is not writable");
14163
14173
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14164
14174
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14165
14175
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14166
14176
  };
14167
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14177
+ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14168
14178
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14169
14179
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14170
14180
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14177,20 +14187,20 @@ class AsnData {
14177
14187
  _AsnData_raw.set(this, void 0);
14178
14188
  if (args.length === 1) {
14179
14189
  // asn
14180
- __classPrivateFieldSet(this, _AsnData_asn, args[0], "f");
14181
- __classPrivateFieldSet(this, _AsnData_raw, AsnConvert.serialize(__classPrivateFieldGet(this, _AsnData_asn, "f")), "f");
14190
+ __classPrivateFieldSet$1(this, _AsnData_asn, args[0], "f");
14191
+ __classPrivateFieldSet$1(this, _AsnData_raw, AsnConvert.serialize(__classPrivateFieldGet$1(this, _AsnData_asn, "f")), "f");
14182
14192
  }
14183
14193
  else {
14184
14194
  // raw, type
14185
- __classPrivateFieldSet(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
14186
- __classPrivateFieldSet(this, _AsnData_raw, BufferSourceConverter.toArrayBuffer(args[0]), "f");
14195
+ __classPrivateFieldSet$1(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
14196
+ __classPrivateFieldSet$1(this, _AsnData_raw, BufferSourceConverter.toArrayBuffer(args[0]), "f");
14187
14197
  }
14188
14198
  }
14189
14199
  get asn() {
14190
- return __classPrivateFieldGet(this, _AsnData_asn, "f");
14200
+ return __classPrivateFieldGet$1(this, _AsnData_asn, "f");
14191
14201
  }
14192
14202
  get raw() {
14193
- return __classPrivateFieldGet(this, _AsnData_raw, "f");
14203
+ return __classPrivateFieldGet$1(this, _AsnData_raw, "f");
14194
14204
  }
14195
14205
  }
14196
14206
  _AsnData_asn = new WeakMap(), _AsnData_raw = new WeakMap();
@@ -16215,6 +16225,22 @@ SMIMECapabilities = SMIMECapabilities_1 = __decorate$1([
16215
16225
  AsnType({ type: AsnTypeTypes.Sequence, itemType: SMIMECapability })
16216
16226
  ], SMIMECapabilities);
16217
16227
 
16228
+ const id_at_statementOfPossession = "1.3.6.1.4.1.22112.2.1";
16229
+ let PrivateKeyPossessionStatement = class PrivateKeyPossessionStatement {
16230
+ constructor(params = {}) {
16231
+ Object.assign(this, params);
16232
+ }
16233
+ };
16234
+ __decorate$1([
16235
+ AsnProp({ type: IssuerAndSerialNumber })
16236
+ ], PrivateKeyPossessionStatement.prototype, "signer", void 0);
16237
+ __decorate$1([
16238
+ AsnProp({ type: Certificate, optional: true })
16239
+ ], PrivateKeyPossessionStatement.prototype, "cert", void 0);
16240
+ PrivateKeyPossessionStatement = __decorate$1([
16241
+ AsnType({ type: AsnTypeTypes.Sequence })
16242
+ ], PrivateKeyPossessionStatement);
16243
+
16218
16244
  /**
16219
16245
  * @license
16220
16246
  * Copyright (c) Peculiar Ventures, LLC.
@@ -16235,6 +16261,7 @@ const attributesParsers = {
16235
16261
  [id_pkcs9_at_challengePassword]: ChallengePassword,
16236
16262
  [id_pkcs9_at_unstructuredName]: UnstructuredName,
16237
16263
  [id_pkcs9_at_extensionRequest]: ExtensionRequest,
16264
+ [id_at_statementOfPossession]: PrivateKeyPossessionStatement,
16238
16265
  };
16239
16266
  class Attribute extends AsnData {
16240
16267
  getAsnExtnValue() {
@@ -16463,11 +16490,6 @@ class Pkcs10CertificateRequest extends AsnData {
16463
16490
  if (certificationRequestInfo.attributes) {
16464
16491
  this.attributes = certificationRequestInfo.attributes
16465
16492
  .map((e) => new Attribute(AsnConvert.serialize(e)));
16466
- const extensionRequestAttribute = this.attributes.find((attribute) => attribute.asn.type === id_pkcs9_at_extensionRequest);
16467
- if (extensionRequestAttribute) {
16468
- this.extensions = extensionRequestAttribute.value
16469
- .map((e) => new Extension(AsnConvert.serialize(e)));
16470
- }
16471
16493
  }
16472
16494
  }
16473
16495
  toString(format = 'pem') {
@@ -16626,6 +16648,1645 @@ class X509Certificates extends Array {
16626
16648
  }
16627
16649
  }
16628
16650
 
16651
+ let globalCrypto = globalThis.crypto;
16652
+ function getCrypto() {
16653
+ return globalCrypto;
16654
+ }
16655
+
16656
+ class SshError extends Error {
16657
+ code;
16658
+ constructor(message, code) {
16659
+ super(message);
16660
+ this.code = code;
16661
+ this.name = this.constructor.name;
16662
+ if (Error.captureStackTrace) {
16663
+ Error.captureStackTrace(this, this.constructor);
16664
+ }
16665
+ }
16666
+ }
16667
+ class UnsupportedAlgorithmError extends SshError {
16668
+ constructor(algorithm, supportedAlgorithms) {
16669
+ const supported = supportedAlgorithms ? ` Supported: ${supportedAlgorithms.join(', ')}` : '';
16670
+ super(`Unsupported algorithm: ${algorithm}.${supported}`, 'UNSUPPORTED_ALGORITHM');
16671
+ }
16672
+ }
16673
+ class InvalidFormatError extends SshError {
16674
+ constructor(format, expectedFormat) {
16675
+ const expected = expectedFormat ? ` Expected: ${expectedFormat}` : '';
16676
+ super(`Invalid format: ${format}.${expected}`, 'INVALID_FORMAT');
16677
+ }
16678
+ }
16679
+ class UnsupportedKeyTypeError extends SshError {
16680
+ constructor(keyType, supportedTypes) {
16681
+ const supported = supportedTypes ? ` Supported: ${supportedTypes.join(', ')}` : '';
16682
+ super(`Unsupported key type: ${keyType}.${supported}`, 'UNSUPPORTED_KEY_TYPE');
16683
+ }
16684
+ }
16685
+ class InvalidPrivateKeyFormatError extends SshError {
16686
+ constructor(details) {
16687
+ const message = details
16688
+ ? `Invalid SSH private key format: ${details}`
16689
+ : 'Invalid SSH private key format';
16690
+ super(message, 'INVALID_PRIVATE_KEY_FORMAT');
16691
+ }
16692
+ }
16693
+ class EncryptedKeyNotSupportedError extends SshError {
16694
+ constructor(cipher) {
16695
+ const message = cipher
16696
+ ? `Encrypted SSH private keys are not supported (cipher: ${cipher})`
16697
+ : 'Encrypted SSH private keys are not supported';
16698
+ super(message, 'ENCRYPTED_KEY_NOT_SUPPORTED');
16699
+ }
16700
+ }
16701
+ class InvalidKeyDataError extends SshError {
16702
+ constructor(details) {
16703
+ const message = details ? `Invalid key data: ${details}` : 'Invalid key data';
16704
+ super(message, 'INVALID_KEY_DATA');
16705
+ }
16706
+ }
16707
+ class UnexpectedEOFError extends SshError {
16708
+ constructor(expected, actual) {
16709
+ const details = expected !== undefined && actual !== undefined
16710
+ ? ` Expected ${expected} bytes, got ${actual}`
16711
+ : '';
16712
+ super(`Unexpected end of data${details}`, 'UNEXPECTED_EOF');
16713
+ }
16714
+ }
16715
+
16716
+ const encoder = new TextEncoder();
16717
+ const decoder = new TextDecoder();
16718
+
16719
+ class SshReader {
16720
+ buffer;
16721
+ offset;
16722
+ constructor(data) {
16723
+ this.buffer = data;
16724
+ this.offset = 0;
16725
+ }
16726
+ readUint8() {
16727
+ if (this.offset >= this.buffer.length) {
16728
+ throw new UnexpectedEOFError(1, 0);
16729
+ }
16730
+ return this.buffer[this.offset++];
16731
+ }
16732
+ readUint32() {
16733
+ const value = (this.readUint8() << 24) |
16734
+ (this.readUint8() << 16) |
16735
+ (this.readUint8() << 8) |
16736
+ this.readUint8();
16737
+ return value >>> 0;
16738
+ }
16739
+ readUint64() {
16740
+ const high = this.readUint32();
16741
+ const low = this.readUint32();
16742
+ return (BigInt(high) << 32n) | BigInt(low);
16743
+ }
16744
+ readBytes(length) {
16745
+ if (length < 0) {
16746
+ throw new InvalidFormatError(`Invalid length: ${length}`);
16747
+ }
16748
+ if (this.offset + length > this.buffer.length) {
16749
+ throw new UnexpectedEOFError(length, this.buffer.length - this.offset);
16750
+ }
16751
+ const result = this.buffer.subarray(this.offset, this.offset + length);
16752
+ this.offset += length;
16753
+ return result;
16754
+ }
16755
+ readString() {
16756
+ const length = this.readUint32();
16757
+ const bytes = this.readBytes(length);
16758
+ return decoder.decode(bytes);
16759
+ }
16760
+ peekString(length) {
16761
+ if (this.offset + length > this.buffer.length) {
16762
+ throw new UnexpectedEOFError(length, this.buffer.length - this.offset);
16763
+ }
16764
+ const bytes = this.buffer.subarray(this.offset, this.offset + length);
16765
+ return decoder.decode(bytes);
16766
+ }
16767
+ readMpInt(sshEncoding = false) {
16768
+ const length = this.readUint32();
16769
+ const bytes = this.readBytes(length);
16770
+ if (sshEncoding && bytes.length > 1 && bytes[0] === 0x00) {
16771
+ return bytes.subarray(1);
16772
+ }
16773
+ return bytes;
16774
+ }
16775
+ readMpIntSsh() {
16776
+ return this.readMpInt(true);
16777
+ }
16778
+ remaining() {
16779
+ return this.buffer.length - this.offset;
16780
+ }
16781
+ getOffset() {
16782
+ return this.offset;
16783
+ }
16784
+ seek(offset) {
16785
+ if (offset < 0 || offset > this.buffer.length) {
16786
+ throw new InvalidFormatError(`Invalid offset: ${offset}. Buffer length: ${this.buffer.length}`);
16787
+ }
16788
+ this.offset = offset;
16789
+ }
16790
+ }
16791
+
16792
+ class SshWriter {
16793
+ buffer;
16794
+ offset;
16795
+ constructor(initialSize = 1024) {
16796
+ this.buffer = new Uint8Array(initialSize);
16797
+ this.offset = 0;
16798
+ }
16799
+ ensureCapacity(additional) {
16800
+ const required = this.offset + additional;
16801
+ if (required > this.buffer.length) {
16802
+ const newSize = Math.max(required, this.buffer.length * 2);
16803
+ const newBuffer = new Uint8Array(newSize);
16804
+ newBuffer.set(this.buffer.subarray(0, this.offset));
16805
+ this.buffer = newBuffer;
16806
+ }
16807
+ }
16808
+ reserve(minCapacity) {
16809
+ if (minCapacity > this.buffer.length) {
16810
+ const newBuffer = new Uint8Array(minCapacity);
16811
+ newBuffer.set(this.buffer.subarray(0, this.offset));
16812
+ this.buffer = newBuffer;
16813
+ }
16814
+ }
16815
+ writeUint8(value) {
16816
+ this.ensureCapacity(1);
16817
+ this.buffer[this.offset++] = value & 0xff;
16818
+ }
16819
+ writeUint32(value) {
16820
+ this.ensureCapacity(4);
16821
+ this.buffer[this.offset++] = (value >>> 24) & 0xff;
16822
+ this.buffer[this.offset++] = (value >>> 16) & 0xff;
16823
+ this.buffer[this.offset++] = (value >>> 8) & 0xff;
16824
+ this.buffer[this.offset++] = value & 0xff;
16825
+ }
16826
+ writeUint64(value) {
16827
+ this.ensureCapacity(8);
16828
+ const high = Number(value >> 32n);
16829
+ const low = Number(value & 0xffffffffn);
16830
+ this.writeUint32(high);
16831
+ this.writeUint32(low);
16832
+ }
16833
+ writeBytes(data) {
16834
+ this.ensureCapacity(data.length);
16835
+ this.buffer.set(data, this.offset);
16836
+ this.offset += data.length;
16837
+ }
16838
+ writeString(value) {
16839
+ const bytes = encoder.encode(value);
16840
+ this.writeUint32(bytes.length);
16841
+ this.writeBytes(bytes);
16842
+ }
16843
+ writeMpInt(value, sshEncoding = false) {
16844
+ if (sshEncoding && value.length > 0 && (value[0] & 0x80) !== 0) {
16845
+ const paddedBytes = new Uint8Array(value.length + 1);
16846
+ paddedBytes[0] = 0x00;
16847
+ paddedBytes.set(value, 1);
16848
+ this.writeUint32(paddedBytes.length);
16849
+ this.writeBytes(paddedBytes);
16850
+ }
16851
+ else {
16852
+ this.writeUint32(value.length);
16853
+ this.writeBytes(value);
16854
+ }
16855
+ }
16856
+ writeMpIntSsh(value) {
16857
+ this.writeMpInt(value, true);
16858
+ }
16859
+ toUint8Array() {
16860
+ return this.buffer.subarray(0, this.offset);
16861
+ }
16862
+ getOffset() {
16863
+ return this.offset;
16864
+ }
16865
+ seek(offset) {
16866
+ if (offset < 0 || offset > this.buffer.length) {
16867
+ throw new InvalidFormatError('Invalid offset');
16868
+ }
16869
+ this.offset = offset;
16870
+ }
16871
+ }
16872
+
16873
+ class RsaBinding {
16874
+ hash = 'SHA-256';
16875
+ constructor(hash = 'SHA-256') {
16876
+ this.hash = hash;
16877
+ }
16878
+ async importPublicSsh(params) {
16879
+ const { blob, crypto } = params;
16880
+ const reader = new SshReader(blob);
16881
+ reader.readString();
16882
+ const e = reader.readMpInt(true);
16883
+ const n = reader.readMpInt(true);
16884
+ const jwk = {
16885
+ kty: 'RSA',
16886
+ n: Convert.ToBase64Url(n),
16887
+ e: Convert.ToBase64Url(e),
16888
+ };
16889
+ return crypto.subtle.importKey('jwk', jwk, {
16890
+ name: 'RSASSA-PKCS1-v1_5',
16891
+ hash: this.hash,
16892
+ }, true, ['verify']);
16893
+ }
16894
+ async exportPublicSsh(params) {
16895
+ const { publicKey, crypto } = params;
16896
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
16897
+ if (!jwk.n || !jwk.e) {
16898
+ throw new InvalidKeyDataError('RSA JWK missing required parameters (n, e)');
16899
+ }
16900
+ const n = BufferSourceConverter.toUint8Array(Convert.FromBase64Url(jwk.n));
16901
+ const e = BufferSourceConverter.toUint8Array(Convert.FromBase64Url(jwk.e));
16902
+ const writer = new SshWriter();
16903
+ writer.writeString('ssh-rsa');
16904
+ writer.writeMpInt(e, true);
16905
+ writer.writeMpInt(n, true);
16906
+ return writer.toUint8Array();
16907
+ }
16908
+ async importPublicSpki(params) {
16909
+ const { spki, crypto } = params;
16910
+ return crypto.subtle.importKey('spki', spki, {
16911
+ name: 'RSASSA-PKCS1-v1_5',
16912
+ hash: this.hash,
16913
+ }, true, ['verify']);
16914
+ }
16915
+ async exportPublicSpki(params) {
16916
+ const { publicKey, crypto } = params;
16917
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
16918
+ return BufferSourceConverter.toUint8Array(spki);
16919
+ }
16920
+ async importPrivatePkcs8(params) {
16921
+ const { pkcs8, crypto } = params;
16922
+ return crypto.subtle.importKey('pkcs8', pkcs8, {
16923
+ name: 'RSASSA-PKCS1-v1_5',
16924
+ hash: this.hash,
16925
+ }, true, ['sign']);
16926
+ }
16927
+ async exportPrivatePkcs8(params) {
16928
+ const { privateKey, crypto } = params;
16929
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
16930
+ return BufferSourceConverter.toUint8Array(pkcs8);
16931
+ }
16932
+ async importPrivateSsh(params) {
16933
+ const { sshKey, crypto } = params;
16934
+ const base64Data = sshKey
16935
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
16936
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
16937
+ .replace(/\s/g, '');
16938
+ const binaryData = Convert.FromBase64(base64Data);
16939
+ const reader = new SshReader(BufferSourceConverter.toUint8Array(binaryData));
16940
+ const magic = reader.readBytes(15);
16941
+ if (Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
16942
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
16943
+ }
16944
+ const _cipherName = reader.readString();
16945
+ reader.readString();
16946
+ reader.readString();
16947
+ if (_cipherName !== 'none') {
16948
+ throw new EncryptedKeyNotSupportedError(_cipherName);
16949
+ }
16950
+ const numKeys = reader.readUint32();
16951
+ if (numKeys !== 1) {
16952
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
16953
+ }
16954
+ const publicKeyLength = reader.readUint32();
16955
+ reader.readBytes(publicKeyLength);
16956
+ const privateKeyLength = reader.readUint32();
16957
+ const privateKeyData = reader.readBytes(privateKeyLength);
16958
+ const privateReader = new SshReader(privateKeyData);
16959
+ const checkint1 = privateReader.readUint32();
16960
+ const checkint2 = privateReader.readUint32();
16961
+ if (checkint1 !== checkint2) {
16962
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
16963
+ }
16964
+ privateReader.readString();
16965
+ const n = privateReader.readMpInt(true);
16966
+ const e = privateReader.readMpInt(true);
16967
+ const d = privateReader.readMpInt(true);
16968
+ const iqmp = privateReader.readMpInt(true);
16969
+ const p = privateReader.readMpInt(true);
16970
+ const q = privateReader.readMpInt(true);
16971
+ privateReader.readString();
16972
+ const dBig = BigInt('0x' + Convert.ToHex(d));
16973
+ const pBig = BigInt('0x' + Convert.ToHex(p));
16974
+ const qBig = BigInt('0x' + Convert.ToHex(q));
16975
+ const dpBig = dBig % (pBig - 1n);
16976
+ const dqBig = dBig % (qBig - 1n);
16977
+ const dpBytes = Convert.FromHex(dpBig.toString(16).padStart(p.length * 2, '0'));
16978
+ const dqBytes = Convert.FromHex(dqBig.toString(16).padStart(q.length * 2, '0'));
16979
+ const jwk = {
16980
+ kty: 'RSA',
16981
+ n: Convert.ToBase64Url(n),
16982
+ e: Convert.ToBase64Url(e),
16983
+ d: Convert.ToBase64Url(d),
16984
+ p: Convert.ToBase64Url(p),
16985
+ q: Convert.ToBase64Url(q),
16986
+ dp: Convert.ToBase64Url(dpBytes),
16987
+ dq: Convert.ToBase64Url(dqBytes),
16988
+ qi: Convert.ToBase64Url(iqmp),
16989
+ };
16990
+ return crypto.subtle.importKey('jwk', jwk, {
16991
+ name: 'RSASSA-PKCS1-v1_5',
16992
+ hash: this.hash,
16993
+ }, true, ['sign']);
16994
+ }
16995
+ async exportPrivateSsh(params) {
16996
+ const { privateKey, crypto, jwk: providedJwk } = params;
16997
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
16998
+ if (!jwk.n || !jwk.e || !jwk.d || !jwk.p || !jwk.q) {
16999
+ throw new InvalidKeyDataError('RSA JWK missing required parameters');
17000
+ }
17001
+ const n = new Uint8Array(Convert.FromBase64Url(jwk.n));
17002
+ const e = new Uint8Array(Convert.FromBase64Url(jwk.e));
17003
+ const d = new Uint8Array(Convert.FromBase64Url(jwk.d));
17004
+ const p = new Uint8Array(Convert.FromBase64Url(jwk.p));
17005
+ const q = new Uint8Array(Convert.FromBase64Url(jwk.q));
17006
+ const qi = jwk.qi ? new Uint8Array(Convert.FromBase64Url(jwk.qi)) : new Uint8Array();
17007
+ const writer = new SshWriter();
17008
+ writer.writeString('ssh-rsa');
17009
+ writer.writeMpInt(n, true);
17010
+ writer.writeMpInt(e, true);
17011
+ writer.writeMpInt(d, true);
17012
+ writer.writeMpInt(qi, true);
17013
+ writer.writeMpInt(p, true);
17014
+ writer.writeMpInt(q, true);
17015
+ return writer.toUint8Array();
17016
+ }
17017
+ async sign(params) {
17018
+ const { privateKey, data, crypto, hash } = params;
17019
+ if (hash && hash !== this.hash) {
17020
+ throw new InvalidKeyDataError(`Hash ${hash} not supported for this RSA algorithm`);
17021
+ }
17022
+ if (!privateKey.extractable) {
17023
+ throw new InvalidKeyDataError('Private key is not extractable');
17024
+ }
17025
+ const pkcs8 = await this.exportPrivatePkcs8({ privateKey, crypto });
17026
+ const keyToUse = await this.importPrivatePkcs8({ pkcs8: new Uint8Array(pkcs8), crypto });
17027
+ const signature = await crypto.subtle.sign('RSASSA-PKCS1-v1_5', keyToUse, data);
17028
+ return BufferSourceConverter.toUint8Array(signature);
17029
+ }
17030
+ async verify(params) {
17031
+ const { publicKey, signature, data, crypto, hash } = params;
17032
+ if (hash && hash !== this.hash) {
17033
+ return false;
17034
+ }
17035
+ if (!publicKey.extractable) {
17036
+ throw new InvalidKeyDataError('Public key is not extractable');
17037
+ }
17038
+ const spki = await this.exportPublicSpki({ publicKey, crypto });
17039
+ const keyToUse = await this.importPublicSpki({ spki: new Uint8Array(spki), crypto });
17040
+ return crypto.subtle.verify('RSASSA-PKCS1-v1_5', keyToUse, signature, data);
17041
+ }
17042
+ encodeSignature(params) {
17043
+ const { signature, algo } = params;
17044
+ const writer = new SshWriter();
17045
+ writer.writeString(algo);
17046
+ writer.writeUint32(signature.byteLength);
17047
+ writer.writeBytes(signature);
17048
+ return writer.toUint8Array();
17049
+ }
17050
+ decodeSignature(params) {
17051
+ const { signature } = params;
17052
+ const reader = new SshReader(signature);
17053
+ const algo = reader.readString();
17054
+ const sigLength = reader.readUint32();
17055
+ const sig = reader.readBytes(sigLength);
17056
+ return { signature: sig, algo };
17057
+ }
17058
+ supportsCryptoKey(cryptoKey) {
17059
+ return cryptoKey.algorithm.name === 'RSASSA-PKCS1-v1_5';
17060
+ }
17061
+ parsePublicKey(reader) {
17062
+ const publicKeyExponent = reader.readBytes(reader.readUint32());
17063
+ const publicKeyModulus = reader.readBytes(reader.readUint32());
17064
+ const writer = new SshWriter();
17065
+ writer.writeString('ssh-rsa');
17066
+ writer.writeMpInt(publicKeyExponent);
17067
+ writer.writeMpInt(publicKeyModulus);
17068
+ return {
17069
+ type: 'ssh-rsa',
17070
+ keyData: writer.toUint8Array(),
17071
+ };
17072
+ }
17073
+ writePublicKey(writer, publicKey) {
17074
+ const publicKeyReader = new SshReader(publicKey.keyData);
17075
+ publicKeyReader.readString();
17076
+ const e = publicKeyReader.readMpInt();
17077
+ const n = publicKeyReader.readMpInt();
17078
+ writer.writeUint32(e.length);
17079
+ writer.writeBytes(e);
17080
+ writer.writeUint32(n.length);
17081
+ writer.writeBytes(n);
17082
+ }
17083
+ getCertificateType() {
17084
+ return 'ssh-rsa-cert-v01@openssh.com';
17085
+ }
17086
+ getSignatureAlgo() {
17087
+ return this.hash === 'SHA-256' ? 'rsa-sha2-256' : 'rsa-sha2-512';
17088
+ }
17089
+ }
17090
+
17091
+ class EcdsaBinding {
17092
+ curveName;
17093
+ sshType;
17094
+ namedCurve;
17095
+ constructor(curveName, sshType, namedCurve) {
17096
+ this.curveName = curveName;
17097
+ this.sshType = sshType;
17098
+ this.namedCurve = namedCurve;
17099
+ }
17100
+ getHashAlgorithm() {
17101
+ switch (this.namedCurve) {
17102
+ case 'P-256':
17103
+ return 'SHA-256';
17104
+ case 'P-384':
17105
+ return 'SHA-384';
17106
+ case 'P-521':
17107
+ return 'SHA-512';
17108
+ default:
17109
+ return 'SHA-256';
17110
+ }
17111
+ }
17112
+ getExpectedLength() {
17113
+ switch (this.namedCurve) {
17114
+ case 'P-256':
17115
+ return 32;
17116
+ case 'P-384':
17117
+ return 48;
17118
+ case 'P-521':
17119
+ return 66;
17120
+ default:
17121
+ return 32;
17122
+ }
17123
+ }
17124
+ getSignatureCoordLength() {
17125
+ return this.getExpectedLength();
17126
+ }
17127
+ async importPublicSsh(params) {
17128
+ const { blob, crypto } = params;
17129
+ const reader = new SshReader(blob);
17130
+ reader.readString();
17131
+ const curve = reader.readString();
17132
+ if (curve !== this.curveName) {
17133
+ throw new InvalidKeyDataError(`ECDSA curve name ${curve}, expected ${this.curveName}`);
17134
+ }
17135
+ const q = reader.readMpInt();
17136
+ const coordLength = Math.floor((q.length - 1) / 2);
17137
+ const jwk = {
17138
+ kty: 'EC',
17139
+ crv: this.namedCurve,
17140
+ x: Convert.ToBase64Url(q.slice(1, 1 + coordLength)),
17141
+ y: Convert.ToBase64Url(q.slice(1 + coordLength)),
17142
+ };
17143
+ return crypto.subtle.importKey('jwk', jwk, {
17144
+ name: 'ECDSA',
17145
+ namedCurve: this.namedCurve,
17146
+ }, true, ['verify']);
17147
+ }
17148
+ async exportPublicSsh(params) {
17149
+ const { publicKey, crypto } = params;
17150
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
17151
+ if (!jwk.x || !jwk.y) {
17152
+ throw new InvalidKeyDataError('ECDSA JWK missing x or y parameters');
17153
+ }
17154
+ const x = new Uint8Array(Convert.FromBase64Url(jwk.x));
17155
+ const y = new Uint8Array(Convert.FromBase64Url(jwk.y));
17156
+ const q = new Uint8Array(1 + x.length + y.length);
17157
+ q[0] = 0x04;
17158
+ q.set(x, 1);
17159
+ q.set(y, 1 + x.length);
17160
+ const writer = new SshWriter();
17161
+ writer.writeString(this.sshType);
17162
+ writer.writeString(this.curveName);
17163
+ writer.writeMpInt(q);
17164
+ return writer.toUint8Array();
17165
+ }
17166
+ async importPublicSpki(params) {
17167
+ const { spki, crypto } = params;
17168
+ return crypto.subtle.importKey('spki', spki, {
17169
+ name: 'ECDSA',
17170
+ namedCurve: this.namedCurve,
17171
+ }, true, ['verify']);
17172
+ }
17173
+ async exportPublicSpki(params) {
17174
+ const { publicKey, crypto } = params;
17175
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
17176
+ return BufferSourceConverter.toUint8Array(spki);
17177
+ }
17178
+ async importPrivatePkcs8(params) {
17179
+ const { pkcs8, crypto } = params;
17180
+ return crypto.subtle.importKey('pkcs8', pkcs8, {
17181
+ name: 'ECDSA',
17182
+ namedCurve: this.namedCurve,
17183
+ }, true, ['sign']);
17184
+ }
17185
+ async exportPrivatePkcs8(params) {
17186
+ const { privateKey, crypto } = params;
17187
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
17188
+ return BufferSourceConverter.toUint8Array(pkcs8);
17189
+ }
17190
+ async exportPrivateSsh(params) {
17191
+ const { privateKey, crypto, jwk: providedJwk } = params;
17192
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
17193
+ if (!jwk.d || !jwk.x || !jwk.y) {
17194
+ throw new InvalidKeyDataError('ECDSA private key JWK missing required parameters');
17195
+ }
17196
+ const x = new Uint8Array(Convert.FromBase64Url(jwk.x));
17197
+ const y = new Uint8Array(Convert.FromBase64Url(jwk.y));
17198
+ const d = new Uint8Array(Convert.FromBase64Url(jwk.d));
17199
+ const publicPoint = new Uint8Array(1 + x.length + y.length);
17200
+ publicPoint[0] = 0x04;
17201
+ publicPoint.set(x, 1);
17202
+ publicPoint.set(y, 1 + x.length);
17203
+ const writer = new SshWriter();
17204
+ writer.writeString(this.sshType);
17205
+ writer.writeString(this.curveName);
17206
+ writer.writeMpInt(publicPoint);
17207
+ writer.writeMpInt(d);
17208
+ return writer.toUint8Array();
17209
+ }
17210
+ async importPrivateSsh(params) {
17211
+ const { sshKey, crypto } = params;
17212
+ const base64Data = sshKey
17213
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
17214
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
17215
+ .replace(/\s/g, '');
17216
+ const binaryData = Convert.FromBase64(base64Data);
17217
+ const reader = new SshReader(BufferSourceConverter.toUint8Array(binaryData));
17218
+ const magic = reader.readBytes(15);
17219
+ if (Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
17220
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
17221
+ }
17222
+ const _cipherName = reader.readString();
17223
+ reader.readString();
17224
+ reader.readString();
17225
+ if (_cipherName !== 'none') {
17226
+ throw new EncryptedKeyNotSupportedError(_cipherName);
17227
+ }
17228
+ const numKeys = reader.readUint32();
17229
+ if (numKeys !== 1) {
17230
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
17231
+ }
17232
+ const publicKeyLength = reader.readUint32();
17233
+ reader.readBytes(publicKeyLength);
17234
+ const privateKeyLength = reader.readUint32();
17235
+ const privateKeyData = reader.readBytes(privateKeyLength);
17236
+ const privateReader = new SshReader(privateKeyData);
17237
+ const checkint1 = privateReader.readUint32();
17238
+ const checkint2 = privateReader.readUint32();
17239
+ if (checkint1 !== checkint2) {
17240
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
17241
+ }
17242
+ privateReader.readString();
17243
+ privateReader.readString();
17244
+ const publicKeyPoint = privateReader.readMpInt();
17245
+ const privateKeyValue = privateReader.readMpInt();
17246
+ privateReader.readString();
17247
+ if (publicKeyPoint[0] !== 0x04) {
17248
+ throw new InvalidKeyDataError('invalid ECDSA public key point format');
17249
+ }
17250
+ const coordLength = Math.floor((publicKeyPoint.length - 1) / 2);
17251
+ const x = publicKeyPoint.slice(1, 1 + coordLength);
17252
+ const y = publicKeyPoint.slice(1 + coordLength);
17253
+ const jwk = {
17254
+ kty: 'EC',
17255
+ crv: this.namedCurve,
17256
+ x: Convert.ToBase64Url(x),
17257
+ y: Convert.ToBase64Url(y),
17258
+ d: Convert.ToBase64Url(privateKeyValue),
17259
+ };
17260
+ return crypto.subtle.importKey('jwk', jwk, {
17261
+ name: 'ECDSA',
17262
+ namedCurve: this.namedCurve,
17263
+ }, true, ['sign']);
17264
+ }
17265
+ async sign(params) {
17266
+ const { privateKey, data, crypto, hash } = params;
17267
+ const expectedHash = this.getHashAlgorithm();
17268
+ if (hash && hash !== expectedHash) {
17269
+ throw new InvalidKeyDataError(`ECDSA ${this.namedCurve} requires ${expectedHash}, got ${hash}`);
17270
+ }
17271
+ const signature = await crypto.subtle.sign({
17272
+ name: 'ECDSA',
17273
+ hash: expectedHash,
17274
+ }, privateKey, data);
17275
+ return BufferSourceConverter.toUint8Array(signature);
17276
+ }
17277
+ async verify(params) {
17278
+ const { publicKey, signature, data, crypto, hash } = params;
17279
+ const expectedHash = this.getHashAlgorithm();
17280
+ if (hash && hash !== expectedHash) {
17281
+ throw new InvalidKeyDataError(`ECDSA ${this.namedCurve} requires ${expectedHash}, got ${hash}`);
17282
+ }
17283
+ return crypto.subtle.verify({
17284
+ name: 'ECDSA',
17285
+ hash: expectedHash,
17286
+ }, publicKey, signature, data);
17287
+ }
17288
+ encodeSignature(params) {
17289
+ const { signature, algo } = params;
17290
+ if (algo.startsWith('ecdsa-sha2-')) {
17291
+ const coordLength = this.getSignatureCoordLength();
17292
+ const r = signature.subarray(0, coordLength);
17293
+ const s = signature.subarray(coordLength);
17294
+ const writer = new SshWriter();
17295
+ writer.writeString(algo);
17296
+ const sigWriter = new SshWriter();
17297
+ sigWriter.writeMpInt(r, true);
17298
+ sigWriter.writeMpInt(s, true);
17299
+ const sigData = sigWriter.toUint8Array();
17300
+ writer.writeUint32(sigData.length);
17301
+ writer.writeBytes(sigData);
17302
+ return writer.toUint8Array();
17303
+ }
17304
+ const writer = new SshWriter();
17305
+ writer.writeString(algo);
17306
+ writer.writeUint32(signature.byteLength);
17307
+ writer.writeBytes(signature);
17308
+ return writer.toUint8Array();
17309
+ }
17310
+ decodeSignature(params) {
17311
+ const { signature } = params;
17312
+ const reader = new SshReader(signature);
17313
+ const algo = reader.readString();
17314
+ const sigLength = reader.readUint32();
17315
+ const sig = reader.readBytes(sigLength);
17316
+ if (algo.startsWith('ecdsa-sha2-')) {
17317
+ const sigReader = new SshReader(sig);
17318
+ let r = sigReader.readMpInt();
17319
+ let s = sigReader.readMpInt();
17320
+ if (r[0] === 0x00 && r.length > 1 && (r[1] & 0x80) === 0) {
17321
+ r = r.slice(1);
17322
+ }
17323
+ if (s[0] === 0x00 && s.length > 1 && (s[1] & 0x80) === 0) {
17324
+ s = s.slice(1);
17325
+ }
17326
+ const expectedLength = this.getExpectedLength();
17327
+ const rPadded = new Uint8Array(expectedLength);
17328
+ const sPadded = new Uint8Array(expectedLength);
17329
+ if (r.length <= expectedLength) {
17330
+ rPadded.set(r, expectedLength - r.length);
17331
+ }
17332
+ else {
17333
+ rPadded.set(r.slice(r.length - expectedLength), 0);
17334
+ }
17335
+ if (s.length <= expectedLength) {
17336
+ sPadded.set(s, expectedLength - s.length);
17337
+ }
17338
+ else {
17339
+ sPadded.set(s.slice(s.length - expectedLength), 0);
17340
+ }
17341
+ const rawSignature = new Uint8Array([...rPadded, ...sPadded]);
17342
+ return { signature: rawSignature, algo };
17343
+ }
17344
+ return { signature: sig, algo };
17345
+ }
17346
+ supportsCryptoKey(cryptoKey) {
17347
+ return (cryptoKey.algorithm.name === 'ECDSA' &&
17348
+ cryptoKey.algorithm.namedCurve === this.namedCurve);
17349
+ }
17350
+ parsePublicKey(reader) {
17351
+ const curveName = reader.readString();
17352
+ if (curveName !== this.curveName) {
17353
+ throw new InvalidKeyDataError(`ECDSA certificate curve name ${curveName}, expected ${this.curveName}`);
17354
+ }
17355
+ const publicKeyPoint = reader.readBytes(reader.readUint32());
17356
+ const writer = new SshWriter();
17357
+ writer.writeString(this.sshType);
17358
+ writer.writeString(curveName);
17359
+ writer.writeMpInt(publicKeyPoint);
17360
+ return {
17361
+ type: this.sshType,
17362
+ keyData: writer.toUint8Array(),
17363
+ };
17364
+ }
17365
+ writePublicKey(writer, publicKey) {
17366
+ const publicKeyReader = new SshReader(publicKey.keyData);
17367
+ publicKeyReader.readString();
17368
+ const curveName = publicKeyReader.readString();
17369
+ const publicPoint = publicKeyReader.readMpInt();
17370
+ writer.writeString(curveName);
17371
+ writer.writeUint32(publicPoint.length);
17372
+ writer.writeBytes(publicPoint);
17373
+ }
17374
+ getCertificateType() {
17375
+ return `${this.sshType}-cert-v01@openssh.com`;
17376
+ }
17377
+ getSignatureAlgo() {
17378
+ return this.sshType;
17379
+ }
17380
+ }
17381
+ const EcdsaP256Binding = new EcdsaBinding('nistp256', 'ecdsa-sha2-nistp256', 'P-256');
17382
+ const EcdsaP384Binding = new EcdsaBinding('nistp384', 'ecdsa-sha2-nistp384', 'P-384');
17383
+ const EcdsaP521Binding = new EcdsaBinding('nistp521', 'ecdsa-sha2-nistp521', 'P-521');
17384
+
17385
+ class Ed25519Binding {
17386
+ async importPublicSsh(params) {
17387
+ const { blob, crypto } = params;
17388
+ const reader = new SshReader(blob);
17389
+ reader.readString();
17390
+ const keyLength = reader.readUint32();
17391
+ if (keyLength !== 32) {
17392
+ throw new InvalidKeyDataError(`Ed25519 key length ${keyLength}, expected 32`);
17393
+ }
17394
+ const publicKeyBytes = reader.readBytes(keyLength);
17395
+ return crypto.subtle.importKey('raw', publicKeyBytes, 'Ed25519', true, [
17396
+ 'verify',
17397
+ ]);
17398
+ }
17399
+ async exportPublicSsh(params) {
17400
+ const { publicKey, crypto } = params;
17401
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
17402
+ if (!jwk.x) {
17403
+ throw new InvalidKeyDataError('Ed25519 JWK missing x parameter');
17404
+ }
17405
+ const keyBytes = new Uint8Array(Convert.FromBase64Url(jwk.x));
17406
+ const writer = new SshWriter();
17407
+ writer.writeString('ssh-ed25519');
17408
+ writer.writeUint32(keyBytes.length);
17409
+ writer.writeBytes(keyBytes);
17410
+ return writer.toUint8Array();
17411
+ }
17412
+ async importPublicSpki(params) {
17413
+ const { spki, crypto } = params;
17414
+ return crypto.subtle.importKey('spki', spki, 'Ed25519', true, ['verify']);
17415
+ }
17416
+ async exportPublicSpki(params) {
17417
+ const { publicKey, crypto } = params;
17418
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
17419
+ return BufferSourceConverter.toUint8Array(spki);
17420
+ }
17421
+ async importPrivatePkcs8(params) {
17422
+ const { pkcs8, crypto } = params;
17423
+ return crypto.subtle.importKey('pkcs8', pkcs8, 'Ed25519', true, ['sign']);
17424
+ }
17425
+ async exportPrivatePkcs8(params) {
17426
+ const { privateKey, crypto } = params;
17427
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
17428
+ return BufferSourceConverter.toUint8Array(pkcs8);
17429
+ }
17430
+ async exportPrivateSsh(params) {
17431
+ const { privateKey, crypto, jwk: providedJwk } = params;
17432
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
17433
+ if (!jwk.d || !jwk.x) {
17434
+ throw new InvalidKeyDataError('Ed25519 private key JWK missing required parameters');
17435
+ }
17436
+ const privateBytes = new Uint8Array(Convert.FromBase64Url(jwk.d));
17437
+ const publicBytes = new Uint8Array(Convert.FromBase64Url(jwk.x));
17438
+ const writer = new SshWriter();
17439
+ writer.writeString('ssh-ed25519');
17440
+ writer.writeUint32(publicBytes.length);
17441
+ writer.writeBytes(publicBytes);
17442
+ const privKeyPart = new Uint8Array(64);
17443
+ privKeyPart.set(privateBytes, 0);
17444
+ privKeyPart.set(publicBytes, 32);
17445
+ writer.writeUint32(privKeyPart.length);
17446
+ writer.writeBytes(privKeyPart);
17447
+ return writer.toUint8Array();
17448
+ }
17449
+ async importPrivateSsh(params) {
17450
+ const { sshKey, crypto } = params;
17451
+ const base64Data = sshKey
17452
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
17453
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
17454
+ .replace(/\s/g, '');
17455
+ const binaryData = Convert.FromBase64(base64Data);
17456
+ const reader = new SshReader(BufferSourceConverter.toUint8Array(binaryData));
17457
+ const magic = reader.readBytes(15);
17458
+ if (Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
17459
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
17460
+ }
17461
+ const _cipherName = reader.readString();
17462
+ reader.readString();
17463
+ reader.readString();
17464
+ if (_cipherName !== 'none') {
17465
+ throw new EncryptedKeyNotSupportedError(_cipherName);
17466
+ }
17467
+ const numKeys = reader.readUint32();
17468
+ if (numKeys !== 1) {
17469
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
17470
+ }
17471
+ const publicKeyLength = reader.readUint32();
17472
+ reader.readBytes(publicKeyLength);
17473
+ const privateKeyLength = reader.readUint32();
17474
+ const privateKeyData = reader.readBytes(privateKeyLength);
17475
+ const privateReader = new SshReader(privateKeyData);
17476
+ const checkint1 = privateReader.readUint32();
17477
+ const checkint2 = privateReader.readUint32();
17478
+ if (checkint1 !== checkint2) {
17479
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
17480
+ }
17481
+ privateReader.readString();
17482
+ const pubKeyLength = privateReader.readUint32();
17483
+ const _publicKeyBytes = privateReader.readBytes(pubKeyLength);
17484
+ const privKeyLength = privateReader.readUint32();
17485
+ const privateKeyBytes = privateReader.readBytes(privKeyLength);
17486
+ privateReader.readString();
17487
+ const privateKey = privateKeyBytes.slice(0, 32);
17488
+ const jwk = {
17489
+ kty: 'OKP',
17490
+ crv: 'Ed25519',
17491
+ d: Convert.ToBase64Url(privateKey),
17492
+ x: Convert.ToBase64Url(_publicKeyBytes),
17493
+ };
17494
+ return crypto.subtle.importKey('jwk', jwk, 'Ed25519', true, ['sign']);
17495
+ }
17496
+ async sign(params) {
17497
+ const { privateKey, data, crypto } = params;
17498
+ const signature = await crypto.subtle.sign('Ed25519', privateKey, data);
17499
+ return BufferSourceConverter.toUint8Array(signature);
17500
+ }
17501
+ async verify(params) {
17502
+ const { publicKey, signature, data, crypto } = params;
17503
+ return crypto.subtle.verify('Ed25519', publicKey, signature, data);
17504
+ }
17505
+ encodeSignature(params) {
17506
+ const { signature, algo } = params;
17507
+ const sigBytes = new Uint8Array(signature);
17508
+ const writer = new SshWriter();
17509
+ writer.writeString(algo);
17510
+ writer.writeUint32(sigBytes.length);
17511
+ writer.writeBytes(sigBytes);
17512
+ return writer.toUint8Array();
17513
+ }
17514
+ decodeSignature(params) {
17515
+ const { signature } = params;
17516
+ const reader = new SshReader(signature);
17517
+ const algo = reader.readString();
17518
+ const sigLength = reader.readUint32();
17519
+ const sigBytes = reader.readBytes(sigLength);
17520
+ return {
17521
+ signature: sigBytes,
17522
+ algo,
17523
+ };
17524
+ }
17525
+ supportsCryptoKey(cryptoKey) {
17526
+ return cryptoKey.algorithm.name === 'Ed25519';
17527
+ }
17528
+ parsePublicKey(reader) {
17529
+ const publicKeyData = reader.readBytes(reader.readUint32());
17530
+ const writer = new SshWriter();
17531
+ writer.writeString('ssh-ed25519');
17532
+ writer.writeUint32(publicKeyData.length);
17533
+ writer.writeBytes(publicKeyData);
17534
+ return {
17535
+ type: 'ssh-ed25519',
17536
+ keyData: writer.toUint8Array(),
17537
+ };
17538
+ }
17539
+ writePublicKey(writer, publicKey) {
17540
+ const publicKeyReader = new SshReader(publicKey.keyData);
17541
+ publicKeyReader.readString();
17542
+ const keyLength = publicKeyReader.readUint32();
17543
+ const rawKeyData = publicKeyReader.readBytes(keyLength);
17544
+ writer.writeUint32(rawKeyData.length);
17545
+ writer.writeBytes(rawKeyData);
17546
+ }
17547
+ getCertificateType() {
17548
+ return 'ssh-ed25519-cert-v01@openssh.com';
17549
+ }
17550
+ getSignatureAlgo() {
17551
+ return 'ssh-ed25519';
17552
+ }
17553
+ }
17554
+
17555
+ const registry = new Map();
17556
+ class AlgorithmRegistry {
17557
+ static get(name) {
17558
+ const binding = registry.get(name);
17559
+ if (!binding) {
17560
+ throw new UnsupportedKeyTypeError(name, Array.from(registry.keys()));
17561
+ }
17562
+ return binding;
17563
+ }
17564
+ static register(name, binding) {
17565
+ registry.set(name, binding);
17566
+ }
17567
+ static getSshTypeFromCryptoKey(cryptoKey) {
17568
+ for (const [sshType, binding] of registry.entries()) {
17569
+ if (binding.supportsCryptoKey(cryptoKey)) {
17570
+ return sshType;
17571
+ }
17572
+ }
17573
+ throw new UnsupportedKeyTypeError(cryptoKey.algorithm.name, Array.from(registry.keys()));
17574
+ }
17575
+ static certTypeToKeyType(certType) {
17576
+ const mapping = {
17577
+ 'ssh-rsa-cert-v01@openssh.com': 'ssh-rsa',
17578
+ 'ssh-ed25519-cert-v01@openssh.com': 'ssh-ed25519',
17579
+ 'ecdsa-sha2-nistp256-cert-v01@openssh.com': 'ecdsa-sha2-nistp256',
17580
+ 'ecdsa-sha2-nistp384-cert-v01@openssh.com': 'ecdsa-sha2-nistp384',
17581
+ 'ecdsa-sha2-nistp521-cert-v01@openssh.com': 'ecdsa-sha2-nistp521',
17582
+ };
17583
+ return mapping[certType];
17584
+ }
17585
+ static getSupportedCertTypes() {
17586
+ return Object.keys({
17587
+ 'ssh-rsa-cert-v01@openssh.com': 'ssh-rsa',
17588
+ 'ssh-ed25519-cert-v01@openssh.com': 'ssh-ed25519',
17589
+ 'ecdsa-sha2-nistp256-cert-v01@openssh.com': 'ecdsa-sha2-nistp256',
17590
+ 'ecdsa-sha2-nistp384-cert-v01@openssh.com': 'ecdsa-sha2-nistp384',
17591
+ 'ecdsa-sha2-nistp521-cert-v01@openssh.com': 'ecdsa-sha2-nistp521',
17592
+ });
17593
+ }
17594
+ }
17595
+ AlgorithmRegistry.register('ssh-ed25519', new Ed25519Binding());
17596
+ AlgorithmRegistry.register('ssh-rsa', new RsaBinding('SHA-256'));
17597
+ AlgorithmRegistry.register('rsa-sha2-256', new RsaBinding('SHA-256'));
17598
+ AlgorithmRegistry.register('rsa-sha2-512', new RsaBinding('SHA-512'));
17599
+ AlgorithmRegistry.register('ecdsa-sha2-nistp256', EcdsaP256Binding);
17600
+ AlgorithmRegistry.register('ecdsa-sha2-nistp384', EcdsaP384Binding);
17601
+ AlgorithmRegistry.register('ecdsa-sha2-nistp521', EcdsaP521Binding);
17602
+
17603
+ function parsePublicKey(input) {
17604
+ const parts = typeof input === 'string' ? input.trim().split(/\s+/) : null;
17605
+ if (!parts || parts.length < 2) {
17606
+ throw new InvalidFormatError('Invalid SSH public key format');
17607
+ }
17608
+ const type = parts[0];
17609
+ const blob = new Uint8Array(Convert.FromBase64(parts[1]));
17610
+ const comment = parts.length > 2 ? parts.slice(2).join(' ') : undefined;
17611
+ const reader = new SshReader(blob);
17612
+ const blobType = reader.readString();
17613
+ if (blobType !== type) {
17614
+ throw new InvalidFormatError('Key type mismatch');
17615
+ }
17616
+ return {
17617
+ type,
17618
+ keyData: blob,
17619
+ comment,
17620
+ };
17621
+ }
17622
+ function serializePublicKey(blob) {
17623
+ const base64 = Convert.ToBase64(blob.keyData);
17624
+ const parts = [blob.type, base64];
17625
+ if (blob.comment) {
17626
+ parts.push(blob.comment);
17627
+ }
17628
+ return parts.join(' ');
17629
+ }
17630
+
17631
+ function parse(input) {
17632
+ if (typeof input === 'string') {
17633
+ const parts = input.trim().split(/\s+/);
17634
+ if (parts.length < 2) {
17635
+ throw new InvalidFormatError('SSH certificate string', 'type base64 [comment]');
17636
+ }
17637
+ const type = parts[0];
17638
+ const blob = new Uint8Array(Convert.FromBase64(parts[1]));
17639
+ const comment = parts.length > 2 ? parts.slice(2).join(' ') : undefined;
17640
+ const reader = new SshReader(blob);
17641
+ const blobType = reader.readString();
17642
+ if (blobType !== type) {
17643
+ throw new InvalidFormatError(`certificate blob type ${blobType}`, `expected ${type}`);
17644
+ }
17645
+ return {
17646
+ type,
17647
+ keyData: blob,
17648
+ comment,
17649
+ };
17650
+ }
17651
+ else {
17652
+ const reader = new SshReader(input);
17653
+ const type = reader.readString();
17654
+ const keyData = input.slice(reader.getOffset());
17655
+ return {
17656
+ type,
17657
+ keyData,
17658
+ };
17659
+ }
17660
+ }
17661
+ function parseCertificateData(keyData) {
17662
+ const reader = new SshReader(keyData);
17663
+ const certType = reader.readString();
17664
+ const nonce = reader.readBytes(reader.readUint32());
17665
+ const mappedKeyType = AlgorithmRegistry.certTypeToKeyType(certType);
17666
+ if (!mappedKeyType) {
17667
+ throw new UnsupportedAlgorithmError(certType, AlgorithmRegistry.getSupportedCertTypes());
17668
+ }
17669
+ const binding = AlgorithmRegistry.get(mappedKeyType);
17670
+ const publicKey = binding.parsePublicKey(reader);
17671
+ const keyType = mappedKeyType;
17672
+ const serial = reader.readUint64();
17673
+ const typeValue = reader.readUint32();
17674
+ const type = typeValue === 1 ? 'user' : 'host';
17675
+ const keyId = reader.readString();
17676
+ const principalsLength = reader.readUint32();
17677
+ const principalsData = reader.readBytes(principalsLength);
17678
+ const validPrincipals = [];
17679
+ if (principalsData.length > 0) {
17680
+ const principalsReader = new SshReader(principalsData);
17681
+ while (principalsReader.getOffset() < principalsData.length) {
17682
+ try {
17683
+ const principal = principalsReader.readString();
17684
+ validPrincipals.push(principal);
17685
+ }
17686
+ catch {
17687
+ break;
17688
+ }
17689
+ }
17690
+ }
17691
+ const validAfter = reader.readUint64();
17692
+ const validBefore = reader.readUint64();
17693
+ const criticalOptions = {};
17694
+ const criticalLength = reader.readUint32();
17695
+ const criticalData = reader.readBytes(criticalLength);
17696
+ if (criticalData.length > 0) {
17697
+ const optionsReader = new SshReader(criticalData);
17698
+ while (optionsReader.getOffset() < criticalData.length) {
17699
+ try {
17700
+ const name = optionsReader.readString();
17701
+ const valueData = optionsReader.readBytes(optionsReader.readUint32());
17702
+ const value = valueData.length === 0 ? '' : decoder.decode(valueData);
17703
+ criticalOptions[name] = value;
17704
+ }
17705
+ catch {
17706
+ break;
17707
+ }
17708
+ }
17709
+ }
17710
+ const extensions = {};
17711
+ const extensionsLength = reader.readUint32();
17712
+ const extensionsData = reader.readBytes(extensionsLength);
17713
+ if (extensionsData.length > 0) {
17714
+ const extReader = new SshReader(extensionsData);
17715
+ while (extReader.getOffset() < extensionsData.length) {
17716
+ try {
17717
+ const name = extReader.readString();
17718
+ const valueData = extReader.readBytes(extReader.readUint32());
17719
+ const value = valueData.length === 0 ? '' : decoder.decode(valueData);
17720
+ extensions[name] = value;
17721
+ }
17722
+ catch {
17723
+ break;
17724
+ }
17725
+ }
17726
+ }
17727
+ const reservedLength = reader.readUint32();
17728
+ const reserved = reader.readBytes(reservedLength);
17729
+ const signatureKeyLength = reader.readUint32();
17730
+ const signatureKeyData = reader.readBytes(signatureKeyLength);
17731
+ const signatureKeyReader = new SshReader(signatureKeyData);
17732
+ const signatureKeyType = signatureKeyReader.readString();
17733
+ const signatureKey = {
17734
+ type: signatureKeyType,
17735
+ keyData: signatureKeyData,
17736
+ };
17737
+ const signatureLength = reader.readUint32();
17738
+ const signature = reader.readBytes(signatureLength);
17739
+ return {
17740
+ nonce,
17741
+ keyType,
17742
+ publicKey,
17743
+ serial,
17744
+ type,
17745
+ keyId,
17746
+ validPrincipals,
17747
+ validAfter,
17748
+ validBefore,
17749
+ criticalOptions,
17750
+ extensions,
17751
+ reserved,
17752
+ signatureKey,
17753
+ signature,
17754
+ };
17755
+ }
17756
+ function serialize(cert) {
17757
+ const base64 = Convert.ToBase64(cert.keyData);
17758
+ const parts = [cert.type, base64];
17759
+ if (cert.comment) {
17760
+ parts.push(cert.comment);
17761
+ }
17762
+ return parts.join(' ');
17763
+ }
17764
+
17765
+ function parseSignature(data) {
17766
+ const reader = new SshReader(data);
17767
+ if (data.length >= 6 && new TextDecoder().decode(data.subarray(0, 6)) === 'SSHSIG') {
17768
+ return parseSshSignatureFormat(reader);
17769
+ }
17770
+ else {
17771
+ return parseLegacyFormat(reader);
17772
+ }
17773
+ }
17774
+ function parseSshSignatureFormat(reader) {
17775
+ const magicBytes = reader.readBytes(6);
17776
+ const magic = new TextDecoder().decode(magicBytes);
17777
+ if (magic !== 'SSHSIG') {
17778
+ throw new InvalidFormatError(magic, 'SSHSIG');
17779
+ }
17780
+ const version = reader.readUint32();
17781
+ const publicKeyLength = reader.readUint32();
17782
+ const publicKey = reader.readBytes(publicKeyLength);
17783
+ const namespace = reader.readString();
17784
+ const reserved = reader.readString();
17785
+ const hashAlgorithm = reader.readString();
17786
+ const signatureLength = reader.readUint32();
17787
+ const signatureData = reader.readBytes(signatureLength);
17788
+ const sigReader = new SshReader(signatureData);
17789
+ const algorithm = sigReader.readString();
17790
+ const signatureLength2 = sigReader.readUint32();
17791
+ const signature = sigReader.readBytes(signatureLength2);
17792
+ return {
17793
+ format: 'ssh-signature',
17794
+ algorithm,
17795
+ signature,
17796
+ version,
17797
+ publicKey,
17798
+ namespace,
17799
+ reserved,
17800
+ hashAlgorithm,
17801
+ };
17802
+ }
17803
+ function parseLegacyFormat(reader) {
17804
+ const algorithm = reader.readString();
17805
+ const signatureLength = reader.readUint32();
17806
+ const signature = reader.readBytes(signatureLength);
17807
+ return {
17808
+ format: 'legacy',
17809
+ algorithm,
17810
+ signature,
17811
+ };
17812
+ }
17813
+ function serializeSignature(blob) {
17814
+ if (blob.format === 'ssh-signature') {
17815
+ return serializeSshSignatureFormat(blob);
17816
+ }
17817
+ else {
17818
+ return serializeLegacyFormat(blob);
17819
+ }
17820
+ }
17821
+ function serializeSshSignatureFormat(blob) {
17822
+ const writer = new SshWriter();
17823
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
17824
+ writer.writeUint32(blob.version || 1);
17825
+ if (blob.publicKey) {
17826
+ writer.writeUint32(blob.publicKey.length);
17827
+ writer.writeBytes(blob.publicKey);
17828
+ }
17829
+ else {
17830
+ writer.writeUint32(0);
17831
+ }
17832
+ writer.writeString(blob.namespace || 'file');
17833
+ writer.writeString(blob.reserved || '');
17834
+ writer.writeString(blob.hashAlgorithm || 'sha512');
17835
+ const sigWriter = new SshWriter();
17836
+ sigWriter.writeString(blob.algorithm);
17837
+ sigWriter.writeUint32(blob.signature.length);
17838
+ sigWriter.writeBytes(blob.signature);
17839
+ const sigData = sigWriter.toUint8Array();
17840
+ writer.writeUint32(sigData.length);
17841
+ writer.writeBytes(sigData);
17842
+ return writer.toUint8Array();
17843
+ }
17844
+ function serializeLegacyFormat(blob) {
17845
+ const writer = new SshWriter();
17846
+ writer.writeString(blob.algorithm);
17847
+ writer.writeUint32(blob.signature.length);
17848
+ writer.writeBytes(blob.signature);
17849
+ return writer.toUint8Array();
17850
+ }
17851
+
17852
+ class SshObject {
17853
+ }
17854
+
17855
+ let SshPublicKey$1 = class SshPublicKey extends SshObject {
17856
+ static TYPE = 'public-key';
17857
+ type = SshPublicKey.TYPE;
17858
+ blob;
17859
+ cachedCryptoKey;
17860
+ constructor(blob) {
17861
+ super();
17862
+ this.blob = blob;
17863
+ }
17864
+ async getCryptoKey(crypto = getCrypto()) {
17865
+ if (!this.cachedCryptoKey) {
17866
+ const binding = AlgorithmRegistry.get(this.blob.type);
17867
+ this.cachedCryptoKey = await binding.importPublicSsh({ blob: this.blob.keyData, crypto });
17868
+ }
17869
+ return this.cachedCryptoKey;
17870
+ }
17871
+ static async fromSSH(sshKey, crypto = getCrypto()) {
17872
+ const blob = parsePublicKey(sshKey);
17873
+ const binding = AlgorithmRegistry.get(blob.type);
17874
+ await binding.importPublicSsh({ blob: blob.keyData, crypto });
17875
+ return new SshPublicKey(blob);
17876
+ }
17877
+ static async fromSPKI(spki, type, crypto = getCrypto()) {
17878
+ const binding = AlgorithmRegistry.get(type);
17879
+ const cryptoKey = await binding.importPublicSpki({ spki, crypto });
17880
+ const exported = await binding.exportPublicSsh({ publicKey: cryptoKey, crypto });
17881
+ const blob = {
17882
+ type,
17883
+ keyData: exported,
17884
+ };
17885
+ return new SshPublicKey(blob);
17886
+ }
17887
+ static async fromWebCrypto(cryptoKey, type, crypto = getCrypto()) {
17888
+ const sshType = type || AlgorithmRegistry.getSshTypeFromCryptoKey(cryptoKey);
17889
+ const binding = AlgorithmRegistry.get(sshType);
17890
+ const exported = await binding.exportPublicSsh({ publicKey: cryptoKey, crypto });
17891
+ const blob = {
17892
+ type: sshType,
17893
+ keyData: exported,
17894
+ };
17895
+ return new SshPublicKey(blob);
17896
+ }
17897
+ async export(format = 'ssh', crypto = getCrypto()) {
17898
+ if (format === 'ssh') {
17899
+ return serializePublicKey(this.blob);
17900
+ }
17901
+ else if (format === 'spki') {
17902
+ const cryptoKey = await this.getCryptoKey(crypto);
17903
+ const binding = AlgorithmRegistry.get(this.blob.type);
17904
+ const spki = await binding.exportPublicSpki({ publicKey: cryptoKey, crypto });
17905
+ return new Uint8Array(spki);
17906
+ }
17907
+ throw new UnsupportedKeyTypeError(`Unsupported export format: ${format}`);
17908
+ }
17909
+ async toSSH() {
17910
+ const result = await this.export('ssh');
17911
+ return result;
17912
+ }
17913
+ async toSPKI() {
17914
+ const result = await this.export('spki');
17915
+ return result;
17916
+ }
17917
+ async toWebCrypto(crypto = getCrypto()) {
17918
+ return this.getCryptoKey(crypto);
17919
+ }
17920
+ async verify(algorithm, signature, data, crypto = getCrypto()) {
17921
+ const binding = AlgorithmRegistry.get(algorithm);
17922
+ const cryptoKey = await this.toWebCrypto(crypto);
17923
+ return binding.verify({
17924
+ publicKey: cryptoKey,
17925
+ signature,
17926
+ data,
17927
+ crypto,
17928
+ });
17929
+ }
17930
+ get keyType() {
17931
+ return this.blob.type;
17932
+ }
17933
+ get comment() {
17934
+ return this.blob.comment;
17935
+ }
17936
+ getBlob() {
17937
+ return { ...this.blob };
17938
+ }
17939
+ async thumbprint(algorithm = 'sha256', crypto = getCrypto()) {
17940
+ const hashAlgorithm = algorithm === 'sha256' ? 'SHA-256' : 'SHA-512';
17941
+ const data = this.blob.keyData;
17942
+ const hash = await crypto.subtle.digest(hashAlgorithm, data);
17943
+ return new Uint8Array(hash);
17944
+ }
17945
+ };
17946
+
17947
+ class SshSignature extends SshObject {
17948
+ static TYPE = 'signature';
17949
+ type = SshSignature.TYPE;
17950
+ blob;
17951
+ format;
17952
+ algorithm;
17953
+ signature;
17954
+ version;
17955
+ publicKey;
17956
+ namespace;
17957
+ reserved;
17958
+ hashAlgorithm;
17959
+ constructor(blob) {
17960
+ super();
17961
+ this.blob = blob;
17962
+ this.format = blob.format;
17963
+ this.algorithm = blob.algorithm;
17964
+ this.signature = blob.signature;
17965
+ this.version = blob.version;
17966
+ this.namespace = blob.namespace;
17967
+ this.reserved = blob.reserved;
17968
+ this.hashAlgorithm = blob.hashAlgorithm;
17969
+ if (blob.publicKey) {
17970
+ const reader = new SshReader(blob.publicKey);
17971
+ const type = reader.readString();
17972
+ this.publicKey = new SshPublicKey$1({ type, keyData: blob.publicKey });
17973
+ }
17974
+ }
17975
+ static parse(data) {
17976
+ const blob = parseSignature(data);
17977
+ return new SshSignature(blob);
17978
+ }
17979
+ static fromBlob(blob) {
17980
+ return new SshSignature(blob);
17981
+ }
17982
+ static fromBase64(base64) {
17983
+ const data = new Uint8Array(Convert.FromBase64(base64));
17984
+ return SshSignature.parse(data);
17985
+ }
17986
+ static fromText(text) {
17987
+ const base64 = text
17988
+ .replace(/-----BEGIN SSH SIGNATURE-----/, '')
17989
+ .replace(/-----END SSH SIGNATURE-----/, '')
17990
+ .replace(/[\r\n\s]/g, '');
17991
+ return SshSignature.fromBase64(base64);
17992
+ }
17993
+ serialize() {
17994
+ return serializeSignature(this.blob);
17995
+ }
17996
+ toBase64() {
17997
+ return Convert.ToBase64(this.serialize());
17998
+ }
17999
+ toText() {
18000
+ const base64 = this.toBase64();
18001
+ const lines = [];
18002
+ for (let i = 0; i < base64.length; i += 70) {
18003
+ lines.push(base64.substring(i, i + 70));
18004
+ }
18005
+ return ['-----BEGIN SSH SIGNATURE-----', ...lines, '-----END SSH SIGNATURE-----'].join('\n');
18006
+ }
18007
+ async toSSH() {
18008
+ return this.toText();
18009
+ }
18010
+ async verify(data, publicKey) {
18011
+ const binding = AlgorithmRegistry.get(this.algorithm);
18012
+ const cryptoKey = await publicKey['getCryptoKey']();
18013
+ const crypto = getCrypto();
18014
+ let dataToVerify = data;
18015
+ if (this.format === 'ssh-signature') {
18016
+ const hashAlg = this.hashAlgorithm || 'sha512';
18017
+ const namespace = this.namespace || 'file';
18018
+ const reserved = this.reserved || '';
18019
+ const hashAlgorithm = hashAlg === 'sha256' ? 'SHA-256' : 'SHA-512';
18020
+ const messageHash = await crypto.subtle.digest(hashAlgorithm, data);
18021
+ const messageHashBytes = new Uint8Array(messageHash);
18022
+ const writer = new SshWriter();
18023
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
18024
+ writer.writeString(namespace);
18025
+ writer.writeString(reserved);
18026
+ writer.writeString(hashAlg);
18027
+ writer.writeUint32(messageHashBytes.length);
18028
+ writer.writeBytes(messageHashBytes);
18029
+ dataToVerify = writer.toUint8Array();
18030
+ }
18031
+ let hashAlgorithm;
18032
+ if (this.algorithm === 'rsa-sha2-256') {
18033
+ hashAlgorithm = 'SHA-256';
18034
+ }
18035
+ else if (this.algorithm === 'rsa-sha2-512') {
18036
+ hashAlgorithm = 'SHA-512';
18037
+ }
18038
+ let signatureToVerify;
18039
+ if (this.format === 'legacy' || this.format === 'ssh-signature') {
18040
+ const sigWriter = new SshWriter();
18041
+ sigWriter.writeString(this.algorithm);
18042
+ sigWriter.writeUint32(this.signature.length);
18043
+ sigWriter.writeBytes(this.signature);
18044
+ const wireFormatSignature = sigWriter.toUint8Array();
18045
+ const decodedSig = binding.decodeSignature({
18046
+ signature: wireFormatSignature,
18047
+ });
18048
+ signatureToVerify = decodedSig.signature;
18049
+ }
18050
+ else {
18051
+ signatureToVerify = this.signature;
18052
+ }
18053
+ return binding.verify({
18054
+ publicKey: cryptoKey,
18055
+ signature: signatureToVerify,
18056
+ data: dataToVerify,
18057
+ crypto,
18058
+ hash: hashAlgorithm,
18059
+ });
18060
+ }
18061
+ static fromLegacy(algorithm, signature) {
18062
+ const binding = AlgorithmRegistry.get(algorithm);
18063
+ const encodedSignature = binding.encodeSignature({
18064
+ signature,
18065
+ algo: algorithm,
18066
+ });
18067
+ const sigReader = new SshReader(encodedSignature);
18068
+ sigReader.readString();
18069
+ const sigLength = sigReader.readUint32();
18070
+ const signatureData = sigReader.readBytes(sigLength);
18071
+ return new SshSignature({
18072
+ format: 'legacy',
18073
+ algorithm,
18074
+ signature: signatureData,
18075
+ });
18076
+ }
18077
+ static fromSshSignature(algorithm, signature, options = {}) {
18078
+ const blob = {
18079
+ format: 'ssh-signature',
18080
+ algorithm,
18081
+ signature,
18082
+ version: options.version || 1,
18083
+ publicKey: options.publicKey ? options.publicKey.getBlob().keyData : undefined,
18084
+ namespace: options.namespace || 'file',
18085
+ reserved: options.reserved || '',
18086
+ hashAlgorithm: options.hashAlgorithm || 'sha512',
18087
+ };
18088
+ return new SshSignature(blob);
18089
+ }
18090
+ static async sign(algorithm, privateKey, data, options = {}) {
18091
+ const { format = 'legacy', namespace = 'file' } = options;
18092
+ if (format === 'legacy') {
18093
+ const rawSignature = await privateKey.sign(algorithm, data);
18094
+ const algorithmUsed = algorithm || privateKey.keyType;
18095
+ return SshSignature.fromLegacy(algorithmUsed, rawSignature);
18096
+ }
18097
+ else {
18098
+ const signatureAlgorithm = algorithm;
18099
+ const binding = AlgorithmRegistry.get(signatureAlgorithm);
18100
+ const hashAlgorithm = algorithm === 'rsa-sha2-256' ? 'sha256' : 'sha512';
18101
+ const publicKey = await privateKey.getPublicKey();
18102
+ const crypto = getCrypto();
18103
+ const webCryptoHashAlg = hashAlgorithm === 'sha256' ? 'SHA-256' : 'SHA-512';
18104
+ const messageHash = await crypto.subtle.digest(webCryptoHashAlg, data);
18105
+ const messageHashBytes = new Uint8Array(messageHash);
18106
+ const writer = new SshWriter();
18107
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
18108
+ writer.writeString(namespace);
18109
+ writer.writeString('');
18110
+ writer.writeString(hashAlgorithm);
18111
+ writer.writeUint32(messageHashBytes.length);
18112
+ writer.writeBytes(messageHashBytes);
18113
+ const dataToSign = writer.toUint8Array();
18114
+ const rawSignature = await privateKey.sign(signatureAlgorithm, dataToSign);
18115
+ const encodedSignature = binding.encodeSignature({
18116
+ signature: rawSignature,
18117
+ algo: signatureAlgorithm,
18118
+ });
18119
+ const sigReader = new SshReader(encodedSignature);
18120
+ sigReader.readString();
18121
+ const sigLength = sigReader.readUint32();
18122
+ const signatureData = sigReader.readBytes(sigLength);
18123
+ return SshSignature.fromSshSignature(signatureAlgorithm, signatureData, {
18124
+ namespace,
18125
+ hashAlgorithm,
18126
+ publicKey,
18127
+ });
18128
+ }
18129
+ }
18130
+ }
18131
+
18132
+ let SshCertificate$1 = class SshCertificate extends SshObject {
18133
+ static TYPE = 'certificate';
18134
+ type = SshCertificate.TYPE;
18135
+ _blob;
18136
+ data;
18137
+ _validAfter;
18138
+ _validBefore;
18139
+ keyId;
18140
+ principals;
18141
+ certType;
18142
+ serial;
18143
+ validAfter;
18144
+ validBefore;
18145
+ publicKey;
18146
+ signatureKey;
18147
+ criticalOptions;
18148
+ extensions;
18149
+ constructor(blob) {
18150
+ super();
18151
+ this._blob = blob;
18152
+ this.data = parseCertificateData(blob.keyData);
18153
+ this._validAfter = this.data.validAfter;
18154
+ this._validBefore = this.data.validBefore;
18155
+ this.keyId = this.data.keyId;
18156
+ this.principals = this.data.validPrincipals;
18157
+ this.certType = this.data.type;
18158
+ this.serial = this.data.serial;
18159
+ this.validAfter = new Date(Number(this.data.validAfter) * 1000);
18160
+ this.validBefore = new Date(Number(this.data.validBefore) * 1000);
18161
+ this.publicKey = new SshPublicKey$1(this.data.publicKey);
18162
+ this.signatureKey = new SshPublicKey$1(this.data.signatureKey);
18163
+ this.criticalOptions = { ...this.data.criticalOptions };
18164
+ this.extensions = { ...this.data.extensions };
18165
+ }
18166
+ static async fromSSH(text) {
18167
+ const blob = parse(text);
18168
+ return new SshCertificate(blob);
18169
+ }
18170
+ static async fromBlob(blob) {
18171
+ return new SshCertificate(blob);
18172
+ }
18173
+ async toSSH() {
18174
+ return serialize(this._blob);
18175
+ }
18176
+ toBlob() {
18177
+ return { ...this._blob };
18178
+ }
18179
+ get blob() {
18180
+ return this.toBlob();
18181
+ }
18182
+ validate(date = new Date()) {
18183
+ const ts = BigInt(Math.floor(date.getTime() / 1000));
18184
+ const after = this._validAfter;
18185
+ const before = this._validBefore;
18186
+ const INFINITY = 0xffffffffffffffffn;
18187
+ const upper = before === INFINITY ? ts : before;
18188
+ return ts >= after && ts <= upper;
18189
+ }
18190
+ async verify(caPublicKey, crypto = getCrypto()) {
18191
+ const verifyKey = caPublicKey || this.signatureKey;
18192
+ const signedData = this.getSignedData();
18193
+ const sshSignature = SshSignature.parse(this.data.signature);
18194
+ const binding = AlgorithmRegistry.get(sshSignature.algorithm);
18195
+ const cryptoKey = await verifyKey.toWebCrypto(crypto);
18196
+ return binding.verify({
18197
+ publicKey: cryptoKey,
18198
+ signature: sshSignature.signature,
18199
+ data: signedData,
18200
+ crypto,
18201
+ });
18202
+ }
18203
+ getSignedData() {
18204
+ const reader = new SshReader(this._blob.keyData);
18205
+ reader.readString();
18206
+ reader.readBytes(reader.readUint32());
18207
+ if (this.data.keyType === 'ssh-ed25519') {
18208
+ reader.readBytes(reader.readUint32());
18209
+ }
18210
+ else if (this.data.keyType === 'ssh-rsa') {
18211
+ reader.readBytes(reader.readUint32());
18212
+ reader.readBytes(reader.readUint32());
18213
+ }
18214
+ else if (this.data.keyType.startsWith('ecdsa-sha2-')) {
18215
+ reader.readString();
18216
+ reader.readBytes(reader.readUint32());
18217
+ }
18218
+ reader.readUint64();
18219
+ reader.readUint32();
18220
+ reader.readBytes(reader.readUint32());
18221
+ reader.readBytes(reader.readUint32());
18222
+ reader.readUint64();
18223
+ reader.readUint64();
18224
+ reader.readBytes(reader.readUint32());
18225
+ reader.readBytes(reader.readUint32());
18226
+ reader.readBytes(reader.readUint32());
18227
+ reader.readBytes(reader.readUint32());
18228
+ const signedDataEnd = reader.getOffset();
18229
+ return this._blob.keyData.slice(0, signedDataEnd);
18230
+ }
18231
+ };
18232
+
18233
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
18234
+ if (kind === "m") throw new TypeError("Private method is not writable");
18235
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
18236
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
18237
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
18238
+ };
18239
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18240
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
18241
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
18242
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
18243
+ };
18244
+ var _SshCertificate_cert;
18245
+ class SshCertificate {
18246
+ constructor(raw) {
18247
+ _SshCertificate_cert.set(this, void 0);
18248
+ const blob = parse(raw.trim());
18249
+ // @ts-expect-error - SshCertificateType is not a constructor
18250
+ __classPrivateFieldSet(this, _SshCertificate_cert, new SshCertificate$1(blob), "f");
18251
+ this.notBefore = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validAfter;
18252
+ this.notAfter = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validBefore;
18253
+ this.validity = dateDiff(this.notBefore, this.notAfter);
18254
+ this.type = [__classPrivateFieldGet(this, _SshCertificate_cert, "f").blob.type, __classPrivateFieldGet(this, _SshCertificate_cert, "f").certType, __classPrivateFieldGet(this, _SshCertificate_cert, "f").type].join(' ');
18255
+ this.serialNumber = __classPrivateFieldGet(this, _SshCertificate_cert, "f").serial.toString();
18256
+ this.keyId = __classPrivateFieldGet(this, _SshCertificate_cert, "f").keyId;
18257
+ this.principals = __classPrivateFieldGet(this, _SshCertificate_cert, "f").principals;
18258
+ this.extensions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").extensions;
18259
+ this.criticalOptions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").criticalOptions;
18260
+ }
18261
+ async parseSignatureKey() {
18262
+ const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toWebCrypto();
18263
+ const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.getBlob();
18264
+ const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.thumbprint('sha256');
18265
+ this.signatureKey = {
18266
+ algorithm: key.algorithm.name,
18267
+ type: blob.type,
18268
+ value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toSSH(),
18269
+ thumbprint: Convert.ToBase64(thumbprint),
18270
+ };
18271
+ }
18272
+ async parsePublicKey() {
18273
+ const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toWebCrypto();
18274
+ const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.getBlob();
18275
+ const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.thumbprint('sha256');
18276
+ this.publicKey = {
18277
+ algorithm: key.algorithm.name,
18278
+ type: blob.type,
18279
+ value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toSSH(),
18280
+ thumbprint: Convert.ToBase64(thumbprint),
18281
+ };
18282
+ }
18283
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18284
+ async toString(_format = 'pem') {
18285
+ return __classPrivateFieldGet(this, _SshCertificate_cert, "f").toSSH();
18286
+ }
18287
+ }
18288
+ _SshCertificate_cert = new WeakMap();
18289
+
16629
18290
  /**
16630
18291
  * @license
16631
18292
  * Copyright (c) Peculiar Ventures, LLC.
@@ -18211,6 +19872,48 @@ const ChallengePasswordAttribute = (props) => {
18211
19872
  hAsync(RowValue, { name: "Value", value: attribute.value.toString() })));
18212
19873
  };
18213
19874
 
19875
+ /**
19876
+ * @license
19877
+ * Copyright (c) Peculiar Ventures, LLC.
19878
+ *
19879
+ * This source code is licensed under the MIT license found in the
19880
+ * LICENSE file in the root directory of this source tree.
19881
+ */
19882
+ const ExtensionRequestAttribute = (props) => {
19883
+ const { attribute } = props;
19884
+ let extensions;
19885
+ if (attribute.value) {
19886
+ extensions = attribute.value.map((e) => new Extension(AsnConvert.serialize(e)));
19887
+ }
19888
+ return (hAsync(BasicAttribute, { attribute: attribute },
19889
+ hAsync(TableRowTable, null,
19890
+ hAsync(Extensions, { extensions: extensions, getDNSNameLink: () => '', getIPAddressLink: () => '', getLEILink: () => '' }))));
19891
+ };
19892
+
19893
+ /**
19894
+ * @license
19895
+ * Copyright (c) Peculiar Ventures, LLC.
19896
+ *
19897
+ * This source code is licensed under the MIT license found in the
19898
+ * LICENSE file in the root directory of this source tree.
19899
+ */
19900
+ const PrivateKeyPossessionStatementAttribute = (props) => {
19901
+ const { attribute } = props;
19902
+ const certificateRaw = attribute.value.cert
19903
+ ? AsnConvert.serialize(attribute.value.cert)
19904
+ : null;
19905
+ return (hAsync(BasicAttribute, { attribute: attribute },
19906
+ hAsync(RowValue, { name: "Serial Number", value: Convert.ToHex(attribute.value.signer.serialNumber), monospace: true }),
19907
+ hAsync(RowValue, { name: "Issuer", value: "" }),
19908
+ hAsync(TableRowTable, null,
19909
+ hAsync(NamePart, { name: attribute.value.signer.issuer })),
19910
+ certificateRaw && [
19911
+ hAsync(RowValue, { name: "Certificate", value: "" }),
19912
+ hAsync(TableRowTable, null,
19913
+ hAsync("peculiar-certificate-viewer", { certificate: Convert.ToBase64(certificateRaw) })),
19914
+ ]));
19915
+ };
19916
+
18214
19917
  /**
18215
19918
  * @license
18216
19919
  * Copyright (c) Peculiar Ventures, LLC.
@@ -18230,6 +19933,9 @@ const Attributes = (props) => {
18230
19933
  if (attribute.value instanceof Name$1) {
18231
19934
  return (hAsync(NameAttribute, { attribute: attribute }));
18232
19935
  }
19936
+ if (attribute.value instanceof ExtensionRequest) {
19937
+ return (hAsync(ExtensionRequestAttribute, { attribute: attribute }));
19938
+ }
18233
19939
  if (attribute.value instanceof ActivityDescription) {
18234
19940
  return (hAsync(ActivityDescriptionAttribute, { attribute: attribute }));
18235
19941
  }
@@ -18251,6 +19957,9 @@ const Attributes = (props) => {
18251
19957
  if (attribute.value instanceof ChallengePassword) {
18252
19958
  return (hAsync(ChallengePasswordAttribute, { attribute: attribute }));
18253
19959
  }
19960
+ if (attribute.value instanceof PrivateKeyPossessionStatement) {
19961
+ return (hAsync(PrivateKeyPossessionStatementAttribute, { attribute: attribute }));
19962
+ }
18254
19963
  if (typeof attribute.value === 'string') {
18255
19964
  return (hAsync(AsStringAttribute, { attribute: attribute }));
18256
19965
  }
@@ -18492,7 +20201,7 @@ const Issuer = (props) => {
18492
20201
  ];
18493
20202
  };
18494
20203
 
18495
- const certificateViewerCss$3 = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
20204
+ const certificateViewerCss$4 = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
18496
20205
 
18497
20206
  class AttributeCertificateViewer {
18498
20207
  constructor(hostRef) {
@@ -18591,7 +20300,7 @@ class AttributeCertificateViewer {
18591
20300
  static get watchers() { return {
18592
20301
  "certificate": ["watchCertificateAndDecode"]
18593
20302
  }; }
18594
- static get style() { return certificateViewerCss$3; }
20303
+ static get style() { return certificateViewerCss$4; }
18595
20304
  static get cmpMeta() { return {
18596
20305
  "$flags$": 265,
18597
20306
  "$tagName$": "peculiar-attribute-certificate-viewer",
@@ -18746,12 +20455,12 @@ class CertificateDecoder {
18746
20455
  this.certificateDecoded = null;
18747
20456
  this.clearCertificate.emit();
18748
20457
  }
18749
- setValue(value) {
20458
+ async setValue(value) {
18750
20459
  this.certificateDecoded = value;
18751
- this.inputPaste.value = value.toString('pem');
18752
- this.successParse.emit(value.toString('base64url'));
20460
+ this.inputPaste.value = await value.toString('pem');
20461
+ this.successParse.emit(await value.toString('base64url'));
18753
20462
  }
18754
- decode(value) {
20463
+ async decode(value) {
18755
20464
  new Promise((resolve) => {
18756
20465
  resolve(new X509Certificates(value));
18757
20466
  })
@@ -18759,6 +20468,7 @@ class CertificateDecoder {
18759
20468
  .catch(() => new X509AttributeCertificate(value))
18760
20469
  .catch(() => new Pkcs10CertificateRequest(value))
18761
20470
  .catch(() => new X509Crl(value))
20471
+ .catch(() => new SshCertificate(value))
18762
20472
  .then((res) => this.setValue(res))
18763
20473
  .catch((error) => {
18764
20474
  console.log(error);
@@ -18781,11 +20491,14 @@ class CertificateDecoder {
18781
20491
  if (this.certificateDecoded instanceof X509Crl) {
18782
20492
  return (hAsync("peculiar-crl-viewer", { certificate: this.certificateDecoded, download: true }));
18783
20493
  }
20494
+ if (this.certificateDecoded instanceof SshCertificate) {
20495
+ return (hAsync("peculiar-ssh-certificate-viewer", { certificate: this.certificateDecoded, download: true }));
20496
+ }
18784
20497
  return null;
18785
20498
  }
18786
20499
  render() {
18787
20500
  var _a;
18788
- return (hAsync(Host, { key: '2c4ec8c59145c494dee26f7e6eae99b10481f091' }, hAsync("textarea", { key: '88129c0b5c56b2458c4af2df6d746c25d4252fd2', placeholder: "Certificate DER or PEM", class: "textarea t-b2 c-black", ref: (el) => { this.inputPaste = el; }, onDrop: this.handleDropFile }), hAsync("div", { key: '3730b1bade8d27bb9bc1617018dc5bf01f9277ef', class: "controls" }, hAsync("div", { key: 'b803986ab6d5bfaf5e61cd9df57428e6bff6bb55', class: "control_row" }, hAsync(Typography, { key: 'e6ed2ea27f11d0957da4109e19483cd040febb01', variant: "b3", color: "secondary-tint-2" }, "Drag or load file:"), hAsync("input", { key: '898d0fdd1de5f204337ab8bf77ad1dafd25da882', type: "file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl", value: "", onChange: this.handleChangeInputFile })), ((_a = this.certificateExamples) === null || _a === void 0 ? void 0 : _a.length) && (hAsync("div", { key: 'd6cf99bfc145f44fdfef32e52eb6afa8ec3836cf', class: "control_row" }, hAsync(Typography, { key: '4f7ff1b34fe34837909e328afdf401a5826d89f5', variant: "b3", color: "secondary-tint-2" }, "Load examples:"), hAsync("select", { key: '47c7433eefc2e82fb5dd9a30f062cc71104f7f5b', onChange: this.handleChangeExample }, hAsync("option", { key: '667a68723f7a22b954c1c89e1e86b85ddc6b4fd5', value: "" }, "None"), this.certificateExamples.map((example) => (hAsync("option", { value: example.value }, example.title)))))), hAsync("div", { key: 'e1fc1f00e7bb998d26a818fee955df9561f8e6c0', class: "control_row" }, hAsync(Button, { key: '254fdd5ff25e644ba5d233d9cec2508a28e023c9', onClick: this.handleClickDecode }, "Decode"), hAsync(Button, { key: '594d6e51c56a1b51440f6495eb85af0eda75bcef', onClick: this.handleClickClear }, "Clear"))), this.renderCertificate()));
20501
+ return (hAsync(Host, { key: '9067f2d7f33a40b3ad0ba03c7338a6f800100dab' }, hAsync("textarea", { key: '9e8962631c259fd5e144a1397d8591dde46d032f', placeholder: "Certificate DER or PEM", class: "textarea t-b2 c-black", ref: (el) => { this.inputPaste = el; }, onDrop: this.handleDropFile }), hAsync("div", { key: '9be2b1e6c9b3de94c9d5e1e6cf31d9fb487960d8', class: "controls" }, hAsync("div", { key: '3959b89ab5c5654a3c10a1166743c056c0340e2e', class: "control_row" }, hAsync(Typography, { key: '3c03f42d14ff5a485264523bab40765bb4f89a8f', variant: "b3", color: "secondary-tint-2" }, "Drag or load file:"), hAsync("input", { key: '3c8682f5de0b0e2f84e37a8a05882ebcf331daef', type: "file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl,.cert", value: "", onChange: this.handleChangeInputFile })), ((_a = this.certificateExamples) === null || _a === void 0 ? void 0 : _a.length) && (hAsync("div", { key: '7c38788ccf4b038126ddf6909ec1d3de76325660', class: "control_row" }, hAsync(Typography, { key: 'c1c13aaad3d1df51465c6c51ee24f45313de8f1c', variant: "b3", color: "secondary-tint-2" }, "Load examples:"), hAsync("select", { key: '811c4440269bb0a0a55f488e10dfa12093b18d7b', onChange: this.handleChangeExample }, hAsync("option", { key: 'd2e30396fe3a59d5c46c83c6cd1e5b5a58f15f73', value: "" }, "None"), this.certificateExamples.map((example) => (hAsync("option", { value: example.value }, example.title)))))), hAsync("div", { key: '58daae2b9d8e2dd4c698ec9ad6e7f0d8b2500883', class: "control_row" }, hAsync(Button, { key: 'd7f813370ace60deaad975622cc26b9a497ce9d2', onClick: this.handleClickDecode }, "Decode"), hAsync(Button, { key: 'ec2fbeb6283ffd17c7328ee78c9464926b0bbb6b', onClick: this.handleClickClear }, "Clear"))), this.renderCertificate()));
18789
20502
  }
18790
20503
  static get style() { return certificateDecoderCss; }
18791
20504
  static get cmpMeta() { return {
@@ -18802,7 +20515,7 @@ class CertificateDecoder {
18802
20515
  }; }
18803
20516
  }
18804
20517
 
18805
- const certificateViewerCss$2 = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
20518
+ const certificateViewerCss$3 = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
18806
20519
 
18807
20520
  class CertificateViewer {
18808
20521
  constructor(hostRef) {
@@ -18902,7 +20615,7 @@ class CertificateViewer {
18902
20615
  static get watchers() { return {
18903
20616
  "certificate": ["watchCertificateAndDecode"]
18904
20617
  }; }
18905
- static get style() { return certificateViewerCss$2; }
20618
+ static get style() { return certificateViewerCss$3; }
18906
20619
  static get cmpMeta() { return {
18907
20620
  "$flags$": 265,
18908
20621
  "$tagName$": "peculiar-certificate-viewer",
@@ -19271,7 +20984,7 @@ class CircularProgress {
19271
20984
  }; }
19272
20985
  }
19273
20986
 
19274
- const certificateViewerCss$1 = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
20987
+ const certificateViewerCss$2 = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
19275
20988
 
19276
20989
  class CrlViewer {
19277
20990
  constructor(hostRef) {
@@ -19364,7 +21077,7 @@ class CrlViewer {
19364
21077
  static get watchers() { return {
19365
21078
  "certificate": ["watchCertificateAndDecode"]
19366
21079
  }; }
19367
- static get style() { return certificateViewerCss$1; }
21080
+ static get style() { return certificateViewerCss$2; }
19368
21081
  static get cmpMeta() { return {
19369
21082
  "$flags$": 265,
19370
21083
  "$tagName$": "peculiar-crl-viewer",
@@ -19384,7 +21097,7 @@ class CrlViewer {
19384
21097
  }; }
19385
21098
  }
19386
21099
 
19387
- const certificateViewerCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
21100
+ const certificateViewerCss$1 = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
19388
21101
 
19389
21102
  class CsrViewer {
19390
21103
  constructor(hostRef) {
@@ -19471,12 +21184,12 @@ class CsrViewer {
19471
21184
  if (!this.certificateDecoded) {
19472
21185
  return this.renderEmptyState();
19473
21186
  }
19474
- return (hAsync(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, hAsync("table", null, hAsync(BasicInformation, Object.assign({}, this.certificateDecoded)), hAsync(SubjectName, { name: this.certificateDecoded.subject }), hAsync(PublicKey, { publicKey: this.certificateDecoded.publicKey }), hAsync(Signature, { signature: this.certificateDecoded.signature }), hAsync(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), hAsync(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), hAsync(Extensions, { extensions: this.certificateDecoded.extensions, title: "Extension Request", getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (hAsync(Miscellaneous, { certificate: this.certificateDecoded })))));
21187
+ return (hAsync(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, hAsync("table", null, hAsync(BasicInformation, Object.assign({}, this.certificateDecoded)), hAsync(SubjectName, { name: this.certificateDecoded.subject }), hAsync(PublicKey, { publicKey: this.certificateDecoded.publicKey }), hAsync(Signature, { signature: this.certificateDecoded.signature }), hAsync(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), hAsync(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (hAsync(Miscellaneous, { certificate: this.certificateDecoded })))));
19475
21188
  }
19476
21189
  static get watchers() { return {
19477
21190
  "certificate": ["watchCertificateAndDecode"]
19478
21191
  }; }
19479
- static get style() { return certificateViewerCss; }
21192
+ static get style() { return certificateViewerCss$1; }
19480
21193
  static get cmpMeta() { return {
19481
21194
  "$flags$": 265,
19482
21195
  "$tagName$": "peculiar-csr-viewer",
@@ -19539,6 +21252,167 @@ class HighlightWords {
19539
21252
  }; }
19540
21253
  }
19541
21254
 
21255
+ /**
21256
+ * @license
21257
+ * Copyright (c) Peculiar Ventures, LLC.
21258
+ *
21259
+ * This source code is licensed under the MIT license found in the
21260
+ * LICENSE file in the root directory of this source tree.
21261
+ */
21262
+ const SshBasicInformation = (props) => {
21263
+ const { serialNumber, validity, notBefore, notAfter, type, keyId, principals, extensions, criticalOptions, } = props;
21264
+ return [
21265
+ hAsync(RowTitle, { value: l10n.getString('basicInformation') }),
21266
+ hAsync(RowValue, { name: l10n.getString('type'), value: type }),
21267
+ hAsync(RowValue, { name: l10n.getString('serialNumber'), value: serialNumber, monospace: true }),
21268
+ hAsync(RowValue, { name: l10n.getString('validity'), value: validity }),
21269
+ hAsync(RowValue, { name: l10n.getString('issued'), value: notBefore ? dateShort(notBefore) : undefined }),
21270
+ hAsync(RowValue, { name: l10n.getString('expired'), value: notAfter ? dateShort(notAfter) : undefined }),
21271
+ hAsync(RowValue, { name: l10n.getString('keyId'), value: keyId }),
21272
+ hAsync(RowValue, { name: l10n.getString('principals'), value: principals.join(', ') }),
21273
+ hAsync(RowValue, { name: l10n.getString('criticalOptions'), value: Object.keys(criticalOptions).join(', ') }),
21274
+ hAsync(RowValue, { name: l10n.getString('extensions'), value: Object.keys(extensions).join(', ') }),
21275
+ ];
21276
+ };
21277
+
21278
+ /**
21279
+ * @license
21280
+ * Copyright (c) Peculiar Ventures, LLC.
21281
+ *
21282
+ * This source code is licensed under the MIT license found in the
21283
+ * LICENSE file in the root directory of this source tree.
21284
+ */
21285
+ const SshPublicKey = (props) => {
21286
+ const { key } = props;
21287
+ if (!key) {
21288
+ return null;
21289
+ }
21290
+ return [
21291
+ hAsync(RowTitle, { value: l10n.getString('publicKeyInfo') }),
21292
+ hAsync(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
21293
+ hAsync(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
21294
+ hAsync(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
21295
+ ];
21296
+ };
21297
+
21298
+ /**
21299
+ * @license
21300
+ * Copyright (c) Peculiar Ventures, LLC.
21301
+ *
21302
+ * This source code is licensed under the MIT license found in the
21303
+ * LICENSE file in the root directory of this source tree.
21304
+ */
21305
+ const SshSignatureKey = (props) => {
21306
+ const { key } = props;
21307
+ if (!key) {
21308
+ return null;
21309
+ }
21310
+ return [
21311
+ hAsync(RowTitle, { value: l10n.getString('signingCA') }),
21312
+ hAsync(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
21313
+ hAsync(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
21314
+ hAsync(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
21315
+ ];
21316
+ };
21317
+
21318
+ const certificateViewerCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";
21319
+
21320
+ class SshCertificateViewer {
21321
+ constructor(hostRef) {
21322
+ registerInstance(this, hostRef);
21323
+ /**
21324
+ * Mobile media query string to control screen view change.
21325
+ * <br />
21326
+ * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.
21327
+ * @example
21328
+ * (max-width: 900px)
21329
+ */
21330
+ this.mobileMediaQueryString = '(max-width: 900px)';
21331
+ this.mobileScreenView = false;
21332
+ this.isDecodeInProcess = true;
21333
+ }
21334
+ handleMediaQueryChange(event) {
21335
+ this.mobileScreenView = event.matches;
21336
+ }
21337
+ componentWillLoad() {
21338
+ this.decodeCertificate(this.certificate);
21339
+ }
21340
+ disconnectedCallback() {
21341
+ this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));
21342
+ }
21343
+ async decodeCertificate(certificate) {
21344
+ this.isDecodeInProcess = true;
21345
+ try {
21346
+ if (certificate instanceof SshCertificate) {
21347
+ this.certificateDecoded = certificate;
21348
+ }
21349
+ else if (typeof certificate === 'string') {
21350
+ this.certificateDecoded = new SshCertificate(certificate);
21351
+ }
21352
+ else {
21353
+ return;
21354
+ }
21355
+ // this.certificateDecoded.parseExtensions();
21356
+ await this.certificateDecoded.parsePublicKey();
21357
+ await this.certificateDecoded.parseSignatureKey();
21358
+ }
21359
+ catch (error) {
21360
+ this.certificateDecodeError = error;
21361
+ console.error('Error certificate parse:', error);
21362
+ }
21363
+ this.isDecodeInProcess = false;
21364
+ }
21365
+ /**
21366
+ * Rerun decodeCertificate if previuos value not equal current value
21367
+ */
21368
+ watchCertificateAndDecode(newValue, oldValue) {
21369
+ if (typeof newValue === 'string' && typeof oldValue === 'string') {
21370
+ if (newValue !== oldValue) {
21371
+ this.decodeCertificate(newValue);
21372
+ }
21373
+ return;
21374
+ }
21375
+ if (newValue instanceof SshCertificate && oldValue instanceof SshCertificate) {
21376
+ if (newValue.serialNumber !== oldValue.serialNumber) {
21377
+ this.decodeCertificate(newValue);
21378
+ }
21379
+ }
21380
+ }
21381
+ renderErrorState() {
21382
+ return (hAsync("div", { class: "status_wrapper" }, hAsync(Typography, null, "There was an error decoding this certificate.")));
21383
+ }
21384
+ renderEmptyState() {
21385
+ return (hAsync("div", { class: "status_wrapper" }, hAsync(Typography, null, "There is no certificate available.")));
21386
+ }
21387
+ render() {
21388
+ if (this.certificateDecodeError) {
21389
+ return this.renderErrorState();
21390
+ }
21391
+ if (!this.certificateDecoded) {
21392
+ return this.renderEmptyState();
21393
+ }
21394
+ return (hAsync(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, hAsync("table", null, hAsync(SshBasicInformation, Object.assign({}, this.certificateDecoded)), hAsync(SshPublicKey, { key: this.certificateDecoded.publicKey }), hAsync(SshSignatureKey, { key: this.certificateDecoded.signatureKey }))));
21395
+ }
21396
+ static get watchers() { return {
21397
+ "certificate": ["watchCertificateAndDecode"]
21398
+ }; }
21399
+ static get style() { return certificateViewerCss; }
21400
+ static get cmpMeta() { return {
21401
+ "$flags$": 265,
21402
+ "$tagName$": "peculiar-ssh-certificate-viewer",
21403
+ "$members$": {
21404
+ "certificate": [513],
21405
+ "download": [516],
21406
+ "mobileMediaQueryString": [1, "mobile-media-query-string"],
21407
+ "mobileScreenView": [32],
21408
+ "isDecodeInProcess": [32]
21409
+ },
21410
+ "$listeners$": undefined,
21411
+ "$lazyBundleId$": "-",
21412
+ "$attrsToReflect$": [["certificate", "certificate"], ["download", "download"]]
21413
+ }; }
21414
+ }
21415
+
19542
21416
  const textHiderCss = ".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";
19543
21417
 
19544
21418
  class TextHider {
@@ -19573,6 +21447,7 @@ registerComponents([
19573
21447
  CrlViewer,
19574
21448
  CsrViewer,
19575
21449
  HighlightWords,
21450
+ SshCertificateViewer,
19576
21451
  TextHider,
19577
21452
  ]);
19578
21453