Rearm reading future on empty packet, and respond to server-initiated key re-exchange
[?]
Nov 28, 2020, 10:12 AM
2SFWWZ2RF742PDI3KLCCQ3CFK7E72I5MJLFNBSS2SVSRL5YOUJKACDependencies
- [2]
Y5HHIQXVWait for the connection to be encrypted in `connect` - [3]
KNLLUDOICorrect usage of `tokio::select!` - [4]
7FRJYUI6Reboot because of a bad change
Change contents
- replacement in thrussh/src/server/mod.rs at line 512
if buf.is_empty() {continue}if buf[0] == crate::msg::DISCONNECT {debug!("break");break;} else if buf[0] <= 4 {continue;}match reply(session, &mut handler, &buf[..]).await {Ok(s) => session = s,Err(e) => {error!("{:?}", e);return Err(e)if !buf.is_empty() {if buf[0] == crate::msg::DISCONNECT {debug!("break");break;} else if buf[0] > 4 {match reply(session, &mut handler, &buf[..]).await {Ok(s) => session = s,Err(e) => {error!("{:?}", e);return Err(e)}} - replacement in thrussh/src/client/mod.rs at line 859
if buf.is_empty() {continue}if buf[0] == crate::msg::DISCONNECT {break;} else if buf[0] <= 4 {continue;if !buf.is_empty() {if buf[0] == crate::msg::DISCONNECT {break;} else if buf[0] > 4 {self = reply(self, &mut handler, &mut encrypted_signal, &buf[..]).await?;} - edit in thrussh/src/client/mod.rs at line 866
self = reply(self, &mut handler, &mut encrypted_signal, &buf[..]).await?; - edit in thrussh/src/client/kex.rs at line 3
use crate::negotiation; - edit in thrussh/src/client/kex.rs at line 5
use crate::{negotiation, Error}; - replacement in thrussh/src/client/kex.rs at line 17
let algo = if self.algo.is_none() {let algo = { - edit in thrussh/src/client/kex.rs at line 22
} else {return Err(Error::Kex.into());