Thrussh: making OpenSSL optional

[?]
Jun 22, 2021, 12:14 PM
NHOSLQGG4CIWBE7VKL5MB7PSY3RZ5IVDFENMGZG6X755GGZ6B3VQC

Dependencies

  • [2] MCS77Y4V Making OpenSSL optional
  • [3] FT67GGO4 Version bump (Pijul and Thrussh)
  • [4] 2WEO7OZL Version updates: getting rid of anyhow + moving to Tokio 1.0
  • [5] TFYJ3P2A Version 0.30.8/0.19.4, and solving conflicts
  • [6] 7FRJYUI6 Reboot because of a bad change
  • [7] 634OYCNM Tokio 0.3
  • [8] Y67GNDVB use tokio::process::Command for proxy commands
  • [9] ELRPPXSG Fixing conflicts
  • [10] EXXUR33Q Fixing queues when sending a vector

Change contents

  • edit in thrussh/src/session.rs at line 21
    [3.172404][3.172404:172423]()
    use openssl::hash;
  • replacement in thrussh/src/session.rs at line 35
    [3.172810][3.172810:172849]()
    pub session_id: hash::DigestBytes,
    [3.172810]
    [3.172849]
    pub session_id: crate::Sha256Hash,
  • replacement in thrussh/src/session.rs at line 405
    [3.185695][3.185695:185742]()
    pub session_id: Option<hash::DigestBytes>,
    [3.185695]
    [3.185742]
    pub session_id: Option<crate::Sha256Hash>,
  • replacement in thrussh/src/session.rs at line 413
    [3.185863][3.185863:185903]()
    session_id: &hash::DigestBytes,
    [3.185863]
    [3.185903]
    session_id: &crate::Sha256Hash,
  • replacement in thrussh/src/session.rs at line 428
    [3.186322][3.186322:186404]()
    pub fn initiate_rekey(ex: Exchange, session_id: &hash::DigestBytes) -> Self {
    [3.186322]
    [3.186404]
    pub fn initiate_rekey(ex: Exchange, session_id: &crate::Sha256Hash) -> Self {
  • replacement in thrussh/src/session.rs at line 448
    [3.186921][3.186921:186968]()
    pub session_id: Option<hash::DigestBytes>,
    [3.186921]
    [3.186968]
    pub session_id: Option<crate::Sha256Hash>,
  • replacement in thrussh/src/session.rs at line 456
    [3.187088][3.187088:187135]()
    pub session_id: Option<hash::DigestBytes>,
    [3.187088]
    [3.187135]
    pub session_id: Option<crate::Sha256Hash>,
  • replacement in thrussh/src/session.rs at line 463
    [3.187229][3.187229:187262]()
    hash: hash::DigestBytes,
    [3.187229]
    [3.187262]
    hash: crate::Sha256Hash,
  • replacement in thrussh/src/session.rs at line 495
    [3.188083][3.188083:188122]()
    pub session_id: hash::DigestBytes,
    [3.188083]
    [3.188122]
    pub session_id: crate::Sha256Hash,
  • replacement in thrussh/src/server/mod.rs at line 574
    [3.5860][2.14214:14258]()
    2 .map_err(crate::Error::from)?;
    [3.5860]
    [3.222121]
    .map_err(crate::Error::from)?;
  • replacement in thrussh/src/server/kex.rs at line 93
    [3.228752][3.6145:6236]()
    let hash: Result<openssl::hash::DigestBytes, Error> = HASH_BUF.with(|buffer| {
    [3.228752]
    [3.228851]
    let hash: Result<_, Error> = HASH_BUF.with(|buffer| {
  • edit in thrussh/src/negotiation.rs at line 21
    [3.269161][3.269161:269180]()
    use openssl::rand;
  • edit in thrussh/src/negotiation.rs at line 23
    [3.269273]
    [3.269273]
    use rand::RngCore;
  • edit in thrussh/src/negotiation.rs at line 87
    [3.270951]
    [3.270951]
    #[cfg(feature = "openssl")]
  • edit in thrussh/src/negotiation.rs at line 89
    [3.270994]
    [3.270994]
    #[cfg(not(feature = "openssl"))]
    use thrussh_keys::key::{ED25519};
  • edit in thrussh/src/negotiation.rs at line 96
    [3.271129]
    [3.271129]
    #[cfg(feature = "openssl")]
  • edit in thrussh/src/negotiation.rs at line 106
    [3.271331]
    [3.271331]
    #[cfg(feature = "openssl")]
  • replacement in thrussh/src/negotiation.rs at line 234
    [3.275820][3.275820:275856]()
    rand::rand_bytes(&mut cookie)?;
    [3.275820]
    [3.275856]
    rand::thread_rng().fill_bytes(&mut cookie);
  • edit in thrussh/src/lib.rs at line 308
    [3.290483]
    [3.290483]
    type Sha256Hash = generic_array::GenericArray<u8, <sha2::Sha256 as digest::FixedOutputDirty>::OutputSize>;
  • edit in thrussh/src/lib.rs at line 428
    [3.13542]
    [3.13542]
    #[cfg(feature = "openssl")]
  • edit in thrussh/src/key.rs at line 32
    [3.305632]
    [3.305632]
    #[cfg(feature = "openssl")]
  • edit in thrussh/src/key.rs at line 55
    [3.306491]
    [3.306491]
    #[cfg(feature = "openssl")]
  • edit in thrussh/src/kex.rs at line 20
    [3.307643]
    [3.307643]
    #[cfg(feature = "openssl")]
  • edit in thrussh/src/kex.rs at line 25
    [3.307730]
    [3.307730]
    use rand::RngCore;
  • edit in thrussh/src/kex.rs at line 78
    [3.309232][3.309232:309262]()
    use openssl::rand::*;
  • replacement in thrussh/src/kex.rs at line 80
    [3.309346][3.309346:309389]()
    rand_bytes(&mut server_secret.0)?;
    [3.309346]
    [3.309389]
    rand::thread_rng().fill_bytes(&mut server_secret.0);
  • edit in thrussh/src/kex.rs at line 99
    [3.14749][3.309936:309966](),[3.309936][3.309936:309966]()
    use openssl::rand::*;
  • replacement in thrussh/src/kex.rs at line 101
    [3.310050][3.310050:310093]()
    rand_bytes(&mut client_secret.0)?;
    [3.310050]
    [3.310093]
    rand::thread_rng().fill_bytes(&mut client_secret.0);
  • replacement in thrussh/src/kex.rs at line 133
    [3.311080][3.14848:14908]()
    ) -> Result<openssl::hash::DigestBytes, crate::Error> {
    [3.311080]
    [3.311141]
    ) -> Result<crate::Sha256Hash, crate::Error> {
  • replacement in thrussh/src/kex.rs at line 148
    [3.311729][3.311729:311942]()
    use openssl::hash::*;
    let hash = {
    let mut hasher = Hasher::new(MessageDigest::sha256())?;
    hasher.update(&buffer)?;
    hasher.finish()?
    };
    Ok(hash)
    [3.311729]
    [3.311942]
    use sha2::Digest;
    let mut hasher = sha2::Sha256::new();
    hasher.update(&buffer);
    Ok(hasher.finalize())
  • replacement in thrussh/src/kex.rs at line 157
    [3.311989][3.311989:312090]()
    session_id: &openssl::hash::DigestBytes,
    exchange_hash: &openssl::hash::DigestBytes,
    [3.311989]
    [3.312090]
    session_id: &crate::Sha256Hash,
    exchange_hash: &crate::Sha256Hash,
  • replacement in thrussh/src/kex.rs at line 182
    [3.313028][3.313028:313273]()
    use openssl::hash::*;
    let hash = {
    let mut hasher = Hasher::new(MessageDigest::sha256())?;
    hasher.update(&buffer)?;
    hasher.finish()?
    [3.313028]
    [3.313273]
    let hash = {
    use sha2::Digest;
    let mut hasher = sha2::Sha256::new();
    hasher.update(&buffer[..]);
    hasher.finalize()
  • replacement in thrussh/src/kex.rs at line 199
    [3.313768][3.313768:313950]()
    let mut hasher = Hasher::new(MessageDigest::sha256())?;
    hasher.update(&buffer)?;
    hasher.finish()?
    [3.313768]
    [3.313950]
    use sha2::Digest;
    let mut hasher = sha2::Sha256::new();
    hasher.update(&buffer[..]);
    hasher.finalize()
  • replacement in thrussh/Cargo.toml at line 49
    [3.64][3.427105:427122](),[3.830][3.427105:427122](),[3.1708][3.427105:427122](),[3.24283][3.427105:427122](),[3.427105][3.427105:427122]()
    openssl = "0.10"
    [3.830]
    [3.427122]
    openssl = { version = "0.10", optional = true }
  • edit in thrussh/Cargo.toml at line 56
    [3.427375]
    [3.427375]
    rand = "0.8"
    sha2 = "0.9"
    generic-array = "0.14"
    digest = "0.9"