Skip to content

Commit

Permalink
aes,kuznyechik,threefish: Rust 1.80 lint fixes (#429)
Browse files Browse the repository at this point in the history
- add `lints.rust.unexpected_cfgs` to Cargo.toml
- threefish: fix typo in `cfg(feature = "cipher")`
  • Loading branch information
tarcieri committed Jul 26, 2024
1 parent 44be9a3 commit f701172
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion aes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ categories = ["cryptography", "no-std"]
[dependencies]
cfg-if = "1"
cipher = "=0.5.0-pre.4"
zeroize = { version = "1.5.6", optional = true, default_features = false, features = ["aarch64"] }
zeroize = { version = "1.5.6", optional = true, default-features = false, features = ["aarch64"] }

[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86"))'.dependencies]
cpufeatures = "0.2"
Expand All @@ -27,6 +27,10 @@ hex-literal = "0.3"
[features]
hazmat = [] # Expose cryptographically hazardous APIs

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ["cfg(aes_compact)", "cfg(aes_force_soft)"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
4 changes: 4 additions & 0 deletions kuznyechik/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ hex-literal = "0.4"
[features]
zeroize = ["cipher/zeroize"]

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ["cfg(kuznyechik_force_soft)"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
2 changes: 1 addition & 1 deletion threefish/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Test vectors from:
//! https://github.com/weidai11/cryptopp/blob/master/TestVectors/threefish.txt
#![cfg(featue = "cipher")]
#![cfg(feature = "cipher")]
use cipher::{Block, BlockCipherDecrypt, BlockCipherEncrypt, KeyInit};
use hex_literal::hex;
use threefish::{Threefish1024, Threefish256, Threefish512};
Expand Down

0 comments on commit f701172

Please sign in to comment.