Skip to content

Commit 7a1a106

Browse files
authored
RUST-970 Upgrade to hmac 0.11 (#413)
1 parent 53b677a commit 7a1a106

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
@@ -46,7 +46,7 @@ futures-io = "0.3.14"
4646
futures-util = { version = "0.3.14", features = ["io"] }
4747
futures-executor = "0.3.14"
4848
hex = "0.4.0"
49-
hmac = "0.10.1"
49+
hmac = "0.11"
5050
lazy_static = "1.4.0"
5151
md-5 = "0.9.1"
5252
os_info = { version = "3.0.1", default-features = false }
@@ -76,7 +76,7 @@ version = "0.20.1"
7676
optional = true
7777

7878
[dependencies.pbkdf2]
79-
version = "0.7.4"
79+
version = "0.8"
8080
default-features = false
8181

8282
[dependencies.reqwest]

src/client/auth/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ fn mac<M: Mac + NewMac>(
517517
auth_mechanism: &str,
518518
) -> Result<impl AsRef<[u8]>> {
519519
let mut mac =
520-
M::new_varkey(key).map_err(|_| Error::unknown_authentication_error(auth_mechanism))?;
520+
M::new_from_slice(key).map_err(|_| Error::unknown_authentication_error(auth_mechanism))?;
521521
mac.update(input);
522522
Ok(mac.finalize().into_bytes())
523523
}

src/client/auth/scram.rs

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

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

0 commit comments

Comments
 (0)