pijul nest
guest [sign in]

Rearm reading future on empty packet, and respond to server-initiated key re-exchange

[?]
Nov 28, 2020, 10:12 AM
2SFWWZ2RF742PDI3KLCCQ3CFK7E72I5MJLFNBSS2SVSRL5YOUJKAC

Dependencies

  • [2] Y5HHIQXV Wait for the connection to be encrypted in `connect`
  • [3] KNLLUDOI Correct usage of `tokio::select!`
  • [4] 7FRJYUI6 Reboot because of a bad change

Change contents

  • replacement in thrussh/src/server/mod.rs at line 512
    [3.219713][3.219713:220226]()
    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)
    [3.219713]
    [3.220226]
    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
    [3.359700][3.359700:359962]()
    if buf.is_empty() {
    continue
    }
    if buf[0] == crate::msg::DISCONNECT {
    break;
    } else if buf[0] <= 4 {
    continue;
    [3.359700]
    [3.359962]
    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
    [3.359984][2.290:384]()
    self = reply(self, &mut handler, &mut encrypted_signal, &buf[..]).await?;
  • edit in thrussh/src/client/kex.rs at line 3
    [3.381592]
    [3.381592]
    use crate::negotiation;
  • edit in thrussh/src/client/kex.rs at line 5
    [3.381624][3.381624:381657]()
    use crate::{negotiation, Error};
  • replacement in thrussh/src/client/kex.rs at line 17
    [3.381947][3.381947:381991]()
    let algo = if self.algo.is_none() {
    [3.381947]
    [3.381991]
    let algo = {
  • edit in thrussh/src/client/kex.rs at line 22
    [3.382238][3.382238:382298]()
    } else {
    return Err(Error::Kex.into());