From ccfafce47eadb72cfebe18c8c9f3d627ef51aab2 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 10 May 2015 19:35:28 -0400 Subject: update rust version --- Cargo.lock | 72 ++++++++++++++++++++++++++++++----------------------------- Cargo.toml | 2 +- src/sha1.rs | 2 +- tests/util.rs | 8 +++---- 4 files changed, 43 insertions(+), 41 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c4ca95f..4060adf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,10 +2,10 @@ name = "matasano" version = "0.0.1" dependencies = [ - "openssl 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -15,87 +15,89 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "gcc" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "0.1.8" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libressl-pnacl-sys" -version = "2.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "pnacl-build-helper 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "log" -version = "0.3.1" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pnacl-build-helper 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl" -version = "0.5.5" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.5.5" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libressl-pnacl-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pkg-config" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pnacl-build-helper" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "rand" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-serialize" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "tempdir" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "time" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/Cargo.toml b/Cargo.toml index bbbd731..f18ef09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,6 @@ path = "tests/set4.rs" [dependencies] rustc-serialize = "0.3" -openssl = "0.5" +openssl = "0.6" rand = "0.3" time = "0.1" diff --git a/src/sha1.rs b/src/sha1.rs index 728c4db..3e97478 100644 --- a/src/sha1.rs +++ b/src/sha1.rs @@ -29,7 +29,7 @@ pub fn sha1 (bytes: &[u8]) -> [u8; 20] { }; let mut w: [u32; 80] = unsafe { ::std::mem::uninitialized() }; for i in 0..16 { - w[i] = ::std::num::Int::from_be(chunk_words[i]); + w[i] = u32::from_be(chunk_words[i]); } for i in 16..80 { w[i] = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]).rotate_left(1); diff --git a/tests/util.rs b/tests/util.rs index cd8014d..6921eea 100644 --- a/tests/util.rs +++ b/tests/util.rs @@ -13,7 +13,7 @@ use self::serialize::hex::FromHex; pub fn read_as_hex_lines (filename: &str) -> Vec> { let fh = File::open(filename).unwrap(); - return ::std::io::BufStream::new(fh) + return ::std::io::BufReader::new(fh) .lines() .map(|line| line.unwrap().from_hex().unwrap()) .collect(); @@ -21,7 +21,7 @@ pub fn read_as_hex_lines (filename: &str) -> Vec> { pub fn read_as_base64_lines (filename: &str) -> Vec> { let fh = File::open(filename).unwrap(); - return ::std::io::BufStream::new(fh) + return ::std::io::BufReader::new(fh) .lines() .map(|line| line.unwrap().from_base64().unwrap()) .collect(); @@ -29,7 +29,7 @@ pub fn read_as_base64_lines (filename: &str) -> Vec> { pub fn read_as_lines (filename: &str) -> Vec> { let fh = File::open(filename).unwrap(); - return ::std::io::BufStream::new(fh) + return ::std::io::BufReader::new(fh) .lines() .map(|line| line.unwrap().as_bytes().to_vec()) .collect(); @@ -37,7 +37,7 @@ pub fn read_as_lines (filename: &str) -> Vec> { pub fn read_as_base64 (filename: &str) -> Vec { let fh = File::open(filename).unwrap(); - return ::std::io::BufStream::new(fh) + return ::std::io::BufReader::new(fh) .lines() .map(|line| line.unwrap().from_base64().unwrap()) .collect::>>() -- cgit v1.2.3-54-g00ecf