parent
2cefc746ce
commit
a6c8a16f46
@ -1,3 +1,4 @@
|
||||
/cookie-0.12.0.crate
|
||||
/cookie-0.14.2.crate
|
||||
/cookie-0.14.3.crate
|
||||
/cookie-0.14.4.crate
|
||||
|
@ -0,0 +1,22 @@
|
||||
diff --git a/src/secure/signed.rs b/src/secure/signed.rs
|
||||
index 2390f17..954866e 100644
|
||||
--- a/src/secure/signed.rs
|
||||
+++ b/src/secure/signed.rs
|
||||
@@ -33,7 +33,7 @@ impl<'a> SignedJar<'a> {
|
||||
/// Signs the cookie's value providing integrity and authenticity.
|
||||
fn sign_cookie(&self, cookie: &mut Cookie) {
|
||||
// Compute HMAC-SHA256 of the cookie's value.
|
||||
- let mut mac = Hmac::<Sha256>::new_varkey(&self.key).expect("good key");
|
||||
+ let mut mac = Hmac::<Sha256>::new_from_slice(&self.key).expect("good key");
|
||||
mac.update(cookie.value().as_bytes());
|
||||
|
||||
// Cookie's new value is [MAC | original-value].
|
||||
@@ -55,7 +55,7 @@ impl<'a> SignedJar<'a> {
|
||||
let digest = base64::decode(digest_str).map_err(|_| "bad base64 digest")?;
|
||||
|
||||
// Perform the verification.
|
||||
- let mut mac = Hmac::<Sha256>::new_varkey(&self.key).expect("good key");
|
||||
+ let mut mac = Hmac::<Sha256>::new_from_slice(&self.key).expect("good key");
|
||||
mac.update(value.as_bytes());
|
||||
mac.verify(&digest)
|
||||
.map(|_| value.to_string())
|
@ -0,0 +1,25 @@
|
||||
--- cookie-0.14.4/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||
+++ cookie-0.14.4/Cargo.toml 2021-08-24T20:57:01.612708+00:00
|
||||
@@ -24,7 +24,7 @@
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
[dependencies.aes-gcm]
|
||||
-version = "0.8.0"
|
||||
+version = "0.9.0"
|
||||
optional = true
|
||||
|
||||
[dependencies.base64]
|
||||
@@ -32,11 +32,11 @@
|
||||
optional = true
|
||||
|
||||
[dependencies.hkdf]
|
||||
-version = "0.10.0"
|
||||
+version = "0.11.0"
|
||||
optional = true
|
||||
|
||||
[dependencies.hmac]
|
||||
-version = "0.10.0"
|
||||
+version = "0.11.0"
|
||||
optional = true
|
||||
|
||||
[dependencies.percent-encoding]
|
@ -1 +1 @@
|
||||
SHA512 (cookie-0.14.3.crate) = a675f92c3fd600214c0d142d96b320bbf0589c274cb5ae09b0c622b083bd605f65bb5afb399884de5105d2aeae4f94cf5a76b9cb7e9ac15f463b683b156103a7
|
||||
SHA512 (cookie-0.14.4.crate) = ce9c57c7a738ed5b772b0e6d6b1fe49ff2486eea366b5883c804939a8fe5fdc3969e325712388e0a0beeae1af4bd09f84c086765566c061da136c34a424f58ff
|
||||
|
Loading…
Reference in new issue