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