Skip to content

Commit dcf47c9

Browse files
committed
promote sha1 to a feature
1 parent 80418dc commit dcf47c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ssh-key/src/signature.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,9 @@ impl Signer<Signature> for (&RsaKeypair, Option<HashAlg>) {
672672
Some(HashAlg::Sha256) => {
673673
rsa::pkcs1v15::SigningKey::<Sha256>::try_from(self.0)?.try_sign(message)
674674
}
675-
#[cfg(feature = "rsa-sha1")]
675+
#[cfg(all(feature = "rsa", feature = "sha1"))]
676676
None => rsa::pkcs1v15::SigningKey::<Sha1>::try_from(self.0)?.try_sign(message),
677-
#[cfg(not(feature = "rsa-sha1"))]
677+
#[cfg(not(all(feature = "rsa", feature = "sha1")))]
678678
None => return Err(Algorithm::Rsa { hash: None }.unsupported_error().into()),
679679
}
680680
.map_err(|_| signature::Error::new())?;

0 commit comments

Comments
 (0)