Skip to content

Commit

Permalink
bump dependencies to pre-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Feb 20, 2024
1 parent 8abfc94 commit c83ce7c
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 133 deletions.
269 changes: 164 additions & 105 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,25 @@ members = [

[profile.dev]
opt-level = 2

[patch.crates-io]
p256 = { git = "https://github.com/RustCrypto/elliptic-curves.git" }
p384 = { git = "https://github.com/RustCrypto/elliptic-curves.git" }
p521 = { git = "https://github.com/RustCrypto/elliptic-curves.git" }

ed25519 = { git = "https://github.com/baloo/signatures.git", branch = "baloo/pkcs8-0.11.0-pre.0" }
ed25519-dalek = { git = "https://github.com/baloo/curve25519-dalek.git", branch = "baloo/rust-crypto/digest-sha2-bumps" }

dsa = { git = "https://github.com/RustCrypto/signatures.git" }

bcrypt-pbkdf = { git = "https://github.com/RustCrypto/password-hashes.git" }

chacha20 = { git = "https://github.com/RustCrypto/stream-ciphers.git" }

# https://github.com/RustCrypto/block-ciphers/pull/411
aes = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/bump-cipher/0.5.0-pre.3" }
des = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/bump-cipher/0.5.0-pre.3" }

# https://github.com/RustCrypto/block-modes/pull/56
cbc = { git = "https://github.com/baloo/block-modes.git", branch = "baloo/bump-prereleases" }
ctr = { git = "https://github.com/baloo/block-modes.git", branch = "baloo/bump-prereleases" }
14 changes: 7 additions & 7 deletions ssh-cipher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ edition = "2021"
rust-version = "1.60"

[dependencies]
cipher = "0.4"
cipher = "=0.5.0-pre.3"
encoding = { package = "ssh-encoding", version = "0.2", path = "../ssh-encoding" }

# optional dependencies
aes = { version = "0.8", optional = true, default-features = false }
aes = { version = "=0.9.0-pre", optional = true, default-features = false }
aes-gcm = { version = "0.10", optional = true, default-features = false, features = ["aes"] }
cbc = { version = "0.1", optional = true }
ctr = { version = "0.9", optional = true, default-features = false }
chacha20 = { version = "0.9", optional = true, default-features = false }
des = { version = "0.8", optional = true, default-features = false }
poly1305 = { version = "0.8", optional = true, default-features = false }
cbc = { version = "=0.2.0-pre", optional = true }
ctr = { version = "=0.10.0-pre", optional = true, default-features = false }
chacha20 = { version = "=0.10.0-pre", optional = true, default-features = false }
des = { version = "=0.9.0-pre", optional = true, default-features = false }
poly1305 = { version = "0.8.0", optional = true, default-features = false }
subtle = { version = "2", optional = true, default-features = false }

[features]
Expand Down
4 changes: 2 additions & 2 deletions ssh-encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ rust-version = "1.60"
[dependencies]
base64 = { package = "base64ct", version = "1.4", optional = true }
bytes = { version = "1", optional = true, default-features = false }
pem = { package = "pem-rfc7468", version = "0.7", optional = true }
sha2 = { version = "0.10", optional = true, default-features = false }
pem = { package = "pem-rfc7468", version = "=1.0.0-pre.0", optional = true }
sha2 = { version = "=0.11.0-pre.3", optional = true, default-features = false }

[dev-dependencies]
hex-literal = "0.4.1"
Expand Down
2 changes: 1 addition & 1 deletion ssh-encoding/tests/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn encode_byte_slice() {
#[test]
fn encode_byte_vec() {
let mut out = Vec::new();
Vec::from(b"example".as_ref()).encode(&mut out).unwrap();
Vec::from(b"example").encode(&mut out).unwrap();
assert_eq!(out, hex!("000000076578616d706c65"));
}

Expand Down
22 changes: 11 additions & 11 deletions ssh-key/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ rust-version = "1.65"
[dependencies]
cipher = { package = "ssh-cipher", version = "0.2", path = "../ssh-cipher" }
encoding = { package = "ssh-encoding", version = "0.2", features = ["base64", "pem", "sha2"], path = "../ssh-encoding" }
sha2 = { version = "0.10.8", default-features = false }
signature = { version = "2", default-features = false }
sha2 = { version = "=0.11.0-pre.3", default-features = false }
signature = { version = "=2.3.0-pre.3", default-features = false }
subtle = { version = "2", default-features = false }
zeroize = { version = "1", default-features = false }

# optional dependencies
bcrypt-pbkdf = { version = "0.10", optional = true, default-features = false, features = ["alloc"] }
bcrypt-pbkdf = { version = "=0.11.0-pre.0", optional = true, default-features = false, features = ["alloc"] }
bigint = { package = "num-bigint-dig", version = "0.8", optional = true, default-features = false }
dsa = { version = "0.6", optional = true, default-features = false }
ed25519-dalek = { version = "2", optional = true, default-features = false }
p256 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
p384 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
p521 = { version = "0.13.3", optional = true, default-features = false, features = ["ecdsa", "getrandom"] } # TODO(tarcieri): RFC6979
dsa = { version = "=0.7.0-pre", optional = true, default-features = false }
ed25519-dalek = { version = "=2.2.0-pre", optional = true, default-features = false }
p256 = { version = "=0.14.0-pre.0", optional = true, default-features = false, features = ["ecdsa"] }
p384 = { version = "=0.14.0-pre", optional = true, default-features = false, features = ["ecdsa"] }
p521 = { version = "=0.14.0-pre", optional = true, default-features = false, features = ["ecdsa", "getrandom"] } # TODO(tarcieri): RFC6979
rand_core = { version = "0.6.4", optional = true, default-features = false }
rsa = { version = "0.9", optional = true, default-features = false, features = ["sha2"] }
sec1 = { version = "0.7.3", optional = true, default-features = false, features = ["point"] }
rsa = { version = "=0.10.0-pre.1", optional = true, default-features = false, features = ["sha2"] }
sec1 = { version = "=0.8.0-pre.1", optional = true, default-features = false, features = ["point"] }
serde = { version = "1", optional = true }
sha1 = { version = "0.10", optional = true, default-features = false }
sha1 = { version = "=0.11.0-pre.3", optional = true, default-features = false }

[dev-dependencies]
hex-literal = "0.4.1"
Expand Down
12 changes: 6 additions & 6 deletions ssh-key/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
//! if let Some(ed25519_public_key) = public_key.key_data().ed25519() {
//! assert_eq!(
//! ed25519_public_key.as_ref(),
//! [
//! &[
//! 0xb3, 0x3e, 0xae, 0xf3, 0x7e, 0xa2, 0xdf, 0x7c, 0xaa, 0x1, 0xd, 0xef, 0xde, 0xa3,
//! 0x4e, 0x24, 0x1f, 0x65, 0xf1, 0xb5, 0x29, 0xa4, 0xf4, 0x3e, 0xd1, 0x43, 0x27, 0xf5,
//! 0xc5, 0x4a, 0xab, 0x62
//! ].as_ref()
//! ]
//! );
//! }
//! # Ok(())
Expand Down Expand Up @@ -103,20 +103,20 @@
//! if let Some(ed25519_keypair) = private_key.key_data().ed25519() {
//! assert_eq!(
//! ed25519_keypair.public.as_ref(),
//! [
//! &[
//! 0xb3, 0x3e, 0xae, 0xf3, 0x7e, 0xa2, 0xdf, 0x7c, 0xaa, 0x1, 0xd, 0xef, 0xde, 0xa3,
//! 0x4e, 0x24, 0x1f, 0x65, 0xf1, 0xb5, 0x29, 0xa4, 0xf4, 0x3e, 0xd1, 0x43, 0x27, 0xf5,
//! 0xc5, 0x4a, 0xab, 0x62
//! ].as_ref()
//! ]
//! );
//!
//! assert_eq!(
//! ed25519_keypair.private.as_ref(),
//! [
//! &[
//! 0xb6, 0x6, 0xc2, 0x22, 0xd1, 0xc, 0x16, 0xda, 0xe1, 0x6c, 0x70, 0xa4, 0xd4, 0x51,
//! 0x73, 0x47, 0x2e, 0xc6, 0x17, 0xe0, 0x5c, 0x65, 0x69, 0x20, 0xd2, 0x6e, 0x56, 0xc0,
//! 0x8f, 0xb5, 0x91, 0xed
//! ].as_ref()
//! ]
//! )
//! }
//! # Ok(())
Expand Down
2 changes: 1 addition & 1 deletion ssh-key/src/private/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl Encode for Ed25519Keypair {

fn encode(&self, writer: &mut impl Writer) -> encoding::Result<()> {
self.public.encode(writer)?;
Zeroizing::new(self.to_bytes()).as_ref().encode(writer)?;
Zeroizing::new(self.to_bytes()).as_slice().encode(writer)?;
Ok(())
}
}
Expand Down

0 comments on commit c83ce7c

Please sign in to comment.