Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PKCS12 support #269

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions mbedtls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ byteorder = { version = "1.0.0", default-features = false }
yasna = { version = "0.2", optional = true, features = ["num-bigint", "bit-vec"] }
num-bigint = { version = "0.2", optional = true }
bit-vec = { version = "0.5", optional = true }
cbc = { version = "0.1.2", optional = true }
rc2 = { version = "0.8.1", optional = true }
cfg-if = "1.0.0"
tokio = { version = "1.16.1", optional = true }

Expand Down Expand Up @@ -72,8 +70,6 @@ zlib = ["mbedtls-sys-auto/zlib"]
time = ["mbedtls-platform-support/time"]
padlock = ["mbedtls-sys-auto/padlock"]
dsa = ["std", "yasna", "num-bigint", "bit-vec"]
pkcs12 = ["std", "yasna"]
pkcs12_rc2 = ["pkcs12", "rc2", "cbc"]
legacy_protocols = ["mbedtls-sys-auto/legacy_protocols"]
async = ["std", "tokio","tokio/net","tokio/io-util", "tokio/macros"]
async-rt = ["async", "tokio/rt", "tokio/sync", "tokio/rt-multi-thread"]
Expand Down
25 changes: 0 additions & 25 deletions mbedtls/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,28 +256,3 @@ pub fn pbkdf2_hmac(
Ok(())
}
}

pub fn pbkdf_pkcs12(
md: Type,
password: &[u8],
salt: &[u8],
id: u8,
iterations: u32,
key: &mut [u8],
) -> Result<()> {
unsafe {
pkcs12_derivation(
key.as_mut_ptr(),
key.len(),
password.as_ptr(),
password.len(),
salt.as_ptr(),
salt.len(),
md.into(),
id as i32,
iterations as i32,
)
.into_result()?;
Ok(())
}
}
3 changes: 0 additions & 3 deletions mbedtls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ pub mod ssl;
pub mod x509;
pub mod alloc;

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

// ==============
// Utility
// ==============
Expand Down
Loading