@peculiar/certificates-viewer 4.7.0 → 4.7.1-alpha.4

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 (215) 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 +1 -1
  4. package/components/certificate-viewer.js +3 -2
  5. package/components/certificate-viewer.js.map +1 -1
  6. package/components/crl-viewer.js +4 -2
  7. package/components/crl-viewer.js.map +1 -1
  8. package/components/csr-viewer.js +1 -1
  9. package/components/download.js +1674 -45
  10. package/components/download.js.map +1 -1
  11. package/components/index2.js +3 -2
  12. package/components/index2.js.map +1 -1
  13. package/components/issuer_name.js +1 -1
  14. package/components/miscellaneous.js +4 -79
  15. package/components/miscellaneous.js.map +1 -1
  16. package/components/peculiar-certificate-decoder.js +32 -16
  17. package/components/peculiar-certificate-decoder.js.map +1 -1
  18. package/components/peculiar-certificates-viewer.js +1 -1
  19. package/components/peculiar-ssh-certificate-viewer.d.ts +11 -0
  20. package/components/peculiar-ssh-certificate-viewer.js +12 -0
  21. package/components/peculiar-ssh-certificate-viewer.js.map +1 -0
  22. package/components/peculiar-text-hider.js +1 -32
  23. package/components/peculiar-text-hider.js.map +1 -1
  24. package/components/pkcs10_certificate_request.js +2 -1
  25. package/components/pkcs10_certificate_request.js.map +1 -1
  26. package/components/row.js +87 -0
  27. package/components/row.js.map +1 -0
  28. package/components/ssh-certificate-viewer.js +210 -0
  29. package/components/ssh-certificate-viewer.js.map +1 -0
  30. package/components/subject_name.js +2 -2
  31. package/components/text-hider.js +40 -0
  32. package/components/text-hider.js.map +1 -0
  33. package/components/utils.js +39 -0
  34. package/components/utils.js.map +1 -0
  35. package/dist/cjs/extension-DTtJlxk8.js +110 -0
  36. package/dist/cjs/{extension-CGZpfI3W.js.map → extension-DTtJlxk8.js.map} +1 -1
  37. package/dist/cjs/index.cjs.js +4 -4
  38. package/dist/cjs/loader.cjs.js +1 -1
  39. package/dist/cjs/{miscellaneous-D_RAtkZz.js → miscellaneous-DCeacaAw.js} +147 -147
  40. package/dist/cjs/{miscellaneous-D_RAtkZz.js.map → miscellaneous-DCeacaAw.js.map} +1 -1
  41. 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
  42. package/dist/cjs/{peculiar-attribute-certificate-viewer_4.cjs.entry.js → peculiar-attribute-certificate-viewer_5.cjs.entry.js} +215 -45
  43. package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -0
  44. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -21
  45. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  46. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  47. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
  48. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +23 -23
  49. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  50. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
  51. package/dist/cjs/peculiar.cjs.js +1 -1
  52. package/dist/cjs/pkcs10_certificate_request-DE-0eDXE.js +146 -0
  53. package/dist/cjs/{pkcs10_certificate_request-BQkkkT42.js.map → pkcs10_certificate_request-DE-0eDXE.js.map} +1 -1
  54. package/dist/cjs/{certification_request-DISQwgjn.js → ssh_certificate-D2q_p49O.js} +1676 -16
  55. package/dist/cjs/ssh_certificate-D2q_p49O.js.map +1 -0
  56. package/dist/cjs/{x509_certificate-DGRpZGA2.js → x509_certificate-Cto1q-eu.js} +29 -29
  57. package/dist/cjs/{x509_certificate-DGRpZGA2.js.map → x509_certificate-Cto1q-eu.js.map} +1 -1
  58. package/dist/cjs/{x509_crl-DMvJk_81.js → x509_crl-CgixMZrh.js} +32 -32
  59. package/dist/cjs/{x509_crl-DMvJk_81.js.map → x509_crl-CgixMZrh.js.map} +1 -1
  60. package/dist/collection/collection-manifest.json +1 -0
  61. package/dist/collection/components/certificate-decoder/certificate-decoder.js +10 -6
  62. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  63. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +29 -0
  64. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -0
  65. package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js +23 -0
  66. package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js.map +1 -0
  67. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js +26 -0
  68. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js.map +1 -0
  69. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js +26 -0
  70. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js.map +1 -0
  71. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +194 -0
  72. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -0
  73. package/dist/collection/crypto/index.js +1 -0
  74. package/dist/collection/crypto/index.js.map +1 -1
  75. package/dist/collection/crypto/ssh_certificate.js +74 -0
  76. package/dist/collection/crypto/ssh_certificate.js.map +1 -0
  77. package/dist/collection/locales/en.json +6 -1
  78. package/dist/collection/utils/download.js +5 -0
  79. package/dist/collection/utils/download.js.map +1 -1
  80. package/dist/esm/{extension-CUOKUt7o.js → extension-DmlhftES.js} +3 -3
  81. package/dist/{esm-es5/extension-CUOKUt7o.js.map → esm/extension-DmlhftES.js.map} +1 -1
  82. package/dist/esm/index.js +2 -2
  83. package/dist/esm/loader.js +1 -1
  84. package/dist/esm/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +4 -4
  85. package/dist/esm/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
  86. 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
  87. package/dist/esm/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +185 -16
  88. package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  89. package/dist/esm/peculiar-certificate-decoder.entry.js +14 -10
  90. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  91. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
  92. package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
  93. package/dist/esm/peculiar.js +1 -1
  94. package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +3 -3
  95. package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
  96. package/dist/esm/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +1676 -17
  97. package/dist/esm/ssh_certificate-PCn0WXhQ.js.map +1 -0
  98. package/dist/esm/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
  99. package/dist/esm/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
  100. package/dist/esm/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +5 -5
  101. package/dist/esm/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
  102. package/dist/esm-es5/{extension-CUOKUt7o.js → extension-DmlhftES.js} +2 -2
  103. package/dist/{esm/extension-CUOKUt7o.js.map → esm-es5/extension-DmlhftES.js.map} +1 -1
  104. package/dist/esm-es5/index.js +1 -1
  105. package/dist/esm-es5/loader.js +2 -2
  106. package/dist/esm-es5/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +2 -2
  107. package/dist/esm-es5/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
  108. 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
  109. package/dist/esm-es5/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +31 -3
  110. package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  111. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  112. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  113. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  114. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  115. package/dist/esm-es5/peculiar.js +1 -1
  116. package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +2 -2
  117. package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
  118. package/dist/esm-es5/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +8 -8
  119. package/dist/esm-es5/ssh_certificate-PCn0WXhQ.js.map +1 -0
  120. package/dist/esm-es5/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
  121. package/dist/esm-es5/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
  122. package/dist/esm-es5/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +2 -2
  123. package/dist/esm-es5/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
  124. package/dist/peculiar/index.esm.js +1 -1
  125. package/dist/peculiar/locales/en.json +6 -1
  126. package/dist/peculiar/{p-17ebc78c.system.entry.js → p-24861cf6.system.entry.js} +2 -2
  127. package/dist/peculiar/{p-a193f8fd.system.entry.js → p-46c17c8d.system.entry.js} +2 -2
  128. package/dist/peculiar/{p-a4e74904.entry.js → p-71cb31c6.entry.js} +47 -19
  129. package/dist/peculiar/p-71cb31c6.entry.js.map +1 -0
  130. package/dist/peculiar/{p-4cc72a56.entry.js → p-71eab586.entry.js} +2 -2
  131. package/dist/peculiar/p-7273601a.entry.js +5 -0
  132. package/dist/peculiar/p-7273601a.entry.js.map +1 -0
  133. package/dist/peculiar/p-83bfd8e5.system.entry.js +5 -0
  134. package/dist/peculiar/p-83bfd8e5.system.entry.js.map +1 -0
  135. package/dist/peculiar/{p-e3967e76.entry.js → p-98219569.entry.js} +2 -2
  136. package/dist/peculiar/p-9MJeDspO.system.js.map +1 -0
  137. package/dist/peculiar/p-AjXipXSl.system.js +12 -0
  138. package/dist/peculiar/{p-CgCUixvk.system.js.map → p-AjXipXSl.system.js.map} +1 -1
  139. package/dist/peculiar/{p-CEzxVCEh.system.js → p-B2FH4Pv2.system.js} +2 -2
  140. package/dist/peculiar/{p-CEzxVCEh.system.js.map → p-B2FH4Pv2.system.js.map} +1 -1
  141. package/dist/peculiar/{p-DcTXA-2R.system.js → p-B5GO6_Ut.system.js} +18 -18
  142. package/dist/peculiar/{p-DcTXA-2R.system.js.map → p-B5GO6_Ut.system.js.map} +1 -1
  143. package/dist/peculiar/{p-Bsy7Sqzl.system.js.map → p-B82-c-xr.system.js.map} +1 -1
  144. package/dist/peculiar/p-BGASC3UX.system.js +1 -1
  145. package/dist/peculiar/p-BHpSDBz_.system.js.map +1 -0
  146. package/dist/peculiar/p-BwlcJAh0.js +12 -0
  147. package/dist/peculiar/{p-CZuaTO2G.js.map → p-BwlcJAh0.js.map} +1 -1
  148. package/dist/peculiar/{p-D8TC0Na9.system.js.map → p-CSz5liuX.system.js.map} +1 -1
  149. package/dist/peculiar/{p-tl0v45Y7.js → p-CstRxc9v.js} +2 -2
  150. package/dist/peculiar/{p-tl0v45Y7.js.map → p-CstRxc9v.js.map} +1 -1
  151. package/dist/peculiar/p-DMDALRLP.system.js +135 -0
  152. package/dist/peculiar/p-DMDALRLP.system.js.map +1 -0
  153. package/dist/peculiar/{p-DTz3NA_M.system.js → p-DPbpwYQ8.system.js} +3 -3
  154. package/dist/peculiar/{p-DTz3NA_M.system.js.map → p-DPbpwYQ8.system.js.map} +1 -1
  155. package/dist/peculiar/{p-CoPYW15U.js → p-Db41gPxb.js} +4 -4
  156. package/dist/peculiar/{p-CoPYW15U.js.map → p-Db41gPxb.js.map} +1 -1
  157. package/dist/peculiar/{p-DKooqn40.js → p-DnOLjFJP.js} +39 -39
  158. package/dist/peculiar/{p-DKooqn40.js.map → p-DnOLjFJP.js.map} +1 -1
  159. package/dist/peculiar/{p-CSS3OhZq.js → p-PCn0WXhQ.js} +13 -13
  160. package/dist/peculiar/p-PCn0WXhQ.js.map +1 -0
  161. package/dist/peculiar/{p-7fTYvx_V.system.js → p-SjVQtfgD.system.js} +5 -5
  162. package/dist/peculiar/{p-7fTYvx_V.system.js.map → p-SjVQtfgD.system.js.map} +1 -1
  163. package/dist/peculiar/{p-e7c60082.system.entry.js → p-cc01a2da.system.entry.js} +47 -19
  164. package/dist/peculiar/p-cc01a2da.system.entry.js.map +1 -0
  165. package/dist/peculiar/{p-BTn-wukS.system.js → p-dOkqMp-O.system.js} +2 -2
  166. package/dist/peculiar/p-dOkqMp-O.system.js.map +1 -0
  167. package/dist/peculiar/{p-BG_D4qzJ.js → p-h7XP7otl.js} +3 -3
  168. package/dist/peculiar/{p-BG_D4qzJ.js.map → p-h7XP7otl.js.map} +1 -1
  169. 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
  170. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  171. package/dist/peculiar/peculiar.esm.js +1 -1
  172. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +4 -4
  173. package/dist/types/components/ssh-certificate-viewer/-components/basic_information.d.ts +21 -0
  174. package/dist/types/components/ssh-certificate-viewer/-components/miscellaneous.d.ts +14 -0
  175. package/dist/types/components/ssh-certificate-viewer/-components/public_key.d.ts +14 -0
  176. package/dist/types/components/ssh-certificate-viewer/-components/signature_key.d.ts +14 -0
  177. package/dist/types/components/ssh-certificate-viewer/ssh-certificate-viewer.d.ts +43 -0
  178. package/dist/types/components.d.ts +43 -0
  179. package/dist/types/crypto/index.d.ts +1 -0
  180. package/dist/types/crypto/ssh_certificate.d.ts +30 -0
  181. package/dist/types/utils/download.d.ts +3 -0
  182. package/dist/types/utils/l10n.d.ts +5 -0
  183. package/hydrate/index.js +1869 -27
  184. package/hydrate/index.mjs +1869 -27
  185. package/package.json +3 -2
  186. package/dist/cjs/certification_request-DISQwgjn.js.map +0 -1
  187. package/dist/cjs/extension-CGZpfI3W.js +0 -110
  188. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +0 -1
  189. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +0 -1
  190. package/dist/cjs/pkcs10_certificate_request-BQkkkT42.js +0 -146
  191. package/dist/esm/certification_request-CSS3OhZq.js.map +0 -1
  192. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  193. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  194. package/dist/esm-es5/certification_request-CSS3OhZq.js.map +0 -1
  195. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  196. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  197. package/dist/peculiar/p-BTn-wukS.system.js.map +0 -1
  198. package/dist/peculiar/p-CSS3OhZq.js.map +0 -1
  199. package/dist/peculiar/p-CZuaTO2G.js +0 -12
  200. package/dist/peculiar/p-CgCUixvk.system.js +0 -12
  201. package/dist/peculiar/p-DLsQGkmT.system.js.map +0 -1
  202. package/dist/peculiar/p-D_WeukQa.system.js +0 -135
  203. package/dist/peculiar/p-D_WeukQa.system.js.map +0 -1
  204. package/dist/peculiar/p-a4e74904.entry.js.map +0 -1
  205. package/dist/peculiar/p-ce006f1c.system.entry.js +0 -5
  206. package/dist/peculiar/p-ce006f1c.system.entry.js.map +0 -1
  207. package/dist/peculiar/p-e7c60082.system.entry.js.map +0 -1
  208. package/dist/peculiar/p-f465afe6.entry.js +0 -5
  209. package/dist/peculiar/p-f465afe6.entry.js.map +0 -1
  210. package/dist/peculiar/p-tBL0ekYY.system.js.map +0 -1
  211. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +0 -1
  212. /package/dist/peculiar/{p-17ebc78c.system.entry.js.map → p-24861cf6.system.entry.js.map} +0 -0
  213. /package/dist/peculiar/{p-a193f8fd.system.entry.js.map → p-46c17c8d.system.entry.js.map} +0 -0
  214. /package/dist/peculiar/{p-4cc72a56.entry.js.map → p-71eab586.entry.js.map} +0 -0
  215. /package/dist/peculiar/{p-e3967e76.entry.js.map → p-98219569.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,
@@ -9998,6 +10002,7 @@ var en = {
9998
10002
  download: download,
9999
10003
  "download.pem": "Download PEM",
10000
10004
  "download.der": "Download DER",
10005
+ "download.ssh": "Download SSH",
10001
10006
  serialNumber: serialNumber,
10002
10007
  version: version,
10003
10008
  validity: validity,
@@ -10034,7 +10039,11 @@ var en = {
10034
10039
  crlEntryExtensions: crlEntryExtensions,
10035
10040
  previewCertificate: previewCertificate,
10036
10041
  viewDetails: viewDetails,
10037
- downloadOptions: downloadOptions
10042
+ downloadOptions: downloadOptions,
10043
+ keyId: keyId,
10044
+ principals: principals,
10045
+ criticalOptions: criticalOptions,
10046
+ signingCA: signingCA
10038
10047
  };
10039
10048
 
10040
10049
  /**
@@ -10165,6 +10174,11 @@ Download.crl = {
10165
10174
  downloadFromBuffer(raw, name, 'crl', 'application/pkix-crl');
10166
10175
  },
10167
10176
  };
10177
+ Download.certSSH = {
10178
+ asSSH: (value, name) => {
10179
+ downloadFromBuffer(Convert.FromString(value), name, 'cert', 'application/ssh-cert');
10180
+ },
10181
+ };
10168
10182
 
10169
10183
  /**
10170
10184
  * @license
@@ -12572,13 +12586,13 @@ function camelCaseToWords(value) {
12572
12586
  * This source code is licensed under the MIT license found in the
12573
12587
  * LICENSE file in the root directory of this source tree.
12574
12588
  */
12575
- var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12589
+ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12576
12590
  if (kind === "m") throw new TypeError("Private method is not writable");
12577
12591
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12578
12592
  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");
12579
12593
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12580
12594
  };
12581
- var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12595
+ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12582
12596
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12583
12597
  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");
12584
12598
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12588,15 +12602,15 @@ class Name {
12588
12602
  constructor(data) {
12589
12603
  _Name_asn.set(this, new Name$1());
12590
12604
  if (BufferSourceConverter.isBufferSource(data)) {
12591
- __classPrivateFieldSet$1(this, _Name_asn, AsnParser.parse(data, Name$1), "f");
12605
+ __classPrivateFieldSet$2(this, _Name_asn, AsnParser.parse(data, Name$1), "f");
12592
12606
  }
12593
12607
  else {
12594
- __classPrivateFieldSet$1(this, _Name_asn, data, "f");
12608
+ __classPrivateFieldSet$2(this, _Name_asn, data, "f");
12595
12609
  }
12596
12610
  }
12597
12611
  toJSON() {
12598
12612
  const res = [];
12599
- __classPrivateFieldGet$1(this, _Name_asn, "f").forEach((o) => (o.forEach((a) => {
12613
+ __classPrivateFieldGet$2(this, _Name_asn, "f").forEach((o) => (o.forEach((a) => {
12600
12614
  res.push({
12601
12615
  type: a.type,
12602
12616
  name: OIDs[a.type],
@@ -14160,13 +14174,13 @@ __decorate([
14160
14174
  * This source code is licensed under the MIT license found in the
14161
14175
  * LICENSE file in the root directory of this source tree.
14162
14176
  */
14163
- var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14177
+ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14164
14178
  if (kind === "m") throw new TypeError("Private method is not writable");
14165
14179
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14166
14180
  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");
14167
14181
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14168
14182
  };
14169
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14183
+ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14170
14184
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14171
14185
  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");
14172
14186
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14179,20 +14193,20 @@ class AsnData {
14179
14193
  _AsnData_raw.set(this, void 0);
14180
14194
  if (args.length === 1) {
14181
14195
  // asn
14182
- __classPrivateFieldSet(this, _AsnData_asn, args[0], "f");
14183
- __classPrivateFieldSet(this, _AsnData_raw, AsnConvert.serialize(__classPrivateFieldGet(this, _AsnData_asn, "f")), "f");
14196
+ __classPrivateFieldSet$1(this, _AsnData_asn, args[0], "f");
14197
+ __classPrivateFieldSet$1(this, _AsnData_raw, AsnConvert.serialize(__classPrivateFieldGet$1(this, _AsnData_asn, "f")), "f");
14184
14198
  }
14185
14199
  else {
14186
14200
  // raw, type
14187
- __classPrivateFieldSet(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
14188
- __classPrivateFieldSet(this, _AsnData_raw, BufferSourceConverter.toArrayBuffer(args[0]), "f");
14201
+ __classPrivateFieldSet$1(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
14202
+ __classPrivateFieldSet$1(this, _AsnData_raw, BufferSourceConverter.toArrayBuffer(args[0]), "f");
14189
14203
  }
14190
14204
  }
14191
14205
  get asn() {
14192
- return __classPrivateFieldGet(this, _AsnData_asn, "f");
14206
+ return __classPrivateFieldGet$1(this, _AsnData_asn, "f");
14193
14207
  }
14194
14208
  get raw() {
14195
- return __classPrivateFieldGet(this, _AsnData_raw, "f");
14209
+ return __classPrivateFieldGet$1(this, _AsnData_raw, "f");
14196
14210
  }
14197
14211
  }
14198
14212
  _AsnData_asn = new WeakMap(), _AsnData_raw = new WeakMap();
@@ -16640,6 +16654,1651 @@ class X509Certificates extends Array {
16640
16654
  }
16641
16655
  }
16642
16656
 
16657
+ let globalCrypto = globalThis.crypto;
16658
+ function getCrypto() {
16659
+ return globalCrypto;
16660
+ }
16661
+
16662
+ class SshError extends Error {
16663
+ code;
16664
+ constructor(message, code) {
16665
+ super(message);
16666
+ this.code = code;
16667
+ this.name = this.constructor.name;
16668
+ if (Error.captureStackTrace) {
16669
+ Error.captureStackTrace(this, this.constructor);
16670
+ }
16671
+ }
16672
+ }
16673
+ class UnsupportedAlgorithmError extends SshError {
16674
+ constructor(algorithm, supportedAlgorithms) {
16675
+ const supported = supportedAlgorithms ? ` Supported: ${supportedAlgorithms.join(', ')}` : '';
16676
+ super(`Unsupported algorithm: ${algorithm}.${supported}`, 'UNSUPPORTED_ALGORITHM');
16677
+ }
16678
+ }
16679
+ class InvalidFormatError extends SshError {
16680
+ constructor(format, expectedFormat) {
16681
+ const expected = expectedFormat ? ` Expected: ${expectedFormat}` : '';
16682
+ super(`Invalid format: ${format}.${expected}`, 'INVALID_FORMAT');
16683
+ }
16684
+ }
16685
+ class UnsupportedKeyTypeError extends SshError {
16686
+ constructor(keyType, supportedTypes) {
16687
+ const supported = supportedTypes ? ` Supported: ${supportedTypes.join(', ')}` : '';
16688
+ super(`Unsupported key type: ${keyType}.${supported}`, 'UNSUPPORTED_KEY_TYPE');
16689
+ }
16690
+ }
16691
+ class InvalidPrivateKeyFormatError extends SshError {
16692
+ constructor(details) {
16693
+ const message = details
16694
+ ? `Invalid SSH private key format: ${details}`
16695
+ : 'Invalid SSH private key format';
16696
+ super(message, 'INVALID_PRIVATE_KEY_FORMAT');
16697
+ }
16698
+ }
16699
+ class EncryptedKeyNotSupportedError extends SshError {
16700
+ constructor(cipher) {
16701
+ const message = cipher
16702
+ ? `Encrypted SSH private keys are not supported (cipher: ${cipher})`
16703
+ : 'Encrypted SSH private keys are not supported';
16704
+ super(message, 'ENCRYPTED_KEY_NOT_SUPPORTED');
16705
+ }
16706
+ }
16707
+ class InvalidKeyDataError extends SshError {
16708
+ constructor(details) {
16709
+ const message = details ? `Invalid key data: ${details}` : 'Invalid key data';
16710
+ super(message, 'INVALID_KEY_DATA');
16711
+ }
16712
+ }
16713
+ class UnexpectedEOFError extends SshError {
16714
+ constructor(expected, actual) {
16715
+ const details = expected !== undefined && actual !== undefined
16716
+ ? ` Expected ${expected} bytes, got ${actual}`
16717
+ : '';
16718
+ super(`Unexpected end of data${details}`, 'UNEXPECTED_EOF');
16719
+ }
16720
+ }
16721
+
16722
+ const encoder = new TextEncoder();
16723
+ const decoder = new TextDecoder();
16724
+
16725
+ class SshReader {
16726
+ buffer;
16727
+ offset;
16728
+ constructor(data) {
16729
+ this.buffer = data;
16730
+ this.offset = 0;
16731
+ }
16732
+ readUint8() {
16733
+ if (this.offset >= this.buffer.length) {
16734
+ throw new UnexpectedEOFError(1, 0);
16735
+ }
16736
+ return this.buffer[this.offset++];
16737
+ }
16738
+ readUint32() {
16739
+ const value = (this.readUint8() << 24) |
16740
+ (this.readUint8() << 16) |
16741
+ (this.readUint8() << 8) |
16742
+ this.readUint8();
16743
+ return value >>> 0;
16744
+ }
16745
+ readUint64() {
16746
+ const high = this.readUint32();
16747
+ const low = this.readUint32();
16748
+ return (BigInt(high) << 32n) | BigInt(low);
16749
+ }
16750
+ readBytes(length) {
16751
+ if (length < 0) {
16752
+ throw new InvalidFormatError(`Invalid length: ${length}`);
16753
+ }
16754
+ if (this.offset + length > this.buffer.length) {
16755
+ throw new UnexpectedEOFError(length, this.buffer.length - this.offset);
16756
+ }
16757
+ const result = this.buffer.subarray(this.offset, this.offset + length);
16758
+ this.offset += length;
16759
+ return result;
16760
+ }
16761
+ readString() {
16762
+ const length = this.readUint32();
16763
+ const bytes = this.readBytes(length);
16764
+ return decoder.decode(bytes);
16765
+ }
16766
+ peekString(length) {
16767
+ if (this.offset + length > this.buffer.length) {
16768
+ throw new UnexpectedEOFError(length, this.buffer.length - this.offset);
16769
+ }
16770
+ const bytes = this.buffer.subarray(this.offset, this.offset + length);
16771
+ return decoder.decode(bytes);
16772
+ }
16773
+ readMpInt(sshEncoding = false) {
16774
+ const length = this.readUint32();
16775
+ const bytes = this.readBytes(length);
16776
+ if (sshEncoding && bytes.length > 1 && bytes[0] === 0x00) {
16777
+ return bytes.subarray(1);
16778
+ }
16779
+ return bytes;
16780
+ }
16781
+ readMpIntSsh() {
16782
+ return this.readMpInt(true);
16783
+ }
16784
+ remaining() {
16785
+ return this.buffer.length - this.offset;
16786
+ }
16787
+ getOffset() {
16788
+ return this.offset;
16789
+ }
16790
+ seek(offset) {
16791
+ if (offset < 0 || offset > this.buffer.length) {
16792
+ throw new InvalidFormatError(`Invalid offset: ${offset}. Buffer length: ${this.buffer.length}`);
16793
+ }
16794
+ this.offset = offset;
16795
+ }
16796
+ }
16797
+
16798
+ class SshWriter {
16799
+ buffer;
16800
+ offset;
16801
+ constructor(initialSize = 1024) {
16802
+ this.buffer = new Uint8Array(initialSize);
16803
+ this.offset = 0;
16804
+ }
16805
+ ensureCapacity(additional) {
16806
+ const required = this.offset + additional;
16807
+ if (required > this.buffer.length) {
16808
+ const newSize = Math.max(required, this.buffer.length * 2);
16809
+ const newBuffer = new Uint8Array(newSize);
16810
+ newBuffer.set(this.buffer.subarray(0, this.offset));
16811
+ this.buffer = newBuffer;
16812
+ }
16813
+ }
16814
+ reserve(minCapacity) {
16815
+ if (minCapacity > this.buffer.length) {
16816
+ const newBuffer = new Uint8Array(minCapacity);
16817
+ newBuffer.set(this.buffer.subarray(0, this.offset));
16818
+ this.buffer = newBuffer;
16819
+ }
16820
+ }
16821
+ writeUint8(value) {
16822
+ this.ensureCapacity(1);
16823
+ this.buffer[this.offset++] = value & 0xff;
16824
+ }
16825
+ writeUint32(value) {
16826
+ this.ensureCapacity(4);
16827
+ this.buffer[this.offset++] = (value >>> 24) & 0xff;
16828
+ this.buffer[this.offset++] = (value >>> 16) & 0xff;
16829
+ this.buffer[this.offset++] = (value >>> 8) & 0xff;
16830
+ this.buffer[this.offset++] = value & 0xff;
16831
+ }
16832
+ writeUint64(value) {
16833
+ this.ensureCapacity(8);
16834
+ const high = Number(value >> 32n);
16835
+ const low = Number(value & 0xffffffffn);
16836
+ this.writeUint32(high);
16837
+ this.writeUint32(low);
16838
+ }
16839
+ writeBytes(data) {
16840
+ this.ensureCapacity(data.length);
16841
+ this.buffer.set(data, this.offset);
16842
+ this.offset += data.length;
16843
+ }
16844
+ writeString(value) {
16845
+ const bytes = encoder.encode(value);
16846
+ this.writeUint32(bytes.length);
16847
+ this.writeBytes(bytes);
16848
+ }
16849
+ writeMpInt(value, sshEncoding = false) {
16850
+ if (sshEncoding && value.length > 0 && (value[0] & 0x80) !== 0) {
16851
+ const paddedBytes = new Uint8Array(value.length + 1);
16852
+ paddedBytes[0] = 0x00;
16853
+ paddedBytes.set(value, 1);
16854
+ this.writeUint32(paddedBytes.length);
16855
+ this.writeBytes(paddedBytes);
16856
+ }
16857
+ else {
16858
+ this.writeUint32(value.length);
16859
+ this.writeBytes(value);
16860
+ }
16861
+ }
16862
+ writeMpIntSsh(value) {
16863
+ this.writeMpInt(value, true);
16864
+ }
16865
+ toUint8Array() {
16866
+ return this.buffer.subarray(0, this.offset);
16867
+ }
16868
+ getOffset() {
16869
+ return this.offset;
16870
+ }
16871
+ seek(offset) {
16872
+ if (offset < 0 || offset > this.buffer.length) {
16873
+ throw new InvalidFormatError('Invalid offset');
16874
+ }
16875
+ this.offset = offset;
16876
+ }
16877
+ }
16878
+
16879
+ class RsaBinding {
16880
+ hash = 'SHA-256';
16881
+ constructor(hash = 'SHA-256') {
16882
+ this.hash = hash;
16883
+ }
16884
+ async importPublicSsh(params) {
16885
+ const { blob, crypto } = params;
16886
+ const reader = new SshReader(blob);
16887
+ reader.readString();
16888
+ const e = reader.readMpInt(true);
16889
+ const n = reader.readMpInt(true);
16890
+ const jwk = {
16891
+ kty: 'RSA',
16892
+ n: Convert.ToBase64Url(n),
16893
+ e: Convert.ToBase64Url(e),
16894
+ };
16895
+ return crypto.subtle.importKey('jwk', jwk, {
16896
+ name: 'RSASSA-PKCS1-v1_5',
16897
+ hash: this.hash,
16898
+ }, true, ['verify']);
16899
+ }
16900
+ async exportPublicSsh(params) {
16901
+ const { publicKey, crypto } = params;
16902
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
16903
+ if (!jwk.n || !jwk.e) {
16904
+ throw new InvalidKeyDataError('RSA JWK missing required parameters (n, e)');
16905
+ }
16906
+ const n = BufferSourceConverter.toUint8Array(Convert.FromBase64Url(jwk.n));
16907
+ const e = BufferSourceConverter.toUint8Array(Convert.FromBase64Url(jwk.e));
16908
+ const writer = new SshWriter();
16909
+ writer.writeString('ssh-rsa');
16910
+ writer.writeMpInt(e, true);
16911
+ writer.writeMpInt(n, true);
16912
+ return writer.toUint8Array();
16913
+ }
16914
+ async importPublicSpki(params) {
16915
+ const { spki, crypto } = params;
16916
+ return crypto.subtle.importKey('spki', spki, {
16917
+ name: 'RSASSA-PKCS1-v1_5',
16918
+ hash: this.hash,
16919
+ }, true, ['verify']);
16920
+ }
16921
+ async exportPublicSpki(params) {
16922
+ const { publicKey, crypto } = params;
16923
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
16924
+ return BufferSourceConverter.toUint8Array(spki);
16925
+ }
16926
+ async importPrivatePkcs8(params) {
16927
+ const { pkcs8, crypto } = params;
16928
+ return crypto.subtle.importKey('pkcs8', pkcs8, {
16929
+ name: 'RSASSA-PKCS1-v1_5',
16930
+ hash: this.hash,
16931
+ }, true, ['sign']);
16932
+ }
16933
+ async exportPrivatePkcs8(params) {
16934
+ const { privateKey, crypto } = params;
16935
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
16936
+ return BufferSourceConverter.toUint8Array(pkcs8);
16937
+ }
16938
+ async importPrivateSsh(params) {
16939
+ const { sshKey, crypto } = params;
16940
+ const base64Data = sshKey
16941
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
16942
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
16943
+ .replace(/\s/g, '');
16944
+ const binaryData = Convert.FromBase64(base64Data);
16945
+ const reader = new SshReader(BufferSourceConverter.toUint8Array(binaryData));
16946
+ const magic = reader.readBytes(15);
16947
+ if (Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
16948
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
16949
+ }
16950
+ const _cipherName = reader.readString();
16951
+ reader.readString();
16952
+ reader.readString();
16953
+ if (_cipherName !== 'none') {
16954
+ throw new EncryptedKeyNotSupportedError(_cipherName);
16955
+ }
16956
+ const numKeys = reader.readUint32();
16957
+ if (numKeys !== 1) {
16958
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
16959
+ }
16960
+ const publicKeyLength = reader.readUint32();
16961
+ reader.readBytes(publicKeyLength);
16962
+ const privateKeyLength = reader.readUint32();
16963
+ const privateKeyData = reader.readBytes(privateKeyLength);
16964
+ const privateReader = new SshReader(privateKeyData);
16965
+ const checkint1 = privateReader.readUint32();
16966
+ const checkint2 = privateReader.readUint32();
16967
+ if (checkint1 !== checkint2) {
16968
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
16969
+ }
16970
+ privateReader.readString();
16971
+ const n = privateReader.readMpInt(true);
16972
+ const e = privateReader.readMpInt(true);
16973
+ const d = privateReader.readMpInt(true);
16974
+ const iqmp = privateReader.readMpInt(true);
16975
+ const p = privateReader.readMpInt(true);
16976
+ const q = privateReader.readMpInt(true);
16977
+ privateReader.readString();
16978
+ const dBig = BigInt('0x' + Convert.ToHex(d));
16979
+ const pBig = BigInt('0x' + Convert.ToHex(p));
16980
+ const qBig = BigInt('0x' + Convert.ToHex(q));
16981
+ const dpBig = dBig % (pBig - 1n);
16982
+ const dqBig = dBig % (qBig - 1n);
16983
+ const dpBytes = Convert.FromHex(dpBig.toString(16).padStart(p.length * 2, '0'));
16984
+ const dqBytes = Convert.FromHex(dqBig.toString(16).padStart(q.length * 2, '0'));
16985
+ const jwk = {
16986
+ kty: 'RSA',
16987
+ n: Convert.ToBase64Url(n),
16988
+ e: Convert.ToBase64Url(e),
16989
+ d: Convert.ToBase64Url(d),
16990
+ p: Convert.ToBase64Url(p),
16991
+ q: Convert.ToBase64Url(q),
16992
+ dp: Convert.ToBase64Url(dpBytes),
16993
+ dq: Convert.ToBase64Url(dqBytes),
16994
+ qi: Convert.ToBase64Url(iqmp),
16995
+ };
16996
+ return crypto.subtle.importKey('jwk', jwk, {
16997
+ name: 'RSASSA-PKCS1-v1_5',
16998
+ hash: this.hash,
16999
+ }, true, ['sign']);
17000
+ }
17001
+ async exportPrivateSsh(params) {
17002
+ const { privateKey, crypto, jwk: providedJwk } = params;
17003
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
17004
+ if (!jwk.n || !jwk.e || !jwk.d || !jwk.p || !jwk.q) {
17005
+ throw new InvalidKeyDataError('RSA JWK missing required parameters');
17006
+ }
17007
+ const n = new Uint8Array(Convert.FromBase64Url(jwk.n));
17008
+ const e = new Uint8Array(Convert.FromBase64Url(jwk.e));
17009
+ const d = new Uint8Array(Convert.FromBase64Url(jwk.d));
17010
+ const p = new Uint8Array(Convert.FromBase64Url(jwk.p));
17011
+ const q = new Uint8Array(Convert.FromBase64Url(jwk.q));
17012
+ const qi = jwk.qi ? new Uint8Array(Convert.FromBase64Url(jwk.qi)) : new Uint8Array();
17013
+ const writer = new SshWriter();
17014
+ writer.writeString('ssh-rsa');
17015
+ writer.writeMpInt(n, true);
17016
+ writer.writeMpInt(e, true);
17017
+ writer.writeMpInt(d, true);
17018
+ writer.writeMpInt(qi, true);
17019
+ writer.writeMpInt(p, true);
17020
+ writer.writeMpInt(q, true);
17021
+ return writer.toUint8Array();
17022
+ }
17023
+ async sign(params) {
17024
+ const { privateKey, data, crypto, hash } = params;
17025
+ if (hash && hash !== this.hash) {
17026
+ throw new InvalidKeyDataError(`Hash ${hash} not supported for this RSA algorithm`);
17027
+ }
17028
+ if (!privateKey.extractable) {
17029
+ throw new InvalidKeyDataError('Private key is not extractable');
17030
+ }
17031
+ const pkcs8 = await this.exportPrivatePkcs8({ privateKey, crypto });
17032
+ const keyToUse = await this.importPrivatePkcs8({ pkcs8: new Uint8Array(pkcs8), crypto });
17033
+ const signature = await crypto.subtle.sign('RSASSA-PKCS1-v1_5', keyToUse, data);
17034
+ return BufferSourceConverter.toUint8Array(signature);
17035
+ }
17036
+ async verify(params) {
17037
+ const { publicKey, signature, data, crypto, hash } = params;
17038
+ if (hash && hash !== this.hash) {
17039
+ return false;
17040
+ }
17041
+ if (!publicKey.extractable) {
17042
+ throw new InvalidKeyDataError('Public key is not extractable');
17043
+ }
17044
+ const spki = await this.exportPublicSpki({ publicKey, crypto });
17045
+ const keyToUse = await this.importPublicSpki({ spki: new Uint8Array(spki), crypto });
17046
+ return crypto.subtle.verify('RSASSA-PKCS1-v1_5', keyToUse, signature, data);
17047
+ }
17048
+ encodeSignature(params) {
17049
+ const { signature, algo } = params;
17050
+ const writer = new SshWriter();
17051
+ writer.writeString(algo);
17052
+ writer.writeUint32(signature.byteLength);
17053
+ writer.writeBytes(signature);
17054
+ return writer.toUint8Array();
17055
+ }
17056
+ decodeSignature(params) {
17057
+ const { signature } = params;
17058
+ const reader = new SshReader(signature);
17059
+ const algo = reader.readString();
17060
+ const sigLength = reader.readUint32();
17061
+ const sig = reader.readBytes(sigLength);
17062
+ return { signature: sig, algo };
17063
+ }
17064
+ supportsCryptoKey(cryptoKey) {
17065
+ return cryptoKey.algorithm.name === 'RSASSA-PKCS1-v1_5';
17066
+ }
17067
+ parsePublicKey(reader) {
17068
+ const publicKeyExponent = reader.readBytes(reader.readUint32());
17069
+ const publicKeyModulus = reader.readBytes(reader.readUint32());
17070
+ const writer = new SshWriter();
17071
+ writer.writeString('ssh-rsa');
17072
+ writer.writeMpInt(publicKeyExponent);
17073
+ writer.writeMpInt(publicKeyModulus);
17074
+ return {
17075
+ type: 'ssh-rsa',
17076
+ keyData: writer.toUint8Array(),
17077
+ };
17078
+ }
17079
+ writePublicKey(writer, publicKey) {
17080
+ const publicKeyReader = new SshReader(publicKey.keyData);
17081
+ publicKeyReader.readString();
17082
+ const e = publicKeyReader.readMpInt();
17083
+ const n = publicKeyReader.readMpInt();
17084
+ writer.writeUint32(e.length);
17085
+ writer.writeBytes(e);
17086
+ writer.writeUint32(n.length);
17087
+ writer.writeBytes(n);
17088
+ }
17089
+ getCertificateType() {
17090
+ return 'ssh-rsa-cert-v01@openssh.com';
17091
+ }
17092
+ getSignatureAlgo() {
17093
+ return this.hash === 'SHA-256' ? 'rsa-sha2-256' : 'rsa-sha2-512';
17094
+ }
17095
+ }
17096
+
17097
+ class EcdsaBinding {
17098
+ curveName;
17099
+ sshType;
17100
+ namedCurve;
17101
+ constructor(curveName, sshType, namedCurve) {
17102
+ this.curveName = curveName;
17103
+ this.sshType = sshType;
17104
+ this.namedCurve = namedCurve;
17105
+ }
17106
+ getHashAlgorithm() {
17107
+ switch (this.namedCurve) {
17108
+ case 'P-256':
17109
+ return 'SHA-256';
17110
+ case 'P-384':
17111
+ return 'SHA-384';
17112
+ case 'P-521':
17113
+ return 'SHA-512';
17114
+ default:
17115
+ return 'SHA-256';
17116
+ }
17117
+ }
17118
+ getExpectedLength() {
17119
+ switch (this.namedCurve) {
17120
+ case 'P-256':
17121
+ return 32;
17122
+ case 'P-384':
17123
+ return 48;
17124
+ case 'P-521':
17125
+ return 66;
17126
+ default:
17127
+ return 32;
17128
+ }
17129
+ }
17130
+ getSignatureCoordLength() {
17131
+ return this.getExpectedLength();
17132
+ }
17133
+ async importPublicSsh(params) {
17134
+ const { blob, crypto } = params;
17135
+ const reader = new SshReader(blob);
17136
+ reader.readString();
17137
+ const curve = reader.readString();
17138
+ if (curve !== this.curveName) {
17139
+ throw new InvalidKeyDataError(`ECDSA curve name ${curve}, expected ${this.curveName}`);
17140
+ }
17141
+ const q = reader.readMpInt();
17142
+ const coordLength = Math.floor((q.length - 1) / 2);
17143
+ const jwk = {
17144
+ kty: 'EC',
17145
+ crv: this.namedCurve,
17146
+ x: Convert.ToBase64Url(q.slice(1, 1 + coordLength)),
17147
+ y: Convert.ToBase64Url(q.slice(1 + coordLength)),
17148
+ };
17149
+ return crypto.subtle.importKey('jwk', jwk, {
17150
+ name: 'ECDSA',
17151
+ namedCurve: this.namedCurve,
17152
+ }, true, ['verify']);
17153
+ }
17154
+ async exportPublicSsh(params) {
17155
+ const { publicKey, crypto } = params;
17156
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
17157
+ if (!jwk.x || !jwk.y) {
17158
+ throw new InvalidKeyDataError('ECDSA JWK missing x or y parameters');
17159
+ }
17160
+ const x = new Uint8Array(Convert.FromBase64Url(jwk.x));
17161
+ const y = new Uint8Array(Convert.FromBase64Url(jwk.y));
17162
+ const q = new Uint8Array(1 + x.length + y.length);
17163
+ q[0] = 0x04;
17164
+ q.set(x, 1);
17165
+ q.set(y, 1 + x.length);
17166
+ const writer = new SshWriter();
17167
+ writer.writeString(this.sshType);
17168
+ writer.writeString(this.curveName);
17169
+ writer.writeMpInt(q);
17170
+ return writer.toUint8Array();
17171
+ }
17172
+ async importPublicSpki(params) {
17173
+ const { spki, crypto } = params;
17174
+ return crypto.subtle.importKey('spki', spki, {
17175
+ name: 'ECDSA',
17176
+ namedCurve: this.namedCurve,
17177
+ }, true, ['verify']);
17178
+ }
17179
+ async exportPublicSpki(params) {
17180
+ const { publicKey, crypto } = params;
17181
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
17182
+ return BufferSourceConverter.toUint8Array(spki);
17183
+ }
17184
+ async importPrivatePkcs8(params) {
17185
+ const { pkcs8, crypto } = params;
17186
+ return crypto.subtle.importKey('pkcs8', pkcs8, {
17187
+ name: 'ECDSA',
17188
+ namedCurve: this.namedCurve,
17189
+ }, true, ['sign']);
17190
+ }
17191
+ async exportPrivatePkcs8(params) {
17192
+ const { privateKey, crypto } = params;
17193
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
17194
+ return BufferSourceConverter.toUint8Array(pkcs8);
17195
+ }
17196
+ async exportPrivateSsh(params) {
17197
+ const { privateKey, crypto, jwk: providedJwk } = params;
17198
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
17199
+ if (!jwk.d || !jwk.x || !jwk.y) {
17200
+ throw new InvalidKeyDataError('ECDSA private key JWK missing required parameters');
17201
+ }
17202
+ const x = new Uint8Array(Convert.FromBase64Url(jwk.x));
17203
+ const y = new Uint8Array(Convert.FromBase64Url(jwk.y));
17204
+ const d = new Uint8Array(Convert.FromBase64Url(jwk.d));
17205
+ const publicPoint = new Uint8Array(1 + x.length + y.length);
17206
+ publicPoint[0] = 0x04;
17207
+ publicPoint.set(x, 1);
17208
+ publicPoint.set(y, 1 + x.length);
17209
+ const writer = new SshWriter();
17210
+ writer.writeString(this.sshType);
17211
+ writer.writeString(this.curveName);
17212
+ writer.writeMpInt(publicPoint);
17213
+ writer.writeMpInt(d);
17214
+ return writer.toUint8Array();
17215
+ }
17216
+ async importPrivateSsh(params) {
17217
+ const { sshKey, crypto } = params;
17218
+ const base64Data = sshKey
17219
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
17220
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
17221
+ .replace(/\s/g, '');
17222
+ const binaryData = Convert.FromBase64(base64Data);
17223
+ const reader = new SshReader(BufferSourceConverter.toUint8Array(binaryData));
17224
+ const magic = reader.readBytes(15);
17225
+ if (Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
17226
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
17227
+ }
17228
+ const _cipherName = reader.readString();
17229
+ reader.readString();
17230
+ reader.readString();
17231
+ if (_cipherName !== 'none') {
17232
+ throw new EncryptedKeyNotSupportedError(_cipherName);
17233
+ }
17234
+ const numKeys = reader.readUint32();
17235
+ if (numKeys !== 1) {
17236
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
17237
+ }
17238
+ const publicKeyLength = reader.readUint32();
17239
+ reader.readBytes(publicKeyLength);
17240
+ const privateKeyLength = reader.readUint32();
17241
+ const privateKeyData = reader.readBytes(privateKeyLength);
17242
+ const privateReader = new SshReader(privateKeyData);
17243
+ const checkint1 = privateReader.readUint32();
17244
+ const checkint2 = privateReader.readUint32();
17245
+ if (checkint1 !== checkint2) {
17246
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
17247
+ }
17248
+ privateReader.readString();
17249
+ privateReader.readString();
17250
+ const publicKeyPoint = privateReader.readMpInt();
17251
+ const privateKeyValue = privateReader.readMpInt();
17252
+ privateReader.readString();
17253
+ if (publicKeyPoint[0] !== 0x04) {
17254
+ throw new InvalidKeyDataError('invalid ECDSA public key point format');
17255
+ }
17256
+ const coordLength = Math.floor((publicKeyPoint.length - 1) / 2);
17257
+ const x = publicKeyPoint.slice(1, 1 + coordLength);
17258
+ const y = publicKeyPoint.slice(1 + coordLength);
17259
+ const jwk = {
17260
+ kty: 'EC',
17261
+ crv: this.namedCurve,
17262
+ x: Convert.ToBase64Url(x),
17263
+ y: Convert.ToBase64Url(y),
17264
+ d: Convert.ToBase64Url(privateKeyValue),
17265
+ };
17266
+ return crypto.subtle.importKey('jwk', jwk, {
17267
+ name: 'ECDSA',
17268
+ namedCurve: this.namedCurve,
17269
+ }, true, ['sign']);
17270
+ }
17271
+ async sign(params) {
17272
+ const { privateKey, data, crypto, hash } = params;
17273
+ const expectedHash = this.getHashAlgorithm();
17274
+ if (hash && hash !== expectedHash) {
17275
+ throw new InvalidKeyDataError(`ECDSA ${this.namedCurve} requires ${expectedHash}, got ${hash}`);
17276
+ }
17277
+ const signature = await crypto.subtle.sign({
17278
+ name: 'ECDSA',
17279
+ hash: expectedHash,
17280
+ }, privateKey, data);
17281
+ return BufferSourceConverter.toUint8Array(signature);
17282
+ }
17283
+ async verify(params) {
17284
+ const { publicKey, signature, data, crypto, hash } = params;
17285
+ const expectedHash = this.getHashAlgorithm();
17286
+ if (hash && hash !== expectedHash) {
17287
+ throw new InvalidKeyDataError(`ECDSA ${this.namedCurve} requires ${expectedHash}, got ${hash}`);
17288
+ }
17289
+ return crypto.subtle.verify({
17290
+ name: 'ECDSA',
17291
+ hash: expectedHash,
17292
+ }, publicKey, signature, data);
17293
+ }
17294
+ encodeSignature(params) {
17295
+ const { signature, algo } = params;
17296
+ if (algo.startsWith('ecdsa-sha2-')) {
17297
+ const coordLength = this.getSignatureCoordLength();
17298
+ const r = signature.subarray(0, coordLength);
17299
+ const s = signature.subarray(coordLength);
17300
+ const writer = new SshWriter();
17301
+ writer.writeString(algo);
17302
+ const sigWriter = new SshWriter();
17303
+ sigWriter.writeMpInt(r, true);
17304
+ sigWriter.writeMpInt(s, true);
17305
+ const sigData = sigWriter.toUint8Array();
17306
+ writer.writeUint32(sigData.length);
17307
+ writer.writeBytes(sigData);
17308
+ return writer.toUint8Array();
17309
+ }
17310
+ const writer = new SshWriter();
17311
+ writer.writeString(algo);
17312
+ writer.writeUint32(signature.byteLength);
17313
+ writer.writeBytes(signature);
17314
+ return writer.toUint8Array();
17315
+ }
17316
+ decodeSignature(params) {
17317
+ const { signature } = params;
17318
+ const reader = new SshReader(signature);
17319
+ const algo = reader.readString();
17320
+ const sigLength = reader.readUint32();
17321
+ const sig = reader.readBytes(sigLength);
17322
+ if (algo.startsWith('ecdsa-sha2-')) {
17323
+ const sigReader = new SshReader(sig);
17324
+ let r = sigReader.readMpInt();
17325
+ let s = sigReader.readMpInt();
17326
+ if (r[0] === 0x00 && r.length > 1 && (r[1] & 0x80) === 0) {
17327
+ r = r.slice(1);
17328
+ }
17329
+ if (s[0] === 0x00 && s.length > 1 && (s[1] & 0x80) === 0) {
17330
+ s = s.slice(1);
17331
+ }
17332
+ const expectedLength = this.getExpectedLength();
17333
+ const rPadded = new Uint8Array(expectedLength);
17334
+ const sPadded = new Uint8Array(expectedLength);
17335
+ if (r.length <= expectedLength) {
17336
+ rPadded.set(r, expectedLength - r.length);
17337
+ }
17338
+ else {
17339
+ rPadded.set(r.slice(r.length - expectedLength), 0);
17340
+ }
17341
+ if (s.length <= expectedLength) {
17342
+ sPadded.set(s, expectedLength - s.length);
17343
+ }
17344
+ else {
17345
+ sPadded.set(s.slice(s.length - expectedLength), 0);
17346
+ }
17347
+ const rawSignature = new Uint8Array([...rPadded, ...sPadded]);
17348
+ return { signature: rawSignature, algo };
17349
+ }
17350
+ return { signature: sig, algo };
17351
+ }
17352
+ supportsCryptoKey(cryptoKey) {
17353
+ return (cryptoKey.algorithm.name === 'ECDSA' &&
17354
+ cryptoKey.algorithm.namedCurve === this.namedCurve);
17355
+ }
17356
+ parsePublicKey(reader) {
17357
+ const curveName = reader.readString();
17358
+ if (curveName !== this.curveName) {
17359
+ throw new InvalidKeyDataError(`ECDSA certificate curve name ${curveName}, expected ${this.curveName}`);
17360
+ }
17361
+ const publicKeyPoint = reader.readBytes(reader.readUint32());
17362
+ const writer = new SshWriter();
17363
+ writer.writeString(this.sshType);
17364
+ writer.writeString(curveName);
17365
+ writer.writeMpInt(publicKeyPoint);
17366
+ return {
17367
+ type: this.sshType,
17368
+ keyData: writer.toUint8Array(),
17369
+ };
17370
+ }
17371
+ writePublicKey(writer, publicKey) {
17372
+ const publicKeyReader = new SshReader(publicKey.keyData);
17373
+ publicKeyReader.readString();
17374
+ const curveName = publicKeyReader.readString();
17375
+ const publicPoint = publicKeyReader.readMpInt();
17376
+ writer.writeString(curveName);
17377
+ writer.writeUint32(publicPoint.length);
17378
+ writer.writeBytes(publicPoint);
17379
+ }
17380
+ getCertificateType() {
17381
+ return `${this.sshType}-cert-v01@openssh.com`;
17382
+ }
17383
+ getSignatureAlgo() {
17384
+ return this.sshType;
17385
+ }
17386
+ }
17387
+ const EcdsaP256Binding = new EcdsaBinding('nistp256', 'ecdsa-sha2-nistp256', 'P-256');
17388
+ const EcdsaP384Binding = new EcdsaBinding('nistp384', 'ecdsa-sha2-nistp384', 'P-384');
17389
+ const EcdsaP521Binding = new EcdsaBinding('nistp521', 'ecdsa-sha2-nistp521', 'P-521');
17390
+
17391
+ class Ed25519Binding {
17392
+ async importPublicSsh(params) {
17393
+ const { blob, crypto } = params;
17394
+ const reader = new SshReader(blob);
17395
+ reader.readString();
17396
+ const keyLength = reader.readUint32();
17397
+ if (keyLength !== 32) {
17398
+ throw new InvalidKeyDataError(`Ed25519 key length ${keyLength}, expected 32`);
17399
+ }
17400
+ const publicKeyBytes = reader.readBytes(keyLength);
17401
+ return crypto.subtle.importKey('raw', publicKeyBytes, 'Ed25519', true, [
17402
+ 'verify',
17403
+ ]);
17404
+ }
17405
+ async exportPublicSsh(params) {
17406
+ const { publicKey, crypto } = params;
17407
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
17408
+ if (!jwk.x) {
17409
+ throw new InvalidKeyDataError('Ed25519 JWK missing x parameter');
17410
+ }
17411
+ const keyBytes = new Uint8Array(Convert.FromBase64Url(jwk.x));
17412
+ const writer = new SshWriter();
17413
+ writer.writeString('ssh-ed25519');
17414
+ writer.writeUint32(keyBytes.length);
17415
+ writer.writeBytes(keyBytes);
17416
+ return writer.toUint8Array();
17417
+ }
17418
+ async importPublicSpki(params) {
17419
+ const { spki, crypto } = params;
17420
+ return crypto.subtle.importKey('spki', spki, 'Ed25519', true, ['verify']);
17421
+ }
17422
+ async exportPublicSpki(params) {
17423
+ const { publicKey, crypto } = params;
17424
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
17425
+ return BufferSourceConverter.toUint8Array(spki);
17426
+ }
17427
+ async importPrivatePkcs8(params) {
17428
+ const { pkcs8, crypto } = params;
17429
+ return crypto.subtle.importKey('pkcs8', pkcs8, 'Ed25519', true, ['sign']);
17430
+ }
17431
+ async exportPrivatePkcs8(params) {
17432
+ const { privateKey, crypto } = params;
17433
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
17434
+ return BufferSourceConverter.toUint8Array(pkcs8);
17435
+ }
17436
+ async exportPrivateSsh(params) {
17437
+ const { privateKey, crypto, jwk: providedJwk } = params;
17438
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
17439
+ if (!jwk.d || !jwk.x) {
17440
+ throw new InvalidKeyDataError('Ed25519 private key JWK missing required parameters');
17441
+ }
17442
+ const privateBytes = new Uint8Array(Convert.FromBase64Url(jwk.d));
17443
+ const publicBytes = new Uint8Array(Convert.FromBase64Url(jwk.x));
17444
+ const writer = new SshWriter();
17445
+ writer.writeString('ssh-ed25519');
17446
+ writer.writeUint32(publicBytes.length);
17447
+ writer.writeBytes(publicBytes);
17448
+ const privKeyPart = new Uint8Array(64);
17449
+ privKeyPart.set(privateBytes, 0);
17450
+ privKeyPart.set(publicBytes, 32);
17451
+ writer.writeUint32(privKeyPart.length);
17452
+ writer.writeBytes(privKeyPart);
17453
+ return writer.toUint8Array();
17454
+ }
17455
+ async importPrivateSsh(params) {
17456
+ const { sshKey, crypto } = params;
17457
+ const base64Data = sshKey
17458
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
17459
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
17460
+ .replace(/\s/g, '');
17461
+ const binaryData = Convert.FromBase64(base64Data);
17462
+ const reader = new SshReader(BufferSourceConverter.toUint8Array(binaryData));
17463
+ const magic = reader.readBytes(15);
17464
+ if (Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
17465
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
17466
+ }
17467
+ const _cipherName = reader.readString();
17468
+ reader.readString();
17469
+ reader.readString();
17470
+ if (_cipherName !== 'none') {
17471
+ throw new EncryptedKeyNotSupportedError(_cipherName);
17472
+ }
17473
+ const numKeys = reader.readUint32();
17474
+ if (numKeys !== 1) {
17475
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
17476
+ }
17477
+ const publicKeyLength = reader.readUint32();
17478
+ reader.readBytes(publicKeyLength);
17479
+ const privateKeyLength = reader.readUint32();
17480
+ const privateKeyData = reader.readBytes(privateKeyLength);
17481
+ const privateReader = new SshReader(privateKeyData);
17482
+ const checkint1 = privateReader.readUint32();
17483
+ const checkint2 = privateReader.readUint32();
17484
+ if (checkint1 !== checkint2) {
17485
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
17486
+ }
17487
+ privateReader.readString();
17488
+ const pubKeyLength = privateReader.readUint32();
17489
+ const _publicKeyBytes = privateReader.readBytes(pubKeyLength);
17490
+ const privKeyLength = privateReader.readUint32();
17491
+ const privateKeyBytes = privateReader.readBytes(privKeyLength);
17492
+ privateReader.readString();
17493
+ const privateKey = privateKeyBytes.slice(0, 32);
17494
+ const jwk = {
17495
+ kty: 'OKP',
17496
+ crv: 'Ed25519',
17497
+ d: Convert.ToBase64Url(privateKey),
17498
+ x: Convert.ToBase64Url(_publicKeyBytes),
17499
+ };
17500
+ return crypto.subtle.importKey('jwk', jwk, 'Ed25519', true, ['sign']);
17501
+ }
17502
+ async sign(params) {
17503
+ const { privateKey, data, crypto } = params;
17504
+ const signature = await crypto.subtle.sign('Ed25519', privateKey, data);
17505
+ return BufferSourceConverter.toUint8Array(signature);
17506
+ }
17507
+ async verify(params) {
17508
+ const { publicKey, signature, data, crypto } = params;
17509
+ return crypto.subtle.verify('Ed25519', publicKey, signature, data);
17510
+ }
17511
+ encodeSignature(params) {
17512
+ const { signature, algo } = params;
17513
+ const sigBytes = new Uint8Array(signature);
17514
+ const writer = new SshWriter();
17515
+ writer.writeString(algo);
17516
+ writer.writeUint32(sigBytes.length);
17517
+ writer.writeBytes(sigBytes);
17518
+ return writer.toUint8Array();
17519
+ }
17520
+ decodeSignature(params) {
17521
+ const { signature } = params;
17522
+ const reader = new SshReader(signature);
17523
+ const algo = reader.readString();
17524
+ const sigLength = reader.readUint32();
17525
+ const sigBytes = reader.readBytes(sigLength);
17526
+ return {
17527
+ signature: sigBytes,
17528
+ algo,
17529
+ };
17530
+ }
17531
+ supportsCryptoKey(cryptoKey) {
17532
+ return cryptoKey.algorithm.name === 'Ed25519';
17533
+ }
17534
+ parsePublicKey(reader) {
17535
+ const publicKeyData = reader.readBytes(reader.readUint32());
17536
+ const writer = new SshWriter();
17537
+ writer.writeString('ssh-ed25519');
17538
+ writer.writeUint32(publicKeyData.length);
17539
+ writer.writeBytes(publicKeyData);
17540
+ return {
17541
+ type: 'ssh-ed25519',
17542
+ keyData: writer.toUint8Array(),
17543
+ };
17544
+ }
17545
+ writePublicKey(writer, publicKey) {
17546
+ const publicKeyReader = new SshReader(publicKey.keyData);
17547
+ publicKeyReader.readString();
17548
+ const keyLength = publicKeyReader.readUint32();
17549
+ const rawKeyData = publicKeyReader.readBytes(keyLength);
17550
+ writer.writeUint32(rawKeyData.length);
17551
+ writer.writeBytes(rawKeyData);
17552
+ }
17553
+ getCertificateType() {
17554
+ return 'ssh-ed25519-cert-v01@openssh.com';
17555
+ }
17556
+ getSignatureAlgo() {
17557
+ return 'ssh-ed25519';
17558
+ }
17559
+ }
17560
+
17561
+ const registry = new Map();
17562
+ class AlgorithmRegistry {
17563
+ static get(name) {
17564
+ const binding = registry.get(name);
17565
+ if (!binding) {
17566
+ throw new UnsupportedKeyTypeError(name, Array.from(registry.keys()));
17567
+ }
17568
+ return binding;
17569
+ }
17570
+ static register(name, binding) {
17571
+ registry.set(name, binding);
17572
+ }
17573
+ static getSshTypeFromCryptoKey(cryptoKey) {
17574
+ for (const [sshType, binding] of registry.entries()) {
17575
+ if (binding.supportsCryptoKey(cryptoKey)) {
17576
+ return sshType;
17577
+ }
17578
+ }
17579
+ throw new UnsupportedKeyTypeError(cryptoKey.algorithm.name, Array.from(registry.keys()));
17580
+ }
17581
+ static certTypeToKeyType(certType) {
17582
+ const mapping = {
17583
+ 'ssh-rsa-cert-v01@openssh.com': 'ssh-rsa',
17584
+ 'ssh-ed25519-cert-v01@openssh.com': 'ssh-ed25519',
17585
+ 'ecdsa-sha2-nistp256-cert-v01@openssh.com': 'ecdsa-sha2-nistp256',
17586
+ 'ecdsa-sha2-nistp384-cert-v01@openssh.com': 'ecdsa-sha2-nistp384',
17587
+ 'ecdsa-sha2-nistp521-cert-v01@openssh.com': 'ecdsa-sha2-nistp521',
17588
+ };
17589
+ return mapping[certType];
17590
+ }
17591
+ static getSupportedCertTypes() {
17592
+ return Object.keys({
17593
+ 'ssh-rsa-cert-v01@openssh.com': 'ssh-rsa',
17594
+ 'ssh-ed25519-cert-v01@openssh.com': 'ssh-ed25519',
17595
+ 'ecdsa-sha2-nistp256-cert-v01@openssh.com': 'ecdsa-sha2-nistp256',
17596
+ 'ecdsa-sha2-nistp384-cert-v01@openssh.com': 'ecdsa-sha2-nistp384',
17597
+ 'ecdsa-sha2-nistp521-cert-v01@openssh.com': 'ecdsa-sha2-nistp521',
17598
+ });
17599
+ }
17600
+ }
17601
+ AlgorithmRegistry.register('ssh-ed25519', new Ed25519Binding());
17602
+ AlgorithmRegistry.register('ssh-rsa', new RsaBinding('SHA-256'));
17603
+ AlgorithmRegistry.register('rsa-sha2-256', new RsaBinding('SHA-256'));
17604
+ AlgorithmRegistry.register('rsa-sha2-512', new RsaBinding('SHA-512'));
17605
+ AlgorithmRegistry.register('ecdsa-sha2-nistp256', EcdsaP256Binding);
17606
+ AlgorithmRegistry.register('ecdsa-sha2-nistp384', EcdsaP384Binding);
17607
+ AlgorithmRegistry.register('ecdsa-sha2-nistp521', EcdsaP521Binding);
17608
+
17609
+ function parsePublicKey(input) {
17610
+ const parts = typeof input === 'string' ? input.trim().split(/\s+/) : null;
17611
+ if (!parts || parts.length < 2) {
17612
+ throw new InvalidFormatError('Invalid SSH public key format');
17613
+ }
17614
+ const type = parts[0];
17615
+ const blob = new Uint8Array(Convert.FromBase64(parts[1]));
17616
+ const comment = parts.length > 2 ? parts.slice(2).join(' ') : undefined;
17617
+ const reader = new SshReader(blob);
17618
+ const blobType = reader.readString();
17619
+ if (blobType !== type) {
17620
+ throw new InvalidFormatError('Key type mismatch');
17621
+ }
17622
+ return {
17623
+ type,
17624
+ keyData: blob,
17625
+ comment,
17626
+ };
17627
+ }
17628
+ function serializePublicKey(blob) {
17629
+ const base64 = Convert.ToBase64(blob.keyData);
17630
+ const parts = [blob.type, base64];
17631
+ if (blob.comment) {
17632
+ parts.push(blob.comment);
17633
+ }
17634
+ return parts.join(' ');
17635
+ }
17636
+
17637
+ function parse(input) {
17638
+ if (typeof input === 'string') {
17639
+ const parts = input.trim().split(/\s+/);
17640
+ if (parts.length < 2) {
17641
+ throw new InvalidFormatError('SSH certificate string', 'type base64 [comment]');
17642
+ }
17643
+ const type = parts[0];
17644
+ const blob = new Uint8Array(Convert.FromBase64(parts[1]));
17645
+ const comment = parts.length > 2 ? parts.slice(2).join(' ') : undefined;
17646
+ const reader = new SshReader(blob);
17647
+ const blobType = reader.readString();
17648
+ if (blobType !== type) {
17649
+ throw new InvalidFormatError(`certificate blob type ${blobType}`, `expected ${type}`);
17650
+ }
17651
+ return {
17652
+ type,
17653
+ keyData: blob,
17654
+ comment,
17655
+ };
17656
+ }
17657
+ else {
17658
+ const reader = new SshReader(input);
17659
+ const type = reader.readString();
17660
+ const keyData = input.slice(reader.getOffset());
17661
+ return {
17662
+ type,
17663
+ keyData,
17664
+ };
17665
+ }
17666
+ }
17667
+ function parseCertificateData(keyData) {
17668
+ const reader = new SshReader(keyData);
17669
+ const certType = reader.readString();
17670
+ const nonce = reader.readBytes(reader.readUint32());
17671
+ const mappedKeyType = AlgorithmRegistry.certTypeToKeyType(certType);
17672
+ if (!mappedKeyType) {
17673
+ throw new UnsupportedAlgorithmError(certType, AlgorithmRegistry.getSupportedCertTypes());
17674
+ }
17675
+ const binding = AlgorithmRegistry.get(mappedKeyType);
17676
+ const publicKey = binding.parsePublicKey(reader);
17677
+ const keyType = mappedKeyType;
17678
+ const serial = reader.readUint64();
17679
+ const typeValue = reader.readUint32();
17680
+ const type = typeValue === 1 ? 'user' : 'host';
17681
+ const keyId = reader.readString();
17682
+ const principalsLength = reader.readUint32();
17683
+ const principalsData = reader.readBytes(principalsLength);
17684
+ const validPrincipals = [];
17685
+ if (principalsData.length > 0) {
17686
+ const principalsReader = new SshReader(principalsData);
17687
+ while (principalsReader.getOffset() < principalsData.length) {
17688
+ try {
17689
+ const principal = principalsReader.readString();
17690
+ validPrincipals.push(principal);
17691
+ }
17692
+ catch {
17693
+ break;
17694
+ }
17695
+ }
17696
+ }
17697
+ const validAfter = reader.readUint64();
17698
+ const validBefore = reader.readUint64();
17699
+ const criticalOptions = {};
17700
+ const criticalLength = reader.readUint32();
17701
+ const criticalData = reader.readBytes(criticalLength);
17702
+ if (criticalData.length > 0) {
17703
+ const optionsReader = new SshReader(criticalData);
17704
+ while (optionsReader.getOffset() < criticalData.length) {
17705
+ try {
17706
+ const name = optionsReader.readString();
17707
+ const valueData = optionsReader.readBytes(optionsReader.readUint32());
17708
+ const value = valueData.length === 0 ? '' : decoder.decode(valueData);
17709
+ criticalOptions[name] = value;
17710
+ }
17711
+ catch {
17712
+ break;
17713
+ }
17714
+ }
17715
+ }
17716
+ const extensions = {};
17717
+ const extensionsLength = reader.readUint32();
17718
+ const extensionsData = reader.readBytes(extensionsLength);
17719
+ if (extensionsData.length > 0) {
17720
+ const extReader = new SshReader(extensionsData);
17721
+ while (extReader.getOffset() < extensionsData.length) {
17722
+ try {
17723
+ const name = extReader.readString();
17724
+ const valueData = extReader.readBytes(extReader.readUint32());
17725
+ const value = valueData.length === 0 ? '' : decoder.decode(valueData);
17726
+ extensions[name] = value;
17727
+ }
17728
+ catch {
17729
+ break;
17730
+ }
17731
+ }
17732
+ }
17733
+ const reservedLength = reader.readUint32();
17734
+ const reserved = reader.readBytes(reservedLength);
17735
+ const signatureKeyLength = reader.readUint32();
17736
+ const signatureKeyData = reader.readBytes(signatureKeyLength);
17737
+ const signatureKeyReader = new SshReader(signatureKeyData);
17738
+ const signatureKeyType = signatureKeyReader.readString();
17739
+ const signatureKey = {
17740
+ type: signatureKeyType,
17741
+ keyData: signatureKeyData,
17742
+ };
17743
+ const signatureLength = reader.readUint32();
17744
+ const signature = reader.readBytes(signatureLength);
17745
+ return {
17746
+ nonce,
17747
+ keyType,
17748
+ publicKey,
17749
+ serial,
17750
+ type,
17751
+ keyId,
17752
+ validPrincipals,
17753
+ validAfter,
17754
+ validBefore,
17755
+ criticalOptions,
17756
+ extensions,
17757
+ reserved,
17758
+ signatureKey,
17759
+ signature,
17760
+ };
17761
+ }
17762
+ function serialize(cert) {
17763
+ const base64 = Convert.ToBase64(cert.keyData);
17764
+ const parts = [cert.type, base64];
17765
+ if (cert.comment) {
17766
+ parts.push(cert.comment);
17767
+ }
17768
+ return parts.join(' ');
17769
+ }
17770
+
17771
+ function parseSignature(data) {
17772
+ const reader = new SshReader(data);
17773
+ if (data.length >= 6 && new TextDecoder().decode(data.subarray(0, 6)) === 'SSHSIG') {
17774
+ return parseSshSignatureFormat(reader);
17775
+ }
17776
+ else {
17777
+ return parseLegacyFormat(reader);
17778
+ }
17779
+ }
17780
+ function parseSshSignatureFormat(reader) {
17781
+ const magicBytes = reader.readBytes(6);
17782
+ const magic = new TextDecoder().decode(magicBytes);
17783
+ if (magic !== 'SSHSIG') {
17784
+ throw new InvalidFormatError(magic, 'SSHSIG');
17785
+ }
17786
+ const version = reader.readUint32();
17787
+ const publicKeyLength = reader.readUint32();
17788
+ const publicKey = reader.readBytes(publicKeyLength);
17789
+ const namespace = reader.readString();
17790
+ const reserved = reader.readString();
17791
+ const hashAlgorithm = reader.readString();
17792
+ const signatureLength = reader.readUint32();
17793
+ const signatureData = reader.readBytes(signatureLength);
17794
+ const sigReader = new SshReader(signatureData);
17795
+ const algorithm = sigReader.readString();
17796
+ const signatureLength2 = sigReader.readUint32();
17797
+ const signature = sigReader.readBytes(signatureLength2);
17798
+ return {
17799
+ format: 'ssh-signature',
17800
+ algorithm,
17801
+ signature,
17802
+ version,
17803
+ publicKey,
17804
+ namespace,
17805
+ reserved,
17806
+ hashAlgorithm,
17807
+ };
17808
+ }
17809
+ function parseLegacyFormat(reader) {
17810
+ const algorithm = reader.readString();
17811
+ const signatureLength = reader.readUint32();
17812
+ const signature = reader.readBytes(signatureLength);
17813
+ return {
17814
+ format: 'legacy',
17815
+ algorithm,
17816
+ signature,
17817
+ };
17818
+ }
17819
+ function serializeSignature(blob) {
17820
+ if (blob.format === 'ssh-signature') {
17821
+ return serializeSshSignatureFormat(blob);
17822
+ }
17823
+ else {
17824
+ return serializeLegacyFormat(blob);
17825
+ }
17826
+ }
17827
+ function serializeSshSignatureFormat(blob) {
17828
+ const writer = new SshWriter();
17829
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
17830
+ writer.writeUint32(blob.version || 1);
17831
+ if (blob.publicKey) {
17832
+ writer.writeUint32(blob.publicKey.length);
17833
+ writer.writeBytes(blob.publicKey);
17834
+ }
17835
+ else {
17836
+ writer.writeUint32(0);
17837
+ }
17838
+ writer.writeString(blob.namespace || 'file');
17839
+ writer.writeString(blob.reserved || '');
17840
+ writer.writeString(blob.hashAlgorithm || 'sha512');
17841
+ const sigWriter = new SshWriter();
17842
+ sigWriter.writeString(blob.algorithm);
17843
+ sigWriter.writeUint32(blob.signature.length);
17844
+ sigWriter.writeBytes(blob.signature);
17845
+ const sigData = sigWriter.toUint8Array();
17846
+ writer.writeUint32(sigData.length);
17847
+ writer.writeBytes(sigData);
17848
+ return writer.toUint8Array();
17849
+ }
17850
+ function serializeLegacyFormat(blob) {
17851
+ const writer = new SshWriter();
17852
+ writer.writeString(blob.algorithm);
17853
+ writer.writeUint32(blob.signature.length);
17854
+ writer.writeBytes(blob.signature);
17855
+ return writer.toUint8Array();
17856
+ }
17857
+
17858
+ class SshObject {
17859
+ }
17860
+
17861
+ let SshPublicKey$1 = class SshPublicKey extends SshObject {
17862
+ static TYPE = 'public-key';
17863
+ type = SshPublicKey.TYPE;
17864
+ blob;
17865
+ cachedCryptoKey;
17866
+ constructor(blob) {
17867
+ super();
17868
+ this.blob = blob;
17869
+ }
17870
+ async getCryptoKey(crypto = getCrypto()) {
17871
+ if (!this.cachedCryptoKey) {
17872
+ const binding = AlgorithmRegistry.get(this.blob.type);
17873
+ this.cachedCryptoKey = await binding.importPublicSsh({ blob: this.blob.keyData, crypto });
17874
+ }
17875
+ return this.cachedCryptoKey;
17876
+ }
17877
+ static async fromSSH(sshKey, crypto = getCrypto()) {
17878
+ const blob = parsePublicKey(sshKey);
17879
+ const binding = AlgorithmRegistry.get(blob.type);
17880
+ await binding.importPublicSsh({ blob: blob.keyData, crypto });
17881
+ return new SshPublicKey(blob);
17882
+ }
17883
+ static async fromSPKI(spki, type, crypto = getCrypto()) {
17884
+ const binding = AlgorithmRegistry.get(type);
17885
+ const cryptoKey = await binding.importPublicSpki({ spki, crypto });
17886
+ const exported = await binding.exportPublicSsh({ publicKey: cryptoKey, crypto });
17887
+ const blob = {
17888
+ type,
17889
+ keyData: exported,
17890
+ };
17891
+ return new SshPublicKey(blob);
17892
+ }
17893
+ static async fromWebCrypto(cryptoKey, type, crypto = getCrypto()) {
17894
+ const sshType = type || AlgorithmRegistry.getSshTypeFromCryptoKey(cryptoKey);
17895
+ const binding = AlgorithmRegistry.get(sshType);
17896
+ const exported = await binding.exportPublicSsh({ publicKey: cryptoKey, crypto });
17897
+ const blob = {
17898
+ type: sshType,
17899
+ keyData: exported,
17900
+ };
17901
+ return new SshPublicKey(blob);
17902
+ }
17903
+ async export(format = 'ssh', crypto = getCrypto()) {
17904
+ if (format === 'ssh') {
17905
+ return serializePublicKey(this.blob);
17906
+ }
17907
+ else if (format === 'spki') {
17908
+ const cryptoKey = await this.getCryptoKey(crypto);
17909
+ const binding = AlgorithmRegistry.get(this.blob.type);
17910
+ const spki = await binding.exportPublicSpki({ publicKey: cryptoKey, crypto });
17911
+ return new Uint8Array(spki);
17912
+ }
17913
+ throw new UnsupportedKeyTypeError(`Unsupported export format: ${format}`);
17914
+ }
17915
+ async toSSH() {
17916
+ const result = await this.export('ssh');
17917
+ return result;
17918
+ }
17919
+ async toSPKI() {
17920
+ const result = await this.export('spki');
17921
+ return result;
17922
+ }
17923
+ async toWebCrypto(crypto = getCrypto()) {
17924
+ return this.getCryptoKey(crypto);
17925
+ }
17926
+ async verify(algorithm, signature, data, crypto = getCrypto()) {
17927
+ const binding = AlgorithmRegistry.get(algorithm);
17928
+ const cryptoKey = await this.toWebCrypto(crypto);
17929
+ return binding.verify({
17930
+ publicKey: cryptoKey,
17931
+ signature,
17932
+ data,
17933
+ crypto,
17934
+ });
17935
+ }
17936
+ get keyType() {
17937
+ return this.blob.type;
17938
+ }
17939
+ get comment() {
17940
+ return this.blob.comment;
17941
+ }
17942
+ getBlob() {
17943
+ return { ...this.blob };
17944
+ }
17945
+ async thumbprint(algorithm = 'sha256', crypto = getCrypto()) {
17946
+ const hashAlgorithm = algorithm === 'sha256' ? 'SHA-256' : 'SHA-512';
17947
+ const data = this.blob.keyData;
17948
+ const hash = await crypto.subtle.digest(hashAlgorithm, data);
17949
+ return new Uint8Array(hash);
17950
+ }
17951
+ };
17952
+
17953
+ class SshSignature extends SshObject {
17954
+ static TYPE = 'signature';
17955
+ type = SshSignature.TYPE;
17956
+ blob;
17957
+ format;
17958
+ algorithm;
17959
+ signature;
17960
+ version;
17961
+ publicKey;
17962
+ namespace;
17963
+ reserved;
17964
+ hashAlgorithm;
17965
+ constructor(blob) {
17966
+ super();
17967
+ this.blob = blob;
17968
+ this.format = blob.format;
17969
+ this.algorithm = blob.algorithm;
17970
+ this.signature = blob.signature;
17971
+ this.version = blob.version;
17972
+ this.namespace = blob.namespace;
17973
+ this.reserved = blob.reserved;
17974
+ this.hashAlgorithm = blob.hashAlgorithm;
17975
+ if (blob.publicKey) {
17976
+ const reader = new SshReader(blob.publicKey);
17977
+ const type = reader.readString();
17978
+ this.publicKey = new SshPublicKey$1({ type, keyData: blob.publicKey });
17979
+ }
17980
+ }
17981
+ static parse(data) {
17982
+ const blob = parseSignature(data);
17983
+ return new SshSignature(blob);
17984
+ }
17985
+ static fromBlob(blob) {
17986
+ return new SshSignature(blob);
17987
+ }
17988
+ static fromBase64(base64) {
17989
+ const data = new Uint8Array(Convert.FromBase64(base64));
17990
+ return SshSignature.parse(data);
17991
+ }
17992
+ static fromText(text) {
17993
+ const base64 = text
17994
+ .replace(/-----BEGIN SSH SIGNATURE-----/, '')
17995
+ .replace(/-----END SSH SIGNATURE-----/, '')
17996
+ .replace(/[\r\n\s]/g, '');
17997
+ return SshSignature.fromBase64(base64);
17998
+ }
17999
+ serialize() {
18000
+ return serializeSignature(this.blob);
18001
+ }
18002
+ toBase64() {
18003
+ return Convert.ToBase64(this.serialize());
18004
+ }
18005
+ toText() {
18006
+ const base64 = this.toBase64();
18007
+ const lines = [];
18008
+ for (let i = 0; i < base64.length; i += 70) {
18009
+ lines.push(base64.substring(i, i + 70));
18010
+ }
18011
+ return ['-----BEGIN SSH SIGNATURE-----', ...lines, '-----END SSH SIGNATURE-----'].join('\n');
18012
+ }
18013
+ async toSSH() {
18014
+ return this.toText();
18015
+ }
18016
+ async verify(data, publicKey) {
18017
+ const binding = AlgorithmRegistry.get(this.algorithm);
18018
+ const cryptoKey = await publicKey['getCryptoKey']();
18019
+ const crypto = getCrypto();
18020
+ let dataToVerify = data;
18021
+ if (this.format === 'ssh-signature') {
18022
+ const hashAlg = this.hashAlgorithm || 'sha512';
18023
+ const namespace = this.namespace || 'file';
18024
+ const reserved = this.reserved || '';
18025
+ const hashAlgorithm = hashAlg === 'sha256' ? 'SHA-256' : 'SHA-512';
18026
+ const messageHash = await crypto.subtle.digest(hashAlgorithm, data);
18027
+ const messageHashBytes = new Uint8Array(messageHash);
18028
+ const writer = new SshWriter();
18029
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
18030
+ writer.writeString(namespace);
18031
+ writer.writeString(reserved);
18032
+ writer.writeString(hashAlg);
18033
+ writer.writeUint32(messageHashBytes.length);
18034
+ writer.writeBytes(messageHashBytes);
18035
+ dataToVerify = writer.toUint8Array();
18036
+ }
18037
+ let hashAlgorithm;
18038
+ if (this.algorithm === 'rsa-sha2-256') {
18039
+ hashAlgorithm = 'SHA-256';
18040
+ }
18041
+ else if (this.algorithm === 'rsa-sha2-512') {
18042
+ hashAlgorithm = 'SHA-512';
18043
+ }
18044
+ let signatureToVerify;
18045
+ if (this.format === 'legacy' || this.format === 'ssh-signature') {
18046
+ const sigWriter = new SshWriter();
18047
+ sigWriter.writeString(this.algorithm);
18048
+ sigWriter.writeUint32(this.signature.length);
18049
+ sigWriter.writeBytes(this.signature);
18050
+ const wireFormatSignature = sigWriter.toUint8Array();
18051
+ const decodedSig = binding.decodeSignature({
18052
+ signature: wireFormatSignature,
18053
+ });
18054
+ signatureToVerify = decodedSig.signature;
18055
+ }
18056
+ else {
18057
+ signatureToVerify = this.signature;
18058
+ }
18059
+ return binding.verify({
18060
+ publicKey: cryptoKey,
18061
+ signature: signatureToVerify,
18062
+ data: dataToVerify,
18063
+ crypto,
18064
+ hash: hashAlgorithm,
18065
+ });
18066
+ }
18067
+ static fromLegacy(algorithm, signature) {
18068
+ const binding = AlgorithmRegistry.get(algorithm);
18069
+ const encodedSignature = binding.encodeSignature({
18070
+ signature,
18071
+ algo: algorithm,
18072
+ });
18073
+ const sigReader = new SshReader(encodedSignature);
18074
+ sigReader.readString();
18075
+ const sigLength = sigReader.readUint32();
18076
+ const signatureData = sigReader.readBytes(sigLength);
18077
+ return new SshSignature({
18078
+ format: 'legacy',
18079
+ algorithm,
18080
+ signature: signatureData,
18081
+ });
18082
+ }
18083
+ static fromSshSignature(algorithm, signature, options = {}) {
18084
+ const blob = {
18085
+ format: 'ssh-signature',
18086
+ algorithm,
18087
+ signature,
18088
+ version: options.version || 1,
18089
+ publicKey: options.publicKey ? options.publicKey.getBlob().keyData : undefined,
18090
+ namespace: options.namespace || 'file',
18091
+ reserved: options.reserved || '',
18092
+ hashAlgorithm: options.hashAlgorithm || 'sha512',
18093
+ };
18094
+ return new SshSignature(blob);
18095
+ }
18096
+ static async sign(algorithm, privateKey, data, options = {}) {
18097
+ const { format = 'legacy', namespace = 'file' } = options;
18098
+ if (format === 'legacy') {
18099
+ const rawSignature = await privateKey.sign(algorithm, data);
18100
+ const algorithmUsed = algorithm || privateKey.keyType;
18101
+ return SshSignature.fromLegacy(algorithmUsed, rawSignature);
18102
+ }
18103
+ else {
18104
+ const signatureAlgorithm = algorithm;
18105
+ const binding = AlgorithmRegistry.get(signatureAlgorithm);
18106
+ const hashAlgorithm = algorithm === 'rsa-sha2-256' ? 'sha256' : 'sha512';
18107
+ const publicKey = await privateKey.getPublicKey();
18108
+ const crypto = getCrypto();
18109
+ const webCryptoHashAlg = hashAlgorithm === 'sha256' ? 'SHA-256' : 'SHA-512';
18110
+ const messageHash = await crypto.subtle.digest(webCryptoHashAlg, data);
18111
+ const messageHashBytes = new Uint8Array(messageHash);
18112
+ const writer = new SshWriter();
18113
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
18114
+ writer.writeString(namespace);
18115
+ writer.writeString('');
18116
+ writer.writeString(hashAlgorithm);
18117
+ writer.writeUint32(messageHashBytes.length);
18118
+ writer.writeBytes(messageHashBytes);
18119
+ const dataToSign = writer.toUint8Array();
18120
+ const rawSignature = await privateKey.sign(signatureAlgorithm, dataToSign);
18121
+ const encodedSignature = binding.encodeSignature({
18122
+ signature: rawSignature,
18123
+ algo: signatureAlgorithm,
18124
+ });
18125
+ const sigReader = new SshReader(encodedSignature);
18126
+ sigReader.readString();
18127
+ const sigLength = sigReader.readUint32();
18128
+ const signatureData = sigReader.readBytes(sigLength);
18129
+ return SshSignature.fromSshSignature(signatureAlgorithm, signatureData, {
18130
+ namespace,
18131
+ hashAlgorithm,
18132
+ publicKey,
18133
+ });
18134
+ }
18135
+ }
18136
+ }
18137
+
18138
+ let SshCertificate$1 = class SshCertificate extends SshObject {
18139
+ static TYPE = 'certificate';
18140
+ type = SshCertificate.TYPE;
18141
+ _blob;
18142
+ data;
18143
+ _validAfter;
18144
+ _validBefore;
18145
+ keyId;
18146
+ principals;
18147
+ certType;
18148
+ serial;
18149
+ validAfter;
18150
+ validBefore;
18151
+ publicKey;
18152
+ signatureKey;
18153
+ criticalOptions;
18154
+ extensions;
18155
+ constructor(blob) {
18156
+ super();
18157
+ this._blob = blob;
18158
+ this.data = parseCertificateData(blob.keyData);
18159
+ this._validAfter = this.data.validAfter;
18160
+ this._validBefore = this.data.validBefore;
18161
+ this.keyId = this.data.keyId;
18162
+ this.principals = this.data.validPrincipals;
18163
+ this.certType = this.data.type;
18164
+ this.serial = this.data.serial;
18165
+ this.validAfter = new Date(Number(this.data.validAfter) * 1000);
18166
+ this.validBefore = new Date(Number(this.data.validBefore) * 1000);
18167
+ this.publicKey = new SshPublicKey$1(this.data.publicKey);
18168
+ this.signatureKey = new SshPublicKey$1(this.data.signatureKey);
18169
+ this.criticalOptions = { ...this.data.criticalOptions };
18170
+ this.extensions = { ...this.data.extensions };
18171
+ }
18172
+ static async fromSSH(text) {
18173
+ const blob = parse(text);
18174
+ return new SshCertificate(blob);
18175
+ }
18176
+ static async fromBlob(blob) {
18177
+ return new SshCertificate(blob);
18178
+ }
18179
+ async toSSH() {
18180
+ return serialize(this._blob);
18181
+ }
18182
+ toBlob() {
18183
+ return { ...this._blob };
18184
+ }
18185
+ get blob() {
18186
+ return this.toBlob();
18187
+ }
18188
+ validate(date = new Date()) {
18189
+ const ts = BigInt(Math.floor(date.getTime() / 1000));
18190
+ const after = this._validAfter;
18191
+ const before = this._validBefore;
18192
+ const INFINITY = 0xffffffffffffffffn;
18193
+ const upper = before === INFINITY ? ts : before;
18194
+ return ts >= after && ts <= upper;
18195
+ }
18196
+ async verify(caPublicKey, crypto = getCrypto()) {
18197
+ const verifyKey = caPublicKey || this.signatureKey;
18198
+ const signedData = this.getSignedData();
18199
+ const sshSignature = SshSignature.parse(this.data.signature);
18200
+ const binding = AlgorithmRegistry.get(sshSignature.algorithm);
18201
+ const cryptoKey = await verifyKey.toWebCrypto(crypto);
18202
+ return binding.verify({
18203
+ publicKey: cryptoKey,
18204
+ signature: sshSignature.signature,
18205
+ data: signedData,
18206
+ crypto,
18207
+ });
18208
+ }
18209
+ getSignedData() {
18210
+ const reader = new SshReader(this._blob.keyData);
18211
+ reader.readString();
18212
+ reader.readBytes(reader.readUint32());
18213
+ if (this.data.keyType === 'ssh-ed25519') {
18214
+ reader.readBytes(reader.readUint32());
18215
+ }
18216
+ else if (this.data.keyType === 'ssh-rsa') {
18217
+ reader.readBytes(reader.readUint32());
18218
+ reader.readBytes(reader.readUint32());
18219
+ }
18220
+ else if (this.data.keyType.startsWith('ecdsa-sha2-')) {
18221
+ reader.readString();
18222
+ reader.readBytes(reader.readUint32());
18223
+ }
18224
+ reader.readUint64();
18225
+ reader.readUint32();
18226
+ reader.readBytes(reader.readUint32());
18227
+ reader.readBytes(reader.readUint32());
18228
+ reader.readUint64();
18229
+ reader.readUint64();
18230
+ reader.readBytes(reader.readUint32());
18231
+ reader.readBytes(reader.readUint32());
18232
+ reader.readBytes(reader.readUint32());
18233
+ reader.readBytes(reader.readUint32());
18234
+ const signedDataEnd = reader.getOffset();
18235
+ return this._blob.keyData.slice(0, signedDataEnd);
18236
+ }
18237
+ };
18238
+
18239
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
18240
+ if (kind === "m") throw new TypeError("Private method is not writable");
18241
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
18242
+ 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");
18243
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
18244
+ };
18245
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18246
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
18247
+ 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");
18248
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
18249
+ };
18250
+ var _SshCertificate_cert;
18251
+ class SshCertificate {
18252
+ constructor(raw) {
18253
+ _SshCertificate_cert.set(this, void 0);
18254
+ const blob = parse(raw.trim());
18255
+ // @ts-expect-error - SshCertificateType is not a constructor
18256
+ __classPrivateFieldSet(this, _SshCertificate_cert, new SshCertificate$1(blob), "f");
18257
+ this.notBefore = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validAfter;
18258
+ this.notAfter = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validBefore;
18259
+ this.validity = dateDiff(this.notBefore, this.notAfter);
18260
+ this.type = [__classPrivateFieldGet(this, _SshCertificate_cert, "f").blob.type, __classPrivateFieldGet(this, _SshCertificate_cert, "f").certType, __classPrivateFieldGet(this, _SshCertificate_cert, "f").type].join(' ');
18261
+ this.serialNumber = __classPrivateFieldGet(this, _SshCertificate_cert, "f").serial.toString();
18262
+ this.keyId = __classPrivateFieldGet(this, _SshCertificate_cert, "f").keyId;
18263
+ this.principals = __classPrivateFieldGet(this, _SshCertificate_cert, "f").principals;
18264
+ this.extensions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").extensions;
18265
+ this.criticalOptions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").criticalOptions;
18266
+ }
18267
+ async parseSignatureKey() {
18268
+ const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toWebCrypto();
18269
+ const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.getBlob();
18270
+ const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.thumbprint('sha256');
18271
+ this.signatureKey = {
18272
+ algorithm: key.algorithm.name,
18273
+ type: blob.type,
18274
+ value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toSSH(),
18275
+ thumbprint: Convert.ToBase64(thumbprint),
18276
+ };
18277
+ }
18278
+ async parsePublicKey() {
18279
+ const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toWebCrypto();
18280
+ const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.getBlob();
18281
+ const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.thumbprint('sha256');
18282
+ this.publicKey = {
18283
+ algorithm: key.algorithm.name,
18284
+ type: blob.type,
18285
+ value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toSSH(),
18286
+ thumbprint: Convert.ToBase64(thumbprint),
18287
+ };
18288
+ }
18289
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18290
+ async toString(_format = 'pem') {
18291
+ return __classPrivateFieldGet(this, _SshCertificate_cert, "f").toSSH();
18292
+ }
18293
+ get commonName() {
18294
+ return __classPrivateFieldGet(this, _SshCertificate_cert, "f").principals.join('_') || __classPrivateFieldGet(this, _SshCertificate_cert, "f").keyId || __classPrivateFieldGet(this, _SshCertificate_cert, "f").certType;
18295
+ }
18296
+ async downloadAsSSH(name) {
18297
+ Download.certSSH.asSSH(await this.toString(), name || this.commonName);
18298
+ }
18299
+ }
18300
+ _SshCertificate_cert = new WeakMap();
18301
+
16643
18302
  /**
16644
18303
  * @license
16645
18304
  * Copyright (c) Peculiar Ventures, LLC.
@@ -18554,7 +20213,7 @@ const Issuer = (props) => {
18554
20213
  ];
18555
20214
  };
18556
20215
 
18557
- 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}";
20216
+ 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}";
18558
20217
 
18559
20218
  class AttributeCertificateViewer {
18560
20219
  constructor(hostRef) {
@@ -18653,7 +20312,7 @@ class AttributeCertificateViewer {
18653
20312
  static get watchers() { return {
18654
20313
  "certificate": ["watchCertificateAndDecode"]
18655
20314
  }; }
18656
- static get style() { return certificateViewerCss$3; }
20315
+ static get style() { return certificateViewerCss$4; }
18657
20316
  static get cmpMeta() { return {
18658
20317
  "$flags$": 265,
18659
20318
  "$tagName$": "peculiar-attribute-certificate-viewer",
@@ -18808,12 +20467,12 @@ class CertificateDecoder {
18808
20467
  this.certificateDecoded = null;
18809
20468
  this.clearCertificate.emit();
18810
20469
  }
18811
- setValue(value) {
20470
+ async setValue(value) {
18812
20471
  this.certificateDecoded = value;
18813
- this.inputPaste.value = value.toString('pem');
18814
- this.successParse.emit(value.toString('base64url'));
20472
+ this.inputPaste.value = await value.toString('pem');
20473
+ this.successParse.emit(await value.toString('base64url'));
18815
20474
  }
18816
- decode(value) {
20475
+ async decode(value) {
18817
20476
  new Promise((resolve) => {
18818
20477
  resolve(new X509Certificates(value));
18819
20478
  })
@@ -18821,6 +20480,7 @@ class CertificateDecoder {
18821
20480
  .catch(() => new X509AttributeCertificate(value))
18822
20481
  .catch(() => new Pkcs10CertificateRequest(value))
18823
20482
  .catch(() => new X509Crl(value))
20483
+ .catch(() => new SshCertificate(value))
18824
20484
  .then((res) => this.setValue(res))
18825
20485
  .catch((error) => {
18826
20486
  console.log(error);
@@ -18843,11 +20503,14 @@ class CertificateDecoder {
18843
20503
  if (this.certificateDecoded instanceof X509Crl) {
18844
20504
  return (hAsync("peculiar-crl-viewer", { certificate: this.certificateDecoded, download: true }));
18845
20505
  }
20506
+ if (this.certificateDecoded instanceof SshCertificate) {
20507
+ return (hAsync("peculiar-ssh-certificate-viewer", { certificate: this.certificateDecoded, download: true }));
20508
+ }
18846
20509
  return null;
18847
20510
  }
18848
20511
  render() {
18849
20512
  var _a;
18850
- 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()));
20513
+ 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()));
18851
20514
  }
18852
20515
  static get style() { return certificateDecoderCss; }
18853
20516
  static get cmpMeta() { return {
@@ -18864,7 +20527,7 @@ class CertificateDecoder {
18864
20527
  }; }
18865
20528
  }
18866
20529
 
18867
- 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}";
20530
+ 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}";
18868
20531
 
18869
20532
  class CertificateViewer {
18870
20533
  constructor(hostRef) {
@@ -18964,7 +20627,7 @@ class CertificateViewer {
18964
20627
  static get watchers() { return {
18965
20628
  "certificate": ["watchCertificateAndDecode"]
18966
20629
  }; }
18967
- static get style() { return certificateViewerCss$2; }
20630
+ static get style() { return certificateViewerCss$3; }
18968
20631
  static get cmpMeta() { return {
18969
20632
  "$flags$": 265,
18970
20633
  "$tagName$": "peculiar-certificate-viewer",
@@ -19333,7 +20996,7 @@ class CircularProgress {
19333
20996
  }; }
19334
20997
  }
19335
20998
 
19336
- 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}";
20999
+ 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}";
19337
21000
 
19338
21001
  class CrlViewer {
19339
21002
  constructor(hostRef) {
@@ -19426,7 +21089,7 @@ class CrlViewer {
19426
21089
  static get watchers() { return {
19427
21090
  "certificate": ["watchCertificateAndDecode"]
19428
21091
  }; }
19429
- static get style() { return certificateViewerCss$1; }
21092
+ static get style() { return certificateViewerCss$2; }
19430
21093
  static get cmpMeta() { return {
19431
21094
  "$flags$": 265,
19432
21095
  "$tagName$": "peculiar-crl-viewer",
@@ -19446,7 +21109,7 @@ class CrlViewer {
19446
21109
  }; }
19447
21110
  }
19448
21111
 
19449
- 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}";
21112
+ 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}";
19450
21113
 
19451
21114
  class CsrViewer {
19452
21115
  constructor(hostRef) {
@@ -19538,7 +21201,7 @@ class CsrViewer {
19538
21201
  static get watchers() { return {
19539
21202
  "certificate": ["watchCertificateAndDecode"]
19540
21203
  }; }
19541
- static get style() { return certificateViewerCss; }
21204
+ static get style() { return certificateViewerCss$1; }
19542
21205
  static get cmpMeta() { return {
19543
21206
  "$flags$": 265,
19544
21207
  "$tagName$": "peculiar-csr-viewer",
@@ -19601,6 +21264,184 @@ class HighlightWords {
19601
21264
  }; }
19602
21265
  }
19603
21266
 
21267
+ /**
21268
+ * @license
21269
+ * Copyright (c) Peculiar Ventures, LLC.
21270
+ *
21271
+ * This source code is licensed under the MIT license found in the
21272
+ * LICENSE file in the root directory of this source tree.
21273
+ */
21274
+ const SshBasicInformation = (props) => {
21275
+ const { serialNumber, validity, notBefore, notAfter, type, keyId, principals, extensions, criticalOptions, } = props;
21276
+ return [
21277
+ hAsync(RowTitle, { value: l10n.getString('basicInformation') }),
21278
+ hAsync(RowValue, { name: l10n.getString('type'), value: type }),
21279
+ hAsync(RowValue, { name: l10n.getString('serialNumber'), value: serialNumber, monospace: true }),
21280
+ hAsync(RowValue, { name: l10n.getString('validity'), value: validity }),
21281
+ hAsync(RowValue, { name: l10n.getString('issued'), value: notBefore ? dateShort(notBefore) : undefined }),
21282
+ hAsync(RowValue, { name: l10n.getString('expired'), value: notAfter ? dateShort(notAfter) : undefined }),
21283
+ hAsync(RowValue, { name: l10n.getString('keyId'), value: keyId }),
21284
+ hAsync(RowValue, { name: l10n.getString('principals'), value: principals.join(', ') || '(none)' }),
21285
+ hAsync(RowValue, { name: l10n.getString('criticalOptions'), value: Object.keys(criticalOptions).join(', ') || '(none)' }),
21286
+ hAsync(RowValue, { name: l10n.getString('extensions'), value: Object.keys(extensions).join(', ') || '(none)' }),
21287
+ ];
21288
+ };
21289
+
21290
+ /**
21291
+ * @license
21292
+ * Copyright (c) Peculiar Ventures, LLC.
21293
+ *
21294
+ * This source code is licensed under the MIT license found in the
21295
+ * LICENSE file in the root directory of this source tree.
21296
+ */
21297
+ const SshPublicKey = (props) => {
21298
+ const { key } = props;
21299
+ if (!key) {
21300
+ return null;
21301
+ }
21302
+ return [
21303
+ hAsync(RowTitle, { value: l10n.getString('publicKeyInfo') }),
21304
+ hAsync(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
21305
+ hAsync(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
21306
+ hAsync(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
21307
+ ];
21308
+ };
21309
+
21310
+ /**
21311
+ * @license
21312
+ * Copyright (c) Peculiar Ventures, LLC.
21313
+ *
21314
+ * This source code is licensed under the MIT license found in the
21315
+ * LICENSE file in the root directory of this source tree.
21316
+ */
21317
+ const SshSignatureKey = (props) => {
21318
+ const { key } = props;
21319
+ if (!key) {
21320
+ return null;
21321
+ }
21322
+ return [
21323
+ hAsync(RowTitle, { value: l10n.getString('signingCA') }),
21324
+ hAsync(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
21325
+ hAsync(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
21326
+ hAsync(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
21327
+ ];
21328
+ };
21329
+
21330
+ /**
21331
+ * @license
21332
+ * Copyright (c) Peculiar Ventures, LLC.
21333
+ *
21334
+ * This source code is licensed under the MIT license found in the
21335
+ * LICENSE file in the root directory of this source tree.
21336
+ */
21337
+ const SshMiscellaneous = (props) => {
21338
+ const { certificate } = props;
21339
+ return [
21340
+ hAsync(RowTitle, { value: l10n.getString('miscellaneous') }),
21341
+ hAsync("tr", null,
21342
+ hAsync("td", null,
21343
+ hAsync(Button, { startIcon: hAsync(DownloadIcon, null), onClick: () => certificate.downloadAsSSH() }, l10n.getString('download.ssh')))),
21344
+ ];
21345
+ };
21346
+
21347
+ 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}";
21348
+
21349
+ class SshCertificateViewer {
21350
+ constructor(hostRef) {
21351
+ registerInstance(this, hostRef);
21352
+ /**
21353
+ * Mobile media query string to control screen view change.
21354
+ * <br />
21355
+ * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.
21356
+ * @example
21357
+ * (max-width: 900px)
21358
+ */
21359
+ this.mobileMediaQueryString = '(max-width: 900px)';
21360
+ this.mobileScreenView = false;
21361
+ this.isDecodeInProcess = true;
21362
+ }
21363
+ handleMediaQueryChange(event) {
21364
+ this.mobileScreenView = event.matches;
21365
+ }
21366
+ componentWillLoad() {
21367
+ this.decodeCertificate(this.certificate);
21368
+ }
21369
+ disconnectedCallback() {
21370
+ this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));
21371
+ }
21372
+ async decodeCertificate(certificate) {
21373
+ this.isDecodeInProcess = true;
21374
+ try {
21375
+ if (certificate instanceof SshCertificate) {
21376
+ this.certificateDecoded = certificate;
21377
+ }
21378
+ else if (typeof certificate === 'string') {
21379
+ this.certificateDecoded = new SshCertificate(certificate);
21380
+ }
21381
+ else {
21382
+ return;
21383
+ }
21384
+ // this.certificateDecoded.parseExtensions();
21385
+ await this.certificateDecoded.parsePublicKey();
21386
+ await this.certificateDecoded.parseSignatureKey();
21387
+ }
21388
+ catch (error) {
21389
+ this.certificateDecodeError = error;
21390
+ console.error('Error certificate parse:', error);
21391
+ }
21392
+ this.isDecodeInProcess = false;
21393
+ }
21394
+ /**
21395
+ * Rerun decodeCertificate if previuos value not equal current value
21396
+ */
21397
+ watchCertificateAndDecode(newValue, oldValue) {
21398
+ if (typeof newValue === 'string' && typeof oldValue === 'string') {
21399
+ if (newValue !== oldValue) {
21400
+ this.decodeCertificate(newValue);
21401
+ }
21402
+ return;
21403
+ }
21404
+ if (newValue instanceof SshCertificate && oldValue instanceof SshCertificate) {
21405
+ if (newValue.serialNumber !== oldValue.serialNumber) {
21406
+ this.decodeCertificate(newValue);
21407
+ }
21408
+ }
21409
+ }
21410
+ renderErrorState() {
21411
+ return (hAsync("div", { class: "status_wrapper" }, hAsync(Typography, null, "There was an error decoding this certificate.")));
21412
+ }
21413
+ renderEmptyState() {
21414
+ return (hAsync("div", { class: "status_wrapper" }, hAsync(Typography, null, "There is no certificate available.")));
21415
+ }
21416
+ render() {
21417
+ if (this.certificateDecodeError) {
21418
+ return this.renderErrorState();
21419
+ }
21420
+ if (!this.certificateDecoded) {
21421
+ return this.renderEmptyState();
21422
+ }
21423
+ 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 }), this.download && (hAsync(SshMiscellaneous, { certificate: this.certificateDecoded })))));
21424
+ }
21425
+ static get watchers() { return {
21426
+ "certificate": ["watchCertificateAndDecode"]
21427
+ }; }
21428
+ static get style() { return certificateViewerCss; }
21429
+ static get cmpMeta() { return {
21430
+ "$flags$": 265,
21431
+ "$tagName$": "peculiar-ssh-certificate-viewer",
21432
+ "$members$": {
21433
+ "certificate": [513],
21434
+ "download": [516],
21435
+ "mobileMediaQueryString": [1, "mobile-media-query-string"],
21436
+ "mobileScreenView": [32],
21437
+ "isDecodeInProcess": [32]
21438
+ },
21439
+ "$listeners$": undefined,
21440
+ "$lazyBundleId$": "-",
21441
+ "$attrsToReflect$": [["certificate", "certificate"], ["download", "download"]]
21442
+ }; }
21443
+ }
21444
+
19604
21445
  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)}";
19605
21446
 
19606
21447
  class TextHider {
@@ -19635,6 +21476,7 @@ registerComponents([
19635
21476
  CrlViewer,
19636
21477
  CsrViewer,
19637
21478
  HighlightWords,
21479
+ SshCertificateViewer,
19638
21480
  TextHider,
19639
21481
  ]);
19640
21482