Fix most clippy warnings

[?]
Apr 19, 2022, 7:04 AM
IKKKVXOKA6MDXPPGVSDPFRY4TI6Y4SSKWO7FKDF4SRJU3WUTZ3MQC

Dependencies

  • [2] SW5Z7UCN Updates in thrussh-config: shell expansions, default config
  • [3] NLPZS76W Make AgentSigner::sign_request_signature return self on error
  • [4] G3FNNIIU Limiting the amount of messages that can be buffered while rekeying to two channel windows
  • [5] 2SFWWZ2R Rearm reading future on empty packet, and respond to server-initiated key re-exchange
  • [6] 2Q2DF2RO Updating thrussh-config to make it usable in real projects
  • [7] BRDS7STA Adding method `send_channel_msg` to client::Session, to make it easier to write handlers
  • [8] 7FRJYUI6 Reboot because of a bad change
  • [9] XEKZBXNI Fixing a bug with tokio::select
  • [10] OGPWDWHU Compilation error on Windows
  • [11] ELRPPXSG Fixing conflicts
  • [12] AWVLXGAW Removing anyhows on Windows
  • [13] OQZGSEWM Buffering non-kex packets received after issuing a KEXINIT
  • [14] 2WEO7OZL Version updates: getting rid of anyhow + moving to Tokio 1.0
  • [15] CROEJT6Q Minor fixes in Thrussh-keys (parsing key files)
  • [16] NHOSLQGG Thrussh: making OpenSSL optional
  • [17] KNLLUDOI Correct usage of `tokio::select!`
  • [18] PBHNTGEX Fixing a channel window error
  • [19] MFMCIUMJ Fixing authentication with RSA
  • [20] V3BRP7LQ Avoid polling the reading future again after disconnection
  • [21] 7CE3RIMY Update dependencies. Update edition to 2021. Improve tests.
  • [22] Y67GNDVB use tokio::process::Command for proxy commands
  • [23] JBFDZQ46 Formatting
  • [24] GMSJ7ETZ More fixes for Windows
  • [25] EXXUR33Q Fixing queues when sending a vector
  • [26] MCS77Y4V Making OpenSSL optional
  • [27] J4ZEHJHG Flush pending packets after a key re-exchange
  • [28] SJBZKVM5 Debug messages
  • [29] YSLHJU3I Add a Close construct to ChannelMsg in the server
  • [30] SRFQGFS6 Cleanup: openssl warning
  • [31] AEIVL6S4 Fixing key fingerprints for RSA keys
  • [32] 634OYCNM Tokio 0.3

Change contents

  • replacement in thrussh-keys/src/signature.rs at line 75
    [5.8412][5.8412:8464]()
    _ => Err((Error::UnknownSignatureType {
    [5.8412]
    [5.8464]
    _ => Err(Error::UnknownSignatureType {
  • replacement in thrussh-keys/src/signature.rs at line 77
    [5.8542][5.8542:8579]()
    })
    .into()),
    [5.8542]
    [5.8579]
    }),
  • replacement in thrussh-keys/src/lib.rs at line 25
    [5.22504][5.22504:24454]()
    //! const PKCS8_ENCRYPTED: &'static str = "-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFLTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQITo1O0b8YrS0CAggA\nMAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBBtLH4T1KOfo1GGr7salhR8BIIE\n0KN9ednYwcTGSX3hg7fROhTw7JAJ1D4IdT1fsoGeNu2BFuIgF3cthGHe6S5zceI2\nMpkfwvHbsOlDFWMUIAb/VY8/iYxhNmd5J6NStMYRC9NC0fVzOmrJqE1wITqxtORx\nIkzqkgFUbaaiFFQPepsh5CvQfAgGEWV329SsTOKIgyTj97RxfZIKA+TR5J5g2dJY\nj346SvHhSxJ4Jc0asccgMb0HGh9UUDzDSql0OIdbnZW5KzYJPOx+aDqnpbz7UzY/\nP8N0w/pEiGmkdkNyvGsdttcjFpOWlLnLDhtLx8dDwi/sbEYHtpMzsYC9jPn3hnds\nTcotqjoSZ31O6rJD4z18FOQb4iZs3MohwEdDd9XKblTfYKM62aQJWH6cVQcg+1C7\njX9l2wmyK26Tkkl5Qg/qSfzrCveke5muZgZkFwL0GCcgPJ8RixSB4GOdSMa/hAMU\nkvFAtoV2GluIgmSe1pG5cNMhurxM1dPPf4WnD+9hkFFSsMkTAuxDZIdDk3FA8zof\nYhv0ZTfvT6V+vgH3Hv7Tqcxomy5Qr3tj5vvAqqDU6k7fC4FvkxDh2mG5ovWvc4Nb\nXv8sed0LGpYitIOMldu6650LoZAqJVv5N4cAA2Edqldf7S2Iz1QnA/usXkQd4tLa\nZ80+sDNv9eCVkfaJ6kOVLk/ghLdXWJYRLenfQZtVUXrPkaPpNXgD0dlaTN8KuvML\nUw/UGa+4ybnPsdVflI0YkJKbxouhp4iB4S5ACAwqHVmsH5GRnujf10qLoS7RjDAl\no/wSHxdT9BECp7TT8ID65u2mlJvH13iJbktPczGXt07nBiBse6OxsClfBtHkRLzE\nQF6UMEXsJnIIMRfrZQnduC8FUOkfPOSXc8r9SeZ3GhfbV/DmWZvFPCpjzKYPsM5+\nN8Bw/iZ7NIH4xzNOgwdp5BzjH9hRtCt4sUKVVlWfEDtTnkHNOusQGKu7HkBF87YZ\nRN/Nd3gvHob668JOcGchcOzcsqsgzhGMD8+G9T9oZkFCYtwUXQU2XjMN0R4VtQgZ\nrAxWyQau9xXMGyDC67gQ5xSn+oqMK0HmoW8jh2LG/cUowHFAkUxdzGadnjGhMOI2\nzwNJPIjF93eDF/+zW5E1l0iGdiYyHkJbWSvcCuvTwma9FIDB45vOh5mSR+YjjSM5\nnq3THSWNi7Cxqz12Q1+i9pz92T2myYKBBtu1WDh+2KOn5DUkfEadY5SsIu/Rb7ub\n5FBihk2RN3y/iZk+36I69HgGg1OElYjps3D+A9AjVby10zxxLAz8U28YqJZm4wA/\nT0HLxBiVw+rsHmLP79KvsT2+b4Diqih+VTXouPWC/W+lELYKSlqnJCat77IxgM9e\nYIhzD47OgWl33GJ/R10+RDoDvY4koYE+V5NLglEhbwjloo9Ryv5ywBJNS7mfXMsK\n/uf+l2AscZTZ1mhtL38efTQCIRjyFHc3V31DI0UdETADi+/Omz+bXu0D5VvX+7c6\nb1iVZKpJw8KUjzeUV8yOZhvGu3LrQbhkTPVYL555iP1KN0Eya88ra+FUKMwLgjYr\nJkUx4iad4dTsGPodwEP/Y9oX/Qk3ZQr+REZ8lg6IBoKKqqrQeBJ9gkm1jfKE6Xkc\nCog3JMeTrb3LiPHgN6gU2P30MRp6L1j1J/MtlOAr5rux\n-----END ENCRYPTED PRIVATE KEY-----\n";
    [5.22504]
    [5.24454]
    //! const PKCS8_ENCRYPTED: &str = "-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFLTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQITo1O0b8YrS0CAggA\nMAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBBtLH4T1KOfo1GGr7salhR8BIIE\n0KN9ednYwcTGSX3hg7fROhTw7JAJ1D4IdT1fsoGeNu2BFuIgF3cthGHe6S5zceI2\nMpkfwvHbsOlDFWMUIAb/VY8/iYxhNmd5J6NStMYRC9NC0fVzOmrJqE1wITqxtORx\nIkzqkgFUbaaiFFQPepsh5CvQfAgGEWV329SsTOKIgyTj97RxfZIKA+TR5J5g2dJY\nj346SvHhSxJ4Jc0asccgMb0HGh9UUDzDSql0OIdbnZW5KzYJPOx+aDqnpbz7UzY/\nP8N0w/pEiGmkdkNyvGsdttcjFpOWlLnLDhtLx8dDwi/sbEYHtpMzsYC9jPn3hnds\nTcotqjoSZ31O6rJD4z18FOQb4iZs3MohwEdDd9XKblTfYKM62aQJWH6cVQcg+1C7\njX9l2wmyK26Tkkl5Qg/qSfzrCveke5muZgZkFwL0GCcgPJ8RixSB4GOdSMa/hAMU\nkvFAtoV2GluIgmSe1pG5cNMhurxM1dPPf4WnD+9hkFFSsMkTAuxDZIdDk3FA8zof\nYhv0ZTfvT6V+vgH3Hv7Tqcxomy5Qr3tj5vvAqqDU6k7fC4FvkxDh2mG5ovWvc4Nb\nXv8sed0LGpYitIOMldu6650LoZAqJVv5N4cAA2Edqldf7S2Iz1QnA/usXkQd4tLa\nZ80+sDNv9eCVkfaJ6kOVLk/ghLdXWJYRLenfQZtVUXrPkaPpNXgD0dlaTN8KuvML\nUw/UGa+4ybnPsdVflI0YkJKbxouhp4iB4S5ACAwqHVmsH5GRnujf10qLoS7RjDAl\no/wSHxdT9BECp7TT8ID65u2mlJvH13iJbktPczGXt07nBiBse6OxsClfBtHkRLzE\nQF6UMEXsJnIIMRfrZQnduC8FUOkfPOSXc8r9SeZ3GhfbV/DmWZvFPCpjzKYPsM5+\nN8Bw/iZ7NIH4xzNOgwdp5BzjH9hRtCt4sUKVVlWfEDtTnkHNOusQGKu7HkBF87YZ\nRN/Nd3gvHob668JOcGchcOzcsqsgzhGMD8+G9T9oZkFCYtwUXQU2XjMN0R4VtQgZ\nrAxWyQau9xXMGyDC67gQ5xSn+oqMK0HmoW8jh2LG/cUowHFAkUxdzGadnjGhMOI2\nzwNJPIjF93eDF/+zW5E1l0iGdiYyHkJbWSvcCuvTwma9FIDB45vOh5mSR+YjjSM5\nnq3THSWNi7Cxqz12Q1+i9pz92T2myYKBBtu1WDh+2KOn5DUkfEadY5SsIu/Rb7ub\n5FBihk2RN3y/iZk+36I69HgGg1OElYjps3D+A9AjVby10zxxLAz8U28YqJZm4wA/\nT0HLxBiVw+rsHmLP79KvsT2+b4Diqih+VTXouPWC/W+lELYKSlqnJCat77IxgM9e\nYIhzD47OgWl33GJ/R10+RDoDvY4koYE+V5NLglEhbwjloo9Ryv5ywBJNS7mfXMsK\n/uf+l2AscZTZ1mhtL38efTQCIRjyFHc3V31DI0UdETADi+/Omz+bXu0D5VvX+7c6\nb1iVZKpJw8KUjzeUV8yOZhvGu3LrQbhkTPVYL555iP1KN0Eya88ra+FUKMwLgjYr\nJkUx4iad4dTsGPodwEP/Y9oX/Qk3ZQr+REZ8lg6IBoKKqqrQeBJ9gkm1jfKE6Xkc\nCog3JMeTrb3LiPHgN6gU2P30MRp6L1j1J/MtlOAr5rux\n-----END ENCRYPTED PRIVATE KEY-----\n";
  • replacement in thrussh-keys/src/lib.rs at line 164
    [5.27377][5.27377:27479]()
    const KEYTYPE_ED25519: &'static [u8] = b"ssh-ed25519";
    const KEYTYPE_RSA: &'static [u8] = b"ssh-rsa";
    [5.27377]
    [5.27479]
    const KEYTYPE_ED25519: &[u8] = b"ssh-ed25519";
    const KEYTYPE_RSA: &[u8] = b"ssh-rsa";
  • replacement in thrussh-keys/src/lib.rs at line 184
    [5.28070][5.28070:28119]()
    _ => Err(Error::CouldNotReadKey.into()),
    [5.28070]
    [5.28119]
    _ => Err(Error::CouldNotReadKey),
  • replacement in thrussh-keys/src/lib.rs at line 197
    [5.28582][5.28582:28620]()
    Ok(key::parse_public_key(&base)?)
    [5.28582]
    [5.28620]
    key::parse_public_key(&base)
  • replacement in thrussh-keys/src/lib.rs at line 247
    [5.30064][5.30064:30110]()
    s.extend_from_slice(&public);
    [5.30064]
    [5.30110]
    s.extend_from_slice(public);
  • replacement in thrussh-keys/src/lib.rs at line 282
    [5.31152][5.31152:31247]()
    (c >= 'a' && c <= 'z')
    || (c >= 'A' && c <= 'Z')
    || (c >= '0' && c <= '9')
    [5.31152]
    [5.31247]
    ('a'..='z').contains(&c)
    || ('A'..='Z').contains(&c)
    || ('0'..='9').contains(&c)
  • replacement in thrussh-keys/src/lib.rs at line 362
    [5.33272][5.33272:33756]()
    match (hosts, key) {
    (Some(h), Some(k)) => {
    debug!("{:?} {:?}", h, k);
    let host_matches = h.split(',').any(|x| x == host_port);
    if host_matches {
    if &parse_public_key_base64(k)? == pubkey {
    return Ok(true);
    } else {
    return Err((Error::KeyChanged { line }).into());
    }
    [5.33272]
    [5.33756]
    if let (Some(h), Some(k)) = (hosts, key) {
    debug!("{:?} {:?}", h, k);
    let host_matches = h.split(',').any(|x| x == host_port);
    if host_matches {
    if &parse_public_key_base64(k)? == pubkey {
    return Ok(true);
    } else {
    return Err(Error::KeyChanged { line });
  • edit in thrussh-keys/src/lib.rs at line 372
    [5.33796][5.33796:33820]()
    _ => {}
  • replacement in thrussh-keys/src/lib.rs at line 412
    [5.35288][5.35288:35325]()
    Err(Error::NoHomeDir.into())
    [5.35288]
    [5.35325]
    Err(Error::NoHomeDir)
  • replacement in thrussh-keys/src/lib.rs at line 424
    [5.35778][5.35778:35815]()
    Err(Error::NoHomeDir.into())
    [5.35778]
    [5.35815]
    Err(Error::NoHomeDir)
  • replacement in thrussh-keys/src/lib.rs at line 437
    [5.35965][5.35965:36040]()
    const ED25519_KEY: &'static str = "-----BEGIN OPENSSH PRIVATE KEY-----
    [5.35965]
    [5.36040]
    const ED25519_KEY: &str = "-----BEGIN OPENSSH PRIVATE KEY-----
  • replacement in thrussh-keys/src/lib.rs at line 447
    [5.1208][5.36451:36522](),[5.36451][5.36451:36522]()
    const RSA_KEY: &'static str = "-----BEGIN OPENSSH PRIVATE KEY-----
    [5.1208]
    [5.36522]
    const RSA_KEY: &str = "-----BEGIN OPENSSH PRIVATE KEY-----
  • replacement in thrussh-keys/src/lib.rs at line 586
    [5.1439][5.43421:43494](),[5.43421][5.43421:43494]()
    pub const PKCS8_RSA: &'static str = "-----BEGIN RSA PRIVATE KEY-----
    [5.1439]
    [5.43494]
    pub const PKCS8_RSA: &str = "-----BEGIN RSA PRIVATE KEY-----
  • replacement in thrussh-keys/src/lib.rs at line 704
    [5.1764][5.49391:49472](),[5.49391][5.49391:49472]()
    const PKCS8_ENCRYPTED: &'static str = "-----BEGIN ENCRYPTED PRIVATE KEY-----
    [5.1764]
    [5.49472]
    const PKCS8_ENCRYPTED: &str = "-----BEGIN ENCRYPTED PRIVATE KEY-----
  • replacement in thrussh-keys/src/key.rs at line 89
    [5.3056][5.59923:59989](),[5.59923][5.59923:59989]()
    fn to_message_digest(&self) -> openssl::hash::MessageDigest {
    [5.3056]
    [5.59989]
    fn get_message_digest(&self) -> openssl::hash::MessageDigest {
  • replacement in thrussh-keys/src/key.rs at line 143
    [5.61362][5.61362:61425]()
    return Err(Error::CouldNotReadKey.into());
    [5.61362]
    [5.61425]
    return Err(Error::CouldNotReadKey);
  • replacement in thrussh-keys/src/key.rs at line 157
    [5.3613][5.3613:3790]()
    if key_algo != b"ssh-rsa" && key_algo != b"rsa-sha2-256" && key_algo != b"rsa-sha2-512" {
    return Err(Error::CouldNotReadKey.into());
    [5.3613]
    [5.3790]
    if key_algo != b"ssh-rsa"
    && key_algo != b"rsa-sha2-256"
    && key_algo != b"rsa-sha2-512"
    {
    return Err(Error::CouldNotReadKey);
  • replacement in thrussh-keys/src/key.rs at line 189
    [5.63024][5.63024:63077]()
    _ => Err(Error::CouldNotReadKey.into()),
    [5.63024]
    [5.63077]
    _ => Err(Error::CouldNotReadKey),
  • replacement in thrussh-keys/src/key.rs at line 204
    [5.63420][5.63420:63562]()
    match self {
    &PublicKey::Ed25519(ref public) => {
    sodium::ed25519::verify_detached(&sig, buffer, &public)
    [5.63420]
    [5.63562]
    match *self {
    PublicKey::Ed25519(ref public) => {
    sodium::ed25519::verify_detached(sig, buffer, public)
  • replacement in thrussh-keys/src/key.rs at line 209
    [5.4932][5.63576:63631](),[5.63576][5.63576:63631]()
    &PublicKey::RSA { ref key, ref hash } => {
    [5.4932]
    [5.63631]
    PublicKey::RSA { ref key, ref hash } => {
  • replacement in thrussh-keys/src/key.rs at line 212
    [5.63703][5.63703:63792]()
    let mut verifier = Verifier::new(hash.to_message_digest(), &key.0)?;
    [5.63703]
    [5.63792]
    let mut verifier = Verifier::new(hash.get_message_digest(), &key.0)?;
  • replacement in thrussh-keys/src/key.rs at line 214
    [5.63838][5.63838:63880]()
    verifier.verify(&sig)
    [5.63838]
    [5.63880]
    verifier.verify(sig)
  • replacement in thrussh-keys/src/key.rs at line 225
    [5.64152][5.4933:4969]()
    use sha2::{Sha256, Digest};
    [5.64152]
    [5.4969]
    use sha2::{Digest, Sha256};
  • edit in thrussh-keys/src/key.rs at line 231
    [5.5107][5.0:1](),[5.64234][5.0:1]()
  • replacement in thrussh-keys/src/key.rs at line 245
    [5.5185][5.5185:5233](),[5.5233][5.428:434](),[5.428][5.428:434]()
    pub fn set_algorithm(&mut self, _: &[u8]) {
    }
    [5.5185]
    [5.64234]
    pub fn set_algorithm(&mut self, _: &[u8]) {}
  • replacement in thrussh-keys/src/key.rs at line 290
    [5.65314][5.65314:65379]()
    match self {
    &KeyPair::Ed25519(ref key) => {
    [5.65314]
    [5.65379]
    match *self {
    KeyPair::Ed25519(ref key) => {
  • replacement in thrussh-keys/src/key.rs at line 297
    [5.5348][5.65575:65628](),[5.65575][5.65575:65628]()
    &KeyPair::RSA { ref key, ref hash } => {
    [5.5348]
    [5.65628]
    KeyPair::RSA { ref key, ref hash } => {
  • replacement in thrussh-keys/src/key.rs at line 304
    [5.65879][5.5349:5380]()
    .unwrap();
    [5.65879]
    [5.65906]
    .unwrap();
  • replacement in thrussh-keys/src/key.rs at line 307
    [5.66007][5.66007:66047]()
    hash: hash.clone(),
    [5.66007]
    [5.66047]
    hash: *hash,
  • replacement in thrussh-keys/src/key.rs at line 337
    [5.1057][5.66871:67051](),[5.66871][5.66871:67051]()
    match self {
    &KeyPair::Ed25519(ref secret) => Ok(Signature::Ed25519(SignatureBytes(
    sodium::ed25519::sign_detached(to_sign.as_ref(), secret).0,
    [5.1057]
    [5.67051]
    match *self {
    KeyPair::Ed25519(ref secret) => Ok(Signature::Ed25519(SignatureBytes(
    sodium::ed25519::sign_detached(to_sign, secret).0,
  • replacement in thrussh-keys/src/key.rs at line 343
    [5.5496][5.67068:67207](),[5.67068][5.67068:67207]()
    &KeyPair::RSA { ref key, ref hash } => Ok(Signature::RSA {
    bytes: rsa_signature(hash, key, to_sign.as_ref())?,
    [5.5496]
    [5.67207]
    KeyPair::RSA { ref key, ref hash } => Ok(Signature::RSA {
    bytes: rsa_signature(hash, key, to_sign)?,
  • replacement in thrussh-keys/src/key.rs at line 359
    [5.1087][5.67617:67685](),[5.67617][5.67617:67685]()
    match self {
    &KeyPair::Ed25519(ref secret) => {
    [5.1087]
    [5.67685]
    match *self {
    KeyPair::Ed25519(ref secret) => {
  • replacement in thrussh-keys/src/key.rs at line 368
    [5.5537][5.67996:68049](),[5.67996][5.67996:68049]()
    &KeyPair::RSA { ref key, ref hash } => {
    [5.5537]
    [5.68049]
    KeyPair::RSA { ref key, ref hash } => {
  • replacement in thrussh-keys/src/key.rs at line 385
    [5.1172][5.68766:68915](),[5.68766][5.68766:68915]()
    match self {
    &KeyPair::Ed25519(ref secret) => {
    let signature = sodium::ed25519::sign_detached(&buffer, secret);
    [5.1172]
    [5.68915]
    match *self {
    KeyPair::Ed25519(ref secret) => {
    let signature = sodium::ed25519::sign_detached(buffer, secret);
  • replacement in thrussh-keys/src/key.rs at line 393
    [5.5578][5.69135:69188](),[5.69135][5.69135:69188]()
    &KeyPair::RSA { ref key, ref hash } => {
    [5.5578]
    [5.69188]
    KeyPair::RSA { ref key, ref hash } => {
  • replacement in thrussh-keys/src/key.rs at line 425
    [5.70196][5.70196:70264]()
    let mut signer = Signer::new(hash.to_message_digest(), &pkey)?;
    [5.70196]
    [5.70264]
    let mut signer = Signer::new(hash.get_message_digest(), &pkey)?;
  • replacement in thrussh-keys/src/key.rs at line 461
    [5.71277][5.71277:71316]()
    Err(Error::CouldNotReadKey.into())
    [5.71277]
    [5.71316]
    Err(Error::CouldNotReadKey)
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 16
    [5.71695][5.71695:72005]()
    const PBES2: &'static [u64] = &[1, 2, 840, 113549, 1, 5, 13];
    const PBKDF2: &'static [u64] = &[1, 2, 840, 113549, 1, 5, 12];
    const HMAC_SHA256: &'static [u64] = &[1, 2, 840, 113549, 2, 9];
    const AES256CBC: &'static [u64] = &[2, 16, 840, 1, 101, 3, 4, 1, 42];
    const ED25519: &'static [u64] = &[1, 3, 101, 112];
    [5.71695]
    [5.6266]
    const PBES2: &[u64] = &[1, 2, 840, 113549, 1, 5, 13];
    const PBKDF2: &[u64] = &[1, 2, 840, 113549, 1, 5, 12];
    const HMAC_SHA256: &[u64] = &[1, 2, 840, 113549, 2, 9];
    const AES256CBC: &[u64] = &[2, 16, 840, 1, 101, 3, 4, 1, 42];
    const ED25519: &[u64] = &[1, 3, 101, 112];
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 22
    [5.6294][5.72005:72064](),[5.72005][5.72005:72064]()
    const RSA: &'static [u64] = &[1, 2, 840, 113549, 1, 1, 1];
    [5.6294]
    [5.72064]
    const RSA: &[u64] = &[1, 2, 840, 113549, 1, 1, 1];
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 27
    [5.72307][5.72307:72367]()
    Cow::Owned(yasna::parse_der(&ciphertext, |reader| {
    [5.72270]
    [5.72367]
    Cow::Owned(yasna::parse_der(ciphertext, |reader| {
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 35
    [5.72720][5.72720:72789]()
    Ok(Err(Error::UnknownAlgorithm(oid)).into())
    [5.72720]
    [5.72789]
    Ok(Err(Error::UnknownAlgorithm(oid)))
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 54
    [5.73379][5.73379:73434]()
    Ok(Err(Error::CouldNotReadKey.into()))
    [5.73379]
    [5.73434]
    Ok(Err(Error::CouldNotReadKey))
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 129
    [5.76013][5.76013:76075]()
    writer.write_bitvec(&BitVec::from_bytes(&public))
    [5.76013]
    [5.76075]
    writer.write_bitvec(&BitVec::from_bytes(public))
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 156
    [5.76970][5.76970:77013]()
    Err(Error::CouldNotReadKey.into())
    [5.76970]
    [5.77013]
    Err(Error::CouldNotReadKey)
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 214
    [5.79089][5.79089:79156]()
    return Ok(Err(Error::CouldNotReadKey.into()));
    [5.79089]
    [5.79156]
    return Ok(Err(Error::CouldNotReadKey));
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 237
    [5.80298][5.80298:80341]()
    Err(Error::CouldNotReadKey.into())
    [5.80298]
    [5.80341]
    Err(Error::CouldNotReadKey)
  • replacement in thrussh-keys/src/format/pkcs8.rs at line 243
    [5.6539][5.6539:6578]()
    Err(Error::CouldNotReadKey.into())
    [5.6539]
    [5.80347]
    Err(Error::CouldNotReadKey)
  • replacement in thrussh-keys/src/format/pkcs5.rs at line 32
    [5.86745][5.86745:86787]()
    Err(Error::KeyIsEncrypted.into())
    [5.86745]
    [5.86787]
    Err(Error::KeyIsEncrypted)
  • replacement in thrussh-keys/src/format/openssh.rs at line 31
    [5.87950][5.87950:88496](),[5.88496][5.8820:9406]()
    for _ in 0..nkeys {
    let key_type = position.read_string()?;
    if key_type == KEYTYPE_ED25519 {
    let pubkey = position.read_string()?;
    let seckey = position.read_string()?;
    let _comment = position.read_string()?;
    assert_eq!(pubkey, &seckey[32..]);
    use key::ed25519::*;
    let mut secret = SecretKey::new_zeroed();
    secret.key.clone_from_slice(seckey);
    return Ok(key::KeyPair::Ed25519(secret));
    } else if key_type == KEYTYPE_RSA && cfg!(feature = "openssl") {
    #[cfg(feature = "openssl")]
    {
    let n = BigNum::from_slice(position.read_string()?)?;
    let e = BigNum::from_slice(position.read_string()?)?;
    let d = BigNum::from_slice(position.read_string()?)?;
    let iqmp = BigNum::from_slice(position.read_string()?)?;
    let p = BigNum::from_slice(position.read_string()?)?;
    let q = BigNum::from_slice(position.read_string()?)?;
    [5.87950]
    [5.88967]
    let key_type = position.read_string()?;
    if key_type == KEYTYPE_ED25519 {
    let pubkey = position.read_string()?;
    let seckey = position.read_string()?;
    let _comment = position.read_string()?;
    assert_eq!(pubkey, &seckey[32..]);
    use key::ed25519::*;
    let mut secret = SecretKey::new_zeroed();
    secret.key.clone_from_slice(seckey);
    Ok(key::KeyPair::Ed25519(secret))
    } else if key_type == KEYTYPE_RSA && cfg!(feature = "openssl") {
    #[cfg(feature = "openssl")]
    {
    let n = BigNum::from_slice(position.read_string()?)?;
    let e = BigNum::from_slice(position.read_string()?)?;
    let d = BigNum::from_slice(position.read_string()?)?;
    let iqmp = BigNum::from_slice(position.read_string()?)?;
    let p = BigNum::from_slice(position.read_string()?)?;
    let q = BigNum::from_slice(position.read_string()?)?;
  • replacement in thrussh-keys/src/format/openssh.rs at line 51
    [5.88968][5.9407:10027]()
    let mut ctx = openssl::bn::BigNumContext::new()?;
    let un = openssl::bn::BigNum::from_u32(1)?;
    let mut p1 = openssl::bn::BigNum::new()?;
    let mut q1 = openssl::bn::BigNum::new()?;
    p1.checked_sub(&p, &un)?;
    q1.checked_sub(&q, &un)?;
    let mut dmp1 = openssl::bn::BigNum::new()?; // d mod p-1
    dmp1.checked_rem(&d, &p1, &mut ctx)?;
    let mut dmq1 = openssl::bn::BigNum::new()?; // d mod q-1
    dmq1.checked_rem(&d, &q1, &mut ctx)?;
    [5.88968]
    [5.89548]
    let mut ctx = openssl::bn::BigNumContext::new()?;
    let un = openssl::bn::BigNum::from_u32(1)?;
    let mut p1 = openssl::bn::BigNum::new()?;
    let mut q1 = openssl::bn::BigNum::new()?;
    p1.checked_sub(&p, &un)?;
    q1.checked_sub(&q, &un)?;
    let mut dmp1 = openssl::bn::BigNum::new()?; // d mod p-1
    dmp1.checked_rem(&d, &p1, &mut ctx)?;
    let mut dmq1 = openssl::bn::BigNum::new()?; // d mod q-1
    dmq1.checked_rem(&d, &q1, &mut ctx)?;
  • replacement in thrussh-keys/src/format/openssh.rs at line 62
    [5.89549][5.10028:10472](),[5.10472][5.89939:90041](),[5.89939][5.89939:90041]()
    let key = openssl::rsa::RsaPrivateKeyBuilder::new(n, e, d)?
    .set_factors(p, q)?
    .set_crt_params(dmp1, dmq1, iqmp)?
    .build();
    key.check_key().unwrap();
    return Ok(key::KeyPair::RSA {
    key,
    hash: key::SignatureHash::SHA2_512,
    });
    }
    } else {
    return Err(Error::UnsupportedKeyType(key_type.to_vec()).into());
    [5.89549]
    [5.90041]
    let key = openssl::rsa::RsaPrivateKeyBuilder::new(n, e, d)?
    .set_factors(p, q)?
    .set_crt_params(dmp1, dmq1, iqmp)?
    .build();
    key.check_key().unwrap();
    Ok(key::KeyPair::RSA {
    key,
    hash: key::SignatureHash::SHA2_512,
    })
  • edit in thrussh-keys/src/format/openssh.rs at line 72
    [5.90055]
    [5.90055]
    } else {
    Err(Error::UnsupportedKeyType(key_type.to_vec()))
  • edit in thrussh-keys/src/format/openssh.rs at line 75
    [5.90065][5.90065:90108]()
    Err(Error::CouldNotReadKey.into())
  • replacement in thrussh-keys/src/format/openssh.rs at line 76
    [5.90121][5.90121:90164]()
    Err(Error::CouldNotReadKey.into())
    [5.90121]
    [5.90164]
    Err(Error::CouldNotReadKey)
  • replacement in thrussh-keys/src/format/openssh.rs at line 100
    [5.90465][5.90465:90512]()
    Err(Error::CouldNotReadKey.into())
    [5.90465]
    [5.90512]
    Err(Error::CouldNotReadKey)
  • replacement in thrussh-keys/src/format/openssh.rs at line 107
    [5.10831][5.91128:91188](),[5.91128][5.91128:91188]()
    _ => return Err(Error::CouldNotReadKey.into()),
    [5.10831]
    [5.91188]
    _ => return Err(Error::CouldNotReadKey),
  • replacement in thrussh-keys/src/format/openssh.rs at line 117
    [5.91526][5.91526:91585]()
    return Err(Error::CouldNotReadKey.into());
    [5.91526]
    [5.91585]
    return Err(Error::CouldNotReadKey);
  • replacement in thrussh-keys/src/format/openssh.rs at line 147
    [5.91972][5.91972:92014]()
    Err(Error::KeyIsEncrypted.into())
    [5.91972]
    [5.92014]
    Err(Error::KeyIsEncrypted)
  • replacement in thrussh-keys/src/format/mod.rs at line 28
    [5.92293][5.92293:92353]()
    const AES_128_CBC: &'static str = "DEK-Info: AES-128-CBC,";
    [5.92293]
    [5.92353]
    const AES_128_CBC: &str = "DEK-Info: AES-128-CBC,";
  • replacement in thrussh-keys/src/format/mod.rs at line 58
    [5.93002][5.93002:93035]()
    if started == true {
    [5.93002]
    [5.93035]
    if started {
  • replacement in thrussh-keys/src/format/mod.rs at line 70
    [5.12667][5.12667:12738]()
    return Err(Error::CouldNotReadKey.into());
    [5.12667]
    [5.12738]
    return Err(Error::CouldNotReadKey);
  • replacement in thrussh-keys/src/format/mod.rs at line 108
    [5.94766][5.94766:94818]()
    None => Err(Error::CouldNotReadKey.into()),
    [5.94766]
    [5.94818]
    None => Err(Error::CouldNotReadKey),
  • replacement in thrussh-keys/src/encoding.rs at line 156
    [5.100731][5.100731:100796]()
    fn reader<'a>(&'a self, starting_at: usize) -> Position<'a>;
    [5.100731]
    [5.100796]
    fn reader(&self, starting_at: usize) -> Position;
  • replacement in thrussh-keys/src/encoding.rs at line 160
    [5.100827][5.100827:100893]()
    fn reader<'a>(&'a self, starting_at: usize) -> Position<'a> {
    [5.100827]
    [5.100893]
    fn reader(&self, starting_at: usize) -> Position {
  • replacement in thrussh-keys/src/encoding.rs at line 162
    [5.100912][5.100912:100934]()
    s: &self,
    [5.100912]
    [5.100934]
    s: self,
  • replacement in thrussh-keys/src/encoding.rs at line 169
    [5.101011][5.101011:101077]()
    fn reader<'a>(&'a self, starting_at: usize) -> Position<'a> {
    [5.101011]
    [5.101077]
    fn reader(&self, starting_at: usize) -> Position {
  • replacement in thrussh-keys/src/encoding.rs at line 208
    [5.102181][5.102181:102228]()
    if self.position + 1 <= self.s.len() {
    [5.102181]
    [5.102228]
    if self.position < self.s.len() {
  • edit in thrussh-keys/src/agent/server.rs at line 9
    [5.2426][5.125430:125439](),[5.125430][5.125430:125439]()
    use std;
  • edit in thrussh-keys/src/agent/server.rs at line 13
    [5.125552][5.125552:125563]()
    use tokio;
  • edit in thrussh-keys/src/agent/server.rs at line 19
    [5.125758]
    [5.125758]
    type KeyStoreMap = HashMap<Vec<u8>, (Arc<key::KeyPair>, SystemTime, Vec<Constraint>)>;
  • replacement in thrussh-keys/src/agent/server.rs at line 23
    [5.125776][5.125776:125874]()
    struct KeyStore(Arc<RwLock<HashMap<Vec<u8>, (Arc<key::KeyPair>, SystemTime, Vec<Constraint>)>>>);
    [5.125776]
    [5.125874]
    struct KeyStore(Arc<RwLock<KeyStoreMap>>);
  • replacement in thrussh-keys/src/agent/server.rs at line 253
    [5.133147][5.133147:133205]()
    secret.key.clone_from_slice(&concat[..]);
    [5.133147]
    [5.133205]
    secret.key.clone_from_slice(concat);
  • replacement in thrussh-keys/src/agent/server.rs at line 287
    [5.134615][5.134615:134664]()
    BigNum::from_slice(&q_inv)?,
    [5.134615]
    [5.134664]
    BigNum::from_slice(q_inv)?,
  • replacement in thrussh-keys/src/agent/server.rs at line 292
    [5.134784][5.134784:134878]()
    writebuf.extend_ssh_mpint(&e);
    writebuf.extend_ssh_mpint(&n);
    [5.134784]
    [5.134878]
    writebuf.extend_ssh_mpint(e);
    writebuf.extend_ssh_mpint(n);
  • replacement in thrussh-keys/src/agent/client.rs at line 296
    [5.149412][5.149412:149468]()
    (self, Err(Error::AgentFailure.into()))
    [5.149412]
    [5.149468]
    (self, Err(Error::AgentFailure))
  • replacement in thrussh-keys/src/agent/client.rs at line 308
    [5.149793][5.149793:149835]()
    key_blob(&public, &mut self.buf);
    [5.149793]
    [5.149835]
    key_blob(public, &mut self.buf);
  • replacement in thrussh-keys/src/agent/client.rs at line 346
    [5.151172][5.151172:151222]()
    self.prepare_sign_request(public, &data);
    [5.151172]
    [5.151222]
    self.prepare_sign_request(public, data);
  • replacement in thrussh-keys/src/agent/client.rs at line 398
    [5.153322][5.153322:153386]()
    _ => Err((Error::UnknownSignatureType {
    [5.153322]
    [5.153386]
    _ => Err(Error::UnknownSignatureType {
  • replacement in thrussh-keys/src/agent/client.rs at line 400
    [5.153476][5.153476:153537]()
    })
    .into()),
    [5.153476]
    [5.153537]
    }),
  • replacement in thrussh-keys/src/agent/client.rs at line 406
    [5.153632][3.682:744]()
    (self, Err(Error::AgentProtocolError.into()))
    [5.153632]
    [5.153686]
    (self, Err(Error::AgentProtocolError))
  • edit in thrussh-config/src/proxy.rs at line 3
    [5.158300][5.158300:158309]()
    use std;
  • edit in thrussh-config/src/proxy.rs at line 6
    [5.46][5.158429:158440](),[5.158429][5.158429:158440]()
    use tokio;
  • replacement in thrussh-config/src/lib.rs at line 151
    [5.164332][5.164332:164480](),[5.164480][2.1191:1254](),[2.1254][5.1173:1259](),[5.1173][5.1173:1259](),[5.1259][5.164541:164635](),[5.164541][5.164541:164635]()
    } else {
    match lower.as_str() {
    "host" => {
    if value.trim_start() == host {
    let mut c = Config::default(host);
    c.port = 22;
    config = Some(c)
    }
    }
    _ => {}
    }
    [5.164332]
    [5.164635]
    } else if lower.as_str() == "host" && value.trim_start() == host {
    let mut c = Config::default(host);
    c.port = 22;
    config = Some(c)
  • edit in thrussh/src/ssh_read.rs at line 4
    [5.166755][5.166755:166764]()
    use std;
  • replacement in thrussh/src/ssh_read.rs at line 25
    [5.167275][5.167275:167297]()
    buf: buf,
    [5.167275]
    [5.167297]
    buf,
  • replacement in thrussh/src/ssh_read.rs at line 124
    [5.170181][5.170181:170235]()
    return Err(Error::Disconnect.into());
    [5.170181]
    [5.170235]
    return Err(Error::Disconnect);
  • replacement in thrussh/src/ssh_read.rs at line 146
    [5.170933][5.170933:171221]()
    if i >= 8 {
    if &ssh_id.buf[0..8] == b"SSH-2.0-" {
    // Either the line starts with "SSH-2.0-"
    ssh_id.sshid_len = i;
    return Ok(&ssh_id.buf[..ssh_id.sshid_len]);
    }
    [5.170933]
    [5.171221]
    if i >= 8 && &ssh_id.buf[0..8] == b"SSH-2.0-" {
    // Either the line starts with "SSH-2.0-"
    ssh_id.sshid_len = i;
    return Ok(&ssh_id.buf[..ssh_id.sshid_len]);
  • replacement in thrussh/src/session.rs at line 148
    [5.176619][5.176619:176684]()
    if let Some(ref channel) = self.channels.get(&channel) {
    [5.176619]
    [5.176684]
    if let Some(channel) = self.channels.get(&channel) {
  • replacement in thrussh/src/session.rs at line 232
    [5.179119][5.179119:179149]()
    while buf.len() > 0 {
    [5.179119]
    [5.179149]
    while !buf.is_empty() {
  • replacement in thrussh/src/session.rs at line 281
    [5.180943][5.180943:180977]()
    while buf.len() > 0 {
    [5.180943]
    [5.180977]
    while !buf.is_empty() {
  • edit in thrussh/src/session.rs at line 396
    [5.185136]
    [5.185136]
    #[allow(clippy::enum_variant_names)]
  • replacement in thrussh/src/session.rs at line 432
    [5.186036][5.186036:186086]()
    session_id: Some(session_id.clone()),
    [5.186036]
    [5.186086]
    session_id: Some(*session_id),
  • replacement in thrussh/src/session.rs at line 446
    [5.186514][5.186514:186564]()
    session_id: Some(session_id.clone()),
    [5.186514]
    [5.186564]
    session_id: Some(*session_id),
  • replacement in thrussh/src/session.rs at line 482
    [5.187438][5.187438:187463]()
    hash.clone()
    [5.187438]
    [5.187463]
    hash
  • replacement in thrussh/src/session.rs at line 494
    [5.187787][5.187787:187823]()
    session_id: session_id,
    [5.187787]
    [5.187823]
    session_id,
  • replacement in thrussh/src/server/session.rs at line 126
    [5.191683][5.191683:191747]()
    if let Some(channel) = enc.channels.get(&channel) {
    [5.191683]
    [5.191747]
    if let Some(channel) = enc.channels.get(channel) {
  • replacement in thrussh/src/server/session.rs at line 137
    [5.192036][5.192036:192100]()
    if let Some(channel) = enc.channels.get(&channel) {
    [5.192036]
    [5.192100]
    if let Some(channel) = enc.channels.get(channel) {
  • replacement in thrussh/src/server/session.rs at line 146
    [5.192311][5.192311:192375]()
    if let Some(channel) = enc.channels.get(&channel) {
    [5.192311]
    [5.192375]
    if let Some(channel) = enc.channels.get(channel) {
  • replacement in thrussh/src/server/session.rs at line 160
    [5.192816][5.192816:192873](),[5.192873][5.0:49](),[5.49][5.192873:193363](),[5.192873][5.192873:193363]()
    ) {
    if enc.rekey.is_none() {
    debug!("starting rekeying");
    if let Some(exchange) = enc.exchange.take() {
    let mut kexinit = KexInit::initiate_rekey(exchange, &enc.session_id);
    kexinit.server_write(
    &self.common.config.as_ref(),
    &mut self.common.cipher,
    &mut self.common.write_buffer,
    )?;
    enc.rekey = Some(Kex::KexInit(kexinit))
    }
    [5.192816]
    [5.193363]
    ) && enc.rekey.is_none() {
    debug!("starting rekeying");
    if let Some(exchange) = enc.exchange.take() {
    let mut kexinit = KexInit::initiate_rekey(exchange, &enc.session_id);
    kexinit.server_write(
    self.common.config.as_ref(),
    &self.common.cipher,
    &mut self.common.write_buffer,
    )?;
    enc.rekey = Some(Kex::KexInit(kexinit))
  • replacement in thrussh/src/server/mod.rs at line 290
    [5.213179][5.213179:213210]()
    #[allow(unused_variables)]
    [5.213179]
    [5.213210]
    #[allow(unused_variables, clippy::too_many_arguments)]
  • edit in thrussh/src/server/mod.rs at line 398
    [5.216476]
    [5.216476]
    #[allow(clippy::wrong_self_convention)]
  • replacement in thrussh/src/server/mod.rs at line 526
    [5.210][5.210:287]()
    match reply(session, &mut handler, &buf[..]).await {
    [5.210]
    [5.287]
    match reply(session, &mut handler, buf).await {
  • replacement in thrussh/src/server/mod.rs at line 616
    [5.222987][5.222987:223015]()
    exchange: exchange,
    [5.222987]
    [5.223015]
    exchange,
  • replacement in thrussh/src/server/mod.rs at line 631
    [5.223466][5.223466:223490]()
    config: config,
    [5.223466]
    [5.223490]
    config,
  • replacement in thrussh/src/server/mod.rs at line 651
    [5.224141][5.224141:224171]()
    &buf,
    [5.224141]
    [5.224171]
    buf,
  • replacement in thrussh/src/server/kex.rs at line 37
    [5.226902][5.226902:226932]()
    key: key,
    [5.226902]
    [5.226932]
    key,
  • replacement in thrussh/src/server/kex.rs at line 42
    [5.227054][5.227054:227108]()
    return Err(Error::UnknownKey.into());
    [5.227054]
    [5.227108]
    return Err(Error::UnknownKey);
  • replacement in thrussh/src/server/kex.rs at line 88
    [5.228600][5.228600:228626]()
    kex: kex,
    [5.228600]
    [5.228626]
    kex,
  • replacement in thrussh/src/server/encrypted.rs at line 60
    [5.232407][5.232407:232452]()
    &mut self.common.cipher,
    [5.232407]
    [5.232452]
    &self.common.cipher,
  • replacement in thrussh/src/server/encrypted.rs at line 89
    [5.753][5.83:173]()
    let mut pending = std::mem::replace(&mut self.pending_reads, Vec::new());
    [5.753]
    [5.173]
    let mut pending = std::mem::take(&mut self.pending_reads);
  • replacement in thrussh/src/server/encrypted.rs at line 103
    [4.220][4.220:274]()
    return Err(Error::Pending.into())
    [4.220]
    [4.274]
    return Err(Error::Pending.into());
  • replacement in thrussh/src/server/encrypted.rs at line 111
    [5.652][5.652:667]()
    },
    [5.652]
    [5.233300]
    }
  • replacement in thrussh/src/server/encrypted.rs at line 190
    [5.235917][5.235917:235956]()
    if let Some(ref banner) = banner {
    [5.235917]
    [5.235956]
    if let Some(banner) = banner {
  • replacement in thrussh/src/server/encrypted.rs at line 199
    [5.236170][5.236170:236196]()
    methods: methods,
    [5.236170]
    [5.236196]
    methods,
  • replacement in thrussh/src/server/encrypted.rs at line 249
    [5.237986][5.237986:238073]()
    auth_request.methods = auth_request.methods - MethodSet::PASSWORD;
    [5.237986]
    [5.238073]
    auth_request.methods -= MethodSet::PASSWORD;
  • replacement in thrussh/src/server/encrypted.rs at line 346
    [5.241770][5.241770:241823]()
    } else if auth_user.len() == 0 {
    [5.241770]
    [5.241823]
    } else if auth_user.is_empty() {
  • replacement in thrussh/src/server/encrypted.rs at line 358
    [5.242325][5.242325:242382]()
    if SIGNATURE_BUFFER.with(|buf| {
    [5.242325]
    [5.242382]
    let signature_verified = SIGNATURE_BUFFER.with(|buf| {
  • replacement in thrussh/src/server/encrypted.rs at line 365
    [5.242706][5.242706:242735]()
    }) {
    [5.242706]
    [5.242735]
    });
    if signature_verified {
  • replacement in thrussh/src/server/encrypted.rs at line 393
    [5.244047][5.244047:244190]()
    self.write.extend_ssh_string(&pubkey_algo);
    self.write.extend_ssh_string(&pubkey_key);
    [5.244047]
    [5.244190]
    self.write.extend_ssh_string(pubkey_algo);
    self.write.extend_ssh_string(pubkey_key);
  • replacement in thrussh/src/server/encrypted.rs at line 399
    [5.244344][5.244344:244384]()
    algo: algo,
    [5.244344]
    [5.244384]
    algo,
  • replacement in thrussh/src/server/encrypted.rs at line 451
    [5.245942][5.245942:245965]()
    user: &mut String,
    [5.245942]
    [5.245965]
    user: &mut str,
  • replacement in thrussh/src/server/encrypted.rs at line 457
    [5.7836][5.246175:246225](),[5.246175][5.246175:246225]()
    let response = Response { pos: r, n: n };
    [5.7836]
    [5.246225]
    let response = Response { pos: r, n };
  • replacement in thrussh/src/server/encrypted.rs at line 465
    [5.7927][5.7927:7991]()
    .map_err(|e| H::Error::from(crate::Error::from(e)))
    [5.7927]
    [5.246491]
    .map_err(H::Error::from)
  • replacement in thrussh/src/server/encrypted.rs at line 567
    [5.250180][5.250180:250254]()
    h.extended_data(channel_num, ext, &data, self).await?
    [5.250180]
    [5.250254]
    h.extended_data(channel_num, ext, data, self).await?
  • replacement in thrussh/src/server/encrypted.rs at line 569
    [5.250279][5.250279:250339]()
    h.data(channel_num, &data, self).await?
    [5.250279]
    [5.250339]
    h.data(channel_num, data, self).await?
  • replacement in thrussh/src/server/encrypted.rs at line 833
    [5.262078][5.262078:262122]()
    sender_channel: sender_channel,
    [5.262078]
    [5.262122]
    sender_channel,
  • edit in thrussh/src/negotiation.rs at line 21
    [5.269161]
    [5.269180]
    use rand::RngCore;
  • edit in thrussh/src/negotiation.rs at line 24
    [5.269273][5.493:512]()
    use rand::RngCore;
  • edit in thrussh/src/negotiation.rs at line 97
    [5.270951]
    [5.513]
    #[cfg(not(feature = "openssl"))]
    use thrussh_keys::key::ED25519;
  • edit in thrussh/src/negotiation.rs at line 101
    [5.270994][5.542:609]()
    #[cfg(not(feature = "openssl"))]
    use thrussh_keys::key::{ED25519};
  • replacement in thrussh/src/negotiation.rs at line 104
    [5.271059][5.271059:271129]()
    match self {
    &PublicKey::Ed25519(_) => ED25519.0,
    [5.271059]
    [5.610]
    match *self {
    PublicKey::Ed25519(_) => ED25519.0,
  • replacement in thrussh/src/negotiation.rs at line 107
    [5.650][5.271129:271178](),[5.271129][5.271129:271178]()
    &PublicKey::RSA { .. } => SSH_RSA.0,
    [5.650]
    [5.271178]
    PublicKey::RSA { .. } => SSH_RSA.0,
  • replacement in thrussh/src/negotiation.rs at line 114
    [5.271259][5.271259:271331]()
    match self {
    &KeyPair::Ed25519 { .. } => ED25519.0,
    [5.271259]
    [5.651]
    match *self {
    KeyPair::Ed25519 { .. } => ED25519.0,
  • replacement in thrussh/src/negotiation.rs at line 117
    [5.691][5.271331:271392](),[5.271331][5.271331:271392]()
    &KeyPair::RSA { ref hash, .. } => hash.name().0,
    [5.691]
    [5.271392]
    KeyPair::RSA { ref hash, .. } => hash.name().0,
  • replacement in thrussh/src/negotiation.rs at line 136
    [5.272011][5.272011:272066]()
    return Err(Error::NoCommonKexAlgo.into());
    [5.272011]
    [5.272066]
    return Err(Error::NoCommonKexAlgo);
  • replacement in thrussh/src/negotiation.rs at line 148
    [5.272459][5.272459:272514]()
    return Err(Error::NoCommonKeyAlgo.into());
    [5.272459]
    [5.272514]
    return Err(Error::NoCommonKeyAlgo);
  • replacement in thrussh/src/negotiation.rs at line 159
    [5.272871][5.272871:272925]()
    return Err(Error::NoCommonCipher.into());
    [5.272871]
    [5.272925]
    return Err(Error::NoCommonCipher);
  • replacement in thrussh/src/negotiation.rs at line 164
    [5.273084][5.273084:273134]()
    let mac = mac.and_then(|(_, x)| Some(x));
    [5.273084]
    [5.273134]
    let mac = mac.map(|(_, x)| x);
  • replacement in thrussh/src/negotiation.rs at line 173
    [5.273445][5.273445:273508]()
    return Err(Error::NoCommonCompression.into());
    [5.273445]
    [5.273508]
    return Err(Error::NoCommonCompression);
  • replacement in thrussh/src/negotiation.rs at line 181
    [5.273782][5.273782:273845]()
    return Err(Error::NoCommonCompression.into());
    [5.273782]
    [5.273845]
    return Err(Error::NoCommonCompression);
  • replacement in thrussh/src/negotiation.rs at line 201
    [5.274620][5.274620:274665]()
    _ => Err(Error::KexInit.into()),
    [5.274620]
    [5.274665]
    _ => Err(Error::KexInit),
  • replacement in thrussh/src/key.rs at line 26
    [5.305344][5.305344:305414]()
    match self {
    &PublicKey::Ed25519(ref public) => {
    [5.305344]
    [5.305414]
    match *self {
    PublicKey::Ed25519(ref public) => {
  • replacement in thrussh/src/key.rs at line 33
    [5.924][5.305632:305681](),[5.305632][5.305632:305681]()
    &PublicKey::RSA { ref key, .. } => {
    [5.924]
    [5.305681]
    PublicKey::RSA { ref key, .. } => {
  • replacement in thrussh/src/key.rs at line 48
    [5.306172][5.306172:306237]()
    match self {
    &KeyPair::Ed25519(ref key) => {
    [5.306172]
    [5.306237]
    match *self {
    KeyPair::Ed25519(ref key) => {
  • replacement in thrussh/src/key.rs at line 56
    [5.965][5.306491:306538](),[5.306491][5.306491:306538]()
    &KeyPair::RSA { ref key, .. } => {
    [5.965]
    [5.306538]
    KeyPair::RSA { ref key, .. } => {
  • replacement in thrussh/src/kex.rs at line 20
    [5.307656][5.307656:307668]()
    use sodium;
    [5.307643]
    [5.307668]
    use rand::RngCore;
  • edit in thrussh/src/kex.rs at line 23
    [5.307730][5.995:1014]()
    use rand::RngCore;
  • replacement in thrussh/src/kex.rs at line 179
    [5.313028][5.1411:1463]()
    let hash = {
    [5.313028]
    [5.1463]
    let hash = {
  • replacement in thrussh/src/kex.rs at line 201
    [5.313977][5.313977:314029]()
    key.extend(&hash.as_ref());
    [5.313977]
    [5.314029]
    key.extend(hash.as_ref());
  • replacement in thrussh/src/kex.rs at line 220
    [5.314672][5.314672:314780]()
    local_to_remote: local_to_remote,
    remote_to_local: remote_to_local,
    [5.314672]
    [5.314780]
    local_to_remote,
    remote_to_local,
  • replacement in thrussh/src/client/session.rs at line 29
    [5.320354][5.320354:320419]()
    _ => return Err(Error::NotAuthenticated.into()),
    [5.320354]
    [5.320419]
    _ => return Err(Error::NotAuthenticated),
  • replacement in thrussh/src/client/session.rs at line 32
    [5.320450][5.320450:320502]()
    return Err(Error::Inconsistent.into());
    [5.320450]
    [5.320502]
    return Err(Error::Inconsistent);
  • replacement in thrussh/src/client/session.rs at line 69
    [5.321898][5.321898:321963]()
    _ => return Err(Error::NotAuthenticated.into()),
    [5.321898]
    [5.321963]
    _ => return Err(Error::NotAuthenticated),
  • replacement in thrussh/src/client/session.rs at line 72
    [5.321994][5.321994:322046]()
    return Err(Error::Inconsistent.into());
    [5.321994]
    [5.322046]
    return Err(Error::Inconsistent);
  • replacement in thrussh/src/client/session.rs at line 113
    [5.323688][5.323688:323753]()
    _ => return Err(Error::NotAuthenticated.into()),
    [5.323688]
    [5.323753]
    _ => return Err(Error::NotAuthenticated),
  • replacement in thrussh/src/client/session.rs at line 116
    [5.323784][5.323784:323836]()
    return Err(Error::Inconsistent.into());
    [5.323784]
    [5.323836]
    return Err(Error::Inconsistent);
  • edit in thrussh/src/client/session.rs at line 121
    [5.323873]
    [5.323873]
    #[allow(clippy::too_many_arguments)]
  • replacement in thrussh/src/client/mod.rs at line 273
    [5.341435][5.15722:15751]()
    if let Err(_) = self
    [5.341435]
    [5.15751]
    if self
  • edit in thrussh/src/client/mod.rs at line 280
    [5.341612]
    [5.15772]
    .is_err()
  • replacement in thrussh/src/client/mod.rs at line 294
    [5.16087][5.16087:16153]()
    Err(e) => return (future, Err(e.into())),
    [5.16087]
    [5.16153]
    Err(e) => return (future, Err(e)),
  • replacement in thrussh/src/client/mod.rs at line 296
    [5.16176][5.16176:16259]()
    if let Err(_) = self.sender.send(Msg::Signed { data }).await {
    [5.16176]
    [5.16259]
    if self.sender.send(Msg::Signed { data }).await.is_err() {
  • replacement in thrussh/src/client/mod.rs at line 328
    [5.343159][5.343159:343217]()
    return Err(Error::Disconnect.into());
    [5.343159]
    [5.343217]
    return Err(Error::Disconnect);
  • edit in thrussh/src/client/mod.rs at line 426
    [5.346527]
    [5.346527]
    #[allow(clippy::too_many_arguments)]
  • replacement in thrussh/src/client/mod.rs at line 889
    [5.716][5.716:818]()
    self = reply(self, &mut handler, &mut encrypted_signal, &buf[..]).await?;
    [5.716]
    [5.818]
    self = reply(self, &mut handler, &mut encrypted_signal, buf).await?;
  • replacement in thrussh/src/client/mod.rs at line 999
    [5.365719][5.365719:365751]()
    exchange: exchange,
    [5.365719]
    [5.365751]
    exchange,
  • replacement in thrussh/src/client/mod.rs at line 1007
    [5.365961][5.365961:365998]()
    &mut self.common.cipher,
    [5.365961]
    [5.365998]
    &self.common.cipher,
  • replacement in thrussh/src/client/mod.rs at line 1020
    [5.366441][5.366441:366482]()
    &mut self.common.cipher,
    [5.366441]
    [5.366482]
    &self.common.cipher,
  • replacement in thrussh/src/client/mod.rs at line 1028
    [5.366860][5.366860:366971]()
    &self.common.config.as_ref(),
    &mut self.common.cipher,
    [5.366860]
    [5.366971]
    self.common.config.as_ref(),
    &self.common.cipher,
  • replacement in thrussh/src/client/kex.rs at line 50
    [5.383335][5.383335:383357]()
    kex: kex,
    [5.383335]
    [5.383357]
    kex,
  • replacement in thrussh/src/client/encrypted.rs at line 62
    [5.386407][5.386407:386456]()
    &mut self.common.cipher,
    [5.386407]
    [5.386456]
    &self.common.cipher,
  • replacement in thrussh/src/client/encrypted.rs at line 103
    [5.898][5.1097:1191]()
    let mut pending = std::mem::replace(&mut self.pending_reads, Vec::new());
    [5.898]
    [5.1191]
    let mut pending = std::mem::take(&mut self.pending_reads);
  • replacement in thrussh/src/client/encrypted.rs at line 117
    [4.574][4.574:632]()
    return Err(Error::Pending.into())
    [4.574]
    [4.632]
    return Err(Error::Pending.into());
  • replacement in thrussh/src/client/encrypted.rs at line 251
    [5.394357][5.394357:394558]()
    match self.receiver.recv().await {
    Some(Msg::Signed { data }) => break data,
    _ => {}
    [5.394357]
    [5.394558]
    if let Some(Msg::Signed { data }) = self.receiver.recv().await {
    break data;
  • replacement in thrussh/src/client/encrypted.rs at line 371
    [5.399565][5.399565:399635]()
    let (c, s) = c.data(channel_num, &data, self).await?;
    [5.399565]
    [5.399635]
    let (c, s) = c.data(channel_num, data, self).await?;
  • replacement in thrussh/src/client/encrypted.rs at line 392
    [5.400558][5.400558:400634]()
    .extended_data(channel_num, extended_code, &data, self)
    [5.400558]
    [5.400634]
    .extended_data(channel_num, extended_code, data, self)
  • replacement in thrussh/src/client/encrypted.rs at line 621
    [5.23144][5.408631:409033](),[5.408631][5.408631:409033]()
    match method {
    &auth::Method::PublicKey { ref key } => {
    let i0 = self.client_make_to_sign(user, key.as_ref(), buffer);
    // Extend with self-signature.
    key.add_self_signature(buffer)?;
    push_packet!(self.write, {
    self.write.extend(&buffer[i0..]);
    })
    }
    _ => {}
    [5.23144]
    [5.409033]
    if let &auth::Method::PublicKey { ref key } = method {
    let i0 = self.client_make_to_sign(user, key.as_ref(), buffer);
    // Extend with self-signature.
    key.add_self_signature(buffer)?;
    push_packet!(self.write, {
    self.write.extend(&buffer[i0..]);
    })
  • replacement in thrussh/src/cipher/chacha20poly1305.rs at line 93
    [5.419801][5.419801:419881]()
    if !poly1305_verify(&tag, ciphertext_in_plaintext_out, &poly_key) {
    [5.419801]
    [5.419881]
    if !poly1305_verify(tag, ciphertext_in_plaintext_out, &poly_key) {
  • replacement in cryptovec/src/lib.rs at line 238
    [5.434677][5.434677:434742]()
    self.p.offset(size as isize) as *mut c_void,
    [5.434677]
    [5.434742]
    self.p.add(size) as *mut c_void,
  • replacement in cryptovec/src/lib.rs at line 256
    [5.435432][5.435432:435512]()
    std::ptr::write_volatile(old_ptr.offset(i as isize), 0)
    [5.435432]
    [5.435512]
    std::ptr::write_volatile(old_ptr.add(i), 0)
  • replacement in cryptovec/src/lib.rs at line 289
    [5.436467][5.436467:436522]()
    unsafe { *(self.p.offset(size as isize)) = s }
    [5.436467]
    [5.436522]
    unsafe { *(self.p.add(size)) = s }
  • replacement in cryptovec/src/lib.rs at line 302
    [5.436846][5.436846:436906]()
    let x: [u8; 4] = unsafe { std::mem::transmute(s) };
    [5.436846]
    [5.436906]
    let x: [u8; 4] = s.to_ne_bytes();
  • replacement in cryptovec/src/lib.rs at line 321
    [5.437424][5.437424:437484]()
    self.p.offset(i as isize) as *const c_void,
    [5.437424]
    [5.437484]
    self.p.add(i) as *const c_void,
  • replacement in cryptovec/src/lib.rs at line 338
    [5.437925][5.437925:438023]()
    unsafe { std::slice::from_raw_parts_mut(self.p.offset(cur_size as isize), n_bytes) };
    [5.437925]
    [5.438023]
    unsafe { std::slice::from_raw_parts_mut(self.p.add(cur_size), n_bytes) };
  • replacement in cryptovec/src/lib.rs at line 369
    [5.438886][5.438886:438986]()
    let s = std::slice::from_raw_parts(self.p.offset(offset as isize), self.size - offset);
    [5.438886]
    [5.438986]
    let s = std::slice::from_raw_parts(self.p.add(offset), self.size - offset);
  • replacement in cryptovec/src/lib.rs at line 383
    [5.439355][5.439355:439438]()
    unsafe { std::slice::from_raw_parts_mut(self.p.offset(size as isize), n) }
    [5.439355]
    [5.439438]
    unsafe { std::slice::from_raw_parts_mut(self.p.add(size), n) }
  • replacement in cryptovec/src/lib.rs at line 396
    [5.439731][5.439731:439825]()
    std::ptr::copy_nonoverlapping(s.as_ptr(), self.p.offset(size as isize), s.len());
    [5.439731]
    [5.439825]
    std::ptr::copy_nonoverlapping(s.as_ptr(), self.p.add(size), s.len());
  • replacement in cryptovec/src/lib.rs at line 420
    [5.440326][5.440326:440401]()
    std::ptr::write_volatile(self.p.offset(i as isize), 0)
    [5.440326]
    [5.440401]
    std::ptr::write_volatile(self.p.add(i), 0)