diff --git a/COPYRIGHT b/COPYRIGHT index a19f4cb8e..d2b3001f8 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,25 +1,3 @@ Unless otherwise specified (below and/or in individual files), the code in this repository is subject to the Mozilla Public License, version 2.0 or . - -The following directories contain some amount of third-party -code and are subject to their own license terms. - -* rc_crypto, in components/support/rc_crypto heavily borrows its API - and portions of its implementation from the Rust portions of ring, - which carries an ISC-style license, reproduced below, and available at - - - Copyright 2015-2019 Brian Smith. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Cargo.lock b/Cargo.lock index 7d707f245..34e477600 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,13 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "MacTypes-sys" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "adler32" version = "1.0.3" @@ -44,6 +36,11 @@ dependencies = [ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "approx" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "argon2rs" version = "0.2.5" @@ -66,7 +63,7 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -84,7 +81,7 @@ dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -94,8 +91,8 @@ name = "backtrace-sys" version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -129,31 +126,9 @@ dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "bindgen" -version = "0.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "clang-sys 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "bitflags" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -224,22 +199,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cc" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "cexpr" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "cfg-if" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cgmath" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "approx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "chrono" version = "0.4.6" @@ -250,16 +227,6 @@ dependencies = [ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "clang-sys" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "clap" version = "2.33.0" @@ -267,7 +234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -293,7 +260,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -302,15 +269,16 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "colored" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winconsole 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -322,7 +290,7 @@ dependencies = [ "clicolors-control 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -337,7 +305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cookie" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -349,7 +317,7 @@ name = "cookie_store" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -365,20 +333,17 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.5.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "crc" @@ -408,7 +373,7 @@ dependencies = [ "csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -527,8 +492,8 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -546,15 +511,15 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ctrlc" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -586,14 +551,14 @@ name = "dirs" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_users 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dogear" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -602,7 +567,7 @@ dependencies = [ [[package]] name = "dtoa" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -616,7 +581,7 @@ dependencies = [ "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "hkdf 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.21 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -699,9 +664,9 @@ name = "failure_derive" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -766,7 +731,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -805,7 +770,7 @@ name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -846,11 +811,10 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.21 (registry+https://github.com/rust-lang/crates.io-index)", "prost 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "prost-build 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "prost-derive 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rc_crypto 0.1.0", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -884,11 +848,6 @@ dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "glob" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "h2" version = "0.1.18" @@ -906,15 +865,6 @@ dependencies = [ "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "hashbrown" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "hawk" version = "1.0.5" @@ -935,7 +885,7 @@ source = "git+https://github.com/eoger/rust-hawk?branch=use-openssl#721c7d72fb3c dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.21 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -979,7 +929,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -997,7 +947,7 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.27" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1007,17 +957,17 @@ dependencies = [ "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1029,8 +979,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.27 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.28 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1061,7 +1011,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1075,7 +1025,7 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1099,24 +1049,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.51" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "libloading" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "libsqlite3-sys" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1227,7 +1168,7 @@ name = "memchr" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1235,7 +1176,7 @@ name = "memchr" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1248,7 +1189,7 @@ name = "mime" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1275,9 +1216,9 @@ name = "miniz_oxide_c_api" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1291,7 +1232,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1312,10 +1253,10 @@ dependencies = [ [[package]] name = "mockito" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "colored 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "colored 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1337,18 +1278,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "native-tls" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.21 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.44 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1358,19 +1299,19 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nix" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1379,27 +1320,6 @@ name = "nodrop" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "nom" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nss_sys" -version = "0.1.0" -dependencies = [ - "bindgen 0.49.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num-integer" version = "0.1.39" @@ -1408,6 +1328,14 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-traits" version = "0.2.6" @@ -1418,7 +1346,7 @@ name = "num_cpus" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1433,15 +1361,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.10.20" +version = "0.10.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1451,11 +1379,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.43" +version = "0.9.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1491,18 +1419,13 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "percent-encoding" version = "1.0.1" @@ -1560,14 +1483,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "places" version = "0.1.0" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "caseless 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "cli-support 0.1.0", "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "dogear 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ctrlc 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "dogear 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "error-support 0.1.0", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1645,7 +1568,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.27" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1685,9 +1608,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1726,9 +1649,8 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mockito 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", - "rc_crypto 0.1.0", + "mockito 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.21 (registry+https://github.com/rust-lang/crates.io-index)", "rusqlite 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1765,7 +1687,7 @@ name = "quote" version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1773,7 +1695,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1783,7 +1705,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1796,7 +1718,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1807,12 +1729,12 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1859,10 +1781,10 @@ dependencies = [ [[package]] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1874,7 +1796,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1923,22 +1845,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rc_crypto" -version = "0.1.0" -dependencies = [ - "error-support 0.1.0", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "nss_sys 0.1.0", - "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rc_log_ffi" version = "0.1.0" @@ -2023,44 +1933,49 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "cookie_store 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.27 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.28 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rgb" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ring" version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2071,7 +1986,7 @@ name = "rusqlite" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "fallible-streaming-iterator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libsqlite3-sys 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2100,7 +2015,7 @@ dependencies = [ [[package]] name = "ryu" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2142,23 +2057,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "security-framework" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.2.3" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2184,9 +2097,9 @@ name = "serde_derive" version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2194,8 +2107,8 @@ name = "serde_json" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2204,8 +2117,8 @@ name = "serde_urlencoded" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2221,11 +2134,6 @@ dependencies = [ "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "shlex" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "siphasher" version = "0.2.3" @@ -2292,9 +2200,9 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2304,10 +2212,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.32" +version = "0.15.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2340,8 +2248,7 @@ dependencies = [ "interrupt 0.1.0", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", - "rc_crypto 0.1.0", + "openssl 0.10.21 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2354,9 +2261,9 @@ name = "synstructure" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2375,7 +2282,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2387,7 +2294,7 @@ version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2417,7 +2324,7 @@ name = "termion" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2428,7 +2335,7 @@ name = "termios" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2452,7 +2359,7 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2468,7 +2375,7 @@ dependencies = [ [[package]] name = "tokio" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2480,7 +2387,7 @@ dependencies = [ "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2528,12 +2435,12 @@ dependencies = [ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2555,7 +2462,7 @@ dependencies = [ [[package]] name = "tokio-threadpool" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2588,14 +2495,6 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "toml" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "try-lock" version = "0.2.2" @@ -2629,7 +2528,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2731,7 +2630,7 @@ dependencies = [ "prost 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "prost-build 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "prost-derive 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2782,7 +2681,7 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2836,6 +2735,17 @@ dependencies = [ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "winconsole" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rgb 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -2846,12 +2756,12 @@ dependencies = [ ] [metadata] -"checksum MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eaf9f0d0b1cc33a4d2aee14fb4b2eac03462ef4db29c8ac4057327d8a71ad86f" "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" "checksum android_logger 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf44378e81264148f08e58336674542f82d0021f685d0be0320c82e1653dbe0b" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum approx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08abcc3b4e9339e33a3d0a5ed15d84a687350c05689d825e0f6655eef9e76a94" "checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392" "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" @@ -2862,8 +2772,7 @@ dependencies = [ "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -"checksum bindgen 0.49.0 (registry+https://github.com/rust-lang/crates.io-index)" = "33e1b67a27bca31fd12a683b2a3618e275311117f48cfcc892e18403ff889026" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bd1fa8ad26490b0a5cfec99089952250301b6716cdeaa7c9ab229598fb82ab66" "checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" @@ -2873,21 +2782,20 @@ dependencies = [ "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum caseless 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "808dab3318747be122cb31d36de18d4d1c81277a76f8332a02b81a3d73463d7f" "checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" -"checksum cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83" -"checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" +"checksum cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a0c56216487bb80eec9c4516337b2588a4f2a2290d72a1416d930e4dcdb0c90d" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" +"checksum cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "64a4b57c8f4e3a2e9ac07e0f6abc9c24b6fc9e1b54c3478cfb598f3d0023e51c" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" -"checksum clang-sys 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4227269cec09f5f83ff160be12a1e9b0262dd1aa305302d5ba296c2ebd291055" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum clicolors-control 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73abfd4c73d003a674ce5d2933fca6ce6c42480ea84a5ffe0a2dc39ed56300f9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum colored 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e9a455e156a4271e12fd0246238c380b1e223e3736663c7a18ed8b6362028a9" +"checksum colored 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6cdb90b60f2927f8d76139c72dbde7e10c3a2bc47c8594c9c7a66529f2687c03" "checksum console 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2bf3720d3f3fc30b721ef1ae54e13af3264af4af39dc476a8de56a6ee1e2184b" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" -"checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" +"checksum cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99be24cfcf40d56ed37fd11c2123be833959bbc5bddecb46e1c2e442e15fa3e0" "checksum cookie_store 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b0d2f2ecb21dce00e2453268370312978af9b8024020c7a37ae2cc6dbbe64685" -"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" -"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" +"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" @@ -2904,13 +2812,13 @@ dependencies = [ "checksum csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9044e25afb0924b5a5fc5511689b0918629e85d68ea591e5e87fbf1e85ea1b3b" "checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65" "checksum ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4c17619643c1252b5f690084b82639dd7fac141c57c8e77a00e0148132092c" -"checksum ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "630391922b1b893692c6334369ff528dcc3a9d8061ccf4c803aa8f83cb13db5e" +"checksum ctrlc 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5531b7f0698d9220b4729f8811931dbe0e91a05be2f7b3245fdc50dd856bae26" "checksum dialoguer 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ad1c29a0368928e78c551354dbff79f103a962ad820519724ef0d74f1c62fa9" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" -"checksum dogear 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d54506b6b209740d0a7a35ca5976db1ad2ed1aa168acc3561efc6a84fa95afe" -"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" +"checksum dogear 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "30ac4a8e8f834f02deb2266b1f279aa5494e990c625d8be8f2988a7c708ba1f8" +"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" "checksum ece 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40068e2a282e5c6fc8c8881d191c3d1ffa10ada2aac0201e274e57a91004851" "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90b2c9496c001e8cb61827acdefad780795c42264c137744cae6f7d9e3450abd" @@ -2936,9 +2844,7 @@ dependencies = [ "checksum futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "62941eff9507c8177d448bd83a44d9b9760856e184081d8cd79ba9f03dd24981" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "85ab6286db06040ddefb71641b50017c06874614001a134b423783e2db2920bd" -"checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" "checksum hawk 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ccb26fc177705af37f278bb3e31643650176d265cb4d233d651dde0660c17b8c" "checksum hawk 2.0.0 (git+https://github.com/eoger/rust-hawk?branch=use-openssl)" = "" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" @@ -2948,18 +2854,17 @@ dependencies = [ "checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" -"checksum hyper 0.12.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4f2777434f26af6e4ce4fdcdccd3bed9d861d11e87bcbe72c0f51ddaca8ff848" +"checksum hyper 0.12.28 (registry+https://github.com/rust-lang/crates.io-index)" = "e8e4606fed1c162e3a63d408c07584429f49a4f34c7176cb6cbee60e78f2372c" "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" -"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" -"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" +"checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6" "checksum libsqlite3-sys 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e310445ab028c374b9efaaed4b7a52a14e3b8ad5a1351b4bbd46dec03ffce717" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" @@ -2975,27 +2880,26 @@ dependencies = [ "checksum miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum mockito 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51de2209113259eac2b0d4d96e2b8920b4936afbf1ba7bf0cbfae2903751942e" +"checksum mockito 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d303c060b18db22e0a9ac12133c32f927c3f980b6f70004bc0cb2f8accc94704" "checksum more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" "checksum multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb04b9f127583ed176e163fb9ec6f3e793b87e21deedd5734a69386a18a0151" -"checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" +"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" +"checksum nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46f0f3210768d796e8fa79ec70ee6af172dacbe7147f5e69be5240a47778302b" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" +"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" "checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" -"checksum openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)" = "5a0d6b781aac4ac1bd6cafe2a2f0ad8c16ae8e1dd5184822a16c50139f8838d9" +"checksum openssl 0.10.21 (registry+https://github.com/rust-lang/crates.io-index)" = "615b325b964d8fb0533e7fad5867f63677bbc79a274c9cd7a19443e1a6fcdd9e" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d" +"checksum openssl-sys 0.9.44 (registry+https://github.com/rust-lang/crates.io-index)" = "50bacc164f352df4c943e77e6f13a09f3dfe1407b6b144f9deba30e4b63e1db3" "checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" "checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" @@ -3005,7 +2909,7 @@ dependencies = [ "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" "checksum prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5511ca4c805aa35f0abff6be7923231d664408b60c09f44ef715f2bce106cd9e" -"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)" = "64c827cea7a7ab30ce4593e5e04d7a11617ad6ece2fa230605a78b00ff965316" "checksum prost 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96d14b1c185652833d24aaad41c5832b0be5616a590227c1fbff57c616754b23" "checksum prost-build 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eb788126ea840817128183f8f603dce02cb7aea25c2a0b764359d8e20010702e" "checksum prost-derive 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e7dc378b94ac374644181a2247cebf59a6ec1c88b49ac77f3a94b86b79d0e11" @@ -3022,7 +2926,7 @@ dependencies = [ "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" @@ -3036,21 +2940,22 @@ dependencies = [ "checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" "checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum reqwest 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "943b9f85622f53bcf71721e0996f23688e3942e51fc33766c2e24a959316767b" +"checksum reqwest 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddcfd2c13c6af0f9c45a1086be3b9c68af79e4430b42790759e2d34cce2a6c60" +"checksum rgb 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)" = "4f089652ca87f5a82a62935ec6172a534066c7b97be003cc8f702ee9a7a59c92" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" "checksum rusqlite 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "700720c977deb8b91c9d881dcbe3309c254d414078ca3856ea6647e569be3b66" "checksum rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" +"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" "checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"checksum security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfab8dda0e7a327c696d893df9ffa19cadc4bd195797997f5223cf5831beaf05" -"checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc" +"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" +"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" @@ -3058,7 +2963,6 @@ dependencies = [ "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" -"checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallbitvec 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1764fe2b30ee783bfe3b9b37b2649d8d590b3148bb12e0079715d4d5c673562e" @@ -3070,7 +2974,7 @@ dependencies = [ "checksum structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3d0760c312538987d363c36c42339b55f5ee176ea8808bbe4543d484a291c8d1" "checksum structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "528aeb7351d042e6ffbc2a6fb76a86f9b622fdf7c25932798e7a82cb03bc94c6" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" -"checksum syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" +"checksum syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)" = "ec52cd796e5f01d0067225a5392e70084acc4c0013fa71d55166d38a8b307836" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" @@ -3083,23 +2987,22 @@ dependencies = [ "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7655088894274afb52b807bd3c87072daa1fedd155068b8705cabfd628956115" -"checksum tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "65641e515a437b308ab131a82ce3042ff9795bef5d6c5a9be4eb24195c417fd9" +"checksum tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cec6c34409089be085de9403ba2010b80e36938c9ca992c4f67f407bb13db0b1" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" "checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" "checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" -"checksum tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022" +"checksum tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "5b2f843ffdf8d6e1f90bddd48da43f99ab071660cd92b7ec560ef3cdfd7a409a" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ec5759cf26cf9659555f36c431b515e3d05f66831741c85b4b5d5dfb9cf1323c" +"checksum tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72558af20be886ea124595ea0f806dd5703b8958e4705429dd58b3d8231f72f2" "checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" "checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3" -"checksum toml 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "87c5890a989fa47ecdc7bcb4c63a77a82c18f306714104b1decfd722db17b39e" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" +"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" @@ -3127,4 +3030,5 @@ dependencies = [ "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" +"checksum winconsole 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef84b96d10db72dd980056666d7f1e7663ce93d82fa33b63e71c966f4cf5032" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" diff --git a/Cargo.toml b/Cargo.toml index 3508e1f6f..99d549799 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,6 @@ members = [ "components/support/ffi", "components/support/force-viaduct-reqwest", "components/support/interrupt", - "components/support/rc_crypto", - "components/support/rc_crypto/nss_sys", "components/viaduct", "components/sync15", "components/rc_log", diff --git a/components/fxa-client/Cargo.toml b/components/fxa-client/Cargo.toml index 44ee0cb16..300203722 100644 --- a/components/fxa-client/Cargo.toml +++ b/components/fxa-client/Cargo.toml @@ -27,7 +27,6 @@ untrusted = "0.6.2" url = "1.7.1" ffi-support = { path = "../support/ffi" } viaduct = { path = "../viaduct" } -rc_crypto = { path = "../support/rc_crypto" } error-support = { path = "../support/error" } [dev-dependencies] diff --git a/components/fxa-client/src/errors.rs b/components/fxa-client/src/errors.rs index 8de009b5b..c807bb071 100644 --- a/components/fxa-client/src/errors.rs +++ b/components/fxa-client/src/errors.rs @@ -111,9 +111,6 @@ pub enum ErrorKind { info: String, }, - #[fail(display = "Crypto/NSS error: {}", _0)] - CryptoError(#[fail(cause)] rc_crypto::Error), - // Basically reimplement error_chain's foreign_links. (Ugh, this sucks) #[fail(display = "http-ece encryption error: {}", _0)] EceError(#[fail(cause)] ece::Error), @@ -156,7 +153,6 @@ pub enum ErrorKind { error_support::define_error! { ErrorKind { - (CryptoError, rc_crypto::Error), (EceError, ece::Error), (HexDecodeError, hex::FromHexError), (Base64Decode, base64::DecodeError), diff --git a/components/fxa-client/src/http_client/browser_id.rs b/components/fxa-client/src/http_client/browser_id.rs index 29a2b2572..556593356 100644 --- a/components/fxa-client/src/http_client/browser_id.rs +++ b/components/fxa-client/src/http_client/browser_id.rs @@ -9,7 +9,7 @@ use crate::{ Config, }; use hawk_request::HawkRequestBuilder; -use rc_crypto::{digest, hkdf, hmac}; +use ring::{digest, hkdf, hmac}; use rsa::RSABrowserIDKeyPair; use serde_derive::*; use serde_json::json; @@ -201,7 +201,7 @@ pub fn derive_sync_key(kb: &[u8]) -> Result> { pub fn compute_client_state(kb: &[u8]) -> Result { Ok(hex::encode( - &digest::digest(&digest::SHA256, &kb)?.as_ref()[0..16], + digest::digest(&digest::SHA256, &kb).as_ref()[0..16].to_vec(), )) } @@ -228,8 +228,8 @@ fn derive_key_from_session_token(session_token: &[u8]) -> Result> { fn derive_hkdf_sha256_key(ikm: &[u8], salt: &[u8], info: &[u8], len: usize) -> Result> { let salt = hmac::SigningKey::new(&digest::SHA256, salt); let mut out = vec![0u8; len]; - hkdf::extract_and_expand(&salt, ikm, info, &mut out)?; - Ok(out) + hkdf::extract_and_expand(&salt, ikm, info, &mut out); + Ok(out.to_vec()) } #[derive(Deserialize)] diff --git a/components/fxa-client/src/oauth.rs b/components/fxa-client/src/oauth.rs index b38aa4540..d69dfab19 100644 --- a/components/fxa-client/src/oauth.rs +++ b/components/fxa-client/src/oauth.rs @@ -7,7 +7,7 @@ use crate::{ scoped_keys::{ScopedKey, ScopedKeysFlow}, util, FirefoxAccount, RNG, }; -use rc_crypto::digest; +use ring::digest; use serde_derive::*; use std::{ collections::HashSet, @@ -123,9 +123,9 @@ impl FirefoxAccount { } fn oauth_flow(&mut self, mut url: Url, scopes: &[&str], wants_keys: bool) -> Result { - let state = util::random_base64_url_string(16)?; - let code_verifier = util::random_base64_url_string(43)?; - let code_challenge = digest::digest(&digest::SHA256, &code_verifier.as_bytes())?; + let state = util::random_base64_url_string(&*RNG, 16)?; + let code_verifier = util::random_base64_url_string(&*RNG, 43)?; + let code_challenge = digest::digest(&digest::SHA256, &code_verifier.as_bytes()); let code_challenge = base64::encode_config(&code_challenge, base64::URL_SAFE_NO_PAD); url.query_pairs_mut() .append_pair("client_id", &self.state.config.client_id) diff --git a/components/fxa-client/src/scoped_keys.rs b/components/fxa-client/src/scoped_keys.rs index 5fd9c0b03..5dd17cc14 100644 --- a/components/fxa-client/src/scoped_keys.rs +++ b/components/fxa-client/src/scoped_keys.rs @@ -4,8 +4,7 @@ use crate::{errors::*, FirefoxAccount}; use byteorder::{BigEndian, ByteOrder}; -use rc_crypto::digest; -use ring::{aead, agreement, agreement::EphemeralPrivateKey, rand::SecureRandom}; +use ring::{aead, agreement, agreement::EphemeralPrivateKey, digest, rand::SecureRandom}; use serde_derive::*; use serde_json::{self, json}; use untrusted::Input; @@ -118,7 +117,7 @@ impl ScopedKeysFlow { buf.extend_from_slice(&to_32b_buf(apv.len() as u32)); buf.extend_from_slice(apv.as_bytes()); buf.extend_from_slice(&to_32b_buf(256)); - Ok(digest::digest(&digest::SHA256, &buf)?) + Ok(digest::digest(&digest::SHA256, &buf).as_ref()[0..32].to_vec()) }, )?; diff --git a/components/fxa-client/src/util.rs b/components/fxa-client/src/util.rs index 3cee741c3..17aa96ea5 100644 --- a/components/fxa-client/src/util.rs +++ b/components/fxa-client/src/util.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use crate::errors::*; -use rc_crypto::rand; +use ring::rand::SecureRandom; use std::time::{SystemTime, UNIX_EPOCH}; // Gets the unix epoch in ms. @@ -21,9 +21,9 @@ pub fn now_secs() -> u64 { since_epoch.as_secs() } -pub fn random_base64_url_string(len: usize) -> Result { +pub fn random_base64_url_string(rng: &dyn SecureRandom, len: usize) -> Result { let mut out = vec![0u8; len]; - rand::fill(&mut out).map_err(|_| ErrorKind::RngFailure)?; + rng.fill(&mut out).map_err(|_| ErrorKind::RngFailure)?; Ok(base64::encode_config(&out, base64::URL_SAFE_NO_PAD)) } diff --git a/components/push/Cargo.toml b/components/push/Cargo.toml index 8602c41be..312d7d9c8 100644 --- a/components/push/Cargo.toml +++ b/components/push/Cargo.toml @@ -26,7 +26,6 @@ viaduct = { path = "../viaduct" } ffi-support = { path = "../support/ffi" } sql-support = { path = "../support/sql" } error-support = { path = "../support/error" } -rc_crypto = { path = "../support/rc_crypto" } [dev-dependencies] env_logger = "0.6.1" diff --git a/components/push/android/src/main/java/mozilla/appservices/push/RustError.kt b/components/push/android/src/main/java/mozilla/appservices/push/RustError.kt index 0b89c1d0d..429fd6624 100644 --- a/components/push/android/src/main/java/mozilla/appservices/push/RustError.kt +++ b/components/push/android/src/main/java/mozilla/appservices/push/RustError.kt @@ -15,7 +15,6 @@ import com.sun.jna.Structure open class PushError(msg: String) : Exception(msg) open class InternalPanic(msg: String) : PushError(msg) open class OpenSSLError(msg: String) : PushError(msg) -open class CryptoError(msg: String) : PushError(msg) open class CommunicationError(msg: String) : PushError(msg) open class CommunicationServerError(msg: String) : PushError(msg) open class AlreadyRegisteredError : PushError( @@ -72,7 +71,6 @@ open class RustError : Structure() { 31 -> return TranscodingError(message) 32 -> return EncryptionError(message) 33 -> return UrlParseError(message) - 34 -> return CryptoError(message) -1 -> return InternalPanic(message) // Note: `1` is used as a generic catch all, but we // might as well handle the others the same way. diff --git a/components/push/src/crypto.rs b/components/push/src/crypto.rs index e4c5301e8..3da49387b 100644 --- a/components/push/src/crypto.rs +++ b/components/push/src/crypto.rs @@ -19,7 +19,7 @@ use ece::{ LocalKeyPairImpl, }; use openssl::ec::EcKey; -use rc_crypto::rand; +use openssl::rand::rand_bytes; use crate::error; @@ -172,7 +172,7 @@ pub struct Crypto; pub fn get_bytes(size: usize) -> error::Result> { let mut bytes = vec![0u8; size]; - rand::fill(&mut bytes)?; + rand_bytes(bytes.as_mut_slice())?; Ok(bytes) } diff --git a/components/push/src/error.rs b/components/push/src/error.rs index 1f5132486..da489c9e4 100644 --- a/components/push/src/error.rs +++ b/components/push/src/error.rs @@ -25,7 +25,6 @@ impl From for ffi_support::ExternError { error_support::define_error! { ErrorKind { - (CryptoError, rc_crypto::Error), (StorageSqlError, rusqlite::Error), (UrlParseError, url::ParseError), } @@ -41,9 +40,6 @@ pub enum ErrorKind { #[fail(display = "Internal Error: {:?}", _0)] InternalError(String), - #[fail(display = "Crypto/NSS error: {}", _0)] - CryptoError(#[fail(cause)] rc_crypto::Error), - /// An unknown OpenSSL Cryptography error #[fail(display = "OpenSSL Error: {:?}", _0)] OpenSSLError(String), @@ -99,7 +95,6 @@ impl ErrorKind { ErrorKind::TranscodingError(_) => 31, ErrorKind::EncryptionError(_) => 32, ErrorKind::UrlParseError(_) => 33, - ErrorKind::CryptoError(_) => 34, }; ffi_support::ErrorCode::new(code) } diff --git a/components/support/rc_crypto/Cargo.toml b/components/support/rc_crypto/Cargo.toml deleted file mode 100644 index 21c4f3c68..000000000 --- a/components/support/rc_crypto/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "rc_crypto" -version = "0.1.0" -authors = ["Edouard Oger "] -edition = "2018" -license = "ISC" - -[lib] -crate-type = ["lib", "staticlib", "cdylib"] - -[dependencies] -failure = "0.1.5" -failure_derive = "0.1.5" -error-support = { path = "../error" } - -[target.'cfg(not(target_os = "ios"))'.dependencies] -nss_sys = { path = "nss_sys" } - -[target.'cfg(target_os = "ios")'.dependencies] -ring = "0.14.5" - -[dev-dependencies] -hex = "0.3.2" diff --git a/components/support/rc_crypto/README.md b/components/support/rc_crypto/README.md deleted file mode 100644 index 1250d8d98..000000000 --- a/components/support/rc_crypto/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# rc_crypto - -rc_crypto, like its name infers, handles all of our cryptographic needs. - -It is backed by the Mozilla-sponsored NSS library through the `nss-sys` crate (more information [here](nss_sys/README.md)). - -It pretty much follows the very rust-idiomatic [ring crate API](https://briansmith.org/rustdoc/ring/). - -## License - -This derives its API and portions of its implementation from the the [`ring`](https://github.com/briansmith/ring/) project, which is available under an ISC-style license. See the COPYRIGHT file, or https://github.com/briansmith/ring/blob/master/LICENSE for details. diff --git a/components/support/rc_crypto/nss_sys/Cargo.toml b/components/support/rc_crypto/nss_sys/Cargo.toml deleted file mode 100644 index ab7f1ef1c..000000000 --- a/components/support/rc_crypto/nss_sys/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "nss_sys" -version = "0.1.0" -authors = ["Edouard Oger "] -edition = "2018" -license = "MPL-2.0" - -[lib] -crate-type = ["lib", "staticlib", "cdylib"] - -[dependencies] -libloading = "0.5.0" -lazy_static = "1.3.0" - -[build-dependencies] -bindgen = "0.49.0" -serde = "1.0.90" -serde_derive = "1.0.90" -toml = "0.5.0" diff --git a/components/support/rc_crypto/nss_sys/README.md b/components/support/rc_crypto/nss_sys/README.md deleted file mode 100644 index 5324546c5..000000000 --- a/components/support/rc_crypto/nss_sys/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## nss_sys - -NSS bindings for Rust. - -These bindings are implemented using `dlopen`/`dlsym` instead of linking against libnss. -This is so we can re-use the NSS library shipped with GeckoView on Fenix and reference-browser. -On Lockbox Android, or even in unit tests artifacts, we ship these library files ourselves alongside our compiled Rust library. - -On iOS the situation is different, we dynamically link because Apple [discourages using `dlopen`](https://github.com/nicklockwood/GZIP/issues/24). diff --git a/components/support/rc_crypto/nss_sys/bindings.toml b/components/support/rc_crypto/nss_sys/bindings.toml deleted file mode 100644 index 484d6ea2f..000000000 --- a/components/support/rc_crypto/nss_sys/bindings.toml +++ /dev/null @@ -1,57 +0,0 @@ -# In this file, every section corresponds to a header file. -# A corresponding binding file will be created in $OUT_DIR. - -headers = [ - "blapit.h", - "nss.h", - "seccomon.h", - "secoidt.h", - "prtypes.h", - "prerror.h", - "pk11pub.h", - "pkcs11t.h", -] -enums = [ - "PK11Origin", - "SECOidTag", - "SECStatus", - "SECItemType", -] -types = [ - "PRBool", - "PRInt32", - "PRUint32", - "PRErrorCode", - "NSSInitContext", - "NSSInitParameters", - "SECItem", - "SECOidTag", - "SECStatus", - "CK_NSS_HKDFParams", - "CK_ATTRIBUTE_TYPE", - "CK_MECHANISM_TYPE", - "PK11Context", - "PK11SlotInfo", - "PK11SymKey", - "PK11Origin", -] -opaque = [ - "NSSInitContext", - "NSSInitParameters", - "PK11Context", - "PK11SlotInfo", - "PK11SymKey", -] -variables = [ - "NSS_INIT_FORCEOPEN", - "NSS_INIT_NOCERTDB", - "NSS_INIT_NOMODDB", - "NSS_INIT_OPTIMIZESPACE", - "NSS_INIT_READONLY", - "CKA_SIGN", - "CKA_WRAP", - "CKM_SHA256_HMAC", - "CKM_SHA512_HMAC", - "CKM_NSS_HKDF_SHA256", - "HASH_LENGTH_MAX", -] diff --git a/components/support/rc_crypto/nss_sys/build.rs b/components/support/rc_crypto/nss_sys/build.rs deleted file mode 100644 index 02e9dfab5..000000000 --- a/components/support/rc_crypto/nss_sys/build.rs +++ /dev/null @@ -1,200 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -use bindgen::Builder; -use serde_derive::Deserialize; -use std::{ - env, - ffi::OsString, - fs, - path::{Path, PathBuf}, - process::Command, -}; -use toml; - -const BINDINGS_CONFIG: &'static str = "bindings.toml"; - -// This is the format of a single section of the configuration file. -#[derive(Deserialize)] -struct Bindings { - // The .h header files to generate from. - headers: Vec, - // types that are explicitly included - types: Option>, - // (un-used) functions that are explicitly included - // functions: Option>, - // variables (and `#define`s) that are explicitly included - variables: Option>, - // types that should be explicitly marked as opaque - opaque: Option>, - // enumerations that are turned into a module (without this, the enum is - // mapped using the default, which means that the individual values are - // formed with an underscore as _). - enums: Option>, - - // Any item that is specifically excluded; if none of the types, functions, - // or variables fields are specified, everything defined will be mapped, - // so this can be used to limit that. - exclude: Option>, -} - -fn env(name: &str) -> Option { - println!("cargo:rerun-if-env-changed={}", name); - env::var_os(name) -} - -fn main() { - let (lib_dir, include_dir) = get_nss(); - // See https://kazlauskas.me/entries/writing-proper-buildrs-scripts.html. - let target_os = env::var("CARGO_CFG_TARGET_OS"); - // Only iOS dynamically links with NSS. All the other platforms dlopen. - if let Ok("ios") = target_os.as_ref().map(|x| &**x) { - println!( - "cargo:rustc-link-search=native={}", - lib_dir.to_string_lossy() - ); - println!("cargo:include={}", include_dir.to_string_lossy()); - } - let config_file = PathBuf::from(BINDINGS_CONFIG); - println!("cargo:rerun-if-changed={}", config_file.to_str().unwrap()); - let config = fs::read_to_string(config_file).expect("unable to read binding configuration"); - let bindings: Bindings = toml::from_str(&config).unwrap(); - build_bindings(&bindings, &include_dir.join("nss")); -} - -fn get_nss() -> (PathBuf, PathBuf) { - let nss_dir = env("NSS_DIR").expect("To build nss_sys, NSS_DIR must be set!"); - let nss_dir = Path::new(&nss_dir); - let lib_dir = nss_dir.join("lib"); - let include_dir = nss_dir.join("include"); - (lib_dir, include_dir) -} - -fn build_bindings(bindings: &Bindings, include_dir: &PathBuf) { - let out = PathBuf::from(env::var("OUT_DIR").unwrap()).join("nss_bindings.rs"); - let mut builder = Builder::default().generate_comments(false); - - for h in bindings.headers.iter().cloned() { - builder = builder.header(include_dir.join(h).to_str().unwrap()); - } - - // Fix our cross-compilation include directories. - builder = fix_include_dirs(builder); - - // Apply the configuration. - let empty: Vec = vec![]; - for v in bindings.types.as_ref().unwrap_or_else(|| &empty).iter() { - builder = builder.whitelist_type(v); - } - // for v in bindings.functions.as_ref().unwrap_or_else(|| &empty).iter() { - // builder = builder.whitelist_function(v); - // } - for v in bindings.variables.as_ref().unwrap_or_else(|| &empty).iter() { - builder = builder.whitelist_var(v); - } - for v in bindings.exclude.as_ref().unwrap_or_else(|| &empty).iter() { - builder = builder.blacklist_item(v); - } - for v in bindings.opaque.as_ref().unwrap_or_else(|| &empty).iter() { - builder = builder.opaque_type(v); - } - for v in bindings.enums.as_ref().unwrap_or_else(|| &empty).iter() { - builder = builder.constified_enum_module(v); - } - - let bindings = builder.generate().expect("unable to generate bindings"); - bindings - .write_to_file(out) - .expect("couldn't write bindings"); -} - -fn fix_include_dirs(mut builder: Builder) -> Builder { - let target_os = env::var("CARGO_CFG_TARGET_OS"); - let target_arch = env::var("CARGO_CFG_TARGET_ARCH"); - match target_os.as_ref().map(|x| &**x) { - Ok("macos") => { - // Cheap and dirty way to detect we are cross-compiling. - if env::var_os("CI").is_some() { - builder = builder - .detect_include_paths(false) - .clang_arg("-isysroot/tmp/MacOSX10.11.sdk"); - } - } - Ok("windows") => { - if env::var_os("CI").is_some() { - builder = builder.clang_arg("-D_M_X64"); - } - } - Ok("ios") => { - let sdk_root; - match target_arch.as_ref().map(|x| &**x).unwrap() { - "aarch64" => { - sdk_root = get_ios_sdk_root("iphoneos"); - builder = builder.clang_arg("--target=arm64-apple-ios") // See https://github.com/rust-lang/rust-bindgen/issues/1211 - } - "x86_64" => { - sdk_root = get_ios_sdk_root("iphonesimulator"); - } - _ => panic!("Unknown iOS architecture."), - } - builder = builder - .detect_include_paths(false) - .clang_arg(format!("-isysroot{}", &sdk_root)); - } - Ok("android") => { - let (android_api_version, _ndk_root, toolchain_dir) = get_android_env(); - let mut toolchain = target_arch.as_ref().map(|x| &**x).unwrap(); - // The other architectures map perfectly to what libs/setup_toolchains_local.sh produces. - if toolchain == "aarch64" { - toolchain = "arm64"; - } - builder = builder - .detect_include_paths(false) - .clang_arg(format!( - "--sysroot={}", - &toolchain_dir - .join(format!("{}-{}/sysroot", toolchain, android_api_version)) - .to_str() - .unwrap() - )) - .clang_arg(format!("-D__ANDROID_API__={}", android_api_version)) - // stddef.h isn't defined otherwise. - .clang_arg(format!( - "-I{}", - toolchain_dir - .join(format!( - "{}-{}/lib64/clang/5.0/include/", - toolchain, android_api_version - )) - .to_str() - .unwrap() - )) - } - _ => {} - } - return builder; -} - -fn get_android_env() -> (String, PathBuf, PathBuf) { - return ( - // This variable is not mandatory for building yet, so fall back to 21. - env::var("ANDROID_NDK_API_VERSION").unwrap_or("21".to_string()), - PathBuf::from(env::var("ANDROID_NDK_ROOT").unwrap()), - PathBuf::from(env::var("ANDROID_NDK_TOOLCHAIN_DIR").unwrap()), - ); -} - -fn get_ios_sdk_root(sdk_name: &str) -> String { - let output = Command::new("xcrun") - .arg("--show-sdk-path") - .arg("-sdk") - .arg(sdk_name) - .output() - .unwrap(); - if output.status.success() { - String::from_utf8(output.stdout).unwrap().trim().to_string() - } else { - panic!("Could not get iOS SDK root!") - } -} diff --git a/components/support/rc_crypto/nss_sys/src/bindings.rs b/components/support/rc_crypto/nss_sys/src/bindings.rs deleted file mode 100644 index 9381cedc4..000000000 --- a/components/support/rc_crypto/nss_sys/src/bindings.rs +++ /dev/null @@ -1,5 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -include!(concat!(env!("OUT_DIR"), "/nss_bindings.rs")); diff --git a/components/support/rc_crypto/nss_sys/src/lib.rs b/components/support/rc_crypto/nss_sys/src/lib.rs deleted file mode 100644 index e957eb6e4..000000000 --- a/components/support/rc_crypto/nss_sys/src/lib.rs +++ /dev/null @@ -1,81 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] - -#[cfg_attr(feature = "cargo-clippy", allow(clippy::all))] -mod bindings; - -pub use bindings::*; -use std::os::raw::{c_char, c_int, c_uchar, c_uint, c_void}; - -// Remap some constants. -pub const SECSuccess: SECStatus = _SECStatus_SECSuccess; -pub const SECFailure: SECStatus = _SECStatus_SECFailure; -pub const PR_FALSE: PRBool = 0; -pub const PR_TRUE: PRBool = 1; -pub const CK_FALSE: CK_BBOOL = 0; -pub const CK_TRUE: CK_BBOOL = 1; - -// This is the version this crate is claiming to be compatible with. -// We check it at runtime using `NSS_VersionCheck`. -pub const COMPATIBLE_NSS_VERSION: &str = "3.26"; - -// Code adapted from https://stackoverflow.com/a/35591693. I am not this kind of smart. -macro_rules! nss_exports { - ($(unsafe fn $fn_name:ident($($arg:ident: $argty:ty),*)$( -> $ret:ty)?;)*) => {$( - #[cfg(not(target_os = "ios"))] - lazy_static::lazy_static! { - pub static ref $fn_name: libloading::Symbol<'static, unsafe extern fn($($arg: $argty),*)$( -> $ret)?> = { - unsafe { - LIBNSS3.get(stringify!($fn_name).as_bytes()).expect(stringify!(Could not get $fn_name handle)) - } - }; - } - #[cfg(target_os = "ios")] - extern "C" { - pub fn $fn_name($($arg: $argty),*)$( -> $ret)?; - } - )*}; -} - -#[cfg(not(target_os = "ios"))] -lazy_static::lazy_static! { - // Lib handle. - static ref LIBNSS3: libloading::Library = { - #[cfg(any(target_os = "macos", target_os = "ios"))] - const LIB_NAME: &str = "libnss3.dylib"; - #[cfg(any(target_os = "linux", target_os = "android"))] - const LIB_NAME: &str = "libnss3.so"; - #[cfg(target_os = "windows")] - const LIB_NAME: &str = "nss3.dll"; - libloading::Library::new(LIB_NAME).expect("Cannot load libnss3.") - }; -} - -nss_exports! { - unsafe fn PR_GetError() -> PRErrorCode; - unsafe fn PR_GetErrorTextLength() -> PRInt32; - unsafe fn PR_GetErrorText(out: *mut c_uchar) -> PRInt32; - unsafe fn NSS_NoDB_Init(configdir: *const c_char) -> SECStatus; - unsafe fn NSS_InitContext(configdir: *const c_char, certPrefix: *const c_char, keyPrefix: *const c_char, secmodName: *const c_char, initParams: *mut NSSInitParameters, flags: PRUint32) -> *mut NSSInitContext; - unsafe fn NSS_IsInitialized() -> PRBool; - unsafe fn NSS_GetVersion() -> *const c_char; - unsafe fn NSS_VersionCheck(importedVersion: *const c_char) -> PRBool; - unsafe fn NSS_SecureMemcmp(ia: *const c_void, ib: *const c_void, n: usize) -> c_int; - unsafe fn PK11_HashBuf(hashAlg: SECOidTag::Type, out: *mut c_uchar, r#in: *const c_uchar, len: PRInt32) -> SECStatus; - unsafe fn PK11_FreeSlot(slot: *mut PK11SlotInfo); - unsafe fn PK11_FreeSymKey(symKey: *mut PK11SymKey); - unsafe fn PK11_DestroyContext(context: *mut PK11Context, freeit: PRBool); - unsafe fn PK11_GetInternalSlot() -> *mut PK11SlotInfo; - unsafe fn PK11_ImportSymKey(slot: *mut PK11SlotInfo, r#type: CK_MECHANISM_TYPE, origin: PK11Origin::Type, operation: CK_ATTRIBUTE_TYPE, key: *mut SECItem, wincx: *mut c_void) -> *mut PK11SymKey; - unsafe fn PK11_CreateContextBySymKey(r#type: CK_MECHANISM_TYPE, operation: CK_ATTRIBUTE_TYPE, symKey: *mut PK11SymKey, param: *mut SECItem) -> *mut PK11Context; - unsafe fn PK11_DigestBegin(cx: *mut PK11Context) -> SECStatus; - unsafe fn PK11_DigestOp(context: *mut PK11Context, r#in: *const c_uchar, len: c_uint) -> SECStatus; - unsafe fn PK11_DigestFinal(context: *mut PK11Context, data: *mut c_uchar, outLen: *mut c_uint, len: c_uint) -> SECStatus; - unsafe fn PK11_GenerateRandom(data: *mut c_uchar, len: c_int) -> SECStatus; - unsafe fn PK11_Derive(baseKey: *mut PK11SymKey, mechanism: CK_MECHANISM_TYPE, param: *mut SECItem, target: CK_MECHANISM_TYPE, operation: CK_ATTRIBUTE_TYPE, keySize: c_int) -> *mut PK11SymKey; - unsafe fn PK11_ExtractKeyValue(symKey: *mut PK11SymKey) -> SECStatus; - unsafe fn PK11_GetKeyData(symKey: *mut PK11SymKey) -> *mut SECItem; -} diff --git a/components/support/rc_crypto/src/constant_time.rs b/components/support/rc_crypto/src/constant_time.rs deleted file mode 100644 index 7f1fd4d7a..000000000 --- a/components/support/rc_crypto/src/constant_time.rs +++ /dev/null @@ -1,57 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use crate::error::*; -#[cfg(not(target_os = "ios"))] -use crate::util::ensure_nss_initialized; -use std::os::raw::c_void; - -/// Returns `Ok(())` if `a == b` and `Error` otherwise. -/// The comparison of `a` and `b` is done in constant time with respect to the -/// contents of each, but NOT in constant time with respect to the lengths of -/// `a` and `b`. -#[cfg(not(target_os = "ios"))] -pub fn verify_slices_are_equal(a: &[u8], b: &[u8]) -> Result<()> { - // NSS_SecureMemcmp will compare N elements fron our slices, - // so make sure they are the same length first. - if a.len() != b.len() { - return Err(ErrorKind::InternalError.into()); - } - ensure_nss_initialized(); - - let result = unsafe { - nss_sys::NSS_SecureMemcmp( - a.as_ptr() as *const c_void, - b.as_ptr() as *const c_void, - a.len(), - ) - }; - match result { - 0 => Ok(()), - _ => Err(ErrorKind::InternalError.into()), - } -} -#[cfg(target_os = "ios")] -pub fn verify_slices_are_equal(a: &[u8], b: &[u8]) -> Result<()> { - ring::constant_time::verify_slices_are_equal(a, b).map_err(|_| ErrorKind::InternalError.into()) -} - -#[cfg(test)] -mod tests { - use super::*; - #[test] - fn does_compare() { - assert!(verify_slices_are_equal(b"bobo", b"bobo").is_ok()); - assert!(verify_slices_are_equal(b"bobo", b"obob").is_err()); - assert!(verify_slices_are_equal(b"bobo", b"notbobo").is_err()); - } -} diff --git a/components/support/rc_crypto/src/digest.rs b/components/support/rc_crypto/src/digest.rs deleted file mode 100644 index 7fdb8844a..000000000 --- a/components/support/rc_crypto/src/digest.rs +++ /dev/null @@ -1,102 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use crate::error::*; -#[cfg(not(target_os = "ios"))] -use crate::util::{ensure_nss_initialized, map_nss_secstatus}; -use std::convert::TryFrom; - -pub enum Algorithm { - SHA256, -} -pub use Algorithm::*; - -impl Algorithm { - fn result_len(&self) -> usize { - match self { - Algorithm::SHA256 => 32, - } - } -} - -#[cfg(not(target_os = "ios"))] -impl From<&Algorithm> for nss_sys::SECOidTag::Type { - fn from(alg: &Algorithm) -> Self { - match alg { - Algorithm::SHA256 => nss_sys::SECOidTag::SEC_OID_SHA256, - } - } -} - -/// A calculated digest value. -#[derive(Clone)] -pub struct Digest { - pub(crate) value: Vec, - pub(crate) algorithm: &'static Algorithm, -} - -impl Digest { - pub fn algorithm(&self) -> &'static Algorithm { - self.algorithm - } -} - -impl AsRef<[u8]> for Digest { - fn as_ref(&self) -> &[u8] { - self.value.as_ref() - } -} - -/// Returns the digest of data using the given digest algorithm. -#[cfg(not(target_os = "ios"))] -pub fn digest(algorithm: &'static Algorithm, data: &[u8]) -> Result { - let mut out_buf = vec![0u8; algorithm.result_len()]; - ensure_nss_initialized(); - let data_len = i32::try_from(data.len())?; - map_nss_secstatus(|| unsafe { - nss_sys::PK11_HashBuf( - algorithm.into(), - out_buf.as_mut_ptr(), - data.as_ptr(), - data_len, - ) - })?; - Ok(Digest { - value: out_buf, - algorithm, - }) -} - -#[cfg(target_os = "ios")] -pub fn digest(algorithm: &'static Algorithm, data: &[u8]) -> Result { - let ring_alg = match algorithm { - Algorithm::SHA256 => &ring::digest::SHA256, - }; - let ring_digest = ring::digest::digest(&ring_alg, data); - Ok(Digest { - value: ring_digest.as_ref().to_vec(), - algorithm, - }) -} - -#[cfg(test)] -mod tests { - use super::*; - use hex; - #[test] - fn sha256_digest() { - assert_eq!( - hex::encode(&digest(&SHA256, b"bobo").unwrap()), - "bf0c97708b849de696e7373508b13c5ea92bafa972fc941d694443e494a4b84d" - ); - } -} diff --git a/components/support/rc_crypto/src/error.rs b/components/support/rc_crypto/src/error.rs deleted file mode 100644 index 7866fb2bd..000000000 --- a/components/support/rc_crypto/src/error.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use failure::Fail; - -#[derive(Debug, Fail)] -pub enum ErrorKind { - #[fail(display = "NSS could not be initialized")] - NSSInitFailure, - #[fail(display = "NSS error: {} {}", _0, _1)] - NSSError(i32, String), - #[fail(display = "Internal error")] - InternalError, - #[fail(display = "Conversion error: {}", _0)] - ConversionError(#[fail(cause)] std::num::TryFromIntError), -} - -error_support::define_error! { - ErrorKind { - (ConversionError, std::num::TryFromIntError), - } -} diff --git a/components/support/rc_crypto/src/hkdf.rs b/components/support/rc_crypto/src/hkdf.rs deleted file mode 100644 index 413e8f5d0..000000000 --- a/components/support/rc_crypto/src/hkdf.rs +++ /dev/null @@ -1,123 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use crate::{digest, error::*, hmac}; -#[cfg(not(target_os = "ios"))] -use crate::{ - p11, - util::{ensure_nss_initialized, map_nss_secstatus}, -}; -#[cfg(not(target_os = "ios"))] -use nss_sys::*; -use std::{ - convert::TryFrom, - mem, - os::raw::{c_uchar, c_ulong}, - ptr, -}; - -pub fn extract_and_expand( - salt: &hmac::SigningKey, - secret: &[u8], - info: &[u8], - out: &mut [u8], -) -> Result<()> { - let prk = extract(salt, secret)?; - expand(&prk, info, out)?; - Ok(()) -} - -pub fn extract(salt: &hmac::SigningKey, secret: &[u8]) -> Result { - let prk = hmac::sign(salt, secret)?; - Ok(hmac::SigningKey::new(salt.digest_algorithm(), prk.as_ref())) -} - -#[cfg(target_os = "ios")] -pub fn expand(prk: &hmac::SigningKey, info: &[u8], out: &mut [u8]) -> Result<()> { - let ring_digest = match prk.digest_alg { - digest::Algorithm::SHA256 => &ring::digest::SHA256, - }; - let ring_prk = ring::hmac::SigningKey::new(&ring_digest, &prk.key_value); - ring::hkdf::expand(&ring_prk, info, out); - Ok(()) -} - -#[cfg(not(target_os = "ios"))] -pub fn expand(prk: &hmac::SigningKey, info: &[u8], out: &mut [u8]) -> Result<()> { - let mech = match prk.digest_algorithm() { - digest::Algorithm::SHA256 => CKM_NSS_HKDF_SHA256, - }; - ensure_nss_initialized(); - // Most of the following code is inspired by the Firefox WebCrypto implementation: - // https://searchfox.org/mozilla-central/rev/ee3905439acbf81e9c829ece0b46d09d2fa26c5c/dom/crypto/WebCryptoTask.cpp#2530-2597 - // Except that we only do the expand part, which explains why we use null pointers bellow. - let mut hkdf_params = CK_NSS_HKDFParams { - bExtract: CK_FALSE, - pSalt: ptr::null_mut(), - ulSaltLen: 0, - bExpand: CK_TRUE, - pInfo: info.as_ptr() as *mut u8, - ulInfoLen: c_ulong::try_from(info.len())?, - }; - let mut params = SECItem { - type_: SECItemType::siBuffer, - data: &mut hkdf_params as *mut _ as *mut c_uchar, - len: u32::try_from(mem::size_of::())?, - }; - let base_key = p11::import_sym_key(mech.into(), CKA_WRAP.into(), &prk.key_value)?; - let len = i32::try_from(out.len())?; - let sym_key = p11::SymKey::from_ptr(unsafe { - // CKM_SHA512_HMAC and CKA_SIGN are key type and usage attributes of the - // derived symmetric key and don't matter because we ignore them anyway. - PK11_Derive( - base_key.as_mut_ptr(), - mech.into(), - &mut params, - CKM_SHA512_HMAC.into(), - CKA_SIGN.into(), - len, - ) - })?; - - map_nss_secstatus(|| unsafe { PK11_ExtractKeyValue(sym_key.as_mut_ptr()) })?; - - // This doesn't leak, because the SECItem* returned by PK11_GetKeyData - // just refers to a buffer managed by `symKey` which we copy into `out`. - let key_data = unsafe { *PK11_GetKeyData(sym_key.as_mut_ptr()) }; - if u32::try_from(out.len())? > key_data.len { - return Err(ErrorKind::InternalError.into()); - } - let key_data_len = usize::try_from(key_data.len)?; - let buf = unsafe { std::slice::from_raw_parts(key_data.data, key_data_len) }; - out.copy_from_slice(&buf[0..out.len()]); - Ok(()) -} - -#[cfg(test)] -mod tests { - use super::*; - use hex; - #[test] - fn hkdf_extract_expand() { - let secret = hex::decode("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b").unwrap(); - let salt = hex::decode("000102030405060708090a0b0c").unwrap(); - let info = hex::decode("f0f1f2f3f4f5f6f7f8f9").unwrap(); - let expected_out = hex::decode( - "3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d5b887185865", - ) - .unwrap(); - let salt = hmac::SigningKey::new(&digest::SHA256, &salt); - let mut out = vec![0u8; expected_out.len()]; - extract_and_expand(&salt, &secret, &info, &mut out).unwrap(); - assert_eq!(out, expected_out); - } -} diff --git a/components/support/rc_crypto/src/hmac.rs b/components/support/rc_crypto/src/hmac.rs deleted file mode 100644 index e95127a28..000000000 --- a/components/support/rc_crypto/src/hmac.rs +++ /dev/null @@ -1,143 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use crate::{constant_time, digest, error::*}; -#[cfg(not(target_os = "ios"))] -use crate::{ - p11, - util::{ensure_nss_initialized, map_nss_secstatus}, -}; -use std::convert::TryFrom; - -/// A calculated signature value. -#[derive(Clone)] -pub struct Signature(digest::Digest); - -impl AsRef<[u8]> for Signature { - #[inline] - fn as_ref(&self) -> &[u8] { - self.0.as_ref() - } -} - -/// A key to use for HMAC signing. -pub struct SigningKey { - pub(crate) digest_alg: &'static digest::Algorithm, - pub(crate) key_value: Vec, -} - -impl SigningKey { - pub fn new(digest_alg: &'static digest::Algorithm, key_value: &[u8]) -> Self { - SigningKey { - digest_alg, - key_value: key_value.to_vec(), - } - } - - #[inline] - pub fn digest_algorithm(&self) -> &'static digest::Algorithm { - self.digest_alg - } -} - -/// A key to use for HMAC authentication. -pub struct VerificationKey { - wrapped: SigningKey, -} - -impl VerificationKey { - pub fn new(digest_alg: &'static digest::Algorithm, key_value: &[u8]) -> Self { - VerificationKey { - wrapped: SigningKey::new(digest_alg, key_value), - } - } - - #[inline] - pub fn digest_algorithm(&self) -> &'static digest::Algorithm { - self.wrapped.digest_algorithm() - } -} - -/// Calculate the HMAC of `data` using `key` and verify it correspond to the provided signature. -pub fn verify(key: &VerificationKey, data: &[u8], signature: &[u8]) -> Result<()> { - verify_with_own_key(&key.wrapped, data, signature) -} - -/// Equivalent to `verify` but allows the consumer to pass a `SigningKey`. -pub fn verify_with_own_key(key: &SigningKey, data: &[u8], signature: &[u8]) -> Result<()> { - constant_time::verify_slices_are_equal(sign(key, data)?.as_ref(), signature) -} - -/// Calculate the HMAC of `data` using `key`. -#[cfg(not(target_os = "ios"))] -pub fn sign(key: &SigningKey, data: &[u8]) -> Result { - let mech = match key.digest_alg { - digest::Algorithm::SHA256 => nss_sys::CKM_SHA256_HMAC, - }; - ensure_nss_initialized(); - let sym_key = p11::import_sym_key(mech.into(), nss_sys::CKA_SIGN.into(), &key.key_value)?; - let context = p11::create_context_by_sym_key(mech.into(), nss_sys::CKA_SIGN.into(), &sym_key)?; - map_nss_secstatus(|| unsafe { nss_sys::PK11_DigestBegin(context.as_mut_ptr()) })?; - let data_len = u32::try_from(data.len())?; - map_nss_secstatus(|| unsafe { - nss_sys::PK11_DigestOp(context.as_mut_ptr(), data.as_ptr(), data_len) - })?; - // We allocate the maximum possible length for the out buffer then we'll - // slice it after nss fills `out_len`. - let mut out_len: u32 = 0; - let mut out = vec![0u8; nss_sys::HASH_LENGTH_MAX as usize]; - map_nss_secstatus(|| unsafe { - nss_sys::PK11_DigestFinal( - context.as_mut_ptr(), - out.as_mut_ptr(), - &mut out_len, - nss_sys::HASH_LENGTH_MAX, - ) - })?; - out.truncate(usize::try_from(out_len)?); - Ok(Signature(digest::Digest { - value: out, - algorithm: key.digest_alg, - })) -} - -#[cfg(target_os = "ios")] -pub fn sign(key: &SigningKey, data: &[u8]) -> Result { - let ring_digest = match key.digest_alg { - digest::Algorithm::SHA256 => &ring::digest::SHA256, - }; - let ring_key = ring::hmac::SigningKey::new(&ring_digest, &key.key_value); - let ring_signature = ring::hmac::sign(&ring_key, data); - Ok(Signature(digest::Digest { - value: ring_signature.as_ref().to_vec(), - algorithm: key.digest_alg, - })) -} - -#[cfg(test)] -mod tests { - use super::*; - use hex; - #[test] - fn hmac_sign_verify() { - let key = VerificationKey::new(&digest::SHA256, b"key"); - let expected_signature = - hex::decode("f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8") - .unwrap(); - assert!(verify( - &key, - b"The quick brown fox jumps over the lazy dog", - &expected_signature - ) - .is_ok()); - } -} diff --git a/components/support/rc_crypto/src/lib.rs b/components/support/rc_crypto/src/lib.rs deleted file mode 100644 index f47565dad..000000000 --- a/components/support/rc_crypto/src/lib.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -/// This crate provides all the cryptographic primitives required by -/// this workspace, backed by the NSS library. -/// The exposed API is pretty much the same as the `ring` crate -/// (https://briansmith.org/rustdoc/ring/) as it is well thought. -pub mod constant_time; -pub mod digest; -mod error; -pub mod hkdf; -pub mod hmac; -#[cfg(not(target_os = "ios"))] -mod p11; -pub mod rand; -#[cfg(not(target_os = "ios"))] -mod util; - -pub use crate::error::{Error, ErrorKind, Result}; diff --git a/components/support/rc_crypto/src/p11.rs b/components/support/rc_crypto/src/p11.rs deleted file mode 100644 index 50be15da6..000000000 --- a/components/support/rc_crypto/src/p11.rs +++ /dev/null @@ -1,119 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use crate::error::*; -use nss_sys::*; -use std::{ - convert::TryFrom, - os::raw::{c_uchar, c_uint}, - ptr, -}; - -// The macro defines a wrapper around pointers refering to -// types allocated by NSS and calling their NSS destructor -// method when they go out of scope avoiding memory leaks. -// The `as_ptr`/`as_mut_ptr` are provided to retrieve the -// raw pointers for the NSS functions consuming them. -macro_rules! scoped_ptr { - ($scoped:ident, $target:ty, $dtor:path) => { - pub struct $scoped { - ptr: *mut $target, - } - - impl $scoped { - pub fn from_ptr(ptr: *mut $target) -> Result<$scoped> { - if !ptr.is_null() { - Ok($scoped { ptr: ptr }) - } else { - Err(ErrorKind::InternalError.into()) - } - } - - #[inline] - #[allow(dead_code)] - pub const fn as_ptr(&self) -> *const $target { - self.ptr - } - - #[inline] - pub fn as_mut_ptr(&self) -> *mut $target { - self.ptr - } - } - - impl Drop for $scoped { - fn drop(&mut self) { - unsafe { $dtor(self.ptr) }; - } - } - }; -} - -scoped_ptr!(Context, PK11Context, pk11_destroy_context_true); -scoped_ptr!(SymKey, PK11SymKey, PK11_FreeSymKey); -scoped_ptr!(Slot, PK11SlotInfo, PK11_FreeSlot); - -#[inline] -unsafe fn pk11_destroy_context_true(context: *mut PK11Context) { - PK11_DestroyContext(context, PR_TRUE); -} - -/// Safe wrapper around `PK11_GetInternalSlot` that -/// de-allocates memory when the slot goes out of -/// scope. -pub(crate) fn get_internal_slot() -> Result { - Slot::from_ptr(unsafe { PK11_GetInternalSlot() }) -} - -/// Safe wrapper around PK11_ImportSymKey that -/// de-allocates memory when the key goes out of -/// scope. -pub(crate) fn import_sym_key( - mechanism: CK_MECHANISM_TYPE, - operation: CK_ATTRIBUTE_TYPE, - buf: &[u8], -) -> Result { - let mut item = SECItem { - type_: SECItemType::siBuffer, - data: buf.as_ptr() as *mut c_uchar, - len: c_uint::try_from(buf.len())?, - }; - let slot = get_internal_slot()?; - SymKey::from_ptr(unsafe { - PK11_ImportSymKey( - slot.as_mut_ptr(), - mechanism, - PK11Origin::PK11_OriginUnwrap, - operation, - &mut item, - ptr::null_mut(), - ) - }) -} - -/// Safe wrapper around PK11_CreateContextBySymKey that -/// de-allocates memory when the context goes out of -/// scope. -pub(crate) fn create_context_by_sym_key( - mechanism: CK_MECHANISM_TYPE, - operation: CK_ATTRIBUTE_TYPE, - sym_key: &SymKey, -) -> Result { - let mut param = SECItem { - type_: SECItemType::siBuffer, - data: ptr::null_mut(), - len: 0, - }; - Context::from_ptr(unsafe { - PK11_CreateContextBySymKey(mechanism, operation, sym_key.as_mut_ptr(), &mut param) - }) -} diff --git a/components/support/rc_crypto/src/rand.rs b/components/support/rc_crypto/src/rand.rs deleted file mode 100644 index c63c604b3..000000000 --- a/components/support/rc_crypto/src/rand.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use crate::error::*; -#[cfg(not(target_os = "ios"))] -use crate::util::{ensure_nss_initialized, map_nss_secstatus}; -use std::convert::TryFrom; - -/// Fill a buffer with cryptographically secure pseudo-random data. -#[cfg(not(target_os = "ios"))] -pub fn fill(dest: &mut [u8]) -> Result<()> { - // `NSS_Init` will initialize the RNG with data from `/dev/urandom`. - ensure_nss_initialized(); - let len = i32::try_from(dest.len())?; - map_nss_secstatus(|| unsafe { nss_sys::PK11_GenerateRandom(dest.as_mut_ptr(), len) })?; - Ok(()) -} - -#[cfg(target_os = "ios")] -pub fn fill(dest: &mut [u8]) -> Result<()> { - use ring::rand::SecureRandom; - let rng = ring::rand::SystemRandom::new(); - rng.fill(dest).map_err(|_| ErrorKind::InternalError.into()) -} - -#[cfg(test)] -mod tests { - use super::*; - #[test] - fn random_fill() { - let mut out = vec![0u8; 64]; - assert!(fill(&mut out).is_ok()); - assert_ne!(out, vec![0u8; 64]); - } -} diff --git a/components/support/rc_crypto/src/util.rs b/components/support/rc_crypto/src/util.rs deleted file mode 100644 index 2980a83f4..000000000 --- a/components/support/rc_crypto/src/util.rs +++ /dev/null @@ -1,75 +0,0 @@ -/* Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -use crate::error::*; -use nss_sys::*; -use std::{convert::TryFrom, ffi::CString, sync::Once}; - -static NSS_INIT: Once = Once::new(); - -pub fn ensure_nss_initialized() { - NSS_INIT.call_once(|| { - let version_ptr = CString::new(nss_sys::COMPATIBLE_NSS_VERSION).unwrap(); - if unsafe { NSS_VersionCheck(version_ptr.as_ptr()) == PR_FALSE } { - panic!("Incompatible NSS version!") - } - if unsafe { NSS_IsInitialized() } == PR_FALSE { - let empty = CString::default(); - let flags = NSS_INIT_READONLY - | NSS_INIT_NOCERTDB - | NSS_INIT_NOMODDB - | NSS_INIT_FORCEOPEN - | NSS_INIT_OPTIMIZESPACE; - let context = unsafe { - NSS_InitContext( - empty.as_ptr(), - empty.as_ptr(), - empty.as_ptr(), - empty.as_ptr(), - std::ptr::null_mut(), - flags, - ) - }; - if context.is_null() { - let error = get_last_error(); - panic!("Could not initialize NSS: {}", error); - } - } - }) -} - -pub fn map_nss_secstatus(callback: F) -> Result<()> -where - F: FnOnce() -> SECStatus, -{ - if callback() == SECSuccess { - return Ok(()); - } - Err(get_last_error()) -} - -/// Retrieve and wrap the last NSS/NSPR error in the current thread. -pub fn get_last_error() -> Error { - let error_code = unsafe { PR_GetError() }; - let error_text: String = usize::try_from(unsafe { PR_GetErrorTextLength() }) - .map(|error_text_len| { - let mut out_str = vec![0u8; error_text_len + 1]; - unsafe { PR_GetErrorText(out_str.as_mut_ptr()) }; - CString::new(&out_str[0..error_text_len]) - .unwrap_or_else(|_| CString::default()) - .to_str() - .unwrap_or_else(|_| "") - .to_owned() - }) - .unwrap_or_else(|_| "".to_string()); - ErrorKind::NSSError(error_code, error_text).into() -} diff --git a/components/sync15/Cargo.toml b/components/sync15/Cargo.toml index c59f70bb7..c0a5743cb 100644 --- a/components/sync15/Cargo.toml +++ b/components/sync15/Cargo.toml @@ -21,7 +21,6 @@ log = "0.4" lazy_static = "1.0" base16 = "0.1.1" failure = "0.1.3" -rc_crypto = { path = "../support/rc_crypto" } viaduct = { path = "../viaduct" } interrupt = { path = "../support/interrupt" } error-support = { path = "../support/error" } diff --git a/components/sync15/src/error.rs b/components/sync15/src/error.rs index 7564777d4..70380fb3f 100644 --- a/components/sync15/src/error.rs +++ b/components/sync15/src/error.rs @@ -71,9 +71,6 @@ pub enum ErrorKind { #[fail(display = "Store error: {}", _0)] StoreError(#[fail(cause)] failure::Error), - #[fail(display = "Crypto/NSS error: {}", _0)] - CryptoError(#[fail(cause)] rc_crypto::Error), - // Basically reimplement error_chain's foreign_links. (Ugh, this sucks) #[fail(display = "OpenSSL error: {}", _0)] OpensslError(#[fail(cause)] openssl::error::ErrorStack), @@ -105,7 +102,6 @@ pub enum ErrorKind { error_support::define_error! { ErrorKind { - (CryptoError, rc_crypto::Error), (OpensslError, openssl::error::ErrorStack), (Base64Decode, base64::DecodeError), (JsonError, serde_json::Error), diff --git a/components/sync15/src/key_bundle.rs b/components/sync15/src/key_bundle.rs index c1b907624..454f345c4 100644 --- a/components/sync15/src/key_bundle.rs +++ b/components/sync15/src/key_bundle.rs @@ -3,12 +3,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use crate::error::{ErrorKind, Result}; -use openssl::symm; -use rc_crypto::{ - digest, - hmac::{self, Signature, SigningKey, VerificationKey}, - rand, -}; +use openssl::hash::MessageDigest; +use openssl::pkey::PKey; +use openssl::sign::Signer; +use openssl::{self, symm}; #[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct KeyBundle { @@ -36,7 +34,7 @@ impl KeyBundle { pub fn new_random() -> Result { let mut buffer = [0u8; 64]; - rand::fill(&mut buffer)?; + openssl::rand::rand_bytes(&mut buffer)?; KeyBundle::from_ksync_bytes(&buffer) } @@ -77,9 +75,20 @@ impl KeyBundle { [base64::encode(&self.enc_key), base64::encode(&self.mac_key)] } - fn hmac(&self, ciphertext: &[u8]) -> Result { - let key = SigningKey::new(&digest::SHA256, self.hmac_key()); - Ok(hmac::sign(&key, ciphertext)?) + /// Returns the 32 byte digest by value since it's small enough to be passed + /// around cheaply, and easily convertable into a slice or vec if you want. + fn hmac(&self, ciphertext: &[u8]) -> Result<[u8; 32]> { + let mut out = [0u8; 32]; + let key = PKey::hmac(self.hmac_key())?; + let mut signer = Signer::new(MessageDigest::sha256(), &key)?; + signer.update(ciphertext)?; + let size = signer.sign(&mut out)?; + // This isn't an Err since it really should not be possible. + assert!( + size == 32, + "Somehow the 256 bits from sha256 do not add up into 32 bytes..." + ); + Ok(out) } /// Important! Don't compare against this directly! use `verify_hmac` or `verify_hmac_string`! @@ -87,25 +96,32 @@ impl KeyBundle { Ok(base16::encode_lower(&self.hmac(ciphertext)?)) } - pub fn verify_hmac(&self, expected_hmac: &[u8], ciphertext_base64: &str) -> Result<()> { - let key = VerificationKey::new(&digest::SHA256, self.hmac_key()); - Ok(hmac::verify( - &key, - ciphertext_base64.as_bytes(), - expected_hmac, - )?) + pub fn verify_hmac(&self, expected_hmac: &[u8], ciphertext_base64: &str) -> Result { + let computed_hmac = self.hmac(ciphertext_base64.as_bytes())?; + // I suspect this is unnecessary for our case, but the rust-openssl docs + // want us to use this over == to avoid sidechannels, and who am I to argue? + Ok(openssl::memcmp::eq(&expected_hmac, &computed_hmac)) } - pub fn verify_hmac_string(&self, expected_hmac: &str, ciphertext_base64: &str) -> Result<()> { + pub fn verify_hmac_string(&self, expected_hmac: &str, ciphertext_base64: &str) -> Result { + let computed_hmac = self.hmac(ciphertext_base64.as_bytes())?; + // Note: openssl::memcmp::eq panics if the sizes aren't the same. Desktop returns that it + // was a verification failure, so we will too. + if expected_hmac.len() != 64 { + log::warn!("Garbage HMAC verification string: Wrong length"); + return Ok(false); + } // Decode the expected_hmac into bytes to avoid issues if a client happens to encode // this as uppercase. This shouldn't happen in practice, but doing it this way is more // robust and avoids an allocation. let mut decoded_hmac = [0u8; 32]; + if base16::decode_slice(expected_hmac, &mut decoded_hmac).is_err() { log::warn!("Garbage HMAC verification string: contained non base16 characters"); - return Err(ErrorKind::HmacMismatch.into()); + return Ok(false); } - self.verify_hmac(&decoded_hmac, ciphertext_base64) + + Ok(openssl::memcmp::eq(&decoded_hmac, &computed_hmac)) } /// Decrypt the provided ciphertext with the given iv, and decodes the @@ -136,7 +152,7 @@ impl KeyBundle { /// and the generated iv. pub fn encrypt_bytes_rand_iv(&self, cleartext_bytes: &[u8]) -> Result<(Vec, [u8; 16])> { let mut iv = [0u8; 16]; - rand::fill(&mut iv)?; + openssl::rand::rand_bytes(&mut iv)?; let ciphertext = self.encrypt_bytes_with_iv(cleartext_bytes, &iv)?; Ok((ciphertext, iv)) } @@ -184,7 +200,7 @@ mod test { let ciphertext_base64 = CIPHERTEXT_B64_PIECES.join(""); assert!(key_bundle .verify_hmac_string(HMAC_B16, &ciphertext_base64) - .is_ok()); + .unwrap()); } #[test]