Skip to content

Commit 8036a78

Browse files
committed
Update openssl to 0.10 and fix some breakage
1 parent c85df2b commit 8036a78

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

Cargo.lock

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ semver = "0.5"
3535
url = "1.2"
3636
tar = "0.4.13"
3737

38-
openssl = "0.9.14"
38+
openssl = "0.10.0"
3939
curl = "0.4"
4040
oauth2 = "0.3"
4141
log = "0.3"

src/s3/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name = "s3"
1313
path = "lib.rs"
1414

1515
[dependencies]
16-
openssl = "0.9"
16+
openssl = "0.10"
1717
chrono = "0.4"
1818
curl = "0.4"
1919
base64 = "0.6"

src/util/hasher.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use openssl::hash::{Hasher, MessageDigest};
55
pub fn hash(data: &[u8]) -> Vec<u8> {
66
let mut hasher = Hasher::new(MessageDigest::sha256()).unwrap();
77
hasher.update(data).unwrap();
8-
hasher.finish2().unwrap().to_vec()
8+
hasher.finish().unwrap().to_vec()
99
}
1010

1111
// Can't derive debug because of Hasher.
@@ -24,13 +24,7 @@ impl<R: Read> HashingReader<R> {
2424
}
2525

2626
pub fn finalize(mut self) -> Vec<u8> {
27-
/*
28-
rustfmt wanted to merge the lines together so had to use this
29-
to stop this from occurring
30-
*/
31-
#[cfg_attr(rustfmt, rustfmt_skip)]
32-
#[allow(deprecated)]
33-
self.hasher.finish().unwrap()
27+
self.hasher.finish().unwrap().to_vec()
3428
}
3529
}
3630

0 commit comments

Comments
 (0)