Skip to content

Commit eb6fee2

Browse files
committed
support RFC8731 name of curve25519-sha256 kex
1 parent 30c401e commit eb6fee2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

russh/src/kex/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ impl AsRef<str> for Name {
8383
}
8484
}
8585

86+
/// `curve25519-sha256`
87+
pub const CURVE25519: Name = Name("curve25519-sha256");
8688
/// `curve25519-sha256@libssh.org`
87-
pub const CURVE25519: Name = Name("curve25519-sha256@libssh.org");
89+
pub const CURVE25519_PRE_RFC_8731: Name = Name("curve25519-sha256@libssh.org");
8890
/// `diffie-hellman-group1-sha1`
8991
pub const DH_G1_SHA1: Name = Name("diffie-hellman-group1-sha1");
9092
/// `diffie-hellman-group14-sha1`
@@ -108,6 +110,7 @@ pub(crate) static KEXES: Lazy<HashMap<&'static Name, &(dyn KexType + Send + Sync
108110
Lazy::new(|| {
109111
let mut h: HashMap<&'static Name, &(dyn KexType + Send + Sync)> = HashMap::new();
110112
h.insert(&CURVE25519, &_CURVE25519);
113+
h.insert(&CURVE25519_PRE_RFC_8731, &_CURVE25519);
111114
h.insert(&DH_G14_SHA256, &_DH_G14_SHA256);
112115
h.insert(&DH_G14_SHA1, &_DH_G14_SHA1);
113116
h.insert(&DH_G1_SHA1, &_DH_G1_SHA1);

0 commit comments

Comments
 (0)