Skip to content

Commit

Permalink
add feature flag kdf
Browse files Browse the repository at this point in the history
  • Loading branch information
xemwebe committed Jul 19, 2023
1 parent ebe05c2 commit 8622bfd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkcs12/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.65"

[dependencies]
cfg-if = "1.0.0"
digest = { version = "0.10.7", features=["alloc"] }
digest = { version = "0.10.7", features=["alloc"], optional = true }
zeroize = "1.6.0"

[dev-dependencies]
Expand All @@ -28,3 +28,6 @@ whirlpool = "0.10.4"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
kdf = ["dep:digest"]

3 changes: 3 additions & 0 deletions pkcs12/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

//! TODO: complete PKCS#12 crate

#[cfg(feature="kdf")]
extern crate alloc;

#[cfg(feature="kdf")]
pub mod kdf;

1 change: 1 addition & 0 deletions pkcs12/tests/kdf.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature="kdf")]
/// Test cases for the key derivation functions.
/// All test cases have been verified against openssl's method `PKCS12_key_gen_utf8`.
/// See https://github.com/xemwebe/test_pkcs12_kdf for a sample program.
Expand Down

0 comments on commit 8622bfd

Please sign in to comment.