We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88196a7 commit 3f4646aCopy full SHA for 3f4646a
russh/src/server/encrypted.rs
@@ -426,8 +426,9 @@ impl Encrypted {
426
debug!("signature = {:?}", signature);
427
let mut s = signature.reader(0);
428
let algo_ = s.read_string().map_err(crate::Error::from)?;
429
- key::SignatureHash::from_rsa_hostkey_algo(algo_)
430
- .inspect(|hash| pubkey.set_algorithm(*hash));
+ if let Some(hash) = key::SignatureHash::from_rsa_hostkey_algo(algo_) {
+ pubkey.set_algorithm(hash);
431
+ }
432
debug!("algo_: {:?}", algo_);
433
let sig = s.read_string().map_err(crate::Error::from)?;
434
#[allow(clippy::indexing_slicing)] // length checked
0 commit comments