Rustfmt formatting (with 2021 edition)

[?]
Apr 19, 2022, 7:21 AM
XJ7D5MCK5RMZNJWOEOP5C3K57NQRMRRELFFTURV47RUKCA7BSRCQC

Dependencies

  • [2] LZA3GTZA is_closed() in thrussh::client
  • [3] IKKKVXOK Fix most clippy warnings
  • [4] FT67GGO4 Version bump (Pijul and Thrussh)
  • [5] 2WEO7OZL Version updates: getting rid of anyhow + moving to Tokio 1.0
  • [6] ATOFE4ZX more detailed error message when SSH_AUTH_SOCK points to a bad location
  • [7] NLPZS76W Make AgentSigner::sign_request_signature return self on error
  • [8] MCS77Y4V Making OpenSSL optional
  • [9] 7FRJYUI6 Reboot because of a bad change

Change contents

  • edit in thrussh-keys/src/pem.rs at line 1
    [4.10525][4.10526:10663]()
    use {Error, ErrorKind, KEYTYPE_ED25519, KEYTYPE_RSA, rsa_key_from_components};
    use std;
    use thrussh::encoding::Reader;
    use thrussh::key;
  • edit in thrussh-keys/src/pem.rs at line 2
    [4.10690]
    [4.10690]
    use base64::{decode_config, MIME};
  • replacement in thrussh-keys/src/pem.rs at line 4
    [4.10708][4.10708:10743]()
    use base64::{decode_config, MIME};
    [4.10708]
    [4.10743]
    use ring;
  • edit in thrussh-keys/src/pem.rs at line 6
    [4.10764]
    [4.10764]
    use std;
    use thrussh::encoding::Reader;
    use thrussh::key;
  • replacement in thrussh-keys/src/pem.rs at line 11
    [4.10790][4.10790:10800]()
    use ring;
    [4.10790]
    [4.10800]
    use {rsa_key_from_components, Error, ErrorKind, KEYTYPE_ED25519, KEYTYPE_RSA};
  • edit in thrussh-keys/src/pem.rs at line 13
    [4.10801][4.10801:10907]()
    use openssl::symm::{encrypt, decrypt, Cipher, Mode, Crypter};
    use openssl::hash::{MessageDigest, Hasher};
  • replacement in thrussh-keys/src/pem.rs at line 14
    [4.10925][4.10925:10926]()
    [4.10925]
    [4.10926]
    use openssl::hash::{Hasher, MessageDigest};
    use openssl::symm::{decrypt, encrypt, Cipher, Crypter, Mode};
  • replacement in thrussh-keys/src/pem.rs at line 55
    [4.12611][4.12611:12786]()
    reader.next().read_sequence(|reader| {
    oid = Some(reader.next().read_oid()?);
    Ok(())
    }).unwrap_or(());
    [4.12611]
    [4.12786]
    reader
    .next()
    .read_sequence(|reader| {
    oid = Some(reader.next().read_oid()?);
    Ok(())
    })
    .unwrap_or(());
  • replacement in thrussh-keys/src/pem.rs at line 64
    [4.12824][4.12824:12850]()
    }).unwrap_or(());
    [4.12824]
    [4.12850]
    })
    .unwrap_or(());
  • replacement in thrussh-keys/src/pem.rs at line 71
    [4.12966][4.12966:13024]()
    return Err(ErrorKind::CouldNotReadKey.into())
    [4.12966]
    [4.13024]
    return Err(ErrorKind::CouldNotReadKey.into());
  • replacement in thrussh-keys/src/pem.rs at line 80
    [4.13407][4.13407:13522]()
    Ok((key::Algorithm::Ed25519(keypair),
    super::KeyPairComponents::Ed25519(components)))
    [4.13407]
    [4.13522]
    Ok((
    key::Algorithm::Ed25519(keypair),
    super::KeyPairComponents::Ed25519(components),
    ))
  • replacement in thrussh-keys/src/pem.rs at line 99
    [4.14211][4.14211:14356]()
    super::KeyPairComponents::RSA(
    super::RSAKeyPairComponents::from_components(&components),
    ),
    [4.14211]
    [4.14356]
    super::KeyPairComponents::RSA(super::RSAKeyPairComponents::from_components(
    &components,
    )),
  • edit in thrussh-keys/src/pem.rs at line 129
    [4.15092][4.15092:15093]()
  • replacement in thrussh-keys/src/pem.rs at line 130
    [4.15130][4.15130:15179]()
    pub fn encode_pkcs8<R:ring::rand::SecureRandom>(
    [4.15130]
    [4.15179]
    pub fn encode_pkcs8<R: ring::rand::SecureRandom>(
  • replacement in thrussh-keys/src/pem.rs at line 134
    [4.15244][4.15244:15260]()
    rounds: u32
    [4.15244]
    [4.15260]
    rounds: u32,
  • edit in thrussh-keys/src/pem.rs at line 137
    [4.15325][4.15325:15326]()
  • replacement in thrussh-keys/src/pem.rs at line 156
    [4.16126][4.16126:16209]()
    writer.next().write_oid(&ObjectIdentifier::from_slice(PBES2));
    [4.16126]
    [4.16209]
    writer
    .next()
    .write_oid(&ObjectIdentifier::from_slice(PBES2));
  • replacement in thrussh-keys/src/pem.rs at line 175
    [4.16715][4.16715:16791]()
    writer.next().write_oid(&ObjectIdentifier::from_slice(PBKDF2));
    [4.16715]
    [4.16791]
    writer
    .next()
    .write_oid(&ObjectIdentifier::from_slice(PBKDF2));
  • replacement in thrussh-keys/src/pem.rs at line 182
    [4.16946][4.16946:17025]()
    writer.next().write_oid(&ObjectIdentifier::from_slice(AES256CBC));
    [4.16946]
    [4.17025]
    writer
    .next()
    .write_oid(&ObjectIdentifier::from_slice(AES256CBC));
  • replacement in thrussh-keys/src/pem.rs at line 195
    [4.17331][4.17331:17412]()
    writer.next().write_oid(&ObjectIdentifier::from_slice(HMAC_SHA256));
    [4.17331]
    [4.17412]
    writer
    .next()
    .write_oid(&ObjectIdentifier::from_slice(HMAC_SHA256));
  • replacement in thrussh-keys/src/pem.rs at line 269
    [4.19149][4.19149:19280]()
    let mut dec = decrypt(
    cipher,
    &key,
    Some(&iv[..]),
    ciphertext
    )?;
    [4.19149]
    [4.19280]
    let mut dec = decrypt(cipher, &key, Some(&iv[..]), ciphertext)?;
  • replacement in thrussh-keys/src/pem.rs at line 306
    [4.20390][4.20390:20506]()
    Ok(keygen.and_then(|keygen| {
    algorithm.map(|algo| Algorithms::Pbes2(keygen, algo))
    }))
    [4.20390]
    [4.20506]
    Ok(keygen.and_then(|keygen| algorithm.map(|algo| Algorithms::Pbes2(keygen, algo))))
  • replacement in thrussh-keys/src/pem.rs at line 325
    [4.21148][4.21148:21301]()
    Ok(digest.map(|digest| {
    KeyDerivation::Pbkdf2 {
    salt,
    rounds,
    digest,
    }
    [4.21148]
    [4.21301]
    Ok(digest.map(|digest| KeyDerivation::Pbkdf2 {
    salt,
    rounds,
    digest,
  • edit in thrussh-keys/src/pem.rs at line 340
    [4.21577][4.21577:21578]()
  • replacement in thrussh-keys/src/key.rs at line 205
    [3.3505][3.3505:3623](),[3.3623][4.63562:63576](),[4.63562][4.63562:63576]()
    PublicKey::Ed25519(ref public) => {
    sodium::ed25519::verify_detached(sig, buffer, public)
    }
    [3.3505]
    [4.4892]
    PublicKey::Ed25519(ref public) => sodium::ed25519::verify_detached(sig, buffer, public),
  • replacement in thrussh-keys/src/bcrypt_pbkdf.rs at line 11
    [4.123136][4.13391:13419]()
    use sha2::{Sha512, Digest};
    [4.123136]
    [4.123162]
    use sha2::{Digest, Sha512};
  • replacement in thrussh-keys/src/agent/client.rs at line 51
    [4.217][4.217:356]()
    Err(Error::IO(io_err)) if io_err.kind() == std::io::ErrorKind::NotFound => Err(Error::BadAuthSock),
    owise => owise
    [4.217]
    [4.356]
    Err(Error::IO(io_err)) if io_err.kind() == std::io::ErrorKind::NotFound => {
    Err(Error::BadAuthSock)
    }
    owise => owise,
  • replacement in thrussh/src/server/session.rs at line 160
    [4.192816][3.9909:9948]()
    ) && enc.rekey.is_none() {
    [4.192816]
    [3.9948]
    ) && enc.rekey.is_none()
    {
  • edit in thrussh/src/client/mod.rs at line 213
    [4.15617][2.0:1]()
  • replacement in cryptovec/src/lib.rs at line 237
    [4.434647][4.434647:434677](),[4.434677][3.14700:14753](),[3.14753][4.434742:434822](),[4.434742][4.434742:434822]()
    libc::memset(
    self.p.add(size) as *mut c_void,
    0,
    self.size - size,
    );
    [4.434647]
    [4.434822]
    libc::memset(self.p.add(size) as *mut c_void, 0, self.size - size);
  • replacement in cryptovec/src/lib.rs at line 333
    [4.437909][4.437909:437925](),[4.437925][3.14959:15045]()
    let s =
    unsafe { std::slice::from_raw_parts_mut(self.p.add(cur_size), n_bytes) };
    [4.437909]
    [4.438023]
    let s = unsafe { std::slice::from_raw_parts_mut(self.p.add(cur_size), n_bytes) };