From 5337a0a14983e547cb4005f68834ebf4ec4c13f8 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 18 Jan 2019 00:04:14 +0100 Subject: [PATCH] Remove the openssl dependency, fixes #4. --- sasl/Cargo.toml | 6 +----- sasl/src/secret.rs | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/sasl/Cargo.toml b/sasl/Cargo.toml index 10c12e99..284b8f96 100644 --- a/sasl/Cargo.toml +++ b/sasl/Cargo.toml @@ -16,7 +16,7 @@ gitlab = { repository = "lumi/sasl-rs" } [features] default = ["scram"] -scram = ["openssl"] +scram = [] [dependencies] base64 = "0.10" @@ -25,7 +25,3 @@ sha-1 = "0.8" sha2 = "0.8" hmac = "0.7" pbkdf2 = { version = "0.3", default-features = false } - -[dependencies.openssl] -version = "0.10.7" -optional = true diff --git a/sasl/src/secret.rs b/sasl/src/secret.rs index 690bf36d..31f42dd9 100644 --- a/sasl/src/secret.rs +++ b/sasl/src/secret.rs @@ -19,7 +19,7 @@ pub struct Pbkdf2Sha1 { } impl Pbkdf2Sha1 { - #[cfg(feature = "openssl")] + #[cfg(feature = "scram")] pub fn derive(password: &str, salt: &[u8], iterations: usize) -> Result { use crate::common::scram::{ScramProvider, Sha1}; use crate::common::Password; @@ -54,7 +54,7 @@ pub struct Pbkdf2Sha256 { } impl Pbkdf2Sha256 { - #[cfg(feature = "openssl")] + #[cfg(feature = "scram")] pub fn derive(password: &str, salt: &[u8], iterations: usize) -> Result { use crate::common::scram::{ScramProvider, Sha256}; use crate::common::Password;