You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
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
|
|
|