From a854b8f14fe0f3c8842b4f9c89860d534f162704 Mon Sep 17 00:00:00 2001 From: einliterflasche Date: Tue, 10 Dec 2024 14:19:46 +0100 Subject: [PATCH] fix missing rustls --- Cargo.lock | 170 +++++++++++++++++++++++++++++++++++++++----- swap/Cargo.toml | 1 + swap/src/bin/asb.rs | 6 ++ 3 files changed, 159 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 24dca526..87e0bc25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,6 +717,32 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "aws-lc-rs" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f47bb8cc16b669d267eeccf585aea077d0882f4777b1c1f740217885d6e6e5a3" +dependencies = [ + "aws-lc-sys", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2101df3813227bbaaaa0b04cd61c534c7954b22bd68d399b440be937dc63ff7" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", +] + [[package]] name = "backoff" version = "0.4.0" @@ -884,6 +910,29 @@ dependencies = [ "virtue", ] +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.90", + "which", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -1341,6 +1390,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfb" version = "0.7.3" @@ -1424,6 +1482,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading 0.8.6", +] + [[package]] name = "clap" version = "2.34.0" @@ -1475,6 +1544,15 @@ dependencies = [ "error-code", ] +[[package]] +name = "cmake" +version = "0.1.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" +dependencies = [ + "cc", +] + [[package]] name = "coarsetime" version = "0.1.34" @@ -2152,7 +2230,7 @@ checksum = "e1b84d32b18d9a256d81e4fec2e4cfd0ab6dde5e5ff49be1713ae0adbd0060c2" dependencies = [ "heck 0.5.0", "indexmap 2.7.0", - "itertools", + "itertools 0.13.0", "proc-macro-crate 3.2.0", "proc-macro2", "quote", @@ -2893,6 +2971,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fslock" version = "0.2.1" @@ -4296,6 +4380,15 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -4633,6 +4726,12 @@ dependencies = [ "spin 0.9.8", ] +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libappindicator" version = "0.9.0" @@ -4653,7 +4752,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", - "libloading", + "libloading 0.7.4", "once_cell", ] @@ -4685,6 +4784,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.48.5", +] + [[package]] name = "libm" version = "0.2.11" @@ -6755,6 +6864,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primeorder" version = "0.13.6" @@ -7582,6 +7701,7 @@ version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring 0.17.8", @@ -7658,6 +7778,7 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", @@ -8962,6 +9083,7 @@ dependencies = [ "reqwest", "rust_decimal", "rust_decimal_macros", + "rustls 0.23.19", "serde", "serde_cbor", "serde_json", @@ -9947,7 +10069,7 @@ checksum = "3915f18c6574f797c5d59089074f79f81e6d93495d726179eebc9084126d617e" dependencies = [ "derive_more 1.0.0", "hex", - "itertools", + "itertools 0.13.0", "libc", "paste", "rand 0.8.5", @@ -10084,7 +10206,7 @@ dependencies = [ "educe", "futures", "humantime-serde", - "itertools", + "itertools 0.13.0", "once_cell", "oneshot-fused-workaround", "pin-project", @@ -10130,7 +10252,7 @@ dependencies = [ "figment", "fs-mistrust", "futures", - "itertools", + "itertools 0.13.0", "notify", "once_cell", "paste", @@ -10191,7 +10313,7 @@ dependencies = [ "http 1.1.0", "httparse", "httpdate", - "itertools", + "itertools 0.13.0", "memchr", "thiserror 1.0.69", "tor-circmgr", @@ -10224,7 +10346,7 @@ dependencies = [ "hex", "humantime", "humantime-serde", - "itertools", + "itertools 0.13.0", "memmap2", "once_cell", "oneshot-fused-workaround", @@ -10302,7 +10424,7 @@ dependencies = [ "futures", "humantime", "humantime-serde", - "itertools", + "itertools 0.13.0", "num_enum", "oneshot-fused-workaround", "pin-project", @@ -10340,7 +10462,7 @@ dependencies = [ "educe", "either", "futures", - "itertools", + "itertools 0.13.0", "oneshot-fused-workaround", "postage", "rand 0.8.5", @@ -10382,7 +10504,7 @@ dependencies = [ "derive-deftly", "derive_more 1.0.0", "digest 0.10.7", - "itertools", + "itertools 0.13.0", "paste", "rand 0.8.5", "safelog", @@ -10419,7 +10541,7 @@ dependencies = [ "growable-bloom-filter", "hex", "humantime", - "itertools", + "itertools 0.13.0", "k12", "once_cell", "oneshot-fused-workaround", @@ -10493,7 +10615,7 @@ dependencies = [ "glob-match", "humantime", "inventory", - "itertools", + "itertools 0.13.0", "rand 0.8.5", "serde", "signature 2.2.0", @@ -10524,7 +10646,7 @@ dependencies = [ "derive_builder_fork_arti", "derive_more 1.0.0", "hex", - "itertools", + "itertools 0.13.0", "safelog", "serde", "serde_with 3.11.0", @@ -10599,7 +10721,7 @@ dependencies = [ "dyn-clone", "educe", "futures", - "itertools", + "itertools 0.13.0", "paste", "pin-project", "serde", @@ -10628,7 +10750,7 @@ dependencies = [ "futures", "hex", "humantime", - "itertools", + "itertools 0.13.0", "num_enum", "rand 0.8.5", "serde", @@ -10664,7 +10786,7 @@ dependencies = [ "educe", "hex", "humantime", - "itertools", + "itertools 0.13.0", "once_cell", "phf 0.11.2", "rand 0.8.5", @@ -10706,7 +10828,7 @@ dependencies = [ "fslock", "fslock-guard", "futures", - "itertools", + "itertools 0.13.0", "oneshot-fused-workaround", "paste", "sanitize-filename", @@ -10835,7 +10957,7 @@ dependencies = [ "educe", "futures", "humantime", - "itertools", + "itertools 0.13.0", "oneshot-fused-workaround", "pin-project", "priority-queue", @@ -11804,6 +11926,18 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "whoami" version = "1.5.2" diff --git a/swap/Cargo.toml b/swap/Cargo.toml index babc5470..dda7cc88 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -60,6 +60,7 @@ reqwest = { version = "0.12", features = [ ], default-features = false } rust_decimal = { version = "1", features = [ "serde-float" ] } rust_decimal_macros = "1" +rustls = "0.23" serde = { version = "1.0", features = [ "derive" ] } serde_cbor = "0.11" serde_json = "1" diff --git a/swap/src/bin/asb.rs b/swap/src/bin/asb.rs index 19e3f29c..46e4c7a8 100644 --- a/swap/src/bin/asb.rs +++ b/swap/src/bin/asb.rs @@ -40,6 +40,12 @@ const DEFAULT_WALLET_NAME: &str = "asb-wallet"; #[tokio::main] pub async fn main() -> Result<()> { + rustls::crypto::ring::default_provider() + .install_default() + .map_err(|e| + anyhow::anyhow!("failed to install default rustls provider: {:?}", e) + )?; + let Arguments { testnet, json,