Explorar o código

Bug 1865: Support for curve25519-sha256 KEX

https://winscp.net/tracker/1865
(cherry picked from commit 49203ae54d1560bd9b5aa53cd08f84febe18dfff)

Source commit: 169ff8efa2786f7d208209ca68b7892942661bd2
Martin Prikryl %!s(int64=5) %!d(string=hai) anos
pai
achega
1e531f0f6c
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      source/putty/sshecc.c

+ 6 - 0
source/putty/sshecc.c

@@ -1654,6 +1654,11 @@ static const struct eckex_extra kex_extra_curve25519 = {
     ssh_ecdhkex_m_getkey,
     ssh_ecdhkex_m_getkey,
 };
 };
 const ssh_kex ssh_ec_kex_curve25519 = {
 const ssh_kex ssh_ec_kex_curve25519 = {
+    "curve25519-sha256", NULL, KEXTYPE_ECDH,
+    &ssh_sha256, &kex_extra_curve25519,
+};
+/* Pre-RFC alias */
+const ssh_kex ssh_ec_kex_curve25519_libssh = {
     "[email protected]", NULL, KEXTYPE_ECDH,
     "[email protected]", NULL, KEXTYPE_ECDH,
     &ssh_sha256, &kex_extra_curve25519,
     &ssh_sha256, &kex_extra_curve25519,
 };
 };
@@ -1696,6 +1701,7 @@ const ssh_kex ssh_ec_kex_nistp521 = {
 
 
 static const ssh_kex *const ec_kex_list[] = {
 static const ssh_kex *const ec_kex_list[] = {
     &ssh_ec_kex_curve25519,
     &ssh_ec_kex_curve25519,
+    &ssh_ec_kex_curve25519_libssh,
     &ssh_ec_kex_nistp256,
     &ssh_ec_kex_nistp256,
     &ssh_ec_kex_nistp384,
     &ssh_ec_kex_nistp384,
     &ssh_ec_kex_nistp521,
     &ssh_ec_kex_nistp521,