Skip to content

Commit 03ffd6a

Browse files
authored
ssh-key: update signature crates (#561)
Updates `dsa` and elliptic curve dependencies: - `dsa` 0.7.0-rc.16 - `ed25519-dalek` 3.0.0-rc.1 - `p256` 0.14.0-rc.15 - `p384` 0.14.0-rc.15 - `p521` 0.14.0-rc.15
1 parent 1377518 commit 03ffd6a

3 files changed

Lines changed: 47 additions & 43 deletions

File tree

Cargo.lock

Lines changed: 38 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh-key/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ zeroize = { version = "1.9", default-features = false }
2828
# optional dependencies
2929
argon2 = { version = "0.6.0-rc.8", optional = true, default-features = false, features = ["alloc"] }
3030
bcrypt-pbkdf = { version = "0.11", optional = true, default-features = false, features = ["alloc"] }
31-
dsa = { version = "0.7.0-rc.15", optional = true, default-features = false, features = ["hazmat"] }
32-
ed25519-dalek = { version = "3.0.0-rc.0", optional = true, default-features = false }
31+
dsa = { version = "0.7.0-rc.16", optional = true, default-features = false, features = ["hazmat"] }
32+
ed25519-dalek = { version = "3.0.0-rc.1", optional = true, default-features = false }
3333
hex = { version = "0.4", optional = true, default-features = false, features = ["alloc"] }
3434
hmac = { version = "0.13", optional = true }
35-
p256 = { version = "0.14.0-rc.12", optional = true, default-features = false, features = ["ecdsa"] }
36-
p384 = { version = "0.14.0-rc.12", optional = true, default-features = false, features = ["ecdsa"] }
37-
p521 = { version = "0.14.0-rc.12", optional = true, default-features = false, features = ["ecdsa"] }
35+
p256 = { version = "0.14.0-rc.15", optional = true, default-features = false, features = ["ecdsa"] }
36+
p384 = { version = "0.14.0-rc.15", optional = true, default-features = false, features = ["ecdsa"] }
37+
p521 = { version = "0.14.0-rc.15", optional = true, default-features = false, features = ["ecdsa"] }
3838
rand_core = { version = "0.10", optional = true, default-features = false }
3939
rsa = { version = "0.10.0-rc.18", optional = true, default-features = false, features = ["sha2"] }
4040
sec1 = { version = "0.8", optional = true, default-features = false, features = ["point"] }

ssh-key/src/private/dsa.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use zeroize::Zeroize;
88

99
#[cfg(feature = "dsa")]
1010
use encoding::Uint;
11-
1211
#[cfg(all(feature = "dsa", feature = "rand_core"))]
1312
use rand_core::CryptoRng;
1413

@@ -162,8 +161,10 @@ impl DsaKeypair {
162161
#[cfg(all(feature = "dsa", feature = "rand_core"))]
163162
#[expect(clippy::missing_errors_doc, reason = "TODO")]
164163
pub fn random<R: CryptoRng + ?Sized>(rng: &mut R) -> Result<Self> {
165-
let components = dsa::Components::generate(rng, Self::KEY_SIZE);
166-
Ok(dsa::SigningKey::generate(rng, components).into())
164+
let Ok(components) =
165+
dsa::Components::try_generate_from_rng_with_key_size(rng, Self::KEY_SIZE);
166+
let Ok(sk) = dsa::SigningKey::try_generate_from_rng_with_components(rng, components);
167+
Ok(sk.into())
167168
}
168169

169170
/// Create a new [`DsaKeypair`] with the given `public` and `private` components.

0 commit comments

Comments
 (0)