use extend_list instead of hand-rolling comma-separation

Robin_Jadoul
Apr 12, 2023, 1:36 PM
CTQHOYXLRJPNE3PTAKLR3NOSBEBZ3T6QI2LEUYUATPK7FLIOJ44QC

Dependencies

  • [2] EUHO3DAZ Send a SSH_MSG_EXT_INFO with server-sig-algs when the client indicates they support extensions by sending ext-info-c. This allows modern clients that don't do ssh-rsa anymore because of sha1 to still use RSA keys with sha2.
  • [3] 7FRJYUI6 Reboot because of a bad change

Change contents

  • replacement in thrussh/src/server/session.rs at line 126
    [2.381][2.381:695]()
    let algs = self
    .common
    .config
    .preferred
    .key
    .iter()
    .map(|n| n.0)
    .collect::<Vec<_>>()
    .join(",");
    buf.extend_ssh_string(algs.as_bytes()); // extension-value
    [2.381]
    [2.695]
    buf.extend_list(self.common.config.preferred.key.iter()); // extension-value