Skip to content

Commit

Permalink
Use negotiated kex instead of prefered
Browse files Browse the repository at this point in the history
  • Loading branch information
RDruon authored and Eugeny committed Aug 17, 2023
1 parent 59112c9 commit 84264b3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions russh/src/client/kex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ impl KexInit {
debug!("i0 = {:?}", i0);

let mut kex = KEXES
.get(
&self
.algo
.as_ref()
.map(|x| &x.kex)
.or_else(|| config.preferred.kex.first())
.ok_or(crate::Error::NoCommonKexAlgo)?,
)
.get(&algo.kex)
.ok_or(crate::Error::UnknownAlgo)?
.make();

Expand Down

0 comments on commit 84264b3

Please sign in to comment.