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 9c2265e commit f2d94c0Copy full SHA for f2d94c0
russh/src/server/encrypted.rs
@@ -519,14 +519,11 @@ impl Encrypted {
519
Ok(())
520
}
521
522
- Err(e) => {
523
- if let russh_keys::Error::CouldNotReadKey = e {
524
- reject_auth_request(until, &mut self.write, auth_request).await;
525
- Ok(())
526
- } else {
527
- Err(crate::Error::from(e).into())
528
- }
+ Err(russh_keys::Error::CouldNotReadKey) | Err(russh_keys::Error::KeyIsCorrupt) => {
+ reject_auth_request(until, &mut self.write, auth_request).await;
+ Ok(())
529
+ Err(e) => Err(crate::Error::from(e).into()),
530
531
532
0 commit comments