Skip to content

Commit 9881419

Browse files
seanpiankapatrickfreed
authored andcommitted
RUST-970 Upgrade to hmac 0.11 (#413)
1 parent 671b0f4 commit 9881419

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ derivative = "2.1.1"
4040
err-derive = "0.2.3"
4141
futures = "0.3.5"
4242
hex = "0.4.0"
43-
hmac = "0.10.1"
43+
hmac = "0.11"
4444
lazy_static = "1.4.0"
4545
md-5 = "0.9.1"
4646
os_info = { version = "3.0.1", default-features = false }
@@ -66,7 +66,7 @@ version = "1.6.2"
6666
optional = true
6767

6868
[dependencies.pbkdf2]
69-
version = "0.6.0"
69+
version = "0.8"
7070
default-features = false
7171

7272
[dependencies.reqwest]

src/client/auth/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ fn mac<M: Mac + NewMac>(
496496
auth_mechanism: &str,
497497
) -> Result<impl AsRef<[u8]>> {
498498
let mut mac =
499-
M::new_varkey(key).map_err(|_| Error::unknown_authentication_error(auth_mechanism))?;
499+
M::new_from_slice(key).map_err(|_| Error::unknown_authentication_error(auth_mechanism))?;
500500
mac.update(input);
501501
Ok(mac.finalize().into_bytes())
502502
}

src/client/auth/scram.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ fn xor(lhs: &[u8], rhs: &[u8]) -> Vec<u8> {
354354
}
355355

356356
fn mac_verify<M: Mac + NewMac>(key: &[u8], input: &[u8], signature: &[u8]) -> Result<()> {
357-
let mut mac = M::new_varkey(key).map_err(|_| Error::unknown_authentication_error("SCRAM"))?;
357+
let mut mac =
358+
M::new_from_slice(key).map_err(|_| Error::unknown_authentication_error("SCRAM"))?;
358359
mac.update(input);
359360
match mac.verify(signature) {
360361
Ok(_) => Ok(()),

0 commit comments

Comments
 (0)