Update to version 0.16.0; Fixes RHBZ#2036002

epel9
Fabio Valentini 3 years ago
parent f6ad62e7ff
commit f2e71bc00a
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -3,3 +3,4 @@
/cookie-0.14.3.crate
/cookie-0.14.4.crate
/cookie-0.15.1.crate
/cookie-0.16.0.crate

@ -1,22 +0,0 @@
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())

@ -1,25 +0,0 @@
--- cookie-0.15.1/Cargo.toml 1970-01-01T00:00:01+00:00
+++ cookie-0.15.1/Cargo.toml 2021-12-09T17:47:59.041554+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,11 +1,11 @@
# Generated by rust2rpm 20
# Generated by rust2rpm 21
%bcond_without check
%global debug_package %{nil}
%global crate cookie
Name: rust-%{crate}
Version: 0.15.1
Version: 0.16.0
Release: %autorelease
Summary: HTTP cookie parsing and cookie jar management
@ -13,18 +13,10 @@ Summary: HTTP cookie parsing and cookie jar management
License: MIT or ASL 2.0
URL: https://crates.io/crates/cookie
Source: %{crates_source}
# Initial patched metadata
# * bump aes-gcm from 0.8 to 0.9
# * bump hkdf from 0.10 to 0.11
# * bump hmac from 0.10 to 0.11
Patch0: cookie-fix-metadata.diff
# * patch for crypto-mac API changes
# https://github.com/SergioBenitez/cookie-rs/commit/14b053a
Patch1: 0001-port-to-crypto-mac-0.11.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
BuildRequires: rust-packaging >= 21
%global _description %{expand:
HTTP cookie parsing and cookie jar management. Supports signed and private
@ -42,9 +34,11 @@ This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license LICENSE-APACHE LICENSE-MIT
%doc CHANGELOG.md README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%license %{crate_instdir}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
@ -56,7 +50,7 @@ This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+aes-gcm-devel
Summary: %{summary}
@ -68,7 +62,7 @@ This package contains library source intended for building other packages which
use the "aes-gcm" feature of the "%{crate}" crate.
%files -n %{name}+aes-gcm-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+base64-devel
Summary: %{summary}
@ -80,7 +74,7 @@ This package contains library source intended for building other packages which
use the "base64" feature of the "%{crate}" crate.
%files -n %{name}+base64-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+hkdf-devel
Summary: %{summary}
@ -92,7 +86,7 @@ This package contains library source intended for building other packages which
use the "hkdf" feature of the "%{crate}" crate.
%files -n %{name}+hkdf-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+hmac-devel
Summary: %{summary}
@ -104,7 +98,7 @@ This package contains library source intended for building other packages which
use the "hmac" feature of the "%{crate}" crate.
%files -n %{name}+hmac-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+key-expansion-devel
Summary: %{summary}
@ -116,7 +110,7 @@ This package contains library source intended for building other packages which
use the "key-expansion" feature of the "%{crate}" crate.
%files -n %{name}+key-expansion-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+percent-encode-devel
Summary: %{summary}
@ -128,7 +122,7 @@ This package contains library source intended for building other packages which
use the "percent-encode" feature of the "%{crate}" crate.
%files -n %{name}+percent-encode-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+percent-encoding-devel
Summary: %{summary}
@ -140,7 +134,7 @@ This package contains library source intended for building other packages which
use the "percent-encoding" feature of the "%{crate}" crate.
%files -n %{name}+percent-encoding-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+private-devel
Summary: %{summary}
@ -152,7 +146,7 @@ This package contains library source intended for building other packages which
use the "private" feature of the "%{crate}" crate.
%files -n %{name}+private-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+rand-devel
Summary: %{summary}
@ -164,7 +158,7 @@ This package contains library source intended for building other packages which
use the "rand" feature of the "%{crate}" crate.
%files -n %{name}+rand-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+secure-devel
Summary: %{summary}
@ -176,7 +170,7 @@ This package contains library source intended for building other packages which
use the "secure" feature of the "%{crate}" crate.
%files -n %{name}+secure-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+sha2-devel
Summary: %{summary}
@ -188,7 +182,7 @@ This package contains library source intended for building other packages which
use the "sha2" feature of the "%{crate}" crate.
%files -n %{name}+sha2-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+signed-devel
Summary: %{summary}
@ -200,7 +194,7 @@ This package contains library source intended for building other packages which
use the "signed" feature of the "%{crate}" crate.
%files -n %{name}+signed-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+subtle-devel
Summary: %{summary}
@ -212,7 +206,7 @@ This package contains library source intended for building other packages which
use the "subtle" feature of the "%{crate}" crate.
%files -n %{name}+subtle-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1

@ -1 +1 @@
SHA512 (cookie-0.15.1.crate) = 1ea4b8508038860376ea7611928928a8009f4b6d5903a53185ec24b345ba0a16d7f054aeed2dd6e7257962a073670b9c2fd0fcec2d901bcdeca2a65a5ac4ed1a
SHA512 (cookie-0.16.0.crate) = 2e4b6c682e6289b6c5b6ad1f7d3a735f04cc984d14bd03f2897c1adb3b1f44ef4d92a864345e160efdf4e942157a8a05015ecfaf61d0088cab799116effbe8d1

Loading…
Cancel
Save