update: Bump rand 0.8 -> 0.9#177
Merged
Merged
Conversation
bssh-russh already depends on rand 0.9; our root crate was the last holdout on 0.8. Bumping to 0.9 removes a duplicate crate version from the tree and aligns with the vendored russh fork. rand 0.9's ThreadRng does not implement rand_core 0.6 traits, which is what ssh-key::PrivateKey::random requires. Switch key-generation call sites to ssh_key::rand_core::OsRng — OS entropy is the correct source for long-lived key material anyway, and thread_rng added no value. rand 0.10 is blocked: bssh-russh pins rand_core = "=0.10.0-rc-3" (pre-release) via its crypto chain, which conflicts with stable rand_core 0.10.0 required by rand 0.10. Revisit once the upstream ssh-key / rsa / ed25519-dalek chain stabilizes on rand_core 0.10.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns our root crate with `bssh-russh` which already depends on rand 0.9, eliminating a duplicate `rand`/`rand_core` copy from the dependency tree.
rand 0.9's `ThreadRng` does not implement rand_core 0.6 traits, which is what `ssh-key::PrivateKey::random` still requires. Key-generation call sites (`src/keygen/{ed25519,rsa}.rs`, `src/bin/bssh_server.rs`) now use `ssh_key::rand_core::OsRng` — OS entropy is the correct source for long-lived key material anyway, and `thread_rng` added no value there.
Why not rand 0.10?
`bssh-russh` pins `rand_core = "=0.10.0-rc-3"` (pre-release) via its crypto chain. Stable rand 0.10 requires stable `rand_core 0.10.0`, which conflicts with that pin. Revisit once the upstream `ssh-key` / `rsa` / `ed25519-dalek` chain stabilizes on rand_core 0.10.
Test plan