Skip to content

Commit 901370b

Browse files
committed
lint
1 parent 44c92c8 commit 901370b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

ssh-key/src/private/rsa.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ use zeroize::Zeroize;
99
#[cfg(feature = "rsa")]
1010
use {
1111
rand_core::CryptoRngCore,
12-
rsa::{
13-
pkcs1v15,
14-
traits::{PrivateKeyParts, PublicKeyParts},
15-
},
12+
rsa::{pkcs1v15, traits::PrivateKeyParts},
1613
sha2::{digest::const_oid::AssociatedOid, Digest},
1714
};
1815

16+
#[cfg(not(feature = "hazmat-allow-insecure-rsa-keys"))]
17+
use rsa::traits::PublicKeyParts;
18+
1919
/// RSA private key.
2020
#[derive(Clone)]
2121
pub struct RsaPrivateKey {

ssh-key/src/public/rsa.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use encoding::{CheckedSum, Decode, Encode, Reader, Writer};
66

77
#[cfg(feature = "rsa")]
88
use {
9-
crate::private::RsaKeypair,
109
rsa::{pkcs1v15, traits::PublicKeyParts},
1110
sha2::{digest::const_oid::AssociatedOid, Digest},
1211
};
@@ -29,7 +28,7 @@ pub struct RsaPublicKey {
2928
impl RsaPublicKey {
3029
/// Minimum allowed RSA key size.
3130
#[cfg(all(feature = "rsa", not(feature = "hazmat-allow-insecure-rsa-keys")))]
32-
pub(crate) const MIN_KEY_SIZE: usize = RsaKeypair::MIN_KEY_SIZE;
31+
pub(crate) const MIN_KEY_SIZE: usize = crate::private::RsaKeypair::MIN_KEY_SIZE;
3332

3433
/// Create a new [`RsaPublicKey`] with the given components:
3534
///

0 commit comments

Comments
 (0)