Remove the openssl dependency, fixes #4.
This commit is contained in:
parent
511eb47be9
commit
16b416a6d0
2 changed files with 3 additions and 7 deletions
|
@ -16,7 +16,7 @@ gitlab = { repository = "lumi/sasl-rs" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["scram"]
|
default = ["scram"]
|
||||||
scram = ["openssl"]
|
scram = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.10"
|
base64 = "0.10"
|
||||||
|
@ -25,7 +25,3 @@ sha-1 = "0.8"
|
||||||
sha2 = "0.8"
|
sha2 = "0.8"
|
||||||
hmac = "0.7"
|
hmac = "0.7"
|
||||||
pbkdf2 = { version = "0.3", default-features = false }
|
pbkdf2 = { version = "0.3", default-features = false }
|
||||||
|
|
||||||
[dependencies.openssl]
|
|
||||||
version = "0.10.7"
|
|
||||||
optional = true
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ pub struct Pbkdf2Sha1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Pbkdf2Sha1 {
|
impl Pbkdf2Sha1 {
|
||||||
#[cfg(feature = "openssl")]
|
#[cfg(feature = "scram")]
|
||||||
pub fn derive(password: &str, salt: &[u8], iterations: usize) -> Result<Pbkdf2Sha1, String> {
|
pub fn derive(password: &str, salt: &[u8], iterations: usize) -> Result<Pbkdf2Sha1, String> {
|
||||||
use crate::common::scram::{ScramProvider, Sha1};
|
use crate::common::scram::{ScramProvider, Sha1};
|
||||||
use crate::common::Password;
|
use crate::common::Password;
|
||||||
|
@ -48,7 +48,7 @@ pub struct Pbkdf2Sha256 {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Pbkdf2Sha256 {
|
impl Pbkdf2Sha256 {
|
||||||
#[cfg(feature = "openssl")]
|
#[cfg(feature = "scram")]
|
||||||
pub fn derive(password: &str, salt: &[u8], iterations: usize) -> Result<Pbkdf2Sha256, String> {
|
pub fn derive(password: &str, salt: &[u8], iterations: usize) -> Result<Pbkdf2Sha256, String> {
|
||||||
use crate::common::scram::{ScramProvider, Sha256};
|
use crate::common::scram::{ScramProvider, Sha256};
|
||||||
use crate::common::Password;
|
use crate::common::Password;
|
||||||
|
|
Loading…
Reference in a new issue