diff --git a/services/commtest/Cargo.lock b/services/commtest/Cargo.lock index b989a485a..60d1607dd 100644 --- a/services/commtest/Cargo.lock +++ b/services/commtest/Cargo.lock @@ -1,1999 +1,2879 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "argon2" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db4ce4441f99dbd377ca8a8f57b698c44d0d6e712d8329b5040da5a64aa1ce73" dependencies = [ "base64ct", "blake2", "password-hash", ] [[package]] name = "async-stream" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" dependencies = [ "async-stream-impl", "futures-core", ] [[package]] name = "async-stream-impl" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2", "quote", "syn 1.0.107", ] [[package]] name = "async-trait" version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3" dependencies = [ "proc-macro2", "quote", "syn 1.0.107", ] [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "aws-config" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcdcf0d683fe9c23d32cf5b53c9918ea0a500375a9fb20109802552658e576c9" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-sdk-sso", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-client", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "hex", + "http", + "hyper", + "ring", + "time 0.3.26", + "tokio", + "tower", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-credential-types" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fcdb2f7acbc076ff5ad05e7864bdb191ca70a6fd07668dc3a1a8bcd051de5ae" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "fastrand", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-endpoint" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cce1c41a6cfaa726adee9ebb9a56fcd2bbfd8be49fd8a04c5e20fd968330b04" +dependencies = [ + "aws-smithy-http", + "aws-smithy-types", + "aws-types", + "http", + "regex", + "tracing", +] + +[[package]] +name = "aws-http" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aadbc44e7a8f3e71c8b374e03ecd972869eb91dd2bc89ed018954a52ba84bc44" +dependencies = [ + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-types", + "aws-types", + "bytes", + "http", + "http-body", + "lazy_static", + "percent-encoding", + "pin-project-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-dynamodb" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fb64867fe098cffee7e34352b01bbfa2beb3aa1b2ff0e0a7bf9ff293557852" +dependencies = [ + "aws-credential-types", + "aws-endpoint", + "aws-http", + "aws-sig-auth", + "aws-smithy-async", + "aws-smithy-client", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http", + "regex", + "tokio-stream", + "tower", + "tracing", +] + +[[package]] +name = "aws-sdk-sso" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b812340d86d4a766b2ca73f740dfd47a97c2dff0c06c8517a16d88241957e4" +dependencies = [ + "aws-credential-types", + "aws-endpoint", + "aws-http", + "aws-sig-auth", + "aws-smithy-async", + "aws-smithy-client", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", + "aws-smithy-types", + "aws-types", + "bytes", + "http", + "regex", + "tokio-stream", + "tower", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "265fac131fbfc188e5c3d96652ea90ecc676a934e3174eaaee523c6cec040b3b" +dependencies = [ + "aws-credential-types", + "aws-endpoint", + "aws-http", + "aws-sig-auth", + "aws-smithy-async", + "aws-smithy-client", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", + "aws-smithy-query", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "bytes", + "http", + "regex", + "tower", + "tracing", +] + +[[package]] +name = "aws-sig-auth" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b94acb10af0c879ecd5c7bdf51cda6679a0a4f4643ce630905a77673bfa3c61" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-http", + "aws-types", + "http", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2ce6f507be68e968a33485ced670111d1cbad161ddbbab1e313c03d37d8f4c" +dependencies = [ + "aws-smithy-http", + "form_urlencoded", + "hex", + "hmac", + "http", + "once_cell", + "percent-encoding", + "regex", + "sha2", + "time 0.3.26", + "tracing", +] + +[[package]] +name = "aws-smithy-async" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13bda3996044c202d75b91afeb11a9afae9db9a721c6a7a427410018e286b880" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", + "tokio-stream", +] + +[[package]] +name = "aws-smithy-client" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a86aa6e21e86c4252ad6a0e3e74da9617295d8d6e374d552be7d3059c41cedd" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-types", + "bytes", + "fastrand", + "http", + "http-body", + "hyper", + "hyper-rustls", + "lazy_static", + "pin-project-lite", + "rustls", + "tokio", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-http" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b3b693869133551f135e1f2c77cb0b8277d9e3e17feaf2213f735857c4f0d28" +dependencies = [ + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http", + "http-body", + "hyper", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "aws-smithy-http-tower" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae4f6c5798a247fac98a867698197d9ac22643596dc3777f0c76b91917616b9" +dependencies = [ + "aws-smithy-http", + "aws-smithy-types", + "bytes", + "http", + "http-body", + "pin-project-lite", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f9f42fbfa96d095194a632fbac19f60077748eba536eb0b9fecc28659807f8" +dependencies = [ + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-query" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98819eb0b04020a1c791903533b638534ae6c12e2aceda3e6e6fba015608d51d" +dependencies = [ + "aws-smithy-types", + "urlencoding", +] + +[[package]] +name = "aws-smithy-types" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a3d0bf4f324f4ef9793b86a1701d9700fbcdbd12a846da45eed104c634c6e8" +dependencies = [ + "base64-simd", + "itoa", + "num-integer", + "ryu", + "time 0.3.26", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1b9d12875731bd07e767be7baad95700c3137b56730ec9ddeedb52a5e5ca63b" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd209616cc8d7bfb82f87811a5c655dc97537f592689b18743bddf5dc5c4829" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-client", + "aws-smithy-http", + "aws-smithy-types", + "http", + "rustc_version", + "tracing", +] + [[package]] name = "axum" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08b108ad2665fa3f6e6a517c3d80ec3e77d224c47d605167aefaa5d7ef97fa48" dependencies = [ "async-trait", "axum-core", "bitflags", "bytes", "futures-util", "http", "http-body", "hyper", "itoa", "matchit", "memchr", "mime", "percent-encoding", "pin-project-lite", "rustversion", "serde", "sync_wrapper", "tower", "tower-http", "tower-layer", "tower-service", ] [[package]] name = "axum-core" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92" dependencies = [ "async-trait", "bytes", "futures-util", "http", "http-body", "mime", "rustversion", "tower-layer", "tower-service", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" [[package]] name = "base64" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "base64ct" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "blake2" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ "digest 0.10.7", ] [[package]] name = "block-buffer" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] [[package]] name = "bumpalo" version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byteorder" version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +[[package]] +name = "bytes-utils" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47d3a8076e283f3acd27400535992edb3ba4b5bb72f8891ad8fbe7932a7d4b9" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "bytesize" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" [[package]] name = "cc" version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "time 0.1.45", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "comm-opaque2" version = "0.2.0" dependencies = [ "argon2", "log", "opaque-ke", "rand", "tonic 0.9.2", "wasm-bindgen", ] +[[package]] +name = "comm-services-lib" +version = "0.1.0" +dependencies = [ + "anyhow", + "aws-config", + "aws-sdk-dynamodb", + "aws-types", + "base64 0.21.2", + "chrono", + "derive_more", + "rand", + "serde", + "serde_json", + "tokio", + "tracing", +] + [[package]] name = "commtest" version = "0.1.0" dependencies = [ "anyhow", "async-stream", "base64 0.20.0", "bytesize", "comm-opaque2", + "comm-services-lib", "derive_more", "futures", "futures-util", "hex", "lazy_static", "num_cpus", "openssl", "prost", "rand", "reqwest", "serde", "serde_json", "sha2", "tokio", "tokio-tungstenite", "tonic 0.8.3", "tonic-build", "tunnelbroker_messages", "url", ] [[package]] name = "const-oid" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "core-foundation-sys" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] [[package]] name = "crypto-bigint" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", "rand_core", "subtle", "zeroize", ] [[package]] name = "crypto-common" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", ] [[package]] name = "curve25519-dalek" version = "4.0.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4033478fbf70d6acf2655ac70da91ee65852d69daf7a67bf7a2f518fb47aafcf" dependencies = [ "byteorder", "digest 0.9.0", "rand_core", "subtle", "zeroize", ] +[[package]] +name = "cxx" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 2.0.15", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.15", +] + [[package]] name = "der" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "derive-where" version = "1.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d322f2907b2abad3117790c1a54d8f2d64574ba0fbea54cb6c6e66a0e50d99a4" dependencies = [ "proc-macro2", "quote", "syn 1.0.107", ] [[package]] name = "derive_more" version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", "syn 1.0.107", ] [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ "generic-array", ] [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", "subtle", ] [[package]] name = "displaydoc" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", "syn 2.0.15", ] [[package]] name = "either" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", "digest 0.10.7", "ff", "generic-array", "group", "rand_core", "sec1", "subtle", "zeroize", ] [[package]] name = "encoding_rs" version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ "cfg-if", ] [[package]] name = "fastrand" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] [[package]] name = "ff" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core", "subtle", ] [[package]] name = "fixedbitset" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ "foreign-types-shared", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ "percent-encoding", ] [[package]] name = "futures" version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures-channel" version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", ] [[package]] name = "futures-core" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + [[package]] name = "futures-macro" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", "syn 2.0.15", ] [[package]] name = "futures-sink" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-core", + "futures-io", "futures-macro", "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "generic-array" version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "serde", "typenum", "version_check", ] [[package]] name = "getrandom" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "group" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", "rand_core", "subtle", ] [[package]] name = "h2" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", "indexmap", "slab", "tokio", "tokio-util", "tracing", ] [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" dependencies = [ "hmac", ] [[package]] name = "hmac" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ "digest 0.10.7", ] [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", "itoa", ] [[package]] name = "http-body" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", "pin-project-lite", ] [[package]] name = "http-range-header" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" [[package]] name = "httparse" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", "http", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.7", "tokio", "tower-service", "tracing", "want", ] +[[package]] +name = "hyper-rustls" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +dependencies = [ + "http", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", +] + [[package]] name = "hyper-timeout" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ "hyper", "pin-project-lite", "tokio", "tokio-io-timeout", ] [[package]] name = "hyper-tls" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", "hyper", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "iana-time-zone" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "idna" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown", ] [[package]] name = "instant" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", ] [[package]] name = "ipnet" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "itertools" version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "js-sys" version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +[[package]] +name = "link-cplusplus" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +dependencies = [ + "cc", +] + [[package]] name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] [[package]] name = "matchit" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", ] +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "wasi", - "windows-sys", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] name = "multimap" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "native-tls" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", "log", "openssl", "openssl-probe", "openssl-sys", "schannel", "security-framework", "security-framework-sys", "tempfile", ] +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + [[package]] name = "num_cpus" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ "hermit-abi", "libc", ] +[[package]] +name = "object" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-ke" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76d410412d23781909d90c3900c5783e830586765f2277bccc78167da8af81a5" dependencies = [ "argon2", "curve25519-dalek", "derive-where", "digest 0.10.7", "displaydoc", "elliptic-curve", "generic-array", "hkdf", "hmac", "rand", "serde", "subtle", "voprf", "zeroize", ] [[package]] name = "openssl" version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ "bitflags", "cfg-if", "foreign-types", "libc", "once_cell", "openssl-macros", "openssl-sys", ] [[package]] name = "openssl-macros" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", "syn 1.0.107", ] [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" version = "0.9.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" dependencies = [ "cc", "libc", "pkg-config", "vcpkg", ] +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + [[package]] name = "password-hash" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", "rand_core", "subtle", ] [[package]] name = "percent-encoding" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "petgraph" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset", "indexmap", ] [[package]] name = "pin-project" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", "syn 1.0.107", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" dependencies = [ "proc-macro2", "syn 1.0.107", ] [[package]] name = "proc-macro2" version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] [[package]] name = "prost" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0b18e655c21ff5ac2084a5ad0611e827b3f92badf79f4910b5a5c58f4d87ff0" dependencies = [ "bytes", "prost-derive", ] [[package]] name = "prost-build" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276470f7f281b0ed53d2ae42dd52b4a8d08853a3c70e7fe95882acbb98a6ae94" dependencies = [ "bytes", "heck", "itertools", "lazy_static", "log", "multimap", "petgraph", "prettyplease", "prost", "prost-types", "regex", "syn 1.0.107", "tempfile", "which", ] [[package]] name = "prost-derive" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "164ae68b6587001ca506d3bf7f1000bfa248d0e1217b618108fba4ec1d0cc306" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", "syn 1.0.107", ] [[package]] name = "prost-types" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "747761bc3dc48f9a34553bf65605cf6cb6288ba219f3450b4275dbd81539551a" dependencies = [ "bytes", "prost", ] [[package]] name = "quote" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] [[package]] name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", "rand_core", ] [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] name = "redox_syscall" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "regex" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ + "aho-corasick", + "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ "winapi", ] [[package]] name = "reqwest" version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ "base64 0.21.2", "bytes", "encoding_rs", "futures-core", "futures-util", "h2", "http", "http-body", "hyper", "hyper-tls", "ipnet", "js-sys", "log", "mime", "mime_guess", "native-tls", "once_cell", "percent-encoding", "pin-project-lite", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] +[[package]] +name = "rustls" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +dependencies = [ + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.2", +] + [[package]] name = "rustversion" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "ryu" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "schannel" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "windows-sys", + "windows-sys 0.42.0", +] + +[[package]] +name = "scratch" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" + +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", ] [[package]] name = "sec1" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct", "der", "generic-array", "subtle", "zeroize", ] [[package]] name = "security-framework" version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ "bitflags", "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", ] [[package]] name = "security-framework-sys" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "semver" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" [[package]] name = "serde" version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", "syn 2.0.15", ] [[package]] name = "serde_json" version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", "serde", ] [[package]] name = "serde_urlencoded" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", "itoa", "ryu", "serde", ] [[package]] name = "sha1" version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", "digest 0.10.7", ] [[package]] name = "sha2" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", "digest 0.10.7", ] [[package]] name = "slab" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" dependencies = [ "autocfg", ] [[package]] name = "socket2" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "subtle" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "syn" version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "sync_wrapper" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" [[package]] name = "tempfile" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", "fastrand", "libc", "redox_syscall", "remove_dir_all", "winapi", ] +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", "syn 2.0.15", ] +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "time" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" +dependencies = [ + "deranged", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451" +dependencies = [ + "time-core", +] + [[package]] name = "tinyvec" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.24.2" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.3", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-io-timeout" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ "pin-project-lite", "tokio", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.15", ] [[package]] name = "tokio-native-tls" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + [[package]] name = "tokio-stream" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" dependencies = [ "futures-core", "pin-project-lite", "tokio", ] [[package]] name = "tokio-tungstenite" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" dependencies = [ "futures-util", "log", "tokio", "tungstenite", ] [[package]] name = "tokio-util" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", "tracing", ] [[package]] name = "tonic" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" dependencies = [ "async-stream", "async-trait", "axum", "base64 0.13.1", "bytes", "futures-core", "futures-util", "h2", "http", "http-body", "hyper", "hyper-timeout", "percent-encoding", "pin-project", "prost", "prost-derive", "tokio", "tokio-stream", "tokio-util", "tower", "tower-layer", "tower-service", "tracing", "tracing-futures", ] [[package]] name = "tonic" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ "base64 0.21.2", "bytes", "futures-core", "futures-util", "http", "http-body", "percent-encoding", "pin-project", "tokio-stream", "tower-layer", "tower-service", "tracing", ] [[package]] name = "tonic-build" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ "prettyplease", "proc-macro2", "prost-build", "quote", "syn 1.0.107", ] [[package]] name = "tower" version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", "indexmap", "pin-project", "pin-project-lite", "rand", "slab", "tokio", "tokio-util", "tower-layer", "tower-service", "tracing", ] [[package]] name = "tower-http" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ "bitflags", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", "pin-project-lite", "tower", "tower-layer", "tower-service", ] [[package]] name = "tower-layer" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", "pin-project-lite", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", "syn 1.0.107", ] [[package]] name = "tracing-core" version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", ] [[package]] name = "tracing-futures" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ "pin-project", "tracing", ] [[package]] name = "try-lock" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" dependencies = [ "base64 0.13.1", "byteorder", "bytes", "http", "httparse", "log", "rand", "sha1", "thiserror", "url", "utf-8", ] [[package]] name = "tunnelbroker_messages" version = "0.1.0" dependencies = [ "serde", "serde_json", ] [[package]] name = "typenum" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ "version_check", ] [[package]] name = "unicode-bidi" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf-8" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "voprf" version = "0.4.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "081acbe8fcf05d5e8e2aad8ef3d40e02eddeaec07c75a9770d862a0fc0874322" dependencies = [ "curve25519-dalek", "derive-where", "digest 0.10.7", "displaydoc", "elliptic-curve", "generic-array", "rand_core", "serde", "sha2", "subtle", "zeroize", ] +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ "log", "try-lock", ] +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", "syn 2.0.15", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", "syn 2.0.15", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "which" version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ "either", "libc", "once_cell", ] [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.0", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm 0.42.0", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "winreg" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi", ] +[[package]] +name = "xmlparser" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" + [[package]] name = "zeroize" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", "syn 2.0.15", ] diff --git a/services/commtest/Cargo.toml b/services/commtest/Cargo.toml index 158654236..dcfc0cf0c 100644 --- a/services/commtest/Cargo.toml +++ b/services/commtest/Cargo.toml @@ -1,34 +1,35 @@ [package] name = "commtest" version = "0.1.0" edition = "2021" license = "BSD-3-Clause" [dependencies] comm-opaque2 = { path = "../../shared/comm-opaque2" } tonic = "0.8" tokio = { version = "1.24", features = ["macros", "rt-multi-thread"] } prost = "0.11" anyhow = "1.0" base64 = "0.20" openssl = "0.10" futures = "0.1" async-stream = "0.3.2" derive_more = "0.99.16" bytesize = "1.1.0" lazy_static = "1.4.0" num_cpus = "1.13.1" sha2 = "0.10.2" hex = "0.4.3" tokio-tungstenite = "0.18.0" tunnelbroker_messages = { path = "../../shared/tunnelbroker_messages" } url = "2.3.1" futures-util = "0.3.28" serde_json = "1.0.96" rand = "0.8.5" -reqwest = { version = "0.11", features = ["json", "multipart"] } +reqwest = { version = "0.11", features = ["json", "multipart", "stream"] } serde = "1.0" +comm-services-lib = { path = "../comm-services-lib" } [build-dependencies] tonic-build = "0.8" derive_more = "0.99.16" diff --git a/services/commtest/src/backup/add_attachments.rs b/services/commtest/src/backup/add_attachments.rs deleted file mode 100644 index 949fab828..000000000 --- a/services/commtest/src/backup/add_attachments.rs +++ /dev/null @@ -1,48 +0,0 @@ -use crate::backup::backup_utils::{ - proto::AddAttachmentsRequest, BackupData, BackupServiceClient, -}; -use crate::constants::ATTACHMENT_DELIMITER; -use crate::tools::Error; -use tonic::Request; - -// log_index = None means that we add attachments to the backup -// log_index = Some(x) means that we add attachments to a specific log -pub async fn run( - client: &mut BackupServiceClient, - backup_data: &BackupData, - log_index: Option, -) -> Result<(), Error> { - let cloned_user_id = backup_data.user_id.clone(); - let cloned_backup_id = backup_data.backup_item.id.clone(); - let log_id: String = match log_index { - Some(index) => { - let log_id = backup_data.log_items[index].id.clone(); - println!("add attachments for log {}/{}", index, log_id); - log_id - } - None => { - println!("add attachments for backup"); - String::new() - } - }; - - let holders: String = match log_index { - Some(log_index) => backup_data.log_items[log_index] - .attachments_holders - .join(ATTACHMENT_DELIMITER), - None => backup_data - .backup_item - .attachments_holders - .join(ATTACHMENT_DELIMITER), - }; - - client - .add_attachments(Request::new(AddAttachmentsRequest { - user_id: cloned_user_id, - backup_id: cloned_backup_id, - log_id, - holders, - })) - .await?; - Ok(()) -} diff --git a/services/commtest/src/backup/backup_utils.rs b/services/commtest/src/backup/backup_utils.rs index 159630498..0f9111396 100644 --- a/services/commtest/src/backup/backup_utils.rs +++ b/services/commtest/src/backup/backup_utils.rs @@ -1,101 +1,9 @@ -pub mod proto { - tonic::include_proto!("backup"); -} -pub use proto::backup_service_client::BackupServiceClient; -use std::collections::HashMap; - -// stands for both, backup and log items -#[derive(Clone)] -pub struct Item { - pub id: String, - pub chunks_sizes: Vec, - pub attachments_holders: Vec, -} - -impl Item { - pub fn new( - id: String, - chunks_sizes: Vec, - attachments_holders: Vec, - ) -> Item { - Item { - id, - chunks_sizes, - attachments_holders, - } - } -} - -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct BackupData { - pub user_id: String, - pub device_id: String, - pub backup_item: Item, - pub log_items: Vec, -} - -pub fn compare_backups(backup_data: &BackupData, result: &BackupData) { - // check backup size - let expected: usize = backup_data.backup_item.chunks_sizes.iter().sum(); - let from_result: usize = result.backup_item.chunks_sizes.iter().sum(); - assert_eq!( - from_result, expected, - "backup sizes do not match, expected {}, got {}", - expected, from_result - ); - - // check backup attachments - let expected: usize = backup_data.backup_item.attachments_holders.len(); - let from_result: usize = result.backup_item.attachments_holders.len(); - assert_eq!( - from_result, expected, - "backup: number of attachments holders do not match, expected {}, got {}", - expected, from_result - ); - - // check number of logs - let expected: usize = backup_data.log_items.len(); - let from_result: usize = result.log_items.len(); - assert_eq!( - expected, from_result, - "backup id {} number of logs do not match, expected {}, got {}", - backup_data.backup_item.id, expected, from_result - ); - - // check log sizes - // map - let mut expected_log_map: HashMap = HashMap::new(); - let mut result_log_map: HashMap = HashMap::new(); - for i in 0..backup_data.log_items.len() { - let expected: usize = backup_data.log_items[i].chunks_sizes.iter().sum(); - let insert_result = - expected_log_map.insert(backup_data.log_items[i].id.clone(), expected); - assert_eq!( - insert_result, None, - "expected collection contained duplicated log id: {}", - backup_data.log_items[i].id - ); - let from_result: usize = result.log_items[i].chunks_sizes.iter().sum(); - let insert_result = - result_log_map.insert(result.log_items[i].id.clone(), from_result); - assert_eq!( - insert_result, None, - "expected collection contained duplicated log id: {}", - result.log_items[i].id - ); - } - - for (expected_id, expected_size) in &expected_log_map { - let result_size = result_log_map.get(expected_id).expect(&format!( - "comparing logs: expected id found in result: {}", - expected_id - )); - assert_eq!( - expected_size, result_size, - "comparing logs, sizes don't match, backup {}", - backup_data.backup_item.id - ); - } - - // todo: check logs attachment holders + pub backup_id: String, + pub user_keys_hash: String, + pub user_keys: Vec, + pub user_data_hash: String, + pub user_data: Vec, + pub attachments: Vec, } diff --git a/services/commtest/src/backup/create_new_backup.rs b/services/commtest/src/backup/create_new_backup.rs index 28e2eccbf..e39e51e7c 100644 --- a/services/commtest/src/backup/create_new_backup.rs +++ b/services/commtest/src/backup/create_new_backup.rs @@ -1,69 +1,60 @@ -use crate::backup::backup_utils::{ - proto::create_new_backup_request::Data::*, proto::CreateNewBackupRequest, - BackupData, BackupServiceClient, +use std::convert::Infallible; + +use crate::tools::Error; +use async_stream::stream; +use comm_services_lib::auth::UserIdentity; +use reqwest::{ + multipart::{Form, Part}, + Body, }; -use crate::tools::{generate_stable_nbytes, DataHasher, Error}; -use tonic::Request; + +use super::backup_utils::BackupData; pub async fn run( - client: &mut BackupServiceClient, + url: reqwest::Url, + user_identity: &UserIdentity, backup_data: &BackupData, -) -> Result { - println!("create new backup"); - let cloned_user_id = backup_data.user_id.clone(); - let cloned_device_id = backup_data.device_id.clone(); - let cloned_backup_chunk_sizes = backup_data.backup_item.chunks_sizes.clone(); - let predefined_byte_value = None; - let outbound = async_stream::stream! { - println!(" - sending user id"); - let request = CreateNewBackupRequest { - data: Some(UserId(cloned_user_id)), - }; - yield request; - println!(" - sending device id"); - let request = CreateNewBackupRequest { - data: Some(DeviceId(cloned_device_id)), - }; - yield request; - println!(" - sending key entropy"); - let request = CreateNewBackupRequest { - data: Some(KeyEntropy(vec![65,66,67,68])), - }; - yield request; - println!(" - sending data hash"); - let mut hasher = DataHasher::new(); - for chunk_size in &cloned_backup_chunk_sizes { - DataHasher::update(&mut hasher, generate_stable_nbytes(*chunk_size, predefined_byte_value)); - } +) -> Result<(), Error> { + println!("Creating new backup"); + + let BackupData { + backup_id, + user_keys_hash, + user_keys, + user_data_hash, + user_data, + attachments, + } = backup_data.clone(); - let request = CreateNewBackupRequest { - data: Some(NewCompactionHash(hasher.get_hash().as_bytes().to_vec())), - }; - yield request; - for chunk_size in &cloned_backup_chunk_sizes { - println!(" - sending data chunk {}", chunk_size); - let request = CreateNewBackupRequest { - data: Some(NewCompactionChunk(generate_stable_nbytes(*chunk_size, predefined_byte_value))), - }; - yield request; - } - }; + let client = reqwest::Client::new(); + let form = Form::new() + .text("backup_id", backup_id) + .text("user_keys_hash", user_keys_hash) + .part( + "user_keys", + Part::stream(Body::wrap_stream( + stream! { yield Ok::, Infallible>(user_keys); }, + )), + ) + .text("user_data_hash", user_data_hash) + .part( + "user_data", + Part::stream(Body::wrap_stream( + stream! { yield Ok::, Infallible>(user_data); }, + )), + ) + .text("attachments", attachments.join("\n")); - let mut backup_id: String = String::new(); - let response = client.create_new_backup(Request::new(outbound)).await?; - let mut inbound = response.into_inner(); - while let Some(response) = inbound.message().await? { - if !response.backup_id.is_empty() { - assert!( - backup_id.is_empty(), - "backup id should be returned only once" - ); - backup_id = response.backup_id; - } + let response = client + .post(url.join("backups")?) + .bearer_auth(user_identity.as_authorization_token()?) + .multipart(form) + .send() + .await?; + + if !response.status().is_success() { + return Err(Error::HttpStatus(response.status())); } - assert!( - !backup_id.is_empty(), - "could not get a backup id from the server" - ); - Ok(backup_id) + + Ok(()) } diff --git a/services/commtest/src/backup/mod.rs b/services/commtest/src/backup/mod.rs index e80c13acc..8ddf1f796 100644 --- a/services/commtest/src/backup/mod.rs +++ b/services/commtest/src/backup/mod.rs @@ -1,5 +1,3 @@ -pub mod add_attachments; pub mod backup_utils; pub mod create_new_backup; pub mod pull_backup; -pub mod send_log; diff --git a/services/commtest/src/backup/pull_backup.rs b/services/commtest/src/backup/pull_backup.rs index 7418a5a56..41167a0d9 100644 --- a/services/commtest/src/backup/pull_backup.rs +++ b/services/commtest/src/backup/pull_backup.rs @@ -1,130 +1,80 @@ -use crate::backup::backup_utils::{ - proto::pull_backup_response::Data, proto::pull_backup_response::Data::*, - proto::pull_backup_response::Id, proto::pull_backup_response::Id::*, - proto::PullBackupRequest, BackupData, BackupServiceClient, Item, -}; -use crate::constants::ATTACHMENT_DELIMITER; +use std::fmt::Display; + use crate::tools::Error; -use std::io::{Error as IOError, ErrorKind}; -use tonic::Request; +use comm_services_lib::auth::UserIdentity; -#[derive(PartialEq, Debug)] -enum State { - Compaction, - Log, +#[derive(Debug, Clone)] +pub enum BackupDescriptor { + BackupID { + backup_id: String, + user_identity: UserIdentity, + }, + Latest { + username: String, + }, } -pub async fn run( - client: &mut BackupServiceClient, - backup_data: &BackupData, -) -> Result { - println!("pull backup"); - let cloned_user_id = backup_data.user_id.clone(); - let cloned_backup_id = backup_data.backup_item.id.clone(); +impl Display for BackupDescriptor { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + BackupDescriptor::BackupID { + backup_id, + user_identity, + } => write!( + f, + "backup '{backup_id}' for user '{}'", + user_identity.user_id + ), + BackupDescriptor::Latest { username } => { + write!(f, "latest backup for user '{username}'") + } + } + } +} - let mut result = BackupData { - user_id: String::new(), - device_id: String::new(), - backup_item: Item::new(String::new(), Vec::new(), Vec::new()), - log_items: Vec::new(), - }; +#[derive(Debug, Clone, Copy)] +pub enum RequestedData { + BackupID, + UserKeys, + UserData, +} - let response = client - .pull_backup(Request::new(PullBackupRequest { - user_id: cloned_user_id, - backup_id: cloned_backup_id, - })) - .await?; - let mut inbound = response.into_inner(); - let mut state: State = State::Compaction; - let mut current_id: String = String::new(); - while let Some(response) = inbound.message().await? { - let response_data: Option = response.data; - let id: Option = response.id; - let mut backup_id: Option = None; - let mut log_id: Option = None; - match id { - Some(BackupId(id)) => backup_id = Some(id), - Some(LogId(id)) => log_id = Some(id), - None => {} - }; - match response_data { - Some(CompactionChunk(chunk)) => { - assert_eq!( - state, - State::Compaction, - "invalid state, expected compaction, got {:?}", - state - ); - current_id = backup_id.ok_or(IOError::new( - ErrorKind::Other, - "backup id expected but not received", - ))?; - println!( - "compaction (id {}), pulling chunk (size: {})", - current_id, - chunk.len() - ); - result.backup_item.chunks_sizes.push(chunk.len()) - } - Some(LogChunk(chunk)) => { - if state == State::Compaction { - state = State::Log; - } - assert_eq!( - state, - State::Log, - "invalid state, expected log, got {:?}", - state - ); - let log_id = log_id.ok_or(IOError::new( - ErrorKind::Other, - "log id expected but not received", - ))?; - if log_id != current_id { - result.log_items.push(Item::new( - log_id.clone(), - Vec::new(), - Vec::new(), - )); - current_id = log_id; - } - let log_items_size = result.log_items.len() - 1; - result.log_items[log_items_size] - .chunks_sizes - .push(chunk.len()); +pub async fn run( + url: reqwest::Url, + backup_descriptor: BackupDescriptor, + requested_data: RequestedData, +) -> Result, Error> { + println!("Pulling data: {requested_data:?}, from {backup_descriptor}"); - println!("log (id {}) chunk size {}", current_id, chunk.len()); - } - None => {} + let client = reqwest::Client::new(); + let url = url.join("backups/")?; + let url = match &backup_descriptor { + BackupDescriptor::BackupID { backup_id, .. } => { + url.join(&format!("{backup_id}/"))? } - if let Some(holders) = response.attachment_holders { - let holders_split: Vec<&str> = - holders.split(ATTACHMENT_DELIMITER).collect(); - if state == State::Compaction { - for holder in holders_split { - if holder.len() == 0 { - continue; - } - println!("attachments for the backup: {}", holder); - result - .backup_item - .attachments_holders - .push(holder.to_string()); - } - } else if state == State::Log { - println!("attachments for the log {:?}: {}", current_id, holders); - for holder in holders_split { - if holder.len() == 0 { - continue; - } - let log_items_size = result.log_items.len() - 1; - result.log_items[log_items_size] - .attachments_holders - .push(holder.to_string()) - } - } + BackupDescriptor::Latest { username } => { + url.join(&format!("latest/{username}/"))? } + }; + let url = match &requested_data { + RequestedData::BackupID => url.join("backup_id")?, + RequestedData::UserKeys => url.join("user_keys")?, + RequestedData::UserData => url.join("user_data")?, + }; + + let mut request = client.get(url); + + if let BackupDescriptor::BackupID { user_identity, .. } = backup_descriptor { + request = request.bearer_auth(user_identity.as_authorization_token()?) } + + let response = request.send().await?; + + if !response.status().is_success() { + return Err(Error::HttpStatus(response.status())); + } + + let result = response.bytes().await?.to_vec(); + Ok(result) } diff --git a/services/commtest/src/backup/send_log.rs b/services/commtest/src/backup/send_log.rs deleted file mode 100644 index ca70a51f2..000000000 --- a/services/commtest/src/backup/send_log.rs +++ /dev/null @@ -1,53 +0,0 @@ -use crate::backup::backup_utils::{ - proto::{send_log_request::Data::*, SendLogRequest}, - BackupData, BackupServiceClient, -}; -use crate::tools::{generate_stable_nbytes, DataHasher, Error}; -use tonic::Request; - -pub async fn run( - client: &mut BackupServiceClient, - backup_data: &BackupData, - log_index: usize, -) -> Result { - println!("send log"); - let cloned_user_id = backup_data.user_id.clone(); - let cloned_backup_id = backup_data.backup_item.id.clone(); - let cloned_log_sizes = backup_data.log_items[log_index].chunks_sizes.clone(); - let predefined_byte_value = None; - let outbound = async_stream::stream! { - println!(" - sending user id"); - let request = SendLogRequest { - data: Some(UserId(cloned_user_id)), - }; - yield request; - println!(" - sending backup id"); - let request = SendLogRequest { - data: Some(BackupId(cloned_backup_id)), - }; - yield request; - println!(" - sending log hash"); - let mut hasher = DataHasher::new(); - for chunk_size in &cloned_log_sizes { - DataHasher::update(&mut hasher, generate_stable_nbytes(*chunk_size, predefined_byte_value)); - } - - let request = SendLogRequest { - data: Some(LogHash(hasher.get_hash().as_bytes().to_vec())), - }; - yield request; - println!(" - sending log data"); - for log_size in &cloned_log_sizes { - println!(" - sending log data {}", *log_size); - let request = SendLogRequest { - data: Some(LogData(generate_stable_nbytes(*log_size, predefined_byte_value))), - }; - yield request; - } - }; - - let response = client.send_log(Request::new(outbound)).await?; - let inbound = response.into_inner(); - println!("send log response: {:?}", inbound.log_checkpoint); - Ok(inbound.log_checkpoint) -} diff --git a/services/commtest/src/tools.rs b/services/commtest/src/tools.rs index a442fd8f8..73a47fec4 100644 --- a/services/commtest/src/tools.rs +++ b/services/commtest/src/tools.rs @@ -1,60 +1,64 @@ use hex::ToHex; use num_cpus; use sha2::{Digest, Sha512}; use std::env; use url::ParseError; pub fn generate_stable_nbytes( number_of_bytes: usize, predefined_byte_value: Option, ) -> Vec { let byte_value = predefined_byte_value.unwrap_or(b'A'); return vec![byte_value; number_of_bytes]; } #[derive( Debug, derive_more::Display, derive_more::From, derive_more::Error, )] pub enum Error { #[display(...)] Proto(std::io::Error), #[display(...)] Tonic(tonic::transport::Error), #[display(...)] TonicStatus(tonic::Status), #[display(...)] Reqwest(reqwest::Error), #[display(fmt = "HTTP status: {:?}.", _0)] HttpStatus(#[error(ignore)] reqwest::StatusCode), #[display(...)] ParseError(ParseError), + #[display(...)] + JsonError(serde_json::error::Error), + #[display(...)] + FromUtf8Error(std::string::FromUtf8Error), } pub fn obtain_number_of_threads() -> usize { let number_of_threads_str: String = env::var("COMM_NUMBER_OF_THREADS").unwrap(); if number_of_threads_str.is_empty() { return num_cpus::get(); } return number_of_threads_str.parse::().unwrap(); } pub struct DataHasher { hasher: Sha512, } impl DataHasher { pub fn new() -> DataHasher { return DataHasher { hasher: Sha512::new(), }; } pub fn update(data_hasher: &mut DataHasher, bytes: Vec) { data_hasher.hasher.update(bytes); } pub fn get_hash(self) -> String { let hash = self.hasher.finalize(); return hash.encode_hex::(); } } diff --git a/services/commtest/tests/backup_integration_test.rs b/services/commtest/tests/backup_integration_test.rs index 7a56233e2..a627a3351 100644 --- a/services/commtest/tests/backup_integration_test.rs +++ b/services/commtest/tests/backup_integration_test.rs @@ -1,126 +1,110 @@ use bytesize::ByteSize; -use commtest::backup::{ - add_attachments, - backup_utils::{self, BackupData, BackupServiceClient, Item}, - create_new_backup, pull_backup, send_log, +use comm_services_lib::{auth::UserIdentity, backup::LatestBackupIDResponse}; +use commtest::{ + backup::{ + backup_utils::BackupData, + create_new_backup, + pull_backup::{self, BackupDescriptor, RequestedData}, + }, + tools::{generate_stable_nbytes, Error}, }; -use commtest::constants; -use commtest::tools::Error; -use std::collections::HashMap; use std::env; #[tokio::test] async fn backup_integration_test() -> Result<(), Error> { let port = env::var("COMM_SERVICES_PORT_BACKUP") - .expect("port env var expected but not received"); - let mut client = - BackupServiceClient::connect(format!("http://localhost:{}", port)).await?; + .expect("port env var expected but not received") + .parse() + .expect("port env var should be a number"); - let attachments_fill_size: u64 = 500; + let mut url = reqwest::Url::parse("http://localhost")?; + url.set_port(Some(port)).expect("failed to set port"); - let mut backup_data = BackupData { - user_id: "user0000".to_string(), - device_id: "device0000".to_string(), - backup_item: Item::new( - String::new(), - vec![ByteSize::mib(1).as_u64() as usize; 6], - vec![ - "holder0".to_string(), - "holder1".to_string(), - "holder2".to_string(), - ], - ), - log_items: vec![ - // the item that almost hits the DB limit, we're going to later add a long - // list of attachments, so that causes it to exceed the limit. - // In this case its data should be moved to the S3 - Item::new( - String::new(), - vec![ - *constants::DYNAMO_DB_ITEM_SIZE_LIMIT - - ByteSize::b(attachments_fill_size / 2).as_u64() as usize, - ], - vec!["holder0".to_string(), "holder1".to_string()], + let backup_datas = [ + BackupData { + backup_id: "b1".to_string(), + user_keys_hash: "kh1".to_string(), + user_keys: generate_stable_nbytes( + ByteSize::kib(4).as_u64() as usize, + Some(b'a'), ), - // just a small item - Item::new( - String::new(), - vec![ByteSize::b(100).as_u64() as usize], - vec!["holder0".to_string()], + user_data_hash: "dh1".to_string(), + user_data: generate_stable_nbytes( + ByteSize::mib(4).as_u64() as usize, + Some(b'A'), ), - // a big item that should be placed in the S3 right away - Item::new( - String::new(), - vec![ - *constants::GRPC_CHUNK_SIZE_LIMIT, - *constants::GRPC_CHUNK_SIZE_LIMIT, - ], - vec![ - "holder0".to_string(), - "holder1".to_string(), - "holder2".to_string(), - ], + attachments: vec![], + }, + BackupData { + backup_id: "b2".to_string(), + user_keys_hash: "kh2".to_string(), + user_keys: generate_stable_nbytes( + ByteSize::kib(4).as_u64() as usize, + Some(b'b'), ), - ], + user_data_hash: "dh2".to_string(), + user_data: generate_stable_nbytes( + ByteSize::mib(4).as_u64() as usize, + Some(b'B'), + ), + attachments: vec![], + }, + ]; + + let user_identity = UserIdentity { + user_id: "1".to_string(), + access_token: "dummy access token".to_string(), + device_id: "dummy device_id".to_string(), }; - backup_data.backup_item.id = - create_new_backup::run(&mut client, &backup_data).await?; - println!("backup id in main: {}", backup_data.backup_item.id); + create_new_backup::run(url.clone(), &user_identity, &backup_datas[0]).await?; + create_new_backup::run(url.clone(), &user_identity, &backup_datas[1]).await?; - add_attachments::run(&mut client, &backup_data, None).await?; + // Test direct lookup + let second_backup_descriptor = BackupDescriptor::BackupID { + backup_id: backup_datas[1].backup_id.clone(), + user_identity: user_identity.clone(), + }; - for log_index in 0..backup_data.log_items.len() { - backup_data.log_items[log_index].id = - send_log::run(&mut client, &backup_data, log_index).await?; - add_attachments::run(&mut client, &backup_data, Some(log_index)).await?; - } + let user_keys = pull_backup::run( + url.clone(), + second_backup_descriptor.clone(), + RequestedData::UserKeys, + ) + .await?; + assert_eq!(user_keys, backup_datas[1].user_keys); - let result: BackupData = pull_backup::run(&mut client, &backup_data).await?; + let user_data = pull_backup::run( + url.clone(), + second_backup_descriptor.clone(), + RequestedData::UserData, + ) + .await?; + assert_eq!(user_data, backup_datas[1].user_data); - backup_utils::compare_backups(&backup_data, &result); + // Test latest backup lookup + let latest_backup_descriptor = BackupDescriptor::Latest { + // Initial version of the backup service uses `user_id` in place of a username + username: "1".to_string(), + }; - // push so many attachments that the log item's data will have to be moved - // from the db to the s3 - let mut attachments_size = 0; - let mut i = backup_data.log_items[0].attachments_holders.len(); - let mut new_attachments: Vec = Vec::new(); - while attachments_size < (attachments_fill_size as usize) { - let att = format!("holder{}", i); - attachments_size += att.len(); - new_attachments.push(att); - i += 1; - } + let backup_id_response = pull_backup::run( + url.clone(), + latest_backup_descriptor.clone(), + RequestedData::BackupID, + ) + .await?; + let response: LatestBackupIDResponse = + serde_json::from_slice(&backup_id_response)?; + assert_eq!(response.backup_id, backup_datas[1].backup_id); - let mut old_attachments = - backup_data.log_items[0].attachments_holders.clone(); - backup_data.log_items[0].attachments_holders = new_attachments; - add_attachments::run(&mut client, &backup_data, Some(0)).await?; - backup_data.log_items[0] - .attachments_holders - .append(&mut old_attachments); - let result = pull_backup::run(&mut client, &backup_data).await?; - // check logs attachments - // map - let mut expected_log_map: HashMap = HashMap::new(); - let mut result_log_map: HashMap = HashMap::new(); - for i in 0..backup_data.log_items.len() { - let expected: usize = backup_data.log_items[i].attachments_holders.len(); - expected_log_map.insert(backup_data.log_items[i].id.clone(), expected); - let from_result: usize = result.log_items[i].attachments_holders.len(); - result_log_map.insert(result.log_items[i].id.clone(), from_result); - } - for (expected_id, expected_size) in &expected_log_map { - let result_size = result_log_map.get(expected_id).expect(&format!( - "comparing logs attachments: expected id found in result: {}", - expected_id - )); - assert_eq!( - expected_size, result_size, - "comparing logs attachments, sizes don't match, backup {}", - backup_data.backup_item.id - ); - } + let user_keys = pull_backup::run( + url.clone(), + latest_backup_descriptor.clone(), + RequestedData::UserKeys, + ) + .await?; + assert_eq!(user_keys, backup_datas[1].user_keys); Ok(()) } diff --git a/services/commtest/tests/backup_performance_test.rs b/services/commtest/tests/backup_performance_test.rs index abbb33723..1be2037d8 100644 --- a/services/commtest/tests/backup_performance_test.rs +++ b/services/commtest/tests/backup_performance_test.rs @@ -1,231 +1,190 @@ use bytesize::ByteSize; -use commtest::backup::{ - add_attachments, - backup_utils::{self, BackupData, BackupServiceClient, Item}, - create_new_backup, pull_backup, send_log, +use comm_services_lib::{auth::UserIdentity, backup::LatestBackupIDResponse}; +use commtest::{ + backup::{ + backup_utils::BackupData, + create_new_backup, + pull_backup::{self, BackupDescriptor}, + }, + tools::{generate_stable_nbytes, obtain_number_of_threads, Error}, }; -use commtest::tools::{obtain_number_of_threads, Error}; use std::env; -use std::sync::mpsc::channel; -use tokio::runtime::Runtime; +use tokio::{runtime::Runtime, task::JoinSet}; #[tokio::test] async fn backup_performance_test() -> Result<(), Error> { let port = env::var("COMM_SERVICES_PORT_BACKUP") - .expect("port env var expected but not received"); - let client = - BackupServiceClient::connect(format!("http://localhost:{}", port)).await?; + .expect("port env var expected but not received") + .parse() + .expect("port env var should be a number"); + + let mut url = reqwest::Url::parse("http://localhost")?; + url.set_port(Some(port)).expect("failed to set port"); let number_of_threads = obtain_number_of_threads(); + let rt = Runtime::new().unwrap(); + println!( "Running performance tests for backup, number of threads: {}", number_of_threads ); let mut backup_data = vec![]; - for i in 0..number_of_threads { backup_data.push(BackupData { - user_id: format!("user{}", i), - device_id: format!("device{}", i), - backup_item: Item::new( - String::new(), - vec![ByteSize::mib(1).as_u64() as usize; 3 + (i % 5)], - (0..(i % 5)).map(|x| format!("holder{}", x)).collect(), + backup_id: format!("b{i}"), + user_keys_hash: format!("kh{i}"), + user_keys: generate_stable_nbytes( + ByteSize::kib(4).as_u64() as usize, + Some(i as u8), ), - log_items: (0..(i % 4)) - .map(|x| { - Item::new( - String::new(), - vec![ByteSize::mib(1).as_u64() as usize; 2 + (x % 2)], - (0..(i % 5)).map(|x| format!("holder{}-{}", i, x)).collect(), - ) - }) - .collect(), + user_data_hash: format!("dh{i}"), + user_data: generate_stable_nbytes( + ByteSize::mib(4).as_u64() as usize, + Some(i as u8), + ), + attachments: vec![], }); } - let rt = Runtime::new().unwrap(); + let user_identities = [ + UserIdentity { + user_id: "1".to_string(), + access_token: "dummy access token".to_string(), + device_id: "dummy device_id".to_string(), + }, + UserIdentity { + user_id: "2".to_string(), + access_token: "dummy access token".to_string(), + device_id: "dummy device_id".to_string(), + }, + ]; + tokio::task::spawn_blocking(move || { - // CREATE NEW BACKUP + println!("Creating new backups"); rt.block_on(async { - println!("performing CREATE NEW BACKUP operations"); - let mut handlers = vec![]; - let (sender, receiver) = channel::<(usize, String)>(); + let mut set = JoinSet::new(); for (i, item) in backup_data.iter().enumerate() { - let item_cloned = item.clone(); - let mut client_cloned = client.clone(); - let sender_cloned = sender.clone(); - handlers.push(tokio::spawn(async move { - let id = create_new_backup::run(&mut client_cloned, &item_cloned) - .await - .unwrap(); - assert!( - !id.is_empty(), - "backup id should not be empty after creating a new backup" - ); - sender_cloned.send((i, id)).unwrap(); - })); + let url = url.clone(); + let user = user_identities[i % user_identities.len()].clone(); + let item = item.clone(); + set.spawn(async move { + create_new_backup::run(url, &user, &item).await.unwrap(); + }); } - // https://docs.rs/tokio/1.1.0/tokio/sync/mpsc/struct.Receiver.html#method.recv - // The channel is closed when all senders have been dropped, or when close - // is called. The best option here is to clone the sender for every - // thread, drop the original one and let all the clones be dropped when - // going out of scope which is equal to the parent thread's termination. - drop(sender); - for handler in handlers { - handler.await.unwrap(); - } - for data in receiver { - println!("received: {:?}", data); - let (index, id) = data; - backup_data[index].backup_item.id = id; + while let Some(result) = set.join_next().await { + result.unwrap(); } }); - // check if backup IDs are properly set - for (i, item) in backup_data.iter().enumerate() { - assert!( - !item.backup_item.id.is_empty(), - "missing backup id for index {}", - i - ); - } - - // ADD ATTACHMENTS - BACKUPS + let mut latest_ids_for_user = vec![]; + println!("Reading latest ids"); rt.block_on(async { - println!("performing ADD ATTACHMENTS - BACKUPS operations"); let mut handlers = vec![]; - for item in &backup_data { - let item_cloned = item.clone(); - let mut client_cloned = client.clone(); + for user in &user_identities { + let url = url.clone(); + let descriptor = BackupDescriptor::Latest { + username: user.user_id.clone(), + }; handlers.push(tokio::spawn(async move { - if !item_cloned.backup_item.attachments_holders.is_empty() { - add_attachments::run(&mut client_cloned, &item_cloned, None) - .await - .unwrap(); - } + let response = pull_backup::run( + url, + descriptor, + pull_backup::RequestedData::BackupID, + ) + .await + .unwrap(); + + serde_json::from_slice::(&response).unwrap() })); } for handler in handlers { - handler.await.unwrap(); + latest_ids_for_user.push(handler.await.unwrap().backup_id); } }); - // SEND LOG + assert_eq!(latest_ids_for_user.len(), user_identities.len()); + + let mut latest_user_keys_for_user = vec![]; + println!("Reading latest user keys"); rt.block_on(async { - println!("performing SEND LOG operations"); let mut handlers = vec![]; - let (sender, receiver) = channel::<(usize, usize, String)>(); - for (backup_index, backup_item) in backup_data.iter().enumerate() { - let backup_item_cloned = backup_item.clone(); - for log_index in 0..backup_item_cloned.log_items.len() { - let backup_item_recloned = backup_item_cloned.clone(); - let mut client_cloned = client.clone(); - let sender_cloned = sender.clone(); - handlers.push(tokio::spawn(async move { - println!( - "sending log, backup index: [{}] log index: [{}]", - backup_index, log_index - ); - let id = send_log::run( - &mut client_cloned, - &backup_item_recloned, - log_index, - ) - .await - .unwrap(); - assert!(!id.is_empty(), "log id should not be empty after sending"); - sender_cloned.send((backup_index, log_index, id)).unwrap(); - })); - } + for user in &user_identities { + let url = url.clone(); + let descriptor = BackupDescriptor::Latest { + username: user.user_id.clone(), + }; + handlers.push(tokio::spawn(async move { + pull_backup::run( + url, + descriptor, + pull_backup::RequestedData::UserKeys, + ) + .await + .unwrap() + })); } - // https://docs.rs/tokio/1.1.0/tokio/sync/mpsc/struct.Receiver.html#method.recv - // The channel is closed when all senders have been dropped, or when close - // is called. The best option here is to clone the sender for every - // thread, drop the original one and let all the clones be dropped when - // going out of scope which is equal to the parent thread's termination. - drop(sender); for handler in handlers { - handler.await.unwrap(); - } - for data in receiver { - println!("received: {:?}", data); - let (backup_index, log_index, id) = data; - backup_data[backup_index].log_items[log_index].id = id; + latest_user_keys_for_user.push(handler.await.unwrap()); } }); - // check if log IDs are properly set - for (backup_index, backup_item) in backup_data.iter().enumerate() { - for (log_index, log_item) in backup_item.log_items.iter().enumerate() { - assert!( - !log_item.id.is_empty(), - "missing log id for backup index {} and log index {}", - backup_index, - log_index - ); - } - } - - // ADD ATTACHMENTS - LOGS - rt.block_on(async { - println!("performing ADD ATTACHMENTS - LOGS operations"); - let mut handlers = vec![]; - for backup_item in &backup_data { - let backup_item_cloned = backup_item.clone(); - for log_index in 0..backup_item_cloned.log_items.len() { - let backup_item_recloned = backup_item_cloned.clone(); - let mut client_cloned = client.clone(); - handlers.push(tokio::spawn(async move { - if !backup_item_recloned - .backup_item - .attachments_holders - .is_empty() - { - add_attachments::run( - &mut client_cloned, - &backup_item_recloned, - Some(log_index), - ) - .await - .unwrap(); - } - })); - } - } + assert_eq!(latest_user_keys_for_user.len(), user_identities.len()); + for (backup_id, user_keys) in + latest_ids_for_user.iter().zip(latest_user_keys_for_user) + { + let backup = backup_data + .iter() + .find(|data| data.backup_id == *backup_id) + .expect("Request should return existing backup data"); - for handler in handlers { - handler.await.unwrap(); - } - }); + assert_eq!(backup.user_keys, user_keys); + } - // PULL BACKUP + let mut latest_user_data_for_user = vec![]; + println!("Reading latest user data"); rt.block_on(async { - println!("performing PULL BACKUP operations"); let mut handlers = vec![]; - for item in backup_data { - let item_cloned = item.clone(); - let mut client_cloned = client.clone(); + for (i, backup_id) in latest_ids_for_user.iter().enumerate() { + let url = url.clone(); + let descriptor = BackupDescriptor::BackupID { + backup_id: backup_id.clone(), + user_identity: user_identities[i % user_identities.len()].clone(), + }; handlers.push(tokio::spawn(async move { - let result = pull_backup::run(&mut client_cloned, &item_cloned) - .await - .unwrap(); - backup_utils::compare_backups(&item_cloned, &result); + pull_backup::run( + url, + descriptor, + pull_backup::RequestedData::UserData, + ) + .await + .unwrap() })); } for handler in handlers { - handler.await.unwrap(); + latest_user_data_for_user.push(handler.await.unwrap()); } }); + + assert_eq!(latest_user_data_for_user.len(), user_identities.len()); + for (backup_id, user_data) in + latest_ids_for_user.iter().zip(latest_user_data_for_user) + { + let backup = backup_data + .iter() + .find(|data| data.backup_id == *backup_id) + .expect("Request should return existing backup data"); + + assert_eq!(backup.user_data, user_data); + } }) .await .expect("Task panicked"); Ok(()) }