Skip to content

Commit 5cac2ed

Browse files
fix(deps): migrate to stable pkcs5 / pkcs8 / ed25519 and loosen prerelease pins
Renames the rc.13 pkcs5 call site to its 0.8.0 stable name and drops the `=` constraints introduced by 2a49916 (#697) on the RustCrypto prerelease stack. Downstream consumers that bring in newer rsa rc.X (or 0.10.0 stable, when it lands) can now resolve russh cleanly without a [patch.crates-io] override. Source change in russh/src/keys/format/pkcs8.rs: pkcs5::pbes2::Parameters::pbkdf2_sha256_aes256cbc(rounds, &salt, iv) becomes pkcs5::pbes2::Parameters::generate_pbkdf2_sha256_aes256cbc(rounds, &salt, iv) Floor bumps in russh/Cargo.toml: crypto-bigint 0.7.0-rc.28 -> 0.7.3 ecdsa 0.17.0-rc.16 -> 0.17.0-rc.18 ed25519-dalek 3.0.0-pre.6 -> 3.0.0-pre.7 elliptic-curve 0.14.0-rc.28 -> 0.14.0-rc.32 p256 / p384 / p521 0.14.0-rc.7 -> 0.14.0-rc.9 pkcs5 0.8.0-rc.13 -> 0.8 (stable) pkcs8 0.11.0-rc.11 -> 0.11 (stable) rsa 0.10.0-rc.16 -> 0.10.0-rc.18 spki 0.8.0-rc.4 -> 0.8 (stable) The `=` prefix is dropped on every line above. Each floor is the first version of the crate that compiles against the stable formats family. The cascade is forced by rsa 0.10.0-rc.16 source failing against pkcs8 0.11.0 stable (same `KeyMalformed` enum-variant rename that broke ed25519-rc.4 in the #697 report) and primefield 0.14.0-rc.7 failing against crypto-bigint 0.7.3. Other prerelease pins (aead, aes-gcm, curve25519-dalek, ml-kem, num-bigint fork, pkcs1) are left untouched. Each one's latest published version matches the pinned version today, so loosening would be a no-op for resolution. Gates run on this branch with rustc 1.88.0 (the rust-toolchain.toml floor): cargo build --workspace clean cargo build --workspace --all-features clean cargo clippy --workspace -- -D warnings clean cargo clippy --workspace --all-features -- -D warnings clean cargo fmt --check clean cargo test --workspace 76 lib tests + all submodule and doc-tests pass cargo test --workspace --all-features 77 lib tests + all submodule and doc-tests pass
1 parent c4ba20d commit 5cac2ed

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

russh/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ cipher = "0.5.1" # only pinned due to a cargo-minimal-versions failure in 0.5.0
4747
ctr = "0.9"
4848
ctr_0_10 = { package = "ctr", version = "0.10.0" }
4949
curve25519-dalek = "=5.0.0-pre.6"
50-
crypto-bigint = { version = "=0.7.0-rc.28", features = ["alloc"] }
50+
crypto-bigint = { version = "0.7.3", features = ["alloc"] }
5151
data-encoding = "2.3"
5252
delegate.workspace = true
5353
digest.workspace = true
5454
der = "0.8"
5555
des = { version = "0.8.1", optional = true }
56-
ecdsa = "=0.17.0-rc.16"
57-
ed25519-dalek = { version = "=3.0.0-pre.6", features = ["alloc", "rand_core", "pkcs8"] }
58-
elliptic-curve = { version = "=0.14.0-rc.28", features = ["ecdh"] }
56+
ecdsa = "0.17.0-rc.18"
57+
ed25519-dalek = { version = "3.0.0-pre.7", features = ["alloc", "rand_core", "pkcs8"] }
58+
elliptic-curve = { version = "0.14.0-rc.32", features = ["ecdh"] }
5959
enum_dispatch = "0.3.13"
6060
flate2 = { version = "1.0.15", optional = true }
6161
futures.workspace = true
@@ -78,19 +78,19 @@ module-lattice = "0.2"
7878
num-bigint = { package = "internal-russh-num-bigint", version = "=0.5.0", features = ["rand_0_10"] }
7979
num_bigint_0_4 = { package = "num-bigint", version = "0.4.6" }
8080
# num-integer = "0.1"
81-
p256 = { version = "=0.14.0-rc.7", features = ["ecdh"] }
82-
p384 = { version = "=0.14.0-rc.7", features = ["ecdh"] }
83-
p521 = { version = "=0.14.0-rc.7", features = ["ecdh"] }
81+
p256 = { version = "0.14.0-rc.9", features = ["ecdh"] }
82+
p384 = { version = "0.14.0-rc.9", features = ["ecdh"] }
83+
p521 = { version = "0.14.0-rc.9", features = ["ecdh"] }
8484
pbkdf2 = "0.12"
8585
pbkdf2_0_13 = { package = "pbkdf2", version = "0.13.0" }
8686
pkcs1 = { version = "=0.8.0-rc.4", optional = true }
87-
pkcs5 = "=0.8.0-rc.13"
88-
pkcs8 = { version = "=0.11.0-rc.11", features = ["encryption", "std"] }
87+
pkcs5 = "0.8"
88+
pkcs8 = { version = "0.11", features = ["encryption", "std"] }
8989
polyval = "0.7.1" # only pinned due to a cargo-minimal-versions failure in 0.7.0
9090
rand_core = { version = "0.10.0" }
9191
rand.workspace = true
9292
ring = { version = "0.17.14", optional = true }
93-
rsa = { version = "=0.10.0-rc.16", optional = true }
93+
rsa = { version = "0.10.0-rc.18", optional = true }
9494
russh-cryptovec = { version = "0.59.0", path = "../cryptovec", features = [
9595
"ssh-encoding",
9696
] }
@@ -104,7 +104,7 @@ sha2.workspace = true
104104
sha2_0_11 = { package = "sha2", version = "0.11.0" }
105105
sha3 = "0.11.0"
106106
signature.workspace = true
107-
spki = "=0.8.0-rc.4"
107+
spki = "0.8"
108108
ssh-encoding.workspace = true
109109
ssh-key.workspace = true
110110
subtle = "2.4"

russh/src/keys/format/pkcs8.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn encode_pkcs8_encrypted(
129129
rng.fill_bytes(&mut iv);
130130

131131
let doc = pvi.encrypt_with_params(
132-
pkcs5::pbes2::Parameters::pbkdf2_sha256_aes256cbc(rounds, &salt, iv)
132+
pkcs5::pbes2::Parameters::generate_pbkdf2_sha256_aes256cbc(rounds, &salt, iv)
133133
.map_err(|_| Error::InvalidParameters)?,
134134
pass,
135135
)?;

0 commit comments

Comments
 (0)