Update to 0.4.0

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 7 years ago
parent a64f80bcbb
commit a6a68d7fd6

1
.gitignore vendored

@ -1 +1,2 @@
/sha1-0.2.0.crate /sha1-0.2.0.crate
/sha1-0.4.0.crate

@ -1,36 +0,0 @@
From 04c65ea41ddd2fb20ae56517ed6ce9be2e5d3d8f Mon Sep 17 00:00:00 2001
From: Casey Rodarmor <casey@rodarmor.com>
Date: Fri, 24 Feb 2017 17:07:53 -0800
Subject: [PATCH] Update openssl dependency from 0.7 to 0.9
---
src/lib.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
index 33f24d1..738f95c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -319,8 +319,8 @@ mod tests {
let mut bytes = [0; 512];
for _ in 0..20 {
- let ty = openssl::crypto::hash::Type::SHA1;
- let mut r = openssl::crypto::hash::Hasher::new(ty);
+ let ty = openssl::hash::MessageDigest::sha1();
+ let mut r = openssl::hash::Hasher::new(ty).unwrap();
m.reset();
for _ in 0..50 {
let len = rng.gen::<usize>() % bytes.len();
@@ -328,7 +328,7 @@ mod tests {
m.update(&bytes[..len]);
r.write(&bytes[..len]).unwrap();
}
- assert_eq!(r.finish(), m.digest().bytes());
+ assert_eq!(r.finish().unwrap(), m.digest().bytes());
}
}
}
--
2.15.0

@ -5,18 +5,13 @@
%global crate sha1 %global crate sha1
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.2.0 Version: 0.4.0
Release: 3%{?dist} Release: 1%{?dist}
Summary: Minimal implementation of SHA1 for Rust Summary: Minimal implementation of SHA1 for Rust
License: BSD License: BSD
URL: https://crates.io/crates/sha1 URL: https://crates.io/crates/sha1
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump openssl to 0.9, https://github.com/mitsuhiko/rust-sha1/pull/19
Patch0: sha1-0.2.0-fix-metadata.diff
# Make it work with new openssl
Patch1: 0001-Update-openssl-dependency-from-0.7-to-0.9.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
@ -61,6 +56,9 @@ which use %{crate} from crates.io.
%{cargo_registry}/%{crate}-%{version}/ %{cargo_registry}/%{crate}-%{version}/
%changelog %changelog
* Sun Dec 31 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.0-1
- Update to 0.4.0
* Wed Nov 29 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.0-3 * Wed Nov 29 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.0-3
- Update patch - Update patch

@ -1,9 +0,0 @@
--- sha1-0.2.0/Cargo.toml 2016-07-13T16:22:04+02:00
+++ sha1-0.2.0/Cargo.toml 2017-11-29T18:04:05.810482+01:00
@@ -8,5 +8,5 @@
repository = "https://github.com/mitsuhiko/rust-sha1"
[dev-dependencies]
-openssl = "0.7"
+openssl = "0.9"
rand = "0.3"

@ -1 +1 @@
SHA512 (sha1-0.2.0.crate) = 2b0a48e1c0e498e2148b6c78245a3db3e2d825fc76257f78d85dcc730235c415a25943b9ab639e10e11d0a5c18528fea81830314c685bc120e8e8b613d27e8ac SHA512 (sha1-0.4.0.crate) = 4ed4fd956e652b3dc42ea1cb476db12e312f288f641b2ecadfb7312d88c3a04d227b1d0f17547b0989e082854aec4f5889ae3c51ec1201b9abaaee89bafd9378

Loading…
Cancel
Save