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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/components/attribute-certificate-viewer.js +4 -2
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/attribute.js +2 -1
  4. package/components/attribute.js.map +1 -1
  5. package/components/certificate-chain-viewer.js +1 -1
  6. package/components/certificate-viewer.js +3 -2
  7. package/components/certificate-viewer.js.map +1 -1
  8. package/components/crl-viewer.js +4 -2
  9. package/components/crl-viewer.js.map +1 -1
  10. package/components/csr-viewer.js +3 -3
  11. package/components/csr-viewer.js.map +1 -1
  12. package/components/download.js +2 -12760
  13. package/components/download.js.map +1 -1
  14. package/components/index.js +2 -1
  15. package/components/index.js.map +1 -1
  16. package/components/index2.js +51 -2
  17. package/components/index2.js.map +1 -1
  18. package/components/issuer_name.js +2 -2
  19. package/components/link.js +14335 -0
  20. package/components/link.js.map +1 -0
  21. package/components/miscellaneous.js +96 -72
  22. package/components/miscellaneous.js.map +1 -1
  23. package/components/peculiar-certificate-decoder.js +32 -16
  24. package/components/peculiar-certificate-decoder.js.map +1 -1
  25. package/components/peculiar-certificates-viewer.js +2 -1
  26. package/components/peculiar-certificates-viewer.js.map +1 -1
  27. package/components/peculiar-ssh-certificate-viewer.d.ts +11 -0
  28. package/components/peculiar-ssh-certificate-viewer.js +12 -0
  29. package/components/peculiar-ssh-certificate-viewer.js.map +1 -0
  30. package/components/peculiar-text-hider.js +1 -32
  31. package/components/peculiar-text-hider.js.map +1 -1
  32. package/components/pkcs10_certificate_request.js +2 -6
  33. package/components/pkcs10_certificate_request.js.map +1 -1
  34. package/components/row.js +87 -0
  35. package/components/row.js.map +1 -0
  36. package/components/ssh-certificate-viewer.js +193 -0
  37. package/components/ssh-certificate-viewer.js.map +1 -0
  38. package/components/subject_name.js +2 -2
  39. package/components/text-hider.js +40 -0
  40. package/components/text-hider.js.map +1 -0
  41. package/dist/cjs/extension-D8YKlAu4.js +110 -0
  42. package/dist/cjs/extension-D8YKlAu4.js.map +1 -0
  43. package/dist/cjs/index.cjs.js +4 -4
  44. package/dist/cjs/loader.cjs.js +1 -1
  45. package/dist/cjs/{miscellaneous-DeBEwLDy.js → miscellaneous-DvVSM5KJ.js} +187 -186
  46. package/dist/cjs/{miscellaneous-DeBEwLDy.js.map → miscellaneous-DvVSM5KJ.js.map} +1 -1
  47. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.cjs.js.map +1 -0
  48. package/dist/cjs/{peculiar-attribute-certificate-viewer_4.cjs.entry.js → peculiar-attribute-certificate-viewer_5.cjs.entry.js} +240 -38
  49. package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -0
  50. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -20
  51. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  52. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  53. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -3
  54. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  55. package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
  56. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +23 -22
  57. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  58. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
  59. package/dist/cjs/peculiar.cjs.js +1 -1
  60. package/dist/cjs/pkcs10_certificate_request-BoHhadiA.js +146 -0
  61. package/dist/cjs/pkcs10_certificate_request-BoHhadiA.js.map +1 -0
  62. package/dist/cjs/{certification_request-CxHe71zR.js → ssh_certificate-s3-rwdMT.js} +1734 -126
  63. package/dist/cjs/ssh_certificate-s3-rwdMT.js.map +1 -0
  64. package/dist/cjs/{x509_certificate-CzplJQ0X.js → x509_certificate-DfXuxxZp.js} +29 -28
  65. package/dist/cjs/{x509_certificate-CzplJQ0X.js.map → x509_certificate-DfXuxxZp.js.map} +1 -1
  66. package/dist/cjs/{x509_crl-B7kFbLDV.js → x509_crl-CxJ2lyGX.js} +32 -31
  67. package/dist/cjs/{x509_crl-B7kFbLDV.js.map → x509_crl-CxJ2lyGX.js.map} +1 -1
  68. package/dist/collection/collection-manifest.json +1 -0
  69. package/dist/collection/components/certificate-decoder/certificate-decoder.js +10 -6
  70. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  71. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js +25 -0
  72. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js.map +1 -0
  73. package/dist/collection/components/certificate-details-parts/attributes/index.js +10 -1
  74. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
  75. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js +27 -0
  76. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js.map +1 -0
  77. package/dist/collection/components/csr-viewer/csr-viewer.js +2 -2
  78. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  79. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +29 -0
  80. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -0
  81. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js +26 -0
  82. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js.map +1 -0
  83. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js +26 -0
  84. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js.map +1 -0
  85. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +193 -0
  86. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -0
  87. package/dist/collection/constants/oids.js +2 -0
  88. package/dist/collection/constants/oids.js.map +1 -1
  89. package/dist/collection/crypto/attribute.js +2 -0
  90. package/dist/collection/crypto/attribute.js.map +1 -1
  91. package/dist/collection/crypto/index.js +1 -0
  92. package/dist/collection/crypto/index.js.map +1 -1
  93. package/dist/collection/crypto/pkcs10_certificate_request.js +0 -7
  94. package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
  95. package/dist/collection/crypto/ssh_certificate.js +68 -0
  96. package/dist/collection/crypto/ssh_certificate.js.map +1 -0
  97. package/dist/collection/locales/en.json +5 -1
  98. package/dist/esm/extension-oK2qpCU6.js +107 -0
  99. package/dist/esm/extension-oK2qpCU6.js.map +1 -0
  100. package/dist/esm/index.js +2 -2
  101. package/dist/esm/loader.js +1 -1
  102. package/dist/esm/{miscellaneous-bVeJt-6m.js → miscellaneous-DrmTXljc.js} +4 -3
  103. package/dist/{esm-es5/miscellaneous-bVeJt-6m.js.map → esm/miscellaneous-DrmTXljc.js.map} +1 -1
  104. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  105. package/dist/esm/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +215 -14
  106. package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  107. package/dist/esm/peculiar-certificate-decoder.entry.js +14 -9
  108. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  109. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -3
  110. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  111. package/dist/esm/peculiar-certificates-viewer.entry.js +3 -2
  112. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  113. package/dist/esm/peculiar.js +1 -1
  114. package/dist/esm/{pkcs10_certificate_request-CK8FH47X.js → pkcs10_certificate_request-Bdt_qA_g.js} +4 -8
  115. package/dist/esm/pkcs10_certificate_request-Bdt_qA_g.js.map +1 -0
  116. package/dist/esm/{certification_request-PeMaLTUD.js → ssh_certificate-Ct-r021h.js} +1682 -115
  117. package/dist/esm/ssh_certificate-Ct-r021h.js.map +1 -0
  118. package/dist/esm/{x509_certificate-CEEWtU_T.js → x509_certificate-5DEbrOA7.js} +4 -3
  119. package/dist/{esm-es5/x509_certificate-CEEWtU_T.js.map → esm/x509_certificate-5DEbrOA7.js.map} +1 -1
  120. package/dist/esm/{x509_crl-BcZd9KVn.js → x509_crl-CPgNUkh7.js} +5 -4
  121. package/dist/{esm-es5/x509_crl-BcZd9KVn.js.map → esm/x509_crl-CPgNUkh7.js.map} +1 -1
  122. package/dist/esm-es5/extension-oK2qpCU6.js +12 -0
  123. package/dist/esm-es5/extension-oK2qpCU6.js.map +1 -0
  124. package/dist/esm-es5/index.js +1 -1
  125. package/dist/esm-es5/loader.js +2 -2
  126. package/dist/esm-es5/{miscellaneous-bVeJt-6m.js → miscellaneous-DrmTXljc.js} +2 -2
  127. package/dist/{esm/miscellaneous-bVeJt-6m.js.map → esm-es5/miscellaneous-DrmTXljc.js.map} +1 -1
  128. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  129. package/dist/esm-es5/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +39 -4
  130. package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  131. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  132. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  133. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  134. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  135. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  136. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  137. package/dist/esm-es5/peculiar.js +1 -1
  138. package/dist/esm-es5/pkcs10_certificate_request-Bdt_qA_g.js +19 -0
  139. package/dist/esm-es5/pkcs10_certificate_request-Bdt_qA_g.js.map +1 -0
  140. package/dist/esm-es5/{certification_request-PeMaLTUD.js → ssh_certificate-Ct-r021h.js} +7 -14
  141. package/dist/esm-es5/ssh_certificate-Ct-r021h.js.map +1 -0
  142. package/dist/esm-es5/{x509_certificate-CEEWtU_T.js → x509_certificate-5DEbrOA7.js} +4 -4
  143. package/dist/{esm/x509_certificate-CEEWtU_T.js.map → esm-es5/x509_certificate-5DEbrOA7.js.map} +1 -1
  144. package/dist/esm-es5/{x509_crl-BcZd9KVn.js → x509_crl-CPgNUkh7.js} +2 -2
  145. package/dist/{esm/x509_crl-BcZd9KVn.js.map → esm-es5/x509_crl-CPgNUkh7.js.map} +1 -1
  146. package/dist/peculiar/index.esm.js +1 -1
  147. package/dist/peculiar/locales/en.json +5 -1
  148. package/dist/peculiar/{p-5479a530.entry.js → p-0b895a8e.entry.js} +2 -2
  149. package/dist/peculiar/{p-84f69023.system.entry.js → p-11434880.system.entry.js} +2 -2
  150. package/dist/peculiar/{p-C9sY8yng.system.js → p-2GQYAR0v.system.js} +3 -3
  151. package/dist/peculiar/{p-C9sY8yng.system.js.map → p-2GQYAR0v.system.js.map} +1 -1
  152. package/dist/peculiar/p-364fd32b.system.entry.js +5 -0
  153. package/dist/peculiar/{p-14fcbc5c.system.entry.js.map → p-364fd32b.system.entry.js.map} +1 -1
  154. package/dist/peculiar/p-5df0f22b.system.entry.js +146 -0
  155. package/dist/peculiar/p-5df0f22b.system.entry.js.map +1 -0
  156. package/dist/peculiar/p-62b723f6.entry.js +145 -0
  157. package/dist/peculiar/p-62b723f6.entry.js.map +1 -0
  158. package/dist/peculiar/p-83a53b4f.entry.js +5 -0
  159. package/dist/peculiar/{p-0de4837d.entry.js.map → p-83a53b4f.entry.js.map} +1 -1
  160. package/dist/peculiar/p-B2G7qjfV.js +369 -0
  161. package/dist/peculiar/{p-CGRNSrHk.js.map → p-B2G7qjfV.js.map} +1 -1
  162. package/dist/peculiar/{p-BypepohK.system.js.map → p-BCsPspKr.system.js.map} +1 -1
  163. package/dist/peculiar/p-BGASC3UX.system.js +1 -1
  164. package/dist/peculiar/p-BGIWeG8l.js +12 -0
  165. package/dist/peculiar/p-BGIWeG8l.js.map +1 -0
  166. package/dist/peculiar/{p-DRvp86xt.system.js → p-BQiABBi1.system.js} +5 -5
  167. package/dist/peculiar/{p-DRvp86xt.system.js.map → p-BQiABBi1.system.js.map} +1 -1
  168. package/dist/peculiar/{p-CezfC5i1.system.js → p-BeVuAzsd.system.js} +42 -42
  169. package/dist/peculiar/{p-CezfC5i1.system.js.map → p-BeVuAzsd.system.js.map} +1 -1
  170. package/dist/peculiar/{p-CZwhKPgb.system.js → p-C31rbtuG.system.js} +2 -2
  171. package/dist/peculiar/p-C31rbtuG.system.js.map +1 -0
  172. package/dist/peculiar/p-Ce-IF7_R.system.js.map +1 -0
  173. package/dist/peculiar/p-ClkgAXnd.system.js +135 -0
  174. package/dist/peculiar/p-ClkgAXnd.system.js.map +1 -0
  175. package/dist/peculiar/p-Ct-r021h.js +135 -0
  176. package/dist/peculiar/p-Ct-r021h.js.map +1 -0
  177. package/dist/peculiar/{p-BaebEpW0.system.js.map → p-CxtUQdcj.system.js.map} +1 -1
  178. package/dist/peculiar/{p-DrmgUhyv.js → p-D9qq15zG.js} +4 -4
  179. package/dist/peculiar/{p-DrmgUhyv.js.map → p-D9qq15zG.js.map} +1 -1
  180. package/dist/peculiar/{p-CjWRKsN-.js → p-DOpiv0-8.js} +3 -3
  181. package/dist/peculiar/{p-CjWRKsN-.js.map → p-DOpiv0-8.js.map} +1 -1
  182. package/dist/peculiar/p-IOtHTzYC.system.js +12 -0
  183. package/dist/peculiar/p-IOtHTzYC.system.js.map +1 -0
  184. package/dist/peculiar/p-LmKU8Smy.system.js.map +1 -0
  185. package/dist/peculiar/p-RWPI76Dh.js +19 -0
  186. package/dist/peculiar/p-RWPI76Dh.js.map +1 -0
  187. package/dist/peculiar/p-da9eb1e7.entry.js +5 -0
  188. package/dist/peculiar/p-da9eb1e7.entry.js.map +1 -0
  189. package/dist/peculiar/p-fd98bb82.system.entry.js +5 -0
  190. package/dist/peculiar/p-fd98bb82.system.entry.js.map +1 -0
  191. package/dist/peculiar/{p-J1t5v5N3.system.js → p-zQwWLfga.system.js} +4 -4
  192. package/dist/peculiar/p-zQwWLfga.system.js.map +1 -0
  193. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.esm.js.map +1 -0
  194. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  195. package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -1
  196. package/dist/peculiar/peculiar-certificates-viewer.entry.esm.js.map +1 -1
  197. package/dist/peculiar/peculiar.esm.js +1 -1
  198. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +4 -4
  199. package/dist/types/components/certificate-details-parts/attributes/extension_request_attribute.d.ts +15 -0
  200. package/dist/types/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.d.ts +15 -0
  201. package/dist/types/components/ssh-certificate-viewer/-components/basic_information.d.ts +21 -0
  202. package/dist/types/components/ssh-certificate-viewer/-components/public_key.d.ts +14 -0
  203. package/dist/types/components/ssh-certificate-viewer/-components/signature_key.d.ts +14 -0
  204. package/dist/types/components/ssh-certificate-viewer/ssh-certificate-viewer.d.ts +43 -0
  205. package/dist/types/components.d.ts +43 -0
  206. package/dist/types/constants/oids.d.ts +2 -0
  207. package/dist/types/crypto/attribute.d.ts +2 -0
  208. package/dist/types/crypto/index.d.ts +1 -0
  209. package/dist/types/crypto/pkcs10_certificate_request.d.ts +0 -2
  210. package/dist/types/crypto/ssh_certificate.d.ts +28 -0
  211. package/dist/types/utils/l10n.d.ts +4 -0
  212. package/hydrate/index.js +1908 -33
  213. package/hydrate/index.mjs +1908 -33
  214. package/package.json +4 -2
  215. package/dist/cjs/certification_request-CxHe71zR.js.map +0 -1
  216. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +0 -1
  217. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +0 -1
  218. package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js +0 -150
  219. package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js.map +0 -1
  220. package/dist/esm/certification_request-PeMaLTUD.js.map +0 -1
  221. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  222. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  223. package/dist/esm/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
  224. package/dist/esm-es5/certification_request-PeMaLTUD.js.map +0 -1
  225. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  226. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  227. package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js +0 -19
  228. package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
  229. package/dist/peculiar/p-00d6f11f.system.entry.js +0 -111
  230. package/dist/peculiar/p-00d6f11f.system.entry.js.map +0 -1
  231. package/dist/peculiar/p-0de4837d.entry.js +0 -5
  232. package/dist/peculiar/p-14fcbc5c.system.entry.js +0 -5
  233. package/dist/peculiar/p-315805ce.entry.js +0 -5
  234. package/dist/peculiar/p-315805ce.entry.js.map +0 -1
  235. package/dist/peculiar/p-591a9019.system.entry.js +0 -5
  236. package/dist/peculiar/p-591a9019.system.entry.js.map +0 -1
  237. package/dist/peculiar/p-BipKYW6e.system.js +0 -142
  238. package/dist/peculiar/p-BipKYW6e.system.js.map +0 -1
  239. package/dist/peculiar/p-BloT0Xj9.system.js.map +0 -1
  240. package/dist/peculiar/p-CGRNSrHk.js +0 -369
  241. package/dist/peculiar/p-CZwhKPgb.system.js.map +0 -1
  242. package/dist/peculiar/p-D1eNnGDF.js +0 -19
  243. package/dist/peculiar/p-D1eNnGDF.js.map +0 -1
  244. package/dist/peculiar/p-ITVWR0oT.system.js.map +0 -1
  245. package/dist/peculiar/p-J1t5v5N3.system.js.map +0 -1
  246. package/dist/peculiar/p-PeMaLTUD.js +0 -142
  247. package/dist/peculiar/p-PeMaLTUD.js.map +0 -1
  248. package/dist/peculiar/p-c8b3766a.entry.js +0 -110
  249. package/dist/peculiar/p-c8b3766a.entry.js.map +0 -1
  250. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +0 -1
  251. /package/dist/peculiar/{p-5479a530.entry.js.map → p-0b895a8e.entry.js.map} +0 -0
  252. /package/dist/peculiar/{p-84f69023.system.entry.js.map → p-11434880.system.entry.js.map} +0 -0
@@ -5411,11 +5411,11 @@ exports.CRLNumber = __decorate$1([
5411
5411
  ], exports.CRLNumber);
5412
5412
 
5413
5413
  const id_ce_deltaCRLIndicator = `${id_ce}.27`;
5414
- let BaseCRLNumber = class BaseCRLNumber extends exports.CRLNumber {
5414
+ exports.BaseCRLNumber = class BaseCRLNumber extends exports.CRLNumber {
5415
5415
  };
5416
- BaseCRLNumber = __decorate$1([
5416
+ exports.BaseCRLNumber = __decorate$1([
5417
5417
  AsnType({ type: exports.AsnTypeTypes.Choice })
5418
- ], BaseCRLNumber);
5418
+ ], exports.BaseCRLNumber);
5419
5419
 
5420
5420
  var CRLDistributionPoints_1;
5421
5421
  const id_ce_cRLDistributionPoints = `${id_ce}.31`;
@@ -5613,17 +5613,17 @@ exports.ExtendedKeyUsage = ExtendedKeyUsage_1 = __decorate$1([
5613
5613
  ], exports.ExtendedKeyUsage);
5614
5614
 
5615
5615
  const id_ce_inhibitAnyPolicy = `${id_ce}.54`;
5616
- let InhibitAnyPolicy = class InhibitAnyPolicy {
5616
+ exports.InhibitAnyPolicy = class InhibitAnyPolicy {
5617
5617
  constructor(value = new ArrayBuffer(0)) {
5618
5618
  this.value = value;
5619
5619
  }
5620
5620
  };
5621
5621
  __decorate$1([
5622
5622
  AsnProp({ type: exports.AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
5623
- ], InhibitAnyPolicy.prototype, "value", void 0);
5624
- InhibitAnyPolicy = __decorate$1([
5623
+ ], exports.InhibitAnyPolicy.prototype, "value", void 0);
5624
+ exports.InhibitAnyPolicy = __decorate$1([
5625
5625
  AsnType({ type: exports.AsnTypeTypes.Choice })
5626
- ], InhibitAnyPolicy);
5626
+ ], exports.InhibitAnyPolicy);
5627
5627
 
5628
5628
  const id_ce_invalidityDate = `${id_ce}.24`;
5629
5629
  exports.InvalidityDate = class InvalidityDate {
@@ -5643,15 +5643,15 @@ exports.InvalidityDate = __decorate$1([
5643
5643
 
5644
5644
  var IssueAlternativeName_1;
5645
5645
  const id_ce_issuerAltName = `${id_ce}.18`;
5646
- let IssueAlternativeName = IssueAlternativeName_1 = class IssueAlternativeName extends GeneralNames {
5646
+ exports.IssueAlternativeName = IssueAlternativeName_1 = class IssueAlternativeName extends GeneralNames {
5647
5647
  constructor(items) {
5648
5648
  super(items);
5649
5649
  Object.setPrototypeOf(this, IssueAlternativeName_1.prototype);
5650
5650
  }
5651
5651
  };
5652
- IssueAlternativeName = IssueAlternativeName_1 = __decorate$1([
5652
+ exports.IssueAlternativeName = IssueAlternativeName_1 = __decorate$1([
5653
5653
  AsnType({ type: exports.AsnTypeTypes.Sequence })
5654
- ], IssueAlternativeName);
5654
+ ], exports.IssueAlternativeName);
5655
5655
 
5656
5656
  const id_ce_keyUsage = `${id_ce}.15`;
5657
5657
  var KeyUsageFlags;
@@ -6767,6 +6767,10 @@ const crlEntryExtensions = "CRL Entry Extensions";
6767
6767
  const previewCertificate = "Preview certificate";
6768
6768
  const viewDetails = "View details";
6769
6769
  const downloadOptions = "Download options";
6770
+ const keyId = "Key ID";
6771
+ const principals = "Principals";
6772
+ const criticalOptions = "Critical Options";
6773
+ const signingCA = "Signing CA";
6770
6774
  var en = {
6771
6775
  basicInformation: basicInformation,
6772
6776
  subjectName: subjectName,
@@ -6814,7 +6818,11 @@ var en = {
6814
6818
  crlEntryExtensions: crlEntryExtensions,
6815
6819
  previewCertificate: previewCertificate,
6816
6820
  viewDetails: viewDetails,
6817
- downloadOptions: downloadOptions
6821
+ downloadOptions: downloadOptions,
6822
+ keyId: keyId,
6823
+ principals: principals,
6824
+ criticalOptions: criticalOptions,
6825
+ signingCA: signingCA
6818
6826
  };
6819
6827
 
6820
6828
  /**
@@ -8089,6 +8097,7 @@ const OIDs = {
8089
8097
  '1.3.6.1.4.1.16334.509.2.3': 'Ngc Class3',
8090
8098
  '1.3.6.1.4.1.17326.10.8.12.1.2': 'Camerfirma EV policy',
8091
8099
  '1.3.6.1.4.1.17326.10.14.2.1.2': 'Camerfirma EV policy',
8100
+ '1.3.6.1.4.1.22112.2.1': 'Private Key Possession Statement',
8092
8101
  '1.3.6.1.4.1.22234.2.5.2.3.1': 'Cert Plus EV policy',
8093
8102
  '1.3.6.1.4.1.23223.1.1.1': 'Start Com EV policy',
8094
8103
  '1.3.6.1.4.1.23629.1.4.2.1.1': 'Safenet Usage Limit',
@@ -8482,6 +8491,7 @@ const OIDs = {
8482
8491
  '1.3.132.0.37': 'Sect409r1',
8483
8492
  '1.3.132.0.38': 'Sect571k1',
8484
8493
  '1.3.132.0.39': 'Sect571r1',
8494
+ '1.3.132.1.12': 'ECDH',
8485
8495
  '1.3.133.16.840.9.84': 'x984',
8486
8496
  '1.3.133.16.840.9.84.0': 'x984 Module',
8487
8497
  '1.3.133.16.840.9.84.0.1': 'x984 Biometrics',
@@ -9232,13 +9242,13 @@ const OIDs = {
9232
9242
  * This source code is licensed under the MIT license found in the
9233
9243
  * LICENSE file in the root directory of this source tree.
9234
9244
  */
9235
- var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9245
+ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9236
9246
  if (kind === "m") throw new TypeError("Private method is not writable");
9237
9247
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9238
9248
  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");
9239
9249
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9240
9250
  };
9241
- var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9251
+ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9242
9252
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9243
9253
  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");
9244
9254
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -9248,15 +9258,15 @@ class Name {
9248
9258
  constructor(data) {
9249
9259
  _Name_asn.set(this, new exports.Name$1());
9250
9260
  if (buildExports.BufferSourceConverter.isBufferSource(data)) {
9251
- __classPrivateFieldSet$1(this, _Name_asn, AsnParser.parse(data, exports.Name$1), "f");
9261
+ __classPrivateFieldSet$2(this, _Name_asn, AsnParser.parse(data, exports.Name$1), "f");
9252
9262
  }
9253
9263
  else {
9254
- __classPrivateFieldSet$1(this, _Name_asn, data, "f");
9264
+ __classPrivateFieldSet$2(this, _Name_asn, data, "f");
9255
9265
  }
9256
9266
  }
9257
9267
  toJSON() {
9258
9268
  const res = [];
9259
- __classPrivateFieldGet$1(this, _Name_asn, "f").forEach((o) => (o.forEach((a) => {
9269
+ __classPrivateFieldGet$2(this, _Name_asn, "f").forEach((o) => (o.forEach((a) => {
9260
9270
  res.push({
9261
9271
  type: a.type,
9262
9272
  name: OIDs[a.type],
@@ -9971,27 +9981,6 @@ class SignedCertificateTimestamp extends Structure {
9971
9981
  }
9972
9982
  }
9973
9983
 
9974
- const id_certificateTransparency = "1.3.6.1.4.1.11129.2.4.2";
9975
- class CertificateTransparency extends OctetString {
9976
- constructor() {
9977
- super(...arguments);
9978
- this.items = [];
9979
- }
9980
- fromASN(asn) {
9981
- super.fromASN(asn);
9982
- const stream = new ByteStream(this.buffer);
9983
- const len = stream.readNumber(2);
9984
- this.items = [];
9985
- while (stream.position < len) {
9986
- this.items.push(new SignedCertificateTimestamp(stream));
9987
- }
9988
- return this;
9989
- }
9990
- toJSON() {
9991
- return this.items.map((o) => o.toJSON());
9992
- }
9993
- }
9994
-
9995
9984
  var Version$1;
9996
9985
  (function (Version) {
9997
9986
  Version[Version["v1"] = 1] = "v1";
@@ -10241,8 +10230,6 @@ __decorate$1([
10241
10230
  AsnProp({ type: OtherLogotypeInfo, context: 3, repeated: "sequence", optional: true })
10242
10231
  ], LogotypeExtn.prototype, "otherLogos", void 0);
10243
10232
 
10244
- const id_pe_logotype = "1.3.6.1.5.5.7.1.12";
10245
-
10246
10233
  var JWTClaimNames_1, JWTClaimPermittedValuesList_1, TNAuthorizationList_1;
10247
10234
  const id_pkix = "1.3.6.1.5.5.7";
10248
10235
  const id_pe = `${id_pkix}.1`;
@@ -10820,13 +10807,13 @@ __decorate([
10820
10807
  * This source code is licensed under the MIT license found in the
10821
10808
  * LICENSE file in the root directory of this source tree.
10822
10809
  */
10823
- var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10810
+ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10824
10811
  if (kind === "m") throw new TypeError("Private method is not writable");
10825
10812
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10826
10813
  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");
10827
10814
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10828
10815
  };
10829
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10816
+ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10830
10817
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10831
10818
  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");
10832
10819
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10839,99 +10826,24 @@ class AsnData {
10839
10826
  _AsnData_raw.set(this, void 0);
10840
10827
  if (args.length === 1) {
10841
10828
  // asn
10842
- __classPrivateFieldSet(this, _AsnData_asn, args[0], "f");
10843
- __classPrivateFieldSet(this, _AsnData_raw, AsnConvert.serialize(__classPrivateFieldGet(this, _AsnData_asn, "f")), "f");
10829
+ __classPrivateFieldSet$1(this, _AsnData_asn, args[0], "f");
10830
+ __classPrivateFieldSet$1(this, _AsnData_raw, AsnConvert.serialize(__classPrivateFieldGet$1(this, _AsnData_asn, "f")), "f");
10844
10831
  }
10845
10832
  else {
10846
10833
  // raw, type
10847
- __classPrivateFieldSet(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
10848
- __classPrivateFieldSet(this, _AsnData_raw, buildExports.BufferSourceConverter.toArrayBuffer(args[0]), "f");
10834
+ __classPrivateFieldSet$1(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
10835
+ __classPrivateFieldSet$1(this, _AsnData_raw, buildExports.BufferSourceConverter.toArrayBuffer(args[0]), "f");
10849
10836
  }
10850
10837
  }
10851
10838
  get asn() {
10852
- return __classPrivateFieldGet(this, _AsnData_asn, "f");
10839
+ return __classPrivateFieldGet$1(this, _AsnData_asn, "f");
10853
10840
  }
10854
10841
  get raw() {
10855
- return __classPrivateFieldGet(this, _AsnData_raw, "f");
10842
+ return __classPrivateFieldGet$1(this, _AsnData_raw, "f");
10856
10843
  }
10857
10844
  }
10858
10845
  _AsnData_asn = new WeakMap(), _AsnData_raw = new WeakMap();
10859
10846
 
10860
- /**
10861
- * @license
10862
- * Copyright (c) Peculiar Ventures, LLC.
10863
- *
10864
- * This source code is licensed under the MIT license found in the
10865
- * LICENSE file in the root directory of this source tree.
10866
- */
10867
- const extensionParsers = {
10868
- [id_pe_authorityInfoAccess]: exports.AuthorityInfoAccessSyntax,
10869
- [id_ce_authorityKeyIdentifier]: AuthorityKeyIdentifier,
10870
- [id_ce_basicConstraints]: BasicConstraints,
10871
- [id_ce_certificateIssuer]: exports.CertificateIssuer,
10872
- [id_ce_certificatePolicies]: exports.CertificatePolicies,
10873
- [id_ce_cRLDistributionPoints]: exports.CRLDistributionPoints,
10874
- '2.5.29.46': exports.CRLDistributionPoints,
10875
- [id_ce_issuingDistributionPoint]: IssuingDistributionPoint,
10876
- [id_ce_cRLReasons]: exports.CRLReason,
10877
- [id_ce_extKeyUsage]: exports.ExtendedKeyUsage,
10878
- [id_ce_inhibitAnyPolicy]: InhibitAnyPolicy,
10879
- [id_ce_invalidityDate]: exports.InvalidityDate,
10880
- [id_ce_issuerAltName]: IssueAlternativeName,
10881
- [id_ce_keyUsage]: KeyUsage,
10882
- [id_ce_nameConstraints]: NameConstraints,
10883
- [id_ce_policyConstraints]: PolicyConstraints,
10884
- [id_ce_policyMappings]: exports.PolicyMappings,
10885
- [id_ce_subjectAltName]: exports.SubjectAlternativeName,
10886
- [id_ce_subjectDirectoryAttributes]: exports.SubjectDirectoryAttributes,
10887
- [id_ce_subjectKeyIdentifier]: SubjectKeyIdentifier,
10888
- [id_pe_qcStatements]: exports.QCStatements,
10889
- [id_certificateTemplate]: CertificateTemplate,
10890
- [id_enrollCertType]: exports.EnrollCertTypeChoice,
10891
- [id_netscapeComment]: exports.NetscapeComment,
10892
- [id_netscapeCertType]: NetscapeCertType,
10893
- [id_caVersion]: exports.CaVersion,
10894
- [id_certificateTransparency]: CertificateTransparency,
10895
- [id_lei]: exports.LeiChoice,
10896
- [id_role]: exports.LeiRole,
10897
- [id_adbe_timestamp]: Timestamp,
10898
- [id_adbe_archiveRevInfo]: ArchiveRevInfo,
10899
- [id_ce_privateKeyUsagePeriod]: PrivateKeyUsagePeriod,
10900
- [id_entrust_entrustVersInfo]: EntrustVersionInfo,
10901
- '2.16.724.1.2.2.4.1': exports.BiometricSyntax,
10902
- [id_pe_biometricInfo]: exports.BiometricSyntax,
10903
- [id_pe_logotype]: LogotypeExtn,
10904
- [id_pe_TNAuthList]: exports.TNAuthorizationList,
10905
- [id_pe_subjectInfoAccess]: exports.SubjectInfoAccessSyntax,
10906
- [id_ce_cRLNumber]: exports.CRLNumber,
10907
- [id_ce_deltaCRLIndicator]: BaseCRLNumber,
10908
- [id_ce_keyDescription]: NonStandardKeyDescription,
10909
- [id_cabforganizationIdentifier]: CabforganizationIdentifier,
10910
- };
10911
- class Extension extends AsnData {
10912
- getAsnExtnValue() {
10913
- return this.asn.extnValue.buffer;
10914
- }
10915
- constructor(raw) {
10916
- super(raw, Extension$1);
10917
- const asnExtnValue = this.getAsnExtnValue();
10918
- try {
10919
- const target = extensionParsers[this.asn.extnID];
10920
- if (target) {
10921
- this.value = AsnParser.parse(asnExtnValue, target);
10922
- }
10923
- else {
10924
- console.warn(`Didn't detect parser for "${this.asn.extnID}" extension.`);
10925
- this.value = buildExports.Convert.ToHex(asnExtnValue);
10926
- }
10927
- }
10928
- catch (error) {
10929
- console.error(`Error parse "${this.asn.extnID}" extension:`, error.message);
10930
- this.value = buildExports.Convert.ToHex(asnExtnValue);
10931
- }
10932
- }
10933
- }
10934
-
10935
10847
  /**
10936
10848
  * @license
10937
10849
  * Copyright (c) Peculiar Ventures, LLC.
@@ -12726,6 +12638,22 @@ SMIMECapabilities = SMIMECapabilities_1 = __decorate$1([
12726
12638
  AsnType({ type: exports.AsnTypeTypes.Sequence, itemType: SMIMECapability })
12727
12639
  ], SMIMECapabilities);
12728
12640
 
12641
+ const id_at_statementOfPossession = "1.3.6.1.4.1.22112.2.1";
12642
+ exports.PrivateKeyPossessionStatement = class PrivateKeyPossessionStatement {
12643
+ constructor(params = {}) {
12644
+ Object.assign(this, params);
12645
+ }
12646
+ };
12647
+ __decorate$1([
12648
+ AsnProp({ type: IssuerAndSerialNumber })
12649
+ ], exports.PrivateKeyPossessionStatement.prototype, "signer", void 0);
12650
+ __decorate$1([
12651
+ AsnProp({ type: Certificate, optional: true })
12652
+ ], exports.PrivateKeyPossessionStatement.prototype, "cert", void 0);
12653
+ exports.PrivateKeyPossessionStatement = __decorate$1([
12654
+ AsnType({ type: exports.AsnTypeTypes.Sequence })
12655
+ ], exports.PrivateKeyPossessionStatement);
12656
+
12729
12657
  var Attributes_1;
12730
12658
  let Attributes = Attributes_1 = class Attributes extends AsnArray {
12731
12659
  constructor(items) {
@@ -12777,6 +12705,1645 @@ __decorate$1([
12777
12705
  AsnProp({ type: exports.AsnPropTypes.BitString })
12778
12706
  ], CertificationRequest.prototype, "signature", void 0);
12779
12707
 
12708
+ let globalCrypto = globalThis.crypto;
12709
+ function getCrypto() {
12710
+ return globalCrypto;
12711
+ }
12712
+
12713
+ class SshError extends Error {
12714
+ code;
12715
+ constructor(message, code) {
12716
+ super(message);
12717
+ this.code = code;
12718
+ this.name = this.constructor.name;
12719
+ if (Error.captureStackTrace) {
12720
+ Error.captureStackTrace(this, this.constructor);
12721
+ }
12722
+ }
12723
+ }
12724
+ class UnsupportedAlgorithmError extends SshError {
12725
+ constructor(algorithm, supportedAlgorithms) {
12726
+ const supported = supportedAlgorithms ? ` Supported: ${supportedAlgorithms.join(', ')}` : '';
12727
+ super(`Unsupported algorithm: ${algorithm}.${supported}`, 'UNSUPPORTED_ALGORITHM');
12728
+ }
12729
+ }
12730
+ class InvalidFormatError extends SshError {
12731
+ constructor(format, expectedFormat) {
12732
+ const expected = expectedFormat ? ` Expected: ${expectedFormat}` : '';
12733
+ super(`Invalid format: ${format}.${expected}`, 'INVALID_FORMAT');
12734
+ }
12735
+ }
12736
+ class UnsupportedKeyTypeError extends SshError {
12737
+ constructor(keyType, supportedTypes) {
12738
+ const supported = supportedTypes ? ` Supported: ${supportedTypes.join(', ')}` : '';
12739
+ super(`Unsupported key type: ${keyType}.${supported}`, 'UNSUPPORTED_KEY_TYPE');
12740
+ }
12741
+ }
12742
+ class InvalidPrivateKeyFormatError extends SshError {
12743
+ constructor(details) {
12744
+ const message = details
12745
+ ? `Invalid SSH private key format: ${details}`
12746
+ : 'Invalid SSH private key format';
12747
+ super(message, 'INVALID_PRIVATE_KEY_FORMAT');
12748
+ }
12749
+ }
12750
+ class EncryptedKeyNotSupportedError extends SshError {
12751
+ constructor(cipher) {
12752
+ const message = cipher
12753
+ ? `Encrypted SSH private keys are not supported (cipher: ${cipher})`
12754
+ : 'Encrypted SSH private keys are not supported';
12755
+ super(message, 'ENCRYPTED_KEY_NOT_SUPPORTED');
12756
+ }
12757
+ }
12758
+ class InvalidKeyDataError extends SshError {
12759
+ constructor(details) {
12760
+ const message = details ? `Invalid key data: ${details}` : 'Invalid key data';
12761
+ super(message, 'INVALID_KEY_DATA');
12762
+ }
12763
+ }
12764
+ class UnexpectedEOFError extends SshError {
12765
+ constructor(expected, actual) {
12766
+ const details = expected !== undefined && actual !== undefined
12767
+ ? ` Expected ${expected} bytes, got ${actual}`
12768
+ : '';
12769
+ super(`Unexpected end of data${details}`, 'UNEXPECTED_EOF');
12770
+ }
12771
+ }
12772
+
12773
+ const encoder = new TextEncoder();
12774
+ const decoder = new TextDecoder();
12775
+
12776
+ class SshReader {
12777
+ buffer;
12778
+ offset;
12779
+ constructor(data) {
12780
+ this.buffer = data;
12781
+ this.offset = 0;
12782
+ }
12783
+ readUint8() {
12784
+ if (this.offset >= this.buffer.length) {
12785
+ throw new UnexpectedEOFError(1, 0);
12786
+ }
12787
+ return this.buffer[this.offset++];
12788
+ }
12789
+ readUint32() {
12790
+ const value = (this.readUint8() << 24) |
12791
+ (this.readUint8() << 16) |
12792
+ (this.readUint8() << 8) |
12793
+ this.readUint8();
12794
+ return value >>> 0;
12795
+ }
12796
+ readUint64() {
12797
+ const high = this.readUint32();
12798
+ const low = this.readUint32();
12799
+ return (BigInt(high) << 32n) | BigInt(low);
12800
+ }
12801
+ readBytes(length) {
12802
+ if (length < 0) {
12803
+ throw new InvalidFormatError(`Invalid length: ${length}`);
12804
+ }
12805
+ if (this.offset + length > this.buffer.length) {
12806
+ throw new UnexpectedEOFError(length, this.buffer.length - this.offset);
12807
+ }
12808
+ const result = this.buffer.subarray(this.offset, this.offset + length);
12809
+ this.offset += length;
12810
+ return result;
12811
+ }
12812
+ readString() {
12813
+ const length = this.readUint32();
12814
+ const bytes = this.readBytes(length);
12815
+ return decoder.decode(bytes);
12816
+ }
12817
+ peekString(length) {
12818
+ if (this.offset + length > this.buffer.length) {
12819
+ throw new UnexpectedEOFError(length, this.buffer.length - this.offset);
12820
+ }
12821
+ const bytes = this.buffer.subarray(this.offset, this.offset + length);
12822
+ return decoder.decode(bytes);
12823
+ }
12824
+ readMpInt(sshEncoding = false) {
12825
+ const length = this.readUint32();
12826
+ const bytes = this.readBytes(length);
12827
+ if (sshEncoding && bytes.length > 1 && bytes[0] === 0x00) {
12828
+ return bytes.subarray(1);
12829
+ }
12830
+ return bytes;
12831
+ }
12832
+ readMpIntSsh() {
12833
+ return this.readMpInt(true);
12834
+ }
12835
+ remaining() {
12836
+ return this.buffer.length - this.offset;
12837
+ }
12838
+ getOffset() {
12839
+ return this.offset;
12840
+ }
12841
+ seek(offset) {
12842
+ if (offset < 0 || offset > this.buffer.length) {
12843
+ throw new InvalidFormatError(`Invalid offset: ${offset}. Buffer length: ${this.buffer.length}`);
12844
+ }
12845
+ this.offset = offset;
12846
+ }
12847
+ }
12848
+
12849
+ class SshWriter {
12850
+ buffer;
12851
+ offset;
12852
+ constructor(initialSize = 1024) {
12853
+ this.buffer = new Uint8Array(initialSize);
12854
+ this.offset = 0;
12855
+ }
12856
+ ensureCapacity(additional) {
12857
+ const required = this.offset + additional;
12858
+ if (required > this.buffer.length) {
12859
+ const newSize = Math.max(required, this.buffer.length * 2);
12860
+ const newBuffer = new Uint8Array(newSize);
12861
+ newBuffer.set(this.buffer.subarray(0, this.offset));
12862
+ this.buffer = newBuffer;
12863
+ }
12864
+ }
12865
+ reserve(minCapacity) {
12866
+ if (minCapacity > this.buffer.length) {
12867
+ const newBuffer = new Uint8Array(minCapacity);
12868
+ newBuffer.set(this.buffer.subarray(0, this.offset));
12869
+ this.buffer = newBuffer;
12870
+ }
12871
+ }
12872
+ writeUint8(value) {
12873
+ this.ensureCapacity(1);
12874
+ this.buffer[this.offset++] = value & 0xff;
12875
+ }
12876
+ writeUint32(value) {
12877
+ this.ensureCapacity(4);
12878
+ this.buffer[this.offset++] = (value >>> 24) & 0xff;
12879
+ this.buffer[this.offset++] = (value >>> 16) & 0xff;
12880
+ this.buffer[this.offset++] = (value >>> 8) & 0xff;
12881
+ this.buffer[this.offset++] = value & 0xff;
12882
+ }
12883
+ writeUint64(value) {
12884
+ this.ensureCapacity(8);
12885
+ const high = Number(value >> 32n);
12886
+ const low = Number(value & 0xffffffffn);
12887
+ this.writeUint32(high);
12888
+ this.writeUint32(low);
12889
+ }
12890
+ writeBytes(data) {
12891
+ this.ensureCapacity(data.length);
12892
+ this.buffer.set(data, this.offset);
12893
+ this.offset += data.length;
12894
+ }
12895
+ writeString(value) {
12896
+ const bytes = encoder.encode(value);
12897
+ this.writeUint32(bytes.length);
12898
+ this.writeBytes(bytes);
12899
+ }
12900
+ writeMpInt(value, sshEncoding = false) {
12901
+ if (sshEncoding && value.length > 0 && (value[0] & 0x80) !== 0) {
12902
+ const paddedBytes = new Uint8Array(value.length + 1);
12903
+ paddedBytes[0] = 0x00;
12904
+ paddedBytes.set(value, 1);
12905
+ this.writeUint32(paddedBytes.length);
12906
+ this.writeBytes(paddedBytes);
12907
+ }
12908
+ else {
12909
+ this.writeUint32(value.length);
12910
+ this.writeBytes(value);
12911
+ }
12912
+ }
12913
+ writeMpIntSsh(value) {
12914
+ this.writeMpInt(value, true);
12915
+ }
12916
+ toUint8Array() {
12917
+ return this.buffer.subarray(0, this.offset);
12918
+ }
12919
+ getOffset() {
12920
+ return this.offset;
12921
+ }
12922
+ seek(offset) {
12923
+ if (offset < 0 || offset > this.buffer.length) {
12924
+ throw new InvalidFormatError('Invalid offset');
12925
+ }
12926
+ this.offset = offset;
12927
+ }
12928
+ }
12929
+
12930
+ class RsaBinding {
12931
+ hash = 'SHA-256';
12932
+ constructor(hash = 'SHA-256') {
12933
+ this.hash = hash;
12934
+ }
12935
+ async importPublicSsh(params) {
12936
+ const { blob, crypto } = params;
12937
+ const reader = new SshReader(blob);
12938
+ reader.readString();
12939
+ const e = reader.readMpInt(true);
12940
+ const n = reader.readMpInt(true);
12941
+ const jwk = {
12942
+ kty: 'RSA',
12943
+ n: buildExports.Convert.ToBase64Url(n),
12944
+ e: buildExports.Convert.ToBase64Url(e),
12945
+ };
12946
+ return crypto.subtle.importKey('jwk', jwk, {
12947
+ name: 'RSASSA-PKCS1-v1_5',
12948
+ hash: this.hash,
12949
+ }, true, ['verify']);
12950
+ }
12951
+ async exportPublicSsh(params) {
12952
+ const { publicKey, crypto } = params;
12953
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
12954
+ if (!jwk.n || !jwk.e) {
12955
+ throw new InvalidKeyDataError('RSA JWK missing required parameters (n, e)');
12956
+ }
12957
+ const n = buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromBase64Url(jwk.n));
12958
+ const e = buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromBase64Url(jwk.e));
12959
+ const writer = new SshWriter();
12960
+ writer.writeString('ssh-rsa');
12961
+ writer.writeMpInt(e, true);
12962
+ writer.writeMpInt(n, true);
12963
+ return writer.toUint8Array();
12964
+ }
12965
+ async importPublicSpki(params) {
12966
+ const { spki, crypto } = params;
12967
+ return crypto.subtle.importKey('spki', spki, {
12968
+ name: 'RSASSA-PKCS1-v1_5',
12969
+ hash: this.hash,
12970
+ }, true, ['verify']);
12971
+ }
12972
+ async exportPublicSpki(params) {
12973
+ const { publicKey, crypto } = params;
12974
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
12975
+ return buildExports.BufferSourceConverter.toUint8Array(spki);
12976
+ }
12977
+ async importPrivatePkcs8(params) {
12978
+ const { pkcs8, crypto } = params;
12979
+ return crypto.subtle.importKey('pkcs8', pkcs8, {
12980
+ name: 'RSASSA-PKCS1-v1_5',
12981
+ hash: this.hash,
12982
+ }, true, ['sign']);
12983
+ }
12984
+ async exportPrivatePkcs8(params) {
12985
+ const { privateKey, crypto } = params;
12986
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
12987
+ return buildExports.BufferSourceConverter.toUint8Array(pkcs8);
12988
+ }
12989
+ async importPrivateSsh(params) {
12990
+ const { sshKey, crypto } = params;
12991
+ const base64Data = sshKey
12992
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
12993
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
12994
+ .replace(/\s/g, '');
12995
+ const binaryData = buildExports.Convert.FromBase64(base64Data);
12996
+ const reader = new SshReader(buildExports.BufferSourceConverter.toUint8Array(binaryData));
12997
+ const magic = reader.readBytes(15);
12998
+ if (buildExports.Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
12999
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
13000
+ }
13001
+ const _cipherName = reader.readString();
13002
+ reader.readString();
13003
+ reader.readString();
13004
+ if (_cipherName !== 'none') {
13005
+ throw new EncryptedKeyNotSupportedError(_cipherName);
13006
+ }
13007
+ const numKeys = reader.readUint32();
13008
+ if (numKeys !== 1) {
13009
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
13010
+ }
13011
+ const publicKeyLength = reader.readUint32();
13012
+ reader.readBytes(publicKeyLength);
13013
+ const privateKeyLength = reader.readUint32();
13014
+ const privateKeyData = reader.readBytes(privateKeyLength);
13015
+ const privateReader = new SshReader(privateKeyData);
13016
+ const checkint1 = privateReader.readUint32();
13017
+ const checkint2 = privateReader.readUint32();
13018
+ if (checkint1 !== checkint2) {
13019
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
13020
+ }
13021
+ privateReader.readString();
13022
+ const n = privateReader.readMpInt(true);
13023
+ const e = privateReader.readMpInt(true);
13024
+ const d = privateReader.readMpInt(true);
13025
+ const iqmp = privateReader.readMpInt(true);
13026
+ const p = privateReader.readMpInt(true);
13027
+ const q = privateReader.readMpInt(true);
13028
+ privateReader.readString();
13029
+ const dBig = BigInt('0x' + buildExports.Convert.ToHex(d));
13030
+ const pBig = BigInt('0x' + buildExports.Convert.ToHex(p));
13031
+ const qBig = BigInt('0x' + buildExports.Convert.ToHex(q));
13032
+ const dpBig = dBig % (pBig - 1n);
13033
+ const dqBig = dBig % (qBig - 1n);
13034
+ const dpBytes = buildExports.Convert.FromHex(dpBig.toString(16).padStart(p.length * 2, '0'));
13035
+ const dqBytes = buildExports.Convert.FromHex(dqBig.toString(16).padStart(q.length * 2, '0'));
13036
+ const jwk = {
13037
+ kty: 'RSA',
13038
+ n: buildExports.Convert.ToBase64Url(n),
13039
+ e: buildExports.Convert.ToBase64Url(e),
13040
+ d: buildExports.Convert.ToBase64Url(d),
13041
+ p: buildExports.Convert.ToBase64Url(p),
13042
+ q: buildExports.Convert.ToBase64Url(q),
13043
+ dp: buildExports.Convert.ToBase64Url(dpBytes),
13044
+ dq: buildExports.Convert.ToBase64Url(dqBytes),
13045
+ qi: buildExports.Convert.ToBase64Url(iqmp),
13046
+ };
13047
+ return crypto.subtle.importKey('jwk', jwk, {
13048
+ name: 'RSASSA-PKCS1-v1_5',
13049
+ hash: this.hash,
13050
+ }, true, ['sign']);
13051
+ }
13052
+ async exportPrivateSsh(params) {
13053
+ const { privateKey, crypto, jwk: providedJwk } = params;
13054
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
13055
+ if (!jwk.n || !jwk.e || !jwk.d || !jwk.p || !jwk.q) {
13056
+ throw new InvalidKeyDataError('RSA JWK missing required parameters');
13057
+ }
13058
+ const n = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.n));
13059
+ const e = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.e));
13060
+ const d = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.d));
13061
+ const p = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.p));
13062
+ const q = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.q));
13063
+ const qi = jwk.qi ? new Uint8Array(buildExports.Convert.FromBase64Url(jwk.qi)) : new Uint8Array();
13064
+ const writer = new SshWriter();
13065
+ writer.writeString('ssh-rsa');
13066
+ writer.writeMpInt(n, true);
13067
+ writer.writeMpInt(e, true);
13068
+ writer.writeMpInt(d, true);
13069
+ writer.writeMpInt(qi, true);
13070
+ writer.writeMpInt(p, true);
13071
+ writer.writeMpInt(q, true);
13072
+ return writer.toUint8Array();
13073
+ }
13074
+ async sign(params) {
13075
+ const { privateKey, data, crypto, hash } = params;
13076
+ if (hash && hash !== this.hash) {
13077
+ throw new InvalidKeyDataError(`Hash ${hash} not supported for this RSA algorithm`);
13078
+ }
13079
+ if (!privateKey.extractable) {
13080
+ throw new InvalidKeyDataError('Private key is not extractable');
13081
+ }
13082
+ const pkcs8 = await this.exportPrivatePkcs8({ privateKey, crypto });
13083
+ const keyToUse = await this.importPrivatePkcs8({ pkcs8: new Uint8Array(pkcs8), crypto });
13084
+ const signature = await crypto.subtle.sign('RSASSA-PKCS1-v1_5', keyToUse, data);
13085
+ return buildExports.BufferSourceConverter.toUint8Array(signature);
13086
+ }
13087
+ async verify(params) {
13088
+ const { publicKey, signature, data, crypto, hash } = params;
13089
+ if (hash && hash !== this.hash) {
13090
+ return false;
13091
+ }
13092
+ if (!publicKey.extractable) {
13093
+ throw new InvalidKeyDataError('Public key is not extractable');
13094
+ }
13095
+ const spki = await this.exportPublicSpki({ publicKey, crypto });
13096
+ const keyToUse = await this.importPublicSpki({ spki: new Uint8Array(spki), crypto });
13097
+ return crypto.subtle.verify('RSASSA-PKCS1-v1_5', keyToUse, signature, data);
13098
+ }
13099
+ encodeSignature(params) {
13100
+ const { signature, algo } = params;
13101
+ const writer = new SshWriter();
13102
+ writer.writeString(algo);
13103
+ writer.writeUint32(signature.byteLength);
13104
+ writer.writeBytes(signature);
13105
+ return writer.toUint8Array();
13106
+ }
13107
+ decodeSignature(params) {
13108
+ const { signature } = params;
13109
+ const reader = new SshReader(signature);
13110
+ const algo = reader.readString();
13111
+ const sigLength = reader.readUint32();
13112
+ const sig = reader.readBytes(sigLength);
13113
+ return { signature: sig, algo };
13114
+ }
13115
+ supportsCryptoKey(cryptoKey) {
13116
+ return cryptoKey.algorithm.name === 'RSASSA-PKCS1-v1_5';
13117
+ }
13118
+ parsePublicKey(reader) {
13119
+ const publicKeyExponent = reader.readBytes(reader.readUint32());
13120
+ const publicKeyModulus = reader.readBytes(reader.readUint32());
13121
+ const writer = new SshWriter();
13122
+ writer.writeString('ssh-rsa');
13123
+ writer.writeMpInt(publicKeyExponent);
13124
+ writer.writeMpInt(publicKeyModulus);
13125
+ return {
13126
+ type: 'ssh-rsa',
13127
+ keyData: writer.toUint8Array(),
13128
+ };
13129
+ }
13130
+ writePublicKey(writer, publicKey) {
13131
+ const publicKeyReader = new SshReader(publicKey.keyData);
13132
+ publicKeyReader.readString();
13133
+ const e = publicKeyReader.readMpInt();
13134
+ const n = publicKeyReader.readMpInt();
13135
+ writer.writeUint32(e.length);
13136
+ writer.writeBytes(e);
13137
+ writer.writeUint32(n.length);
13138
+ writer.writeBytes(n);
13139
+ }
13140
+ getCertificateType() {
13141
+ return 'ssh-rsa-cert-v01@openssh.com';
13142
+ }
13143
+ getSignatureAlgo() {
13144
+ return this.hash === 'SHA-256' ? 'rsa-sha2-256' : 'rsa-sha2-512';
13145
+ }
13146
+ }
13147
+
13148
+ class EcdsaBinding {
13149
+ curveName;
13150
+ sshType;
13151
+ namedCurve;
13152
+ constructor(curveName, sshType, namedCurve) {
13153
+ this.curveName = curveName;
13154
+ this.sshType = sshType;
13155
+ this.namedCurve = namedCurve;
13156
+ }
13157
+ getHashAlgorithm() {
13158
+ switch (this.namedCurve) {
13159
+ case 'P-256':
13160
+ return 'SHA-256';
13161
+ case 'P-384':
13162
+ return 'SHA-384';
13163
+ case 'P-521':
13164
+ return 'SHA-512';
13165
+ default:
13166
+ return 'SHA-256';
13167
+ }
13168
+ }
13169
+ getExpectedLength() {
13170
+ switch (this.namedCurve) {
13171
+ case 'P-256':
13172
+ return 32;
13173
+ case 'P-384':
13174
+ return 48;
13175
+ case 'P-521':
13176
+ return 66;
13177
+ default:
13178
+ return 32;
13179
+ }
13180
+ }
13181
+ getSignatureCoordLength() {
13182
+ return this.getExpectedLength();
13183
+ }
13184
+ async importPublicSsh(params) {
13185
+ const { blob, crypto } = params;
13186
+ const reader = new SshReader(blob);
13187
+ reader.readString();
13188
+ const curve = reader.readString();
13189
+ if (curve !== this.curveName) {
13190
+ throw new InvalidKeyDataError(`ECDSA curve name ${curve}, expected ${this.curveName}`);
13191
+ }
13192
+ const q = reader.readMpInt();
13193
+ const coordLength = Math.floor((q.length - 1) / 2);
13194
+ const jwk = {
13195
+ kty: 'EC',
13196
+ crv: this.namedCurve,
13197
+ x: buildExports.Convert.ToBase64Url(q.slice(1, 1 + coordLength)),
13198
+ y: buildExports.Convert.ToBase64Url(q.slice(1 + coordLength)),
13199
+ };
13200
+ return crypto.subtle.importKey('jwk', jwk, {
13201
+ name: 'ECDSA',
13202
+ namedCurve: this.namedCurve,
13203
+ }, true, ['verify']);
13204
+ }
13205
+ async exportPublicSsh(params) {
13206
+ const { publicKey, crypto } = params;
13207
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
13208
+ if (!jwk.x || !jwk.y) {
13209
+ throw new InvalidKeyDataError('ECDSA JWK missing x or y parameters');
13210
+ }
13211
+ const x = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.x));
13212
+ const y = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.y));
13213
+ const q = new Uint8Array(1 + x.length + y.length);
13214
+ q[0] = 0x04;
13215
+ q.set(x, 1);
13216
+ q.set(y, 1 + x.length);
13217
+ const writer = new SshWriter();
13218
+ writer.writeString(this.sshType);
13219
+ writer.writeString(this.curveName);
13220
+ writer.writeMpInt(q);
13221
+ return writer.toUint8Array();
13222
+ }
13223
+ async importPublicSpki(params) {
13224
+ const { spki, crypto } = params;
13225
+ return crypto.subtle.importKey('spki', spki, {
13226
+ name: 'ECDSA',
13227
+ namedCurve: this.namedCurve,
13228
+ }, true, ['verify']);
13229
+ }
13230
+ async exportPublicSpki(params) {
13231
+ const { publicKey, crypto } = params;
13232
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
13233
+ return buildExports.BufferSourceConverter.toUint8Array(spki);
13234
+ }
13235
+ async importPrivatePkcs8(params) {
13236
+ const { pkcs8, crypto } = params;
13237
+ return crypto.subtle.importKey('pkcs8', pkcs8, {
13238
+ name: 'ECDSA',
13239
+ namedCurve: this.namedCurve,
13240
+ }, true, ['sign']);
13241
+ }
13242
+ async exportPrivatePkcs8(params) {
13243
+ const { privateKey, crypto } = params;
13244
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
13245
+ return buildExports.BufferSourceConverter.toUint8Array(pkcs8);
13246
+ }
13247
+ async exportPrivateSsh(params) {
13248
+ const { privateKey, crypto, jwk: providedJwk } = params;
13249
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
13250
+ if (!jwk.d || !jwk.x || !jwk.y) {
13251
+ throw new InvalidKeyDataError('ECDSA private key JWK missing required parameters');
13252
+ }
13253
+ const x = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.x));
13254
+ const y = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.y));
13255
+ const d = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.d));
13256
+ const publicPoint = new Uint8Array(1 + x.length + y.length);
13257
+ publicPoint[0] = 0x04;
13258
+ publicPoint.set(x, 1);
13259
+ publicPoint.set(y, 1 + x.length);
13260
+ const writer = new SshWriter();
13261
+ writer.writeString(this.sshType);
13262
+ writer.writeString(this.curveName);
13263
+ writer.writeMpInt(publicPoint);
13264
+ writer.writeMpInt(d);
13265
+ return writer.toUint8Array();
13266
+ }
13267
+ async importPrivateSsh(params) {
13268
+ const { sshKey, crypto } = params;
13269
+ const base64Data = sshKey
13270
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
13271
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
13272
+ .replace(/\s/g, '');
13273
+ const binaryData = buildExports.Convert.FromBase64(base64Data);
13274
+ const reader = new SshReader(buildExports.BufferSourceConverter.toUint8Array(binaryData));
13275
+ const magic = reader.readBytes(15);
13276
+ if (buildExports.Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
13277
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
13278
+ }
13279
+ const _cipherName = reader.readString();
13280
+ reader.readString();
13281
+ reader.readString();
13282
+ if (_cipherName !== 'none') {
13283
+ throw new EncryptedKeyNotSupportedError(_cipherName);
13284
+ }
13285
+ const numKeys = reader.readUint32();
13286
+ if (numKeys !== 1) {
13287
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
13288
+ }
13289
+ const publicKeyLength = reader.readUint32();
13290
+ reader.readBytes(publicKeyLength);
13291
+ const privateKeyLength = reader.readUint32();
13292
+ const privateKeyData = reader.readBytes(privateKeyLength);
13293
+ const privateReader = new SshReader(privateKeyData);
13294
+ const checkint1 = privateReader.readUint32();
13295
+ const checkint2 = privateReader.readUint32();
13296
+ if (checkint1 !== checkint2) {
13297
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
13298
+ }
13299
+ privateReader.readString();
13300
+ privateReader.readString();
13301
+ const publicKeyPoint = privateReader.readMpInt();
13302
+ const privateKeyValue = privateReader.readMpInt();
13303
+ privateReader.readString();
13304
+ if (publicKeyPoint[0] !== 0x04) {
13305
+ throw new InvalidKeyDataError('invalid ECDSA public key point format');
13306
+ }
13307
+ const coordLength = Math.floor((publicKeyPoint.length - 1) / 2);
13308
+ const x = publicKeyPoint.slice(1, 1 + coordLength);
13309
+ const y = publicKeyPoint.slice(1 + coordLength);
13310
+ const jwk = {
13311
+ kty: 'EC',
13312
+ crv: this.namedCurve,
13313
+ x: buildExports.Convert.ToBase64Url(x),
13314
+ y: buildExports.Convert.ToBase64Url(y),
13315
+ d: buildExports.Convert.ToBase64Url(privateKeyValue),
13316
+ };
13317
+ return crypto.subtle.importKey('jwk', jwk, {
13318
+ name: 'ECDSA',
13319
+ namedCurve: this.namedCurve,
13320
+ }, true, ['sign']);
13321
+ }
13322
+ async sign(params) {
13323
+ const { privateKey, data, crypto, hash } = params;
13324
+ const expectedHash = this.getHashAlgorithm();
13325
+ if (hash && hash !== expectedHash) {
13326
+ throw new InvalidKeyDataError(`ECDSA ${this.namedCurve} requires ${expectedHash}, got ${hash}`);
13327
+ }
13328
+ const signature = await crypto.subtle.sign({
13329
+ name: 'ECDSA',
13330
+ hash: expectedHash,
13331
+ }, privateKey, data);
13332
+ return buildExports.BufferSourceConverter.toUint8Array(signature);
13333
+ }
13334
+ async verify(params) {
13335
+ const { publicKey, signature, data, crypto, hash } = params;
13336
+ const expectedHash = this.getHashAlgorithm();
13337
+ if (hash && hash !== expectedHash) {
13338
+ throw new InvalidKeyDataError(`ECDSA ${this.namedCurve} requires ${expectedHash}, got ${hash}`);
13339
+ }
13340
+ return crypto.subtle.verify({
13341
+ name: 'ECDSA',
13342
+ hash: expectedHash,
13343
+ }, publicKey, signature, data);
13344
+ }
13345
+ encodeSignature(params) {
13346
+ const { signature, algo } = params;
13347
+ if (algo.startsWith('ecdsa-sha2-')) {
13348
+ const coordLength = this.getSignatureCoordLength();
13349
+ const r = signature.subarray(0, coordLength);
13350
+ const s = signature.subarray(coordLength);
13351
+ const writer = new SshWriter();
13352
+ writer.writeString(algo);
13353
+ const sigWriter = new SshWriter();
13354
+ sigWriter.writeMpInt(r, true);
13355
+ sigWriter.writeMpInt(s, true);
13356
+ const sigData = sigWriter.toUint8Array();
13357
+ writer.writeUint32(sigData.length);
13358
+ writer.writeBytes(sigData);
13359
+ return writer.toUint8Array();
13360
+ }
13361
+ const writer = new SshWriter();
13362
+ writer.writeString(algo);
13363
+ writer.writeUint32(signature.byteLength);
13364
+ writer.writeBytes(signature);
13365
+ return writer.toUint8Array();
13366
+ }
13367
+ decodeSignature(params) {
13368
+ const { signature } = params;
13369
+ const reader = new SshReader(signature);
13370
+ const algo = reader.readString();
13371
+ const sigLength = reader.readUint32();
13372
+ const sig = reader.readBytes(sigLength);
13373
+ if (algo.startsWith('ecdsa-sha2-')) {
13374
+ const sigReader = new SshReader(sig);
13375
+ let r = sigReader.readMpInt();
13376
+ let s = sigReader.readMpInt();
13377
+ if (r[0] === 0x00 && r.length > 1 && (r[1] & 0x80) === 0) {
13378
+ r = r.slice(1);
13379
+ }
13380
+ if (s[0] === 0x00 && s.length > 1 && (s[1] & 0x80) === 0) {
13381
+ s = s.slice(1);
13382
+ }
13383
+ const expectedLength = this.getExpectedLength();
13384
+ const rPadded = new Uint8Array(expectedLength);
13385
+ const sPadded = new Uint8Array(expectedLength);
13386
+ if (r.length <= expectedLength) {
13387
+ rPadded.set(r, expectedLength - r.length);
13388
+ }
13389
+ else {
13390
+ rPadded.set(r.slice(r.length - expectedLength), 0);
13391
+ }
13392
+ if (s.length <= expectedLength) {
13393
+ sPadded.set(s, expectedLength - s.length);
13394
+ }
13395
+ else {
13396
+ sPadded.set(s.slice(s.length - expectedLength), 0);
13397
+ }
13398
+ const rawSignature = new Uint8Array([...rPadded, ...sPadded]);
13399
+ return { signature: rawSignature, algo };
13400
+ }
13401
+ return { signature: sig, algo };
13402
+ }
13403
+ supportsCryptoKey(cryptoKey) {
13404
+ return (cryptoKey.algorithm.name === 'ECDSA' &&
13405
+ cryptoKey.algorithm.namedCurve === this.namedCurve);
13406
+ }
13407
+ parsePublicKey(reader) {
13408
+ const curveName = reader.readString();
13409
+ if (curveName !== this.curveName) {
13410
+ throw new InvalidKeyDataError(`ECDSA certificate curve name ${curveName}, expected ${this.curveName}`);
13411
+ }
13412
+ const publicKeyPoint = reader.readBytes(reader.readUint32());
13413
+ const writer = new SshWriter();
13414
+ writer.writeString(this.sshType);
13415
+ writer.writeString(curveName);
13416
+ writer.writeMpInt(publicKeyPoint);
13417
+ return {
13418
+ type: this.sshType,
13419
+ keyData: writer.toUint8Array(),
13420
+ };
13421
+ }
13422
+ writePublicKey(writer, publicKey) {
13423
+ const publicKeyReader = new SshReader(publicKey.keyData);
13424
+ publicKeyReader.readString();
13425
+ const curveName = publicKeyReader.readString();
13426
+ const publicPoint = publicKeyReader.readMpInt();
13427
+ writer.writeString(curveName);
13428
+ writer.writeUint32(publicPoint.length);
13429
+ writer.writeBytes(publicPoint);
13430
+ }
13431
+ getCertificateType() {
13432
+ return `${this.sshType}-cert-v01@openssh.com`;
13433
+ }
13434
+ getSignatureAlgo() {
13435
+ return this.sshType;
13436
+ }
13437
+ }
13438
+ const EcdsaP256Binding = new EcdsaBinding('nistp256', 'ecdsa-sha2-nistp256', 'P-256');
13439
+ const EcdsaP384Binding = new EcdsaBinding('nistp384', 'ecdsa-sha2-nistp384', 'P-384');
13440
+ const EcdsaP521Binding = new EcdsaBinding('nistp521', 'ecdsa-sha2-nistp521', 'P-521');
13441
+
13442
+ class Ed25519Binding {
13443
+ async importPublicSsh(params) {
13444
+ const { blob, crypto } = params;
13445
+ const reader = new SshReader(blob);
13446
+ reader.readString();
13447
+ const keyLength = reader.readUint32();
13448
+ if (keyLength !== 32) {
13449
+ throw new InvalidKeyDataError(`Ed25519 key length ${keyLength}, expected 32`);
13450
+ }
13451
+ const publicKeyBytes = reader.readBytes(keyLength);
13452
+ return crypto.subtle.importKey('raw', publicKeyBytes, 'Ed25519', true, [
13453
+ 'verify',
13454
+ ]);
13455
+ }
13456
+ async exportPublicSsh(params) {
13457
+ const { publicKey, crypto } = params;
13458
+ const jwk = await crypto.subtle.exportKey('jwk', publicKey);
13459
+ if (!jwk.x) {
13460
+ throw new InvalidKeyDataError('Ed25519 JWK missing x parameter');
13461
+ }
13462
+ const keyBytes = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.x));
13463
+ const writer = new SshWriter();
13464
+ writer.writeString('ssh-ed25519');
13465
+ writer.writeUint32(keyBytes.length);
13466
+ writer.writeBytes(keyBytes);
13467
+ return writer.toUint8Array();
13468
+ }
13469
+ async importPublicSpki(params) {
13470
+ const { spki, crypto } = params;
13471
+ return crypto.subtle.importKey('spki', spki, 'Ed25519', true, ['verify']);
13472
+ }
13473
+ async exportPublicSpki(params) {
13474
+ const { publicKey, crypto } = params;
13475
+ const spki = await crypto.subtle.exportKey('spki', publicKey);
13476
+ return buildExports.BufferSourceConverter.toUint8Array(spki);
13477
+ }
13478
+ async importPrivatePkcs8(params) {
13479
+ const { pkcs8, crypto } = params;
13480
+ return crypto.subtle.importKey('pkcs8', pkcs8, 'Ed25519', true, ['sign']);
13481
+ }
13482
+ async exportPrivatePkcs8(params) {
13483
+ const { privateKey, crypto } = params;
13484
+ const pkcs8 = await crypto.subtle.exportKey('pkcs8', privateKey);
13485
+ return buildExports.BufferSourceConverter.toUint8Array(pkcs8);
13486
+ }
13487
+ async exportPrivateSsh(params) {
13488
+ const { privateKey, crypto, jwk: providedJwk } = params;
13489
+ const jwk = providedJwk || (await crypto.subtle.exportKey('jwk', privateKey));
13490
+ if (!jwk.d || !jwk.x) {
13491
+ throw new InvalidKeyDataError('Ed25519 private key JWK missing required parameters');
13492
+ }
13493
+ const privateBytes = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.d));
13494
+ const publicBytes = new Uint8Array(buildExports.Convert.FromBase64Url(jwk.x));
13495
+ const writer = new SshWriter();
13496
+ writer.writeString('ssh-ed25519');
13497
+ writer.writeUint32(publicBytes.length);
13498
+ writer.writeBytes(publicBytes);
13499
+ const privKeyPart = new Uint8Array(64);
13500
+ privKeyPart.set(privateBytes, 0);
13501
+ privKeyPart.set(publicBytes, 32);
13502
+ writer.writeUint32(privKeyPart.length);
13503
+ writer.writeBytes(privKeyPart);
13504
+ return writer.toUint8Array();
13505
+ }
13506
+ async importPrivateSsh(params) {
13507
+ const { sshKey, crypto } = params;
13508
+ const base64Data = sshKey
13509
+ .replace(/-----BEGIN OPENSSH PRIVATE KEY-----/, '')
13510
+ .replace(/-----END OPENSSH PRIVATE KEY-----/, '')
13511
+ .replace(/\s/g, '');
13512
+ const binaryData = buildExports.Convert.FromBase64(base64Data);
13513
+ const reader = new SshReader(buildExports.BufferSourceConverter.toUint8Array(binaryData));
13514
+ const magic = reader.readBytes(15);
13515
+ if (buildExports.Convert.ToHex(magic) !== '6f70656e7373682d6b65792d763100') {
13516
+ throw new InvalidPrivateKeyFormatError('invalid magic string');
13517
+ }
13518
+ const _cipherName = reader.readString();
13519
+ reader.readString();
13520
+ reader.readString();
13521
+ if (_cipherName !== 'none') {
13522
+ throw new EncryptedKeyNotSupportedError(_cipherName);
13523
+ }
13524
+ const numKeys = reader.readUint32();
13525
+ if (numKeys !== 1) {
13526
+ throw new InvalidPrivateKeyFormatError('multiple keys not supported');
13527
+ }
13528
+ const publicKeyLength = reader.readUint32();
13529
+ reader.readBytes(publicKeyLength);
13530
+ const privateKeyLength = reader.readUint32();
13531
+ const privateKeyData = reader.readBytes(privateKeyLength);
13532
+ const privateReader = new SshReader(privateKeyData);
13533
+ const checkint1 = privateReader.readUint32();
13534
+ const checkint2 = privateReader.readUint32();
13535
+ if (checkint1 !== checkint2) {
13536
+ throw new InvalidPrivateKeyFormatError('invalid checkints');
13537
+ }
13538
+ privateReader.readString();
13539
+ const pubKeyLength = privateReader.readUint32();
13540
+ const _publicKeyBytes = privateReader.readBytes(pubKeyLength);
13541
+ const privKeyLength = privateReader.readUint32();
13542
+ const privateKeyBytes = privateReader.readBytes(privKeyLength);
13543
+ privateReader.readString();
13544
+ const privateKey = privateKeyBytes.slice(0, 32);
13545
+ const jwk = {
13546
+ kty: 'OKP',
13547
+ crv: 'Ed25519',
13548
+ d: buildExports.Convert.ToBase64Url(privateKey),
13549
+ x: buildExports.Convert.ToBase64Url(_publicKeyBytes),
13550
+ };
13551
+ return crypto.subtle.importKey('jwk', jwk, 'Ed25519', true, ['sign']);
13552
+ }
13553
+ async sign(params) {
13554
+ const { privateKey, data, crypto } = params;
13555
+ const signature = await crypto.subtle.sign('Ed25519', privateKey, data);
13556
+ return buildExports.BufferSourceConverter.toUint8Array(signature);
13557
+ }
13558
+ async verify(params) {
13559
+ const { publicKey, signature, data, crypto } = params;
13560
+ return crypto.subtle.verify('Ed25519', publicKey, signature, data);
13561
+ }
13562
+ encodeSignature(params) {
13563
+ const { signature, algo } = params;
13564
+ const sigBytes = new Uint8Array(signature);
13565
+ const writer = new SshWriter();
13566
+ writer.writeString(algo);
13567
+ writer.writeUint32(sigBytes.length);
13568
+ writer.writeBytes(sigBytes);
13569
+ return writer.toUint8Array();
13570
+ }
13571
+ decodeSignature(params) {
13572
+ const { signature } = params;
13573
+ const reader = new SshReader(signature);
13574
+ const algo = reader.readString();
13575
+ const sigLength = reader.readUint32();
13576
+ const sigBytes = reader.readBytes(sigLength);
13577
+ return {
13578
+ signature: sigBytes,
13579
+ algo,
13580
+ };
13581
+ }
13582
+ supportsCryptoKey(cryptoKey) {
13583
+ return cryptoKey.algorithm.name === 'Ed25519';
13584
+ }
13585
+ parsePublicKey(reader) {
13586
+ const publicKeyData = reader.readBytes(reader.readUint32());
13587
+ const writer = new SshWriter();
13588
+ writer.writeString('ssh-ed25519');
13589
+ writer.writeUint32(publicKeyData.length);
13590
+ writer.writeBytes(publicKeyData);
13591
+ return {
13592
+ type: 'ssh-ed25519',
13593
+ keyData: writer.toUint8Array(),
13594
+ };
13595
+ }
13596
+ writePublicKey(writer, publicKey) {
13597
+ const publicKeyReader = new SshReader(publicKey.keyData);
13598
+ publicKeyReader.readString();
13599
+ const keyLength = publicKeyReader.readUint32();
13600
+ const rawKeyData = publicKeyReader.readBytes(keyLength);
13601
+ writer.writeUint32(rawKeyData.length);
13602
+ writer.writeBytes(rawKeyData);
13603
+ }
13604
+ getCertificateType() {
13605
+ return 'ssh-ed25519-cert-v01@openssh.com';
13606
+ }
13607
+ getSignatureAlgo() {
13608
+ return 'ssh-ed25519';
13609
+ }
13610
+ }
13611
+
13612
+ const registry = new Map();
13613
+ class AlgorithmRegistry {
13614
+ static get(name) {
13615
+ const binding = registry.get(name);
13616
+ if (!binding) {
13617
+ throw new UnsupportedKeyTypeError(name, Array.from(registry.keys()));
13618
+ }
13619
+ return binding;
13620
+ }
13621
+ static register(name, binding) {
13622
+ registry.set(name, binding);
13623
+ }
13624
+ static getSshTypeFromCryptoKey(cryptoKey) {
13625
+ for (const [sshType, binding] of registry.entries()) {
13626
+ if (binding.supportsCryptoKey(cryptoKey)) {
13627
+ return sshType;
13628
+ }
13629
+ }
13630
+ throw new UnsupportedKeyTypeError(cryptoKey.algorithm.name, Array.from(registry.keys()));
13631
+ }
13632
+ static certTypeToKeyType(certType) {
13633
+ const mapping = {
13634
+ 'ssh-rsa-cert-v01@openssh.com': 'ssh-rsa',
13635
+ 'ssh-ed25519-cert-v01@openssh.com': 'ssh-ed25519',
13636
+ 'ecdsa-sha2-nistp256-cert-v01@openssh.com': 'ecdsa-sha2-nistp256',
13637
+ 'ecdsa-sha2-nistp384-cert-v01@openssh.com': 'ecdsa-sha2-nistp384',
13638
+ 'ecdsa-sha2-nistp521-cert-v01@openssh.com': 'ecdsa-sha2-nistp521',
13639
+ };
13640
+ return mapping[certType];
13641
+ }
13642
+ static getSupportedCertTypes() {
13643
+ return Object.keys({
13644
+ 'ssh-rsa-cert-v01@openssh.com': 'ssh-rsa',
13645
+ 'ssh-ed25519-cert-v01@openssh.com': 'ssh-ed25519',
13646
+ 'ecdsa-sha2-nistp256-cert-v01@openssh.com': 'ecdsa-sha2-nistp256',
13647
+ 'ecdsa-sha2-nistp384-cert-v01@openssh.com': 'ecdsa-sha2-nistp384',
13648
+ 'ecdsa-sha2-nistp521-cert-v01@openssh.com': 'ecdsa-sha2-nistp521',
13649
+ });
13650
+ }
13651
+ }
13652
+ AlgorithmRegistry.register('ssh-ed25519', new Ed25519Binding());
13653
+ AlgorithmRegistry.register('ssh-rsa', new RsaBinding('SHA-256'));
13654
+ AlgorithmRegistry.register('rsa-sha2-256', new RsaBinding('SHA-256'));
13655
+ AlgorithmRegistry.register('rsa-sha2-512', new RsaBinding('SHA-512'));
13656
+ AlgorithmRegistry.register('ecdsa-sha2-nistp256', EcdsaP256Binding);
13657
+ AlgorithmRegistry.register('ecdsa-sha2-nistp384', EcdsaP384Binding);
13658
+ AlgorithmRegistry.register('ecdsa-sha2-nistp521', EcdsaP521Binding);
13659
+
13660
+ function parsePublicKey(input) {
13661
+ const parts = typeof input === 'string' ? input.trim().split(/\s+/) : null;
13662
+ if (!parts || parts.length < 2) {
13663
+ throw new InvalidFormatError('Invalid SSH public key format');
13664
+ }
13665
+ const type = parts[0];
13666
+ const blob = new Uint8Array(buildExports.Convert.FromBase64(parts[1]));
13667
+ const comment = parts.length > 2 ? parts.slice(2).join(' ') : undefined;
13668
+ const reader = new SshReader(blob);
13669
+ const blobType = reader.readString();
13670
+ if (blobType !== type) {
13671
+ throw new InvalidFormatError('Key type mismatch');
13672
+ }
13673
+ return {
13674
+ type,
13675
+ keyData: blob,
13676
+ comment,
13677
+ };
13678
+ }
13679
+ function serializePublicKey(blob) {
13680
+ const base64 = buildExports.Convert.ToBase64(blob.keyData);
13681
+ const parts = [blob.type, base64];
13682
+ if (blob.comment) {
13683
+ parts.push(blob.comment);
13684
+ }
13685
+ return parts.join(' ');
13686
+ }
13687
+
13688
+ function parse(input) {
13689
+ if (typeof input === 'string') {
13690
+ const parts = input.trim().split(/\s+/);
13691
+ if (parts.length < 2) {
13692
+ throw new InvalidFormatError('SSH certificate string', 'type base64 [comment]');
13693
+ }
13694
+ const type = parts[0];
13695
+ const blob = new Uint8Array(buildExports.Convert.FromBase64(parts[1]));
13696
+ const comment = parts.length > 2 ? parts.slice(2).join(' ') : undefined;
13697
+ const reader = new SshReader(blob);
13698
+ const blobType = reader.readString();
13699
+ if (blobType !== type) {
13700
+ throw new InvalidFormatError(`certificate blob type ${blobType}`, `expected ${type}`);
13701
+ }
13702
+ return {
13703
+ type,
13704
+ keyData: blob,
13705
+ comment,
13706
+ };
13707
+ }
13708
+ else {
13709
+ const reader = new SshReader(input);
13710
+ const type = reader.readString();
13711
+ const keyData = input.slice(reader.getOffset());
13712
+ return {
13713
+ type,
13714
+ keyData,
13715
+ };
13716
+ }
13717
+ }
13718
+ function parseCertificateData(keyData) {
13719
+ const reader = new SshReader(keyData);
13720
+ const certType = reader.readString();
13721
+ const nonce = reader.readBytes(reader.readUint32());
13722
+ const mappedKeyType = AlgorithmRegistry.certTypeToKeyType(certType);
13723
+ if (!mappedKeyType) {
13724
+ throw new UnsupportedAlgorithmError(certType, AlgorithmRegistry.getSupportedCertTypes());
13725
+ }
13726
+ const binding = AlgorithmRegistry.get(mappedKeyType);
13727
+ const publicKey = binding.parsePublicKey(reader);
13728
+ const keyType = mappedKeyType;
13729
+ const serial = reader.readUint64();
13730
+ const typeValue = reader.readUint32();
13731
+ const type = typeValue === 1 ? 'user' : 'host';
13732
+ const keyId = reader.readString();
13733
+ const principalsLength = reader.readUint32();
13734
+ const principalsData = reader.readBytes(principalsLength);
13735
+ const validPrincipals = [];
13736
+ if (principalsData.length > 0) {
13737
+ const principalsReader = new SshReader(principalsData);
13738
+ while (principalsReader.getOffset() < principalsData.length) {
13739
+ try {
13740
+ const principal = principalsReader.readString();
13741
+ validPrincipals.push(principal);
13742
+ }
13743
+ catch {
13744
+ break;
13745
+ }
13746
+ }
13747
+ }
13748
+ const validAfter = reader.readUint64();
13749
+ const validBefore = reader.readUint64();
13750
+ const criticalOptions = {};
13751
+ const criticalLength = reader.readUint32();
13752
+ const criticalData = reader.readBytes(criticalLength);
13753
+ if (criticalData.length > 0) {
13754
+ const optionsReader = new SshReader(criticalData);
13755
+ while (optionsReader.getOffset() < criticalData.length) {
13756
+ try {
13757
+ const name = optionsReader.readString();
13758
+ const valueData = optionsReader.readBytes(optionsReader.readUint32());
13759
+ const value = valueData.length === 0 ? '' : decoder.decode(valueData);
13760
+ criticalOptions[name] = value;
13761
+ }
13762
+ catch {
13763
+ break;
13764
+ }
13765
+ }
13766
+ }
13767
+ const extensions = {};
13768
+ const extensionsLength = reader.readUint32();
13769
+ const extensionsData = reader.readBytes(extensionsLength);
13770
+ if (extensionsData.length > 0) {
13771
+ const extReader = new SshReader(extensionsData);
13772
+ while (extReader.getOffset() < extensionsData.length) {
13773
+ try {
13774
+ const name = extReader.readString();
13775
+ const valueData = extReader.readBytes(extReader.readUint32());
13776
+ const value = valueData.length === 0 ? '' : decoder.decode(valueData);
13777
+ extensions[name] = value;
13778
+ }
13779
+ catch {
13780
+ break;
13781
+ }
13782
+ }
13783
+ }
13784
+ const reservedLength = reader.readUint32();
13785
+ const reserved = reader.readBytes(reservedLength);
13786
+ const signatureKeyLength = reader.readUint32();
13787
+ const signatureKeyData = reader.readBytes(signatureKeyLength);
13788
+ const signatureKeyReader = new SshReader(signatureKeyData);
13789
+ const signatureKeyType = signatureKeyReader.readString();
13790
+ const signatureKey = {
13791
+ type: signatureKeyType,
13792
+ keyData: signatureKeyData,
13793
+ };
13794
+ const signatureLength = reader.readUint32();
13795
+ const signature = reader.readBytes(signatureLength);
13796
+ return {
13797
+ nonce,
13798
+ keyType,
13799
+ publicKey,
13800
+ serial,
13801
+ type,
13802
+ keyId,
13803
+ validPrincipals,
13804
+ validAfter,
13805
+ validBefore,
13806
+ criticalOptions,
13807
+ extensions,
13808
+ reserved,
13809
+ signatureKey,
13810
+ signature,
13811
+ };
13812
+ }
13813
+ function serialize(cert) {
13814
+ const base64 = buildExports.Convert.ToBase64(cert.keyData);
13815
+ const parts = [cert.type, base64];
13816
+ if (cert.comment) {
13817
+ parts.push(cert.comment);
13818
+ }
13819
+ return parts.join(' ');
13820
+ }
13821
+
13822
+ function parseSignature(data) {
13823
+ const reader = new SshReader(data);
13824
+ if (data.length >= 6 && new TextDecoder().decode(data.subarray(0, 6)) === 'SSHSIG') {
13825
+ return parseSshSignatureFormat(reader);
13826
+ }
13827
+ else {
13828
+ return parseLegacyFormat(reader);
13829
+ }
13830
+ }
13831
+ function parseSshSignatureFormat(reader) {
13832
+ const magicBytes = reader.readBytes(6);
13833
+ const magic = new TextDecoder().decode(magicBytes);
13834
+ if (magic !== 'SSHSIG') {
13835
+ throw new InvalidFormatError(magic, 'SSHSIG');
13836
+ }
13837
+ const version = reader.readUint32();
13838
+ const publicKeyLength = reader.readUint32();
13839
+ const publicKey = reader.readBytes(publicKeyLength);
13840
+ const namespace = reader.readString();
13841
+ const reserved = reader.readString();
13842
+ const hashAlgorithm = reader.readString();
13843
+ const signatureLength = reader.readUint32();
13844
+ const signatureData = reader.readBytes(signatureLength);
13845
+ const sigReader = new SshReader(signatureData);
13846
+ const algorithm = sigReader.readString();
13847
+ const signatureLength2 = sigReader.readUint32();
13848
+ const signature = sigReader.readBytes(signatureLength2);
13849
+ return {
13850
+ format: 'ssh-signature',
13851
+ algorithm,
13852
+ signature,
13853
+ version,
13854
+ publicKey,
13855
+ namespace,
13856
+ reserved,
13857
+ hashAlgorithm,
13858
+ };
13859
+ }
13860
+ function parseLegacyFormat(reader) {
13861
+ const algorithm = reader.readString();
13862
+ const signatureLength = reader.readUint32();
13863
+ const signature = reader.readBytes(signatureLength);
13864
+ return {
13865
+ format: 'legacy',
13866
+ algorithm,
13867
+ signature,
13868
+ };
13869
+ }
13870
+ function serializeSignature(blob) {
13871
+ if (blob.format === 'ssh-signature') {
13872
+ return serializeSshSignatureFormat(blob);
13873
+ }
13874
+ else {
13875
+ return serializeLegacyFormat(blob);
13876
+ }
13877
+ }
13878
+ function serializeSshSignatureFormat(blob) {
13879
+ const writer = new SshWriter();
13880
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
13881
+ writer.writeUint32(blob.version || 1);
13882
+ if (blob.publicKey) {
13883
+ writer.writeUint32(blob.publicKey.length);
13884
+ writer.writeBytes(blob.publicKey);
13885
+ }
13886
+ else {
13887
+ writer.writeUint32(0);
13888
+ }
13889
+ writer.writeString(blob.namespace || 'file');
13890
+ writer.writeString(blob.reserved || '');
13891
+ writer.writeString(blob.hashAlgorithm || 'sha512');
13892
+ const sigWriter = new SshWriter();
13893
+ sigWriter.writeString(blob.algorithm);
13894
+ sigWriter.writeUint32(blob.signature.length);
13895
+ sigWriter.writeBytes(blob.signature);
13896
+ const sigData = sigWriter.toUint8Array();
13897
+ writer.writeUint32(sigData.length);
13898
+ writer.writeBytes(sigData);
13899
+ return writer.toUint8Array();
13900
+ }
13901
+ function serializeLegacyFormat(blob) {
13902
+ const writer = new SshWriter();
13903
+ writer.writeString(blob.algorithm);
13904
+ writer.writeUint32(blob.signature.length);
13905
+ writer.writeBytes(blob.signature);
13906
+ return writer.toUint8Array();
13907
+ }
13908
+
13909
+ class SshObject {
13910
+ }
13911
+
13912
+ class SshPublicKey extends SshObject {
13913
+ static TYPE = 'public-key';
13914
+ type = SshPublicKey.TYPE;
13915
+ blob;
13916
+ cachedCryptoKey;
13917
+ constructor(blob) {
13918
+ super();
13919
+ this.blob = blob;
13920
+ }
13921
+ async getCryptoKey(crypto = getCrypto()) {
13922
+ if (!this.cachedCryptoKey) {
13923
+ const binding = AlgorithmRegistry.get(this.blob.type);
13924
+ this.cachedCryptoKey = await binding.importPublicSsh({ blob: this.blob.keyData, crypto });
13925
+ }
13926
+ return this.cachedCryptoKey;
13927
+ }
13928
+ static async fromSSH(sshKey, crypto = getCrypto()) {
13929
+ const blob = parsePublicKey(sshKey);
13930
+ const binding = AlgorithmRegistry.get(blob.type);
13931
+ await binding.importPublicSsh({ blob: blob.keyData, crypto });
13932
+ return new SshPublicKey(blob);
13933
+ }
13934
+ static async fromSPKI(spki, type, crypto = getCrypto()) {
13935
+ const binding = AlgorithmRegistry.get(type);
13936
+ const cryptoKey = await binding.importPublicSpki({ spki, crypto });
13937
+ const exported = await binding.exportPublicSsh({ publicKey: cryptoKey, crypto });
13938
+ const blob = {
13939
+ type,
13940
+ keyData: exported,
13941
+ };
13942
+ return new SshPublicKey(blob);
13943
+ }
13944
+ static async fromWebCrypto(cryptoKey, type, crypto = getCrypto()) {
13945
+ const sshType = type || AlgorithmRegistry.getSshTypeFromCryptoKey(cryptoKey);
13946
+ const binding = AlgorithmRegistry.get(sshType);
13947
+ const exported = await binding.exportPublicSsh({ publicKey: cryptoKey, crypto });
13948
+ const blob = {
13949
+ type: sshType,
13950
+ keyData: exported,
13951
+ };
13952
+ return new SshPublicKey(blob);
13953
+ }
13954
+ async export(format = 'ssh', crypto = getCrypto()) {
13955
+ if (format === 'ssh') {
13956
+ return serializePublicKey(this.blob);
13957
+ }
13958
+ else if (format === 'spki') {
13959
+ const cryptoKey = await this.getCryptoKey(crypto);
13960
+ const binding = AlgorithmRegistry.get(this.blob.type);
13961
+ const spki = await binding.exportPublicSpki({ publicKey: cryptoKey, crypto });
13962
+ return new Uint8Array(spki);
13963
+ }
13964
+ throw new UnsupportedKeyTypeError(`Unsupported export format: ${format}`);
13965
+ }
13966
+ async toSSH() {
13967
+ const result = await this.export('ssh');
13968
+ return result;
13969
+ }
13970
+ async toSPKI() {
13971
+ const result = await this.export('spki');
13972
+ return result;
13973
+ }
13974
+ async toWebCrypto(crypto = getCrypto()) {
13975
+ return this.getCryptoKey(crypto);
13976
+ }
13977
+ async verify(algorithm, signature, data, crypto = getCrypto()) {
13978
+ const binding = AlgorithmRegistry.get(algorithm);
13979
+ const cryptoKey = await this.toWebCrypto(crypto);
13980
+ return binding.verify({
13981
+ publicKey: cryptoKey,
13982
+ signature,
13983
+ data,
13984
+ crypto,
13985
+ });
13986
+ }
13987
+ get keyType() {
13988
+ return this.blob.type;
13989
+ }
13990
+ get comment() {
13991
+ return this.blob.comment;
13992
+ }
13993
+ getBlob() {
13994
+ return { ...this.blob };
13995
+ }
13996
+ async thumbprint(algorithm = 'sha256', crypto = getCrypto()) {
13997
+ const hashAlgorithm = algorithm === 'sha256' ? 'SHA-256' : 'SHA-512';
13998
+ const data = this.blob.keyData;
13999
+ const hash = await crypto.subtle.digest(hashAlgorithm, data);
14000
+ return new Uint8Array(hash);
14001
+ }
14002
+ }
14003
+
14004
+ class SshSignature extends SshObject {
14005
+ static TYPE = 'signature';
14006
+ type = SshSignature.TYPE;
14007
+ blob;
14008
+ format;
14009
+ algorithm;
14010
+ signature;
14011
+ version;
14012
+ publicKey;
14013
+ namespace;
14014
+ reserved;
14015
+ hashAlgorithm;
14016
+ constructor(blob) {
14017
+ super();
14018
+ this.blob = blob;
14019
+ this.format = blob.format;
14020
+ this.algorithm = blob.algorithm;
14021
+ this.signature = blob.signature;
14022
+ this.version = blob.version;
14023
+ this.namespace = blob.namespace;
14024
+ this.reserved = blob.reserved;
14025
+ this.hashAlgorithm = blob.hashAlgorithm;
14026
+ if (blob.publicKey) {
14027
+ const reader = new SshReader(blob.publicKey);
14028
+ const type = reader.readString();
14029
+ this.publicKey = new SshPublicKey({ type, keyData: blob.publicKey });
14030
+ }
14031
+ }
14032
+ static parse(data) {
14033
+ const blob = parseSignature(data);
14034
+ return new SshSignature(blob);
14035
+ }
14036
+ static fromBlob(blob) {
14037
+ return new SshSignature(blob);
14038
+ }
14039
+ static fromBase64(base64) {
14040
+ const data = new Uint8Array(buildExports.Convert.FromBase64(base64));
14041
+ return SshSignature.parse(data);
14042
+ }
14043
+ static fromText(text) {
14044
+ const base64 = text
14045
+ .replace(/-----BEGIN SSH SIGNATURE-----/, '')
14046
+ .replace(/-----END SSH SIGNATURE-----/, '')
14047
+ .replace(/[\r\n\s]/g, '');
14048
+ return SshSignature.fromBase64(base64);
14049
+ }
14050
+ serialize() {
14051
+ return serializeSignature(this.blob);
14052
+ }
14053
+ toBase64() {
14054
+ return buildExports.Convert.ToBase64(this.serialize());
14055
+ }
14056
+ toText() {
14057
+ const base64 = this.toBase64();
14058
+ const lines = [];
14059
+ for (let i = 0; i < base64.length; i += 70) {
14060
+ lines.push(base64.substring(i, i + 70));
14061
+ }
14062
+ return ['-----BEGIN SSH SIGNATURE-----', ...lines, '-----END SSH SIGNATURE-----'].join('\n');
14063
+ }
14064
+ async toSSH() {
14065
+ return this.toText();
14066
+ }
14067
+ async verify(data, publicKey) {
14068
+ const binding = AlgorithmRegistry.get(this.algorithm);
14069
+ const cryptoKey = await publicKey['getCryptoKey']();
14070
+ const crypto = getCrypto();
14071
+ let dataToVerify = data;
14072
+ if (this.format === 'ssh-signature') {
14073
+ const hashAlg = this.hashAlgorithm || 'sha512';
14074
+ const namespace = this.namespace || 'file';
14075
+ const reserved = this.reserved || '';
14076
+ const hashAlgorithm = hashAlg === 'sha256' ? 'SHA-256' : 'SHA-512';
14077
+ const messageHash = await crypto.subtle.digest(hashAlgorithm, data);
14078
+ const messageHashBytes = new Uint8Array(messageHash);
14079
+ const writer = new SshWriter();
14080
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
14081
+ writer.writeString(namespace);
14082
+ writer.writeString(reserved);
14083
+ writer.writeString(hashAlg);
14084
+ writer.writeUint32(messageHashBytes.length);
14085
+ writer.writeBytes(messageHashBytes);
14086
+ dataToVerify = writer.toUint8Array();
14087
+ }
14088
+ let hashAlgorithm;
14089
+ if (this.algorithm === 'rsa-sha2-256') {
14090
+ hashAlgorithm = 'SHA-256';
14091
+ }
14092
+ else if (this.algorithm === 'rsa-sha2-512') {
14093
+ hashAlgorithm = 'SHA-512';
14094
+ }
14095
+ let signatureToVerify;
14096
+ if (this.format === 'legacy' || this.format === 'ssh-signature') {
14097
+ const sigWriter = new SshWriter();
14098
+ sigWriter.writeString(this.algorithm);
14099
+ sigWriter.writeUint32(this.signature.length);
14100
+ sigWriter.writeBytes(this.signature);
14101
+ const wireFormatSignature = sigWriter.toUint8Array();
14102
+ const decodedSig = binding.decodeSignature({
14103
+ signature: wireFormatSignature,
14104
+ });
14105
+ signatureToVerify = decodedSig.signature;
14106
+ }
14107
+ else {
14108
+ signatureToVerify = this.signature;
14109
+ }
14110
+ return binding.verify({
14111
+ publicKey: cryptoKey,
14112
+ signature: signatureToVerify,
14113
+ data: dataToVerify,
14114
+ crypto,
14115
+ hash: hashAlgorithm,
14116
+ });
14117
+ }
14118
+ static fromLegacy(algorithm, signature) {
14119
+ const binding = AlgorithmRegistry.get(algorithm);
14120
+ const encodedSignature = binding.encodeSignature({
14121
+ signature,
14122
+ algo: algorithm,
14123
+ });
14124
+ const sigReader = new SshReader(encodedSignature);
14125
+ sigReader.readString();
14126
+ const sigLength = sigReader.readUint32();
14127
+ const signatureData = sigReader.readBytes(sigLength);
14128
+ return new SshSignature({
14129
+ format: 'legacy',
14130
+ algorithm,
14131
+ signature: signatureData,
14132
+ });
14133
+ }
14134
+ static fromSshSignature(algorithm, signature, options = {}) {
14135
+ const blob = {
14136
+ format: 'ssh-signature',
14137
+ algorithm,
14138
+ signature,
14139
+ version: options.version || 1,
14140
+ publicKey: options.publicKey ? options.publicKey.getBlob().keyData : undefined,
14141
+ namespace: options.namespace || 'file',
14142
+ reserved: options.reserved || '',
14143
+ hashAlgorithm: options.hashAlgorithm || 'sha512',
14144
+ };
14145
+ return new SshSignature(blob);
14146
+ }
14147
+ static async sign(algorithm, privateKey, data, options = {}) {
14148
+ const { format = 'legacy', namespace = 'file' } = options;
14149
+ if (format === 'legacy') {
14150
+ const rawSignature = await privateKey.sign(algorithm, data);
14151
+ const algorithmUsed = algorithm || privateKey.keyType;
14152
+ return SshSignature.fromLegacy(algorithmUsed, rawSignature);
14153
+ }
14154
+ else {
14155
+ const signatureAlgorithm = algorithm;
14156
+ const binding = AlgorithmRegistry.get(signatureAlgorithm);
14157
+ const hashAlgorithm = algorithm === 'rsa-sha2-256' ? 'sha256' : 'sha512';
14158
+ const publicKey = await privateKey.getPublicKey();
14159
+ const crypto = getCrypto();
14160
+ const webCryptoHashAlg = hashAlgorithm === 'sha256' ? 'SHA-256' : 'SHA-512';
14161
+ const messageHash = await crypto.subtle.digest(webCryptoHashAlg, data);
14162
+ const messageHashBytes = new Uint8Array(messageHash);
14163
+ const writer = new SshWriter();
14164
+ writer.writeBytes(new TextEncoder().encode('SSHSIG'));
14165
+ writer.writeString(namespace);
14166
+ writer.writeString('');
14167
+ writer.writeString(hashAlgorithm);
14168
+ writer.writeUint32(messageHashBytes.length);
14169
+ writer.writeBytes(messageHashBytes);
14170
+ const dataToSign = writer.toUint8Array();
14171
+ const rawSignature = await privateKey.sign(signatureAlgorithm, dataToSign);
14172
+ const encodedSignature = binding.encodeSignature({
14173
+ signature: rawSignature,
14174
+ algo: signatureAlgorithm,
14175
+ });
14176
+ const sigReader = new SshReader(encodedSignature);
14177
+ sigReader.readString();
14178
+ const sigLength = sigReader.readUint32();
14179
+ const signatureData = sigReader.readBytes(sigLength);
14180
+ return SshSignature.fromSshSignature(signatureAlgorithm, signatureData, {
14181
+ namespace,
14182
+ hashAlgorithm,
14183
+ publicKey,
14184
+ });
14185
+ }
14186
+ }
14187
+ }
14188
+
14189
+ let SshCertificate$1 = class SshCertificate extends SshObject {
14190
+ static TYPE = 'certificate';
14191
+ type = SshCertificate.TYPE;
14192
+ _blob;
14193
+ data;
14194
+ _validAfter;
14195
+ _validBefore;
14196
+ keyId;
14197
+ principals;
14198
+ certType;
14199
+ serial;
14200
+ validAfter;
14201
+ validBefore;
14202
+ publicKey;
14203
+ signatureKey;
14204
+ criticalOptions;
14205
+ extensions;
14206
+ constructor(blob) {
14207
+ super();
14208
+ this._blob = blob;
14209
+ this.data = parseCertificateData(blob.keyData);
14210
+ this._validAfter = this.data.validAfter;
14211
+ this._validBefore = this.data.validBefore;
14212
+ this.keyId = this.data.keyId;
14213
+ this.principals = this.data.validPrincipals;
14214
+ this.certType = this.data.type;
14215
+ this.serial = this.data.serial;
14216
+ this.validAfter = new Date(Number(this.data.validAfter) * 1000);
14217
+ this.validBefore = new Date(Number(this.data.validBefore) * 1000);
14218
+ this.publicKey = new SshPublicKey(this.data.publicKey);
14219
+ this.signatureKey = new SshPublicKey(this.data.signatureKey);
14220
+ this.criticalOptions = { ...this.data.criticalOptions };
14221
+ this.extensions = { ...this.data.extensions };
14222
+ }
14223
+ static async fromSSH(text) {
14224
+ const blob = parse(text);
14225
+ return new SshCertificate(blob);
14226
+ }
14227
+ static async fromBlob(blob) {
14228
+ return new SshCertificate(blob);
14229
+ }
14230
+ async toSSH() {
14231
+ return serialize(this._blob);
14232
+ }
14233
+ toBlob() {
14234
+ return { ...this._blob };
14235
+ }
14236
+ get blob() {
14237
+ return this.toBlob();
14238
+ }
14239
+ validate(date = new Date()) {
14240
+ const ts = BigInt(Math.floor(date.getTime() / 1000));
14241
+ const after = this._validAfter;
14242
+ const before = this._validBefore;
14243
+ const INFINITY = 0xffffffffffffffffn;
14244
+ const upper = before === INFINITY ? ts : before;
14245
+ return ts >= after && ts <= upper;
14246
+ }
14247
+ async verify(caPublicKey, crypto = getCrypto()) {
14248
+ const verifyKey = caPublicKey || this.signatureKey;
14249
+ const signedData = this.getSignedData();
14250
+ const sshSignature = SshSignature.parse(this.data.signature);
14251
+ const binding = AlgorithmRegistry.get(sshSignature.algorithm);
14252
+ const cryptoKey = await verifyKey.toWebCrypto(crypto);
14253
+ return binding.verify({
14254
+ publicKey: cryptoKey,
14255
+ signature: sshSignature.signature,
14256
+ data: signedData,
14257
+ crypto,
14258
+ });
14259
+ }
14260
+ getSignedData() {
14261
+ const reader = new SshReader(this._blob.keyData);
14262
+ reader.readString();
14263
+ reader.readBytes(reader.readUint32());
14264
+ if (this.data.keyType === 'ssh-ed25519') {
14265
+ reader.readBytes(reader.readUint32());
14266
+ }
14267
+ else if (this.data.keyType === 'ssh-rsa') {
14268
+ reader.readBytes(reader.readUint32());
14269
+ reader.readBytes(reader.readUint32());
14270
+ }
14271
+ else if (this.data.keyType.startsWith('ecdsa-sha2-')) {
14272
+ reader.readString();
14273
+ reader.readBytes(reader.readUint32());
14274
+ }
14275
+ reader.readUint64();
14276
+ reader.readUint32();
14277
+ reader.readBytes(reader.readUint32());
14278
+ reader.readBytes(reader.readUint32());
14279
+ reader.readUint64();
14280
+ reader.readUint64();
14281
+ reader.readBytes(reader.readUint32());
14282
+ reader.readBytes(reader.readUint32());
14283
+ reader.readBytes(reader.readUint32());
14284
+ reader.readBytes(reader.readUint32());
14285
+ const signedDataEnd = reader.getOffset();
14286
+ return this._blob.keyData.slice(0, signedDataEnd);
14287
+ }
14288
+ };
14289
+
14290
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14291
+ if (kind === "m") throw new TypeError("Private method is not writable");
14292
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14293
+ 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");
14294
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14295
+ };
14296
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14297
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14298
+ 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");
14299
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14300
+ };
14301
+ var _SshCertificate_cert;
14302
+ class SshCertificate {
14303
+ constructor(raw) {
14304
+ _SshCertificate_cert.set(this, void 0);
14305
+ const blob = parse(raw.trim());
14306
+ // @ts-expect-error - SshCertificateType is not a constructor
14307
+ __classPrivateFieldSet(this, _SshCertificate_cert, new SshCertificate$1(blob), "f");
14308
+ this.notBefore = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validAfter;
14309
+ this.notAfter = __classPrivateFieldGet(this, _SshCertificate_cert, "f").validBefore;
14310
+ this.validity = dateDiff(this.notBefore, this.notAfter);
14311
+ this.type = [__classPrivateFieldGet(this, _SshCertificate_cert, "f").blob.type, __classPrivateFieldGet(this, _SshCertificate_cert, "f").certType, __classPrivateFieldGet(this, _SshCertificate_cert, "f").type].join(' ');
14312
+ this.serialNumber = __classPrivateFieldGet(this, _SshCertificate_cert, "f").serial.toString();
14313
+ this.keyId = __classPrivateFieldGet(this, _SshCertificate_cert, "f").keyId;
14314
+ this.principals = __classPrivateFieldGet(this, _SshCertificate_cert, "f").principals;
14315
+ this.extensions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").extensions;
14316
+ this.criticalOptions = __classPrivateFieldGet(this, _SshCertificate_cert, "f").criticalOptions;
14317
+ }
14318
+ async parseSignatureKey() {
14319
+ const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toWebCrypto();
14320
+ const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.getBlob();
14321
+ const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.thumbprint('sha256');
14322
+ this.signatureKey = {
14323
+ algorithm: key.algorithm.name,
14324
+ type: blob.type,
14325
+ value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").signatureKey.toSSH(),
14326
+ thumbprint: buildExports.Convert.ToBase64(thumbprint),
14327
+ };
14328
+ }
14329
+ async parsePublicKey() {
14330
+ const key = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toWebCrypto();
14331
+ const blob = __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.getBlob();
14332
+ const thumbprint = await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.thumbprint('sha256');
14333
+ this.publicKey = {
14334
+ algorithm: key.algorithm.name,
14335
+ type: blob.type,
14336
+ value: await __classPrivateFieldGet(this, _SshCertificate_cert, "f").publicKey.toSSH(),
14337
+ thumbprint: buildExports.Convert.ToBase64(thumbprint),
14338
+ };
14339
+ }
14340
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
14341
+ async toString(_format = 'pem') {
14342
+ return __classPrivateFieldGet(this, _SshCertificate_cert, "f").toSSH();
14343
+ }
14344
+ }
14345
+ _SshCertificate_cert = new WeakMap();
14346
+
12780
14347
  exports.ArchiveRevInfo = ArchiveRevInfo;
12781
14348
  exports.AsnArray = AsnArray;
12782
14349
  exports.AsnConvert = AsnConvert;
@@ -12790,17 +14357,17 @@ exports.Attribute = Attribute$1;
12790
14357
  exports.AttributeCertificate = AttributeCertificate;
12791
14358
  exports.AuthorityKeyIdentifier = AuthorityKeyIdentifier;
12792
14359
  exports.BasicConstraints = BasicConstraints;
14360
+ exports.ByteStream = ByteStream;
12793
14361
  exports.CabforganizationIdentifier = CabforganizationIdentifier;
12794
14362
  exports.Certificate = Certificate;
12795
14363
  exports.CertificateList = CertificateList;
12796
14364
  exports.CertificateTemplate = CertificateTemplate;
12797
- exports.CertificateTransparency = CertificateTransparency;
12798
14365
  exports.CertificationRequest = CertificationRequest;
12799
14366
  exports.ContentInfo = ContentInfo;
12800
14367
  exports.Download = Download;
12801
14368
  exports.EDIPartyName = EDIPartyName;
12802
14369
  exports.EntrustVersionInfo = EntrustVersionInfo;
12803
- exports.Extension = Extension;
14370
+ exports.Extension = Extension$1;
12804
14371
  exports.IssuingDistributionPoint = IssuingDistributionPoint;
12805
14372
  exports.KeyUsage = KeyUsage;
12806
14373
  exports.LogotypeExtn = LogotypeExtn;
@@ -12817,7 +14384,9 @@ exports.PrivateKeyUsagePeriod = PrivateKeyUsagePeriod;
12817
14384
  exports.RSAPublicKey = RSAPublicKey;
12818
14385
  exports.RootOfTrust = RootOfTrust;
12819
14386
  exports.SemanticsInformation = SemanticsInformation;
14387
+ exports.SignedCertificateTimestamp = SignedCertificateTimestamp;
12820
14388
  exports.SignedData = SignedData;
14389
+ exports.SshCertificate = SshCertificate;
12821
14390
  exports.SubjectKeyIdentifier = SubjectKeyIdentifier;
12822
14391
  exports.Timestamp = Timestamp;
12823
14392
  exports.UserNotice = UserNotice;
@@ -12837,15 +14406,54 @@ exports.id_InsuranceValue = id_InsuranceValue;
12837
14406
  exports.id_TypeRelationship = id_TypeRelationship;
12838
14407
  exports.id_ValuationRanking = id_ValuationRanking;
12839
14408
  exports.id_WebGDPR = id_WebGDPR;
14409
+ exports.id_adbe_archiveRevInfo = id_adbe_archiveRevInfo;
14410
+ exports.id_adbe_timestamp = id_adbe_timestamp;
12840
14411
  exports.id_alg_composite = id_alg_composite;
14412
+ exports.id_at_statementOfPossession = id_at_statementOfPossession;
14413
+ exports.id_caVersion = id_caVersion;
14414
+ exports.id_cabforganizationIdentifier = id_cabforganizationIdentifier;
14415
+ exports.id_ce_authorityKeyIdentifier = id_ce_authorityKeyIdentifier;
14416
+ exports.id_ce_basicConstraints = id_ce_basicConstraints;
14417
+ exports.id_ce_cRLDistributionPoints = id_ce_cRLDistributionPoints;
14418
+ exports.id_ce_cRLNumber = id_ce_cRLNumber;
14419
+ exports.id_ce_cRLReasons = id_ce_cRLReasons;
14420
+ exports.id_ce_certificateIssuer = id_ce_certificateIssuer;
14421
+ exports.id_ce_certificatePolicies = id_ce_certificatePolicies;
14422
+ exports.id_ce_deltaCRLIndicator = id_ce_deltaCRLIndicator;
14423
+ exports.id_ce_extKeyUsage = id_ce_extKeyUsage;
14424
+ exports.id_ce_inhibitAnyPolicy = id_ce_inhibitAnyPolicy;
14425
+ exports.id_ce_invalidityDate = id_ce_invalidityDate;
14426
+ exports.id_ce_issuerAltName = id_ce_issuerAltName;
14427
+ exports.id_ce_issuingDistributionPoint = id_ce_issuingDistributionPoint;
14428
+ exports.id_ce_keyDescription = id_ce_keyDescription;
14429
+ exports.id_ce_keyUsage = id_ce_keyUsage;
14430
+ exports.id_ce_nameConstraints = id_ce_nameConstraints;
14431
+ exports.id_ce_policyConstraints = id_ce_policyConstraints;
14432
+ exports.id_ce_policyMappings = id_ce_policyMappings;
14433
+ exports.id_ce_privateKeyUsagePeriod = id_ce_privateKeyUsagePeriod;
14434
+ exports.id_ce_subjectAltName = id_ce_subjectAltName;
14435
+ exports.id_ce_subjectDirectoryAttributes = id_ce_subjectDirectoryAttributes;
14436
+ exports.id_ce_subjectKeyIdentifier = id_ce_subjectKeyIdentifier;
14437
+ exports.id_certificateTemplate = id_certificateTemplate;
12841
14438
  exports.id_composite_key = id_composite_key;
12842
14439
  exports.id_ecPublicKey = id_ecPublicKey;
14440
+ exports.id_enrollCertType = id_enrollCertType;
14441
+ exports.id_entrust_entrustVersInfo = id_entrust_entrustVersInfo;
14442
+ exports.id_lei = id_lei;
14443
+ exports.id_netscapeCertType = id_netscapeCertType;
14444
+ exports.id_netscapeComment = id_netscapeComment;
14445
+ exports.id_pe_TNAuthList = id_pe_TNAuthList;
14446
+ exports.id_pe_authorityInfoAccess = id_pe_authorityInfoAccess;
14447
+ exports.id_pe_biometricInfo = id_pe_biometricInfo;
14448
+ exports.id_pe_qcStatements = id_pe_qcStatements;
14449
+ exports.id_pe_subjectInfoAccess = id_pe_subjectInfoAccess;
12843
14450
  exports.id_pkcs9_at_challengePassword = id_pkcs9_at_challengePassword;
12844
14451
  exports.id_pkcs9_at_extensionRequest = id_pkcs9_at_extensionRequest;
12845
14452
  exports.id_pkcs9_at_unstructuredName = id_pkcs9_at_unstructuredName;
12846
14453
  exports.id_qcs_pkixQCSyntax_v2 = id_qcs_pkixQCSyntax_v2;
14454
+ exports.id_role = id_role;
12847
14455
  exports.id_rsaEncryption = id_rsaEncryption;
12848
14456
  exports.l10n = l10n;
12849
- //# sourceMappingURL=certification_request-CxHe71zR.js.map
14457
+ //# sourceMappingURL=ssh_certificate-s3-rwdMT.js.map
12850
14458
 
12851
- //# sourceMappingURL=certification_request-CxHe71zR.js.map
14459
+ //# sourceMappingURL=ssh_certificate-s3-rwdMT.js.map