diff --git a/russh/src/negotiation.rs b/russh/src/negotiation.rs index 78f14356..705bc5e5 100644 --- a/russh/src/negotiation.rs +++ b/russh/src/negotiation.rs @@ -79,7 +79,7 @@ impl Preferred { .filter(|n| { available_host_keys .iter() - .any(|k| is_key_compatible_with_algo(k, *n)) + .any(|k| is_key_compatible_with_algo(k, n)) }) .cloned() .collect::>() @@ -450,7 +450,7 @@ pub fn write_kex( server_config .keys .iter() - .any(|k| is_key_compatible_with_algo(k, *algo)) + .any(|k| is_key_compatible_with_algo(k, algo)) }) .map(|x| x.to_string()) .collect(), diff --git a/russh/src/server/kex.rs b/russh/src/server/kex.rs index a4ea3b95..cfa1f078 100644 --- a/russh/src/server/kex.rs +++ b/russh/src/server/kex.rs @@ -36,7 +36,7 @@ impl KexInit { let Some(matching_key_index) = config .keys .iter() - .position(|key| is_key_compatible_with_algo(&key, &algo.key)) + .position(|key| is_key_compatible_with_algo(key, &algo.key)) else { debug!("unknown key {:?}", algo.key); return Err(Error::UnknownKey);