diff --git a/Cargo.lock b/Cargo.lock index f73b99992e..b71d62a3c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,7 +72,7 @@ name = "atty" version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -88,7 +88,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -97,8 +97,8 @@ name = "backtrace-sys" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -189,7 +189,7 @@ dependencies = [ [[package]] name = "bytes" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -202,7 +202,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -238,7 +238,7 @@ name = "clear_on_drop" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -286,7 +286,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -404,7 +404,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -421,7 +421,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -467,7 +467,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -618,7 +618,7 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -641,10 +641,10 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -778,7 +778,7 @@ name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -807,7 +807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.65" +version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -892,7 +892,7 @@ dependencies = [ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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)", @@ -917,7 +917,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -947,7 +947,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -964,7 +964,7 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -973,8 +973,8 @@ name = "num_cpus" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1034,7 +1034,7 @@ dependencies = [ "cfg-if 0.1.10 (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.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1049,8 +1049,8 @@ version = "0.9.53" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1072,7 +1072,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1186,7 +1186,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (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.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1204,7 +1204,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1286,7 +1286,7 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1298,7 +1298,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.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1378,7 +1378,7 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.21 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1451,7 +1451,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1550,7 +1550,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1577,7 +1577,7 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1659,7 +1659,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1687,7 +1687,7 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1715,11 +1715,11 @@ name = "tokio" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2068,9 +2068,9 @@ dependencies = [ "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum bytes 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c85319f157e4e26c703678e68e26ab71a46c0199286fa670b21cc9fec13d895" +"checksum bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10004c15deb332055f7a4a208190aed362cf9a7c2f6ab70a305fba50e1105f38" "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" -"checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" +"checksum cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum chacha 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" @@ -2095,7 +2095,7 @@ dependencies = [ "checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" +"checksum encoding_rs 0.8.21 (registry+https://github.com/rust-lang/crates.io-index)" = "f730a5068736d360795b76e8c53ef51d052a4090d281412da851f5fd6204f36d" "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" "checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" @@ -2121,7 +2121,7 @@ dependencies = [ "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" +"checksum hermit-abi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f629dc602392d3ec14bfc8a09b5e644d7ffd725102b48b81e59f90f2633621d7" "checksum hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" "checksum hkdf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fa08a006102488bd9cd5b8013aabe84955cf5ae22e304c2caf655b633aefae3" "checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" @@ -2139,7 +2139,7 @@ dependencies = [ "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum keystream 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" +"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" "checksum lioness 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" "checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" diff --git a/src/main.rs b/src/main.rs index 6363f36fd1..77aa7fce27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -87,7 +87,7 @@ fn run(matches: &ArgMatches) { notifier.run(); }); - provider.start_listening().unwrap() + provider.start().unwrap() } fn execute(matches: ArgMatches) -> Result<(), String> { diff --git a/src/provider/client_handling/mod.rs b/src/provider/client_handling/mod.rs index 1c1ae1c119..a277f8a8db 100644 --- a/src/provider/client_handling/mod.rs +++ b/src/provider/client_handling/mod.rs @@ -1,6 +1,8 @@ use crate::provider::storage::{ClientStorage, StoreError}; +use crate::provider::ClientLedger; use curve25519_dalek::digest::Digest; use curve25519_dalek::scalar::Scalar; +use futures::lock::Mutex as FMutex; use hmac::{Hmac, Mac}; use serde::{Deserialize, Serialize}; use serde_json::json; @@ -15,6 +17,7 @@ use std::collections::HashMap; use std::hash::Hash; use std::io; use std::path::{Path, PathBuf}; +use futures::{Future, AsyncReadExt}; use std::sync::{Arc, RwLock}; type HmacSha256 = Hmac; @@ -44,17 +47,17 @@ impl From for ClientProcessingError { } } -#[derive(Debug, Clone)] +#[derive(Debug)] pub(crate) struct ClientProcessingData { store_dir: PathBuf, - registered_clients_ledger: HashMap, + registered_clients_ledger: ClientLedger, secret_key: Scalar, } impl ClientProcessingData { pub(crate) fn new( store_dir: PathBuf, - registered_clients_ledger: HashMap, + registered_clients_ledger: ClientLedger, secret_key: Scalar, ) -> Self { ClientProcessingData { @@ -64,56 +67,65 @@ impl ClientProcessingData { } } - pub(crate) fn add_arc_rwlock(self) -> Arc> { - Arc::new(RwLock::new(self)) + pub(crate) fn add_arc_futures_mutex(self) -> Arc> { + Arc::new(FMutex::new(self)) } } pub(crate) struct ClientRequestProcessor(()); impl ClientRequestProcessor { - pub(crate) fn process_client_request( + pub(crate) async fn process_client_request( data: &[u8], - processing_data: &RwLock, + processing_data: Arc>, ) -> Result, ClientProcessingError> { - let read_processing_data = processing_data.read().unwrap(); - let client_request = ProviderRequests::from_bytes(&data)?; - println!("Received the following request: {:?}", client_request); - match client_request { - ProviderRequests::Register(req) => Ok(ClientRequestProcessor::register_new_client( - req, - read_processing_data.store_dir.as_path(), - // TODO: this WILL NOT work because ledger is cloned - &mut processing_data - .read() - .unwrap() - .registered_clients_ledger - .clone(), - read_processing_data.secret_key, - )? - .to_bytes()), - ProviderRequests::PullMessages(req) => { - Ok(ClientRequestProcessor::process_pull_messages_request( - req, - processing_data.read().unwrap().store_dir.as_path(), - &mut processing_data - .read() - .unwrap() - .registered_clients_ledger - .clone(), - )? - .to_bytes()) - } - } +// let read_processing_data = processing_data.read().map(|mut guard| *guard).await.unwrap(); + +// let fut = processing_data.read().map(|mut guard| { +// *guard +// }); +// +// let read_processing_data = processing_data.read().await; + + + Ok((vec![])) +// let client_request = ProviderRequests::from_bytes(&data)?; +// println!("Received the following request: {:?}", client_request); +// match client_request { +// ProviderRequests::Register(req) => Ok(ClientRequestProcessor::register_new_client( +// req, +// read_processing_data.store_dir.as_path(), +// // TODO: this WILL NOT work because ledger is cloned +// &mut processing_data +// .read() +// .unwrap() +// .registered_clients_ledger +// .clone(), +// read_processing_data.secret_key, +// )? +// .to_bytes()), +// ProviderRequests::PullMessages(req) => { +// Ok(ClientRequestProcessor::process_pull_messages_request( +// req, +// processing_data.read().unwrap().store_dir.as_path(), +// &mut processing_data +// .read() +// .unwrap() +// .registered_clients_ledger +// .clone(), +// )? +// .to_bytes()) +// } +// } } fn process_pull_messages_request( req: PullRequest, store_dir: &Path, - registered_client_ledger: &mut HashMap, + registered_client_ledger: &mut ClientLedger, ) -> Result { println!("Processing pull!"); - if registered_client_ledger.contains_key(&req.auth_token) { + if registered_client_ledger.0.contains_key(&req.auth_token) { let retrieved_messages = ClientStorage::retrieve_client_files(req.destination_address, store_dir)?; Ok(PullResponse::new(retrieved_messages)) @@ -125,7 +137,7 @@ impl ClientRequestProcessor { fn register_new_client( req: RegisterRequest, store_dir: &Path, - registered_client_ledger: &mut HashMap, + registered_client_ledger: &mut ClientLedger, provider_secret_key: Scalar, ) -> Result { println!("Processing register new client request!"); @@ -133,8 +145,8 @@ impl ClientRequestProcessor { req.destination_address.to_vec(), provider_secret_key, ); - if !registered_client_ledger.contains_key(&auth_token) { - registered_client_ledger.insert(auth_token, req.destination_address); + if !registered_client_ledger.0.contains_key(&auth_token) { + registered_client_ledger.0.insert(auth_token, req.destination_address); ClientRequestProcessor::create_storage_dir(req.destination_address, store_dir); } Ok(RegisterResponse::new(auth_token.to_vec())) @@ -170,18 +182,17 @@ mod register_new_client { let req1 = RegisterRequest { destination_address: [1u8; 32], }; - let mut registered_client_ledger: HashMap = - HashMap::new(); + let mut registered_client_ledger = ClientLedger::new(); let store_dir = Path::new("./foo/"); let key = Scalar::from_bytes_mod_order([1u8; 32]); - assert_eq!(0, registered_client_ledger.len()); + assert_eq!(0, registered_client_ledger.0.len()); ClientRequestProcessor::register_new_client( req1, &store_dir, &mut registered_client_ledger, key, ); - assert_eq!(1, registered_client_ledger.len()); + assert_eq!(1, registered_client_ledger.0.len()); let req2 = RegisterRequest { destination_address: [2u8; 32], @@ -192,7 +203,7 @@ mod register_new_client { &mut registered_client_ledger, key, ); - assert_eq!(2, registered_client_ledger.len()); + assert_eq!(2, registered_client_ledger.0.len()); } #[test] @@ -200,8 +211,7 @@ mod register_new_client { let req1 = RegisterRequest { destination_address: [1u8; 32], }; - let mut registered_client_ledger: HashMap = - HashMap::new(); + let mut registered_client_ledger = ClientLedger::new(); let store_dir = Path::new("./foo/"); let key = Scalar::from_bytes_mod_order([1u8; 32]); ClientRequestProcessor::register_new_client( @@ -219,7 +229,7 @@ mod register_new_client { &mut registered_client_ledger, key, ); - assert_eq!(1, registered_client_ledger.len()) + assert_eq!(1, registered_client_ledger.0.len()) } } diff --git a/src/provider/mod.rs b/src/provider/mod.rs index 1628c8a6f8..393a381b8e 100644 --- a/src/provider/mod.rs +++ b/src/provider/mod.rs @@ -2,12 +2,10 @@ use std::net::{Shutdown, SocketAddr}; use std::path::PathBuf; use std::sync::Arc; use std::sync::RwLock; - use curve25519_dalek::montgomery::MontgomeryPoint; use curve25519_dalek::scalar::Scalar; use tokio::prelude::*; use tokio::runtime::Runtime; - use crate::provider::client_handling::{ClientProcessingData, ClientRequestProcessor}; use crate::provider::mix_handling::{MixPacketProcessor, MixProcessingData}; use crate::provider::storage::ClientStorage; @@ -15,6 +13,7 @@ use futures::io::Error; use sfw_provider_requests::requests::AuthToken; use sphinx::route::DestinationAddressBytes; use std::collections::HashMap; +use futures::lock::Mutex as FMutex; mod client_handling; mod mix_handling; @@ -67,12 +66,25 @@ impl From for ProviderError { } } +#[derive(Debug)] +pub struct ClientLedger(HashMap); + +impl ClientLedger { + fn new() -> Self { + ClientLedger(HashMap::new()) + } + + fn load(file: PathBuf) -> Self { + unimplemented!() + } +} + pub struct ServiceProvider { mix_network_address: SocketAddr, client_network_address: SocketAddr, secret_key: Scalar, store_dir: PathBuf, - registered_clients_ledger: HashMap, + registered_clients_ledger: ClientLedger, } impl ServiceProvider { @@ -83,7 +95,7 @@ impl ServiceProvider { secret_key: config.secret_key, store_dir: PathBuf::from(config.store_dir.clone()), // TODO: load initial ledger from file - registered_clients_ledger: HashMap::new(), + registered_clients_ledger: ClientLedger::new(), } } @@ -116,10 +128,10 @@ impl ServiceProvider { store_data, processing_data.read().unwrap().store_dir.as_path(), ) - .unwrap_or_else(|e| { - eprintln!("failed to store processed sphinx message; err = {:?}", e); - return; - }); + .unwrap_or_else(|e| { + eprintln!("failed to store processed sphinx message; err = {:?}", e); + return; + }); } Err(e) => { eprintln!("failed to read from socket; err = {:?}", e); @@ -147,7 +159,7 @@ impl ServiceProvider { // TODO: FIGURE OUT HOW TO SET READ_DEADLINES IN TOKIO async fn process_client_socket_connection( mut socket: tokio::net::TcpStream, - processing_data: Arc>, + processing_data: Arc>, ) { let mut buf = [0; 1024]; @@ -161,8 +173,8 @@ impl ServiceProvider { Ok(n) => { match ClientRequestProcessor::process_client_request( buf[..n].as_ref(), - processing_data.as_ref(), - ) { + processing_data, + ).await { Err(e) => { eprintln!("failed to process client request; err = {:?}", e); Err(()) @@ -215,12 +227,12 @@ impl ServiceProvider { async fn start_client_listening( address: SocketAddr, store_dir: PathBuf, - client_ledger: HashMap, + client_ledger: ClientLedger, secret_key: Scalar, ) -> Result<(), ProviderError> { let mut listener = tokio::net::TcpListener::bind(address).await?; let processing_data = - ClientProcessingData::new(store_dir, client_ledger, secret_key).add_arc_rwlock(); + ClientProcessingData::new(store_dir, client_ledger, secret_key).add_arc_futures_mutex(); loop { let (socket, _) = listener.accept().await?; @@ -234,7 +246,8 @@ impl ServiceProvider { } } - pub fn start_listening(&self) -> Result<(), Box> { + // Note: this now consumes the provider + pub fn start(self) -> Result<(), Box> { // Create the runtime, probably later move it to Provider struct itself? // TODO: figure out the difference between Runtime and Handle let mut rt = Runtime::new()?; @@ -248,7 +261,7 @@ impl ServiceProvider { let client_future = rt.spawn(ServiceProvider::start_client_listening( self.client_network_address, self.store_dir.clone(), - self.registered_clients_ledger.clone(), // we're just cloning the initial ledger state + self.registered_clients_ledger, // we're just cloning the initial ledger state self.secret_key, )); // Spawn the root task