Skip to content

Commit c3a029e

Browse files
authored
Merge pull request #849 from sfackler/md-updates
Update hash crates
2 parents c5591c8 + 76cd380 commit c3a029e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

postgres-protocol/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ base64 = "0.13"
1313
byteorder = "1.0"
1414
bytes = "1.0"
1515
fallible-iterator = "0.2"
16-
hmac = "0.11"
17-
md-5 = "0.9"
16+
hmac = "0.12"
17+
md-5 = "0.10"
1818
memchr = "2.0"
1919
rand = "0.8"
20-
sha2 = "0.9"
20+
sha2 = "0.10"
2121
stringprep = "0.1"

postgres-protocol/src/authentication/sasl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! SASL-based authentication support.
22
3-
use hmac::{Hmac, Mac, NewMac};
3+
use hmac::{Hmac, Mac};
44
use rand::{self, Rng};
55
use sha2::digest::FixedOutput;
66
use sha2::{Digest, Sha256};
@@ -275,7 +275,7 @@ impl ScramSha256 {
275275
let mut hmac = Hmac::<Sha256>::new_from_slice(&server_key)
276276
.expect("HMAC is able to accept all key sizes");
277277
hmac.update(auth_message.as_bytes());
278-
hmac.verify(&verifier)
278+
hmac.verify_slice(&verifier)
279279
.map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "SCRAM verification error"))
280280
}
281281
}

postgres-protocol/src/password/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! end up in logs pg_stat displays, etc.
88
99
use crate::authentication::sasl;
10-
use hmac::{Hmac, Mac, NewMac};
10+
use hmac::{Hmac, Mac};
1111
use md5::Md5;
1212
use rand::RngCore;
1313
use sha2::digest::FixedOutput;

tokio-postgres/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ impl<'a> UrlParser<'a> {
780780
}
781781

782782
fn take_all(&mut self) -> &'a str {
783-
mem::replace(&mut self.s, "")
783+
mem::take(&mut self.s)
784784
}
785785

786786
fn eat_byte(&mut self) {

0 commit comments

Comments
 (0)