From 12f3028b62b9d693f181687797881c1cf5f4625e Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Sat, 7 Sep 2024 17:30:34 +0300 Subject: [PATCH] Remove openssl and replace with rustls + ring + webpki_roots --- Cargo.lock | 313 +++++++++-------------- Cargo.toml | 57 +++-- cli/Cargo.toml | 1 + cli/src/cli.rs | 2 + kaspad/Cargo.toml | 1 + kaspad/src/main.rs | 2 + rpc/wrpc/examples/subscriber/Cargo.toml | 1 + rpc/wrpc/examples/subscriber/src/main.rs | 1 + rpc/wrpc/proxy/Cargo.toml | 1 + rpc/wrpc/proxy/src/main.rs | 2 + rpc/wrpc/server/Cargo.toml | 12 +- rpc/wrpc/wasm/Cargo.toml | 1 + simpa/Cargo.toml | 3 +- simpa/src/main.rs | 2 + wallet/wasm/Cargo.toml | 2 +- 15 files changed, 163 insertions(+), 238 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d1ebf9cfa..95f3d0964 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -538,7 +538,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "which", ] @@ -558,7 +558,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.75", ] @@ -1356,7 +1356,7 @@ dependencies = [ "lazy_static", "mintex", "parking_lot", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", "thousands", @@ -1606,21 +1606,6 @@ 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.2.1" @@ -2106,6 +2091,7 @@ dependencies = [ "tokio", "tokio-rustls 0.26.0", "tower-service", + "webpki-roots 0.26.5", ] [[package]] @@ -2120,22 +2106,6 @@ dependencies = [ "tokio-io-timeout", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.4.1", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.7" @@ -2494,6 +2464,7 @@ dependencies = [ "nw-sys", "pad", "regex", + "rustls 0.23.12", "separator", "serde", "serde_json", @@ -3660,6 +3631,7 @@ dependencies = [ "kaspa-notify", "kaspa-rpc-core", "kaspa-wrpc-client", + "rustls 0.23.12", "tokio", "workflow-core", "workflow-log", @@ -3677,6 +3649,7 @@ dependencies = [ "kaspa-rpc-macros", "kaspa-wrpc-server", "num_cpus", + "rustls 0.23.12", "thiserror", "tokio", "workflow-core", @@ -3701,7 +3674,6 @@ dependencies = [ "kaspa-utils", "log", "num_cpus", - "openssl", "paste", "serde", "thiserror", @@ -3730,6 +3702,7 @@ dependencies = [ "kaspa-rpc-macros", "kaspa-wasm-core", "kaspa-wrpc-client", + "ring", "serde", "serde-wasm-bindgen", "serde_json", @@ -3778,6 +3751,7 @@ dependencies = [ "num_cpus", "rand 0.8.5", "rayon", + "rustls 0.23.12", "serde", "serde_with", "tempfile", @@ -4246,23 +4220,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "ndarray" version = "0.13.1" @@ -4524,60 +4481,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "openssl" -version = "0.10.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" -dependencies = [ - "bitflags 2.6.0", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.75", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-src" -version = "300.3.1+3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" -dependencies = [ - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" @@ -4926,6 +4829,54 @@ dependencies = [ "prost", ] +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.0.0", + "rustls 0.23.12", + "socket2 0.5.7", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring", + "rustc-hash 2.0.0", + "rustls 0.23.12", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +dependencies = [ + "libc", + "once_cell", + "socket2 0.5.7", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -5117,29 +5068,31 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-rustls", - "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls 0.23.12", "rustls-pemfile 2.1.3", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", "system-configuration", "tokio", - "tokio-native-tls", + "tokio-rustls 0.26.0", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots 0.26.5", "windows-registry", ] @@ -5222,6 +5175,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.0" @@ -5277,6 +5236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "once_cell", + "ring", "rustls-pki-types", "rustls-webpki 0.102.6", "subtle", @@ -5359,15 +5319,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -5410,29 +5361,6 @@ dependencies = [ "cc", ] -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.6.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "semver" version = "1.0.23" @@ -5689,6 +5617,7 @@ dependencies = [ "rand 0.8.5", "rand_distr 0.4.3", "rayon", + "rustls 0.23.12", "secp256k1", "tokio", ] @@ -5875,9 +5804,9 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -6068,16 +5997,6 @@ dependencies = [ "syn 2.0.75", ] -[[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.24.1" @@ -6118,10 +6037,12 @@ checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", - "native-tls", + "rustls 0.23.12", + "rustls-pki-types", "tokio", - "tokio-native-tls", + "tokio-rustls 0.26.0", "tungstenite", + "webpki-roots 0.26.5", ] [[package]] @@ -6211,6 +6132,7 @@ dependencies = [ "tower-layer", "tower-service", "tracing", + "webpki-roots 0.25.4", ] [[package]] @@ -6332,8 +6254,9 @@ dependencies = [ "http 1.1.0", "httparse", "log", - "native-tls", "rand 0.8.5", + "rustls 0.23.12", + "rustls-pki-types", "sha1", "thiserror", "utf-8", @@ -6649,6 +6572,21 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "webpki-roots" +version = "0.26.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "which" version = "4.4.2" @@ -6953,8 +6891,7 @@ dependencies = [ [[package]] name = "workflow-chrome" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97134771e915c188b83d7a704b7ab626ef7a5c403deb5f09e89387536a1f3156" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "cfg-if 1.0.0", "chrome-sys", @@ -6968,8 +6905,7 @@ dependencies = [ [[package]] name = "workflow-core" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff42951d05b777c35c0650fa1d16bef24f37e4aae539d06463bcedb2d8125e90" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "async-channel 2.3.1", "async-std", @@ -7001,8 +6937,7 @@ dependencies = [ [[package]] name = "workflow-core-macros" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "137266453ee5696254d8cc0cf1a535ad931be18860b657749f1ea79431c95129" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "convert_case 0.6.0", "parse-variants", @@ -7018,8 +6953,7 @@ dependencies = [ [[package]] name = "workflow-dom" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f632b72a510fbd06711ac00edd41800f5ff789af66ef295736a0b74fa288fde" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "futures", "js-sys", @@ -7036,8 +6970,7 @@ dependencies = [ [[package]] name = "workflow-http" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8974f653aa090c4627738082a3e532c5b70ef75bc5d8bdc00e9df93a84c6a8" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "cfg-if 1.0.0", "reqwest", @@ -7052,8 +6985,7 @@ dependencies = [ [[package]] name = "workflow-log" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a0f71b5bd0fc4fe6e256cce3c9ba3b888f154533a9c91bec647bac715e9c37" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "cfg-if 1.0.0", "console", @@ -7068,8 +7000,7 @@ dependencies = [ [[package]] name = "workflow-macro-tools" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058b63fd7d255d04a5da8a4e2aab57bd8c9693dfd09a31c82ef47a65d807ca75" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "convert_case 0.6.0", "parse-variants", @@ -7081,8 +7012,7 @@ dependencies = [ [[package]] name = "workflow-node" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c6227ecff04a63c6cd42f8d179526e49a33708b6216abcd803e9a3b3ae94ac" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "borsh", "futures", @@ -7102,8 +7032,7 @@ dependencies = [ [[package]] name = "workflow-nw" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9014be650ede0fdcc10e5cdeece72f30db7e35846fd4c1e9e7a0dbb2e4a11815" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "ahash", "async-trait", @@ -7126,8 +7055,7 @@ dependencies = [ [[package]] name = "workflow-panic-hook" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c8909242a7d2f15d15d4f20f6cdc05932b394c6f34bd122de0a94eeddde493" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen", @@ -7151,8 +7079,7 @@ dependencies = [ [[package]] name = "workflow-rpc" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e26bdfb04aee86d80206160d817132966a4cca636b3565d597171412c3a570a" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "ahash", "async-std", @@ -7181,8 +7108,7 @@ dependencies = [ [[package]] name = "workflow-rpc-macros" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8bd0c19bab1fc8606fd8a7b89b76bbc1c70b5389a4895c7ab5c81199b31578" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "parse-variants", "proc-macro-error", @@ -7194,8 +7120,7 @@ dependencies = [ [[package]] name = "workflow-serializer" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a7e3a8965373eb92d4dde26078a08677c4aebb422096d96f36ad89c33ddadb" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "ahash", "borsh", @@ -7205,8 +7130,7 @@ dependencies = [ [[package]] name = "workflow-store" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "782c42bf9ea4eff8a518c6c65b000f4d10179dedfa19348a26d34f4637571437" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "async-std", "base64 0.22.1", @@ -7233,8 +7157,7 @@ dependencies = [ [[package]] name = "workflow-task" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dbc4593b9c3a635b11952e35e33b273db513ce304af368bfb2e59eca47e77f8" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "futures", "thiserror", @@ -7245,8 +7168,7 @@ dependencies = [ [[package]] name = "workflow-task-macros" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee242b444bc37cf4d338c3c2994a3302b82ca2fa6a33537037bfed09e1583a0" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "convert_case 0.6.0", "parse-variants", @@ -7261,8 +7183,7 @@ dependencies = [ [[package]] name = "workflow-terminal" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7b181672f3debb02b0c1db672164a8ae827d0ae064a77c008c7beb126341b6" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "async-std", "async-trait", @@ -7290,8 +7211,7 @@ dependencies = [ [[package]] name = "workflow-terminal-macros" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac116e1d603e4462496ba2ec4133c43af29e7729493ff0ed8ea91319221cf06" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "convert_case 0.6.0", "parse-variants", @@ -7306,8 +7226,7 @@ dependencies = [ [[package]] name = "workflow-wasm" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a878ee79b2a117277ae24d87525686f50006b87f43cf2052401e12c330fddbbc" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "cfg-if 1.0.0", "faster-hex", @@ -7327,8 +7246,7 @@ dependencies = [ [[package]] name = "workflow-wasm-macros" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9268b990788e1bf1a307e1bc9d9f498e9ee2cb6d4ba3292d1c7b0b5d3d0d9e46" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "js-sys", "proc-macro-error", @@ -7341,8 +7259,7 @@ dependencies = [ [[package]] name = "workflow-websocket" version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d03ec3c5ad42ba1a2bfba7e752be890ecacabf73c6da300ad78a2ffa1e3c5a" +source = "git+https://github.com/workflow-rs/workflow-rs.git?rev=refs/pull/13/head#5a8846a9a8141028bcec180be76a4c3e31a8f2d9" dependencies = [ "ahash", "async-channel 2.3.1", diff --git a/Cargo.toml b/Cargo.toml index 0fdc4a499..66fc77764 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -250,7 +250,7 @@ thiserror = "1.0.50" tokio = { version = "1.33.0", features = ["sync", "rt-multi-thread"] } tokio-stream = "0.1.14" toml = "0.8.8" -tonic = { version = "0.10.2", features = ["tls", "gzip", "transport"] } +tonic = { version = "0.10.2", features = ["tls-webpki-roots", "gzip", "transport"] } tonic-build = { version = "0.10.2", features = ["prost"] } triggered = "0.1.2" uuid = { version = "1.5.0", features = ["v4", "fast-rng", "serde"] } @@ -274,20 +274,21 @@ indexed_db_futures = "0.5.0" # workflow-perf-monitor = { path = "../../../workflow-perf-monitor-rs" } workflow-perf-monitor = "0.0.2" nw-sys = "0.1.6" +rustls = { version = "0.23", default-features = false, features = ["ring"] } # workflow dependencies -workflow-core = { version = "0.17.0" } -workflow-d3 = { version = "0.17.0" } -workflow-dom = { version = "0.17.0" } -workflow-http = { version = "0.17.0" } -workflow-log = { version = "0.17.0" } -workflow-node = { version = "0.17.0" } -workflow-nw = { version = "0.17.0" } -workflow-rpc = { version = "0.17.0" } -workflow-serializer = { version = "0.17.0" } -workflow-store = { version = "0.17.0" } -workflow-terminal = { version = "0.17.0" } -workflow-wasm = { version = "0.17.0" } +# workflow-core = { version = "0.17.0" } +# workflow-d3 = { version = "0.17.0" } +# workflow-dom = { version = "0.17.0" } +# workflow-http = { version = "0.17.0" } +# workflow-log = { version = "0.17.0" } +# workflow-node = { version = "0.17.0" } +# workflow-nw = { version = "0.17.0" } +# workflow-rpc = { version = "0.17.0" } +# workflow-serializer = { version = "0.17.0" } +# workflow-store = { version = "0.17.0" } +# workflow-terminal = { version = "0.17.0" } +# workflow-wasm = { version = "0.17.0" } # if below is enabled, this means that there is an ongoing work # on the workflow-rs crate. This requires that you clone workflow-rs @@ -295,29 +296,31 @@ workflow-wasm = { version = "0.17.0" } # workflow-core = { path = "../workflow-rs/core" } # workflow-d3 = { path = "../workflow-rs/d3" } # workflow-dom = { path = "../workflow-rs/dom" } -# workflow-http = { path = "../workflow-rs/http" } +# # Same features as default but with rustls-tls-webpki-roots instead of native-tls +# workflow-http = { path = "../workflow-rs/http", default-features = false, features = ["rustls-tls-webpki-roots", "http2", "charset", "macos-system-configuration"] } # workflow-log = { path = "../workflow-rs/log" } # workflow-node = { path = "../workflow-rs/node" } # workflow-nw = { path = "../workflow-rs/nw" } -# workflow-rpc = { path = "../workflow-rs/rpc" } +# workflow-rpc = { path = "../workflow-rs/rpc", default-features = false, features = ["rustls-tls-webpki-roots"] } # workflow-serializer = { path = "../workflow-rs/serializer" } # workflow-store = { path = "../workflow-rs/store" } # workflow-terminal = { path = "../workflow-rs/terminal" } # workflow-wasm = { path = "../workflow-rs/wasm" } + # --- -# workflow-core = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-d3 = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-dom = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-http = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-log = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-node = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-nw = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-rpc = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-serializer = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-store = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-terminal = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } -# workflow-wasm = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" } +workflow-core = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-d3 = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-dom = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-http = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head", default-features = false, features = ["rustls-tls-webpki-roots", "http2", "charset", "macos-system-configuration"] } +workflow-log = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-node = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-nw = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-rpc = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head", default-features = false, features = ["rustls-tls-webpki-roots"] } +workflow-serializer = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-store = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-terminal = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } +workflow-wasm = { git = "https://github.com/workflow-rs/workflow-rs.git", rev = "refs/pull/13/head" } # https://github.com/aspectron/nw-sys # nw-sys = { path = "../nw-sys" } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 60a43002a..03612871c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -63,6 +63,7 @@ workflow-nw.workspace = true workflow-store.workspace = true workflow-terminal.workspace = true workflow-wasm.workspace = true +rustls.workspace = true [dependencies.web-sys] workspace = true diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 5ca1997ea..b03f70c8a 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -99,6 +99,8 @@ impl KaspaCli { } } + rustls::crypto::ring::default_provider().install_default().unwrap(); + workflow_log::set_colors_enabled(true); } diff --git a/kaspad/Cargo.toml b/kaspad/Cargo.toml index 15a408dad..22be27e33 100644 --- a/kaspad/Cargo.toml +++ b/kaspad/Cargo.toml @@ -55,6 +55,7 @@ tempfile.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["rt", "macros", "rt-multi-thread"] } workflow-log.workspace = true +rustls.workspace = true toml = "0.8.10" serde_with = "3.7.0" diff --git a/kaspad/src/main.rs b/kaspad/src/main.rs index 1d1706efa..ed80640b7 100644 --- a/kaspad/src/main.rs +++ b/kaspad/src/main.rs @@ -22,6 +22,8 @@ pub fn main() { init_allocator_with_default_settings(); + rustls::crypto::ring::default_provider().install_default().unwrap(); + let args = parse_args(); match fd_budget::try_set_fd_limit(DESIRED_DAEMON_SOFT_FD_LIMIT) { diff --git a/rpc/wrpc/examples/subscriber/Cargo.toml b/rpc/wrpc/examples/subscriber/Cargo.toml index 1e1b8bdba..643e722fc 100644 --- a/rpc/wrpc/examples/subscriber/Cargo.toml +++ b/rpc/wrpc/examples/subscriber/Cargo.toml @@ -20,3 +20,4 @@ tokio.workspace = true workflow-core.workspace = true workflow-log.workspace = true ctrlc.workspace = true +rustls.workspace = true diff --git a/rpc/wrpc/examples/subscriber/src/main.rs b/rpc/wrpc/examples/subscriber/src/main.rs index 00aa128ba..92cf0c9cf 100644 --- a/rpc/wrpc/examples/subscriber/src/main.rs +++ b/rpc/wrpc/examples/subscriber/src/main.rs @@ -268,6 +268,7 @@ impl Listener { #[tokio::main] async fn main() -> Result<()> { + rustls::crypto::ring::default_provider().install_default().unwrap(); let listener = Listener::try_new(NetworkId::new(NetworkType::Mainnet), None)?; let (shutdown_sender, shutdown_receiver) = oneshot::<()>(); diff --git a/rpc/wrpc/proxy/Cargo.toml b/rpc/wrpc/proxy/Cargo.toml index 21b9b322a..679482154 100644 --- a/rpc/wrpc/proxy/Cargo.toml +++ b/rpc/wrpc/proxy/Cargo.toml @@ -23,6 +23,7 @@ tokio.workspace = true workflow-core.workspace = true workflow-log.workspace = true workflow-rpc.workspace = true +rustls.workspace = true [package.metadata.emanate.build] folder = "setup" diff --git a/rpc/wrpc/proxy/src/main.rs b/rpc/wrpc/proxy/src/main.rs index 1cb9ad5c6..c9fea4887 100644 --- a/rpc/wrpc/proxy/src/main.rs +++ b/rpc/wrpc/proxy/src/main.rs @@ -51,6 +51,8 @@ struct Args { #[tokio::main] async fn main() -> Result<()> { + rustls::crypto::ring::default_provider().install_default().unwrap(); + let Args { testnet, simnet, devnet, grpc_proxy_address, interface, verbose, threads, encoding } = Args::parse(); let network_type = if testnet { diff --git a/rpc/wrpc/server/Cargo.toml b/rpc/wrpc/server/Cargo.toml index 3bf285c3f..8102e5e5d 100644 --- a/rpc/wrpc/server/Cargo.toml +++ b/rpc/wrpc/server/Cargo.toml @@ -33,14 +33,4 @@ tokio.workspace = true workflow-core.workspace = true workflow-log.workspace = true workflow-rpc.workspace = true -workflow-serializer.workspace = true - -# Adding explicitely the openssl dependency here is needed for a successful build with zigbuild and musl -# as used in the release deployment in GitHub CI -# see: https://github.com/rust-cross/cargo-zigbuild/issues/127 - -[target.x86_64-unknown-linux-gnu.dependencies] -openssl = { version = "0.10", features = ["vendored"] } - -[target.x86_64-unknown-linux-musl.dependencies] -openssl = { version = "0.10", features = ["vendored"] } +workflow-serializer.workspace = true \ No newline at end of file diff --git a/rpc/wrpc/wasm/Cargo.toml b/rpc/wrpc/wasm/Cargo.toml index 9bd639fdb..54019fdca 100644 --- a/rpc/wrpc/wasm/Cargo.toml +++ b/rpc/wrpc/wasm/Cargo.toml @@ -40,6 +40,7 @@ js-sys.workspace = true wasm-bindgen-futures.workspace = true workflow-core.workspace = true futures.workspace = true +ring = { version = "0.17", features = ["wasm32_unknown_unknown_js"] } [lints] workspace = true diff --git a/simpa/Cargo.toml b/simpa/Cargo.toml index 30162ba4f..cb6d53b10 100644 --- a/simpa/Cargo.toml +++ b/simpa/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true repository.workspace = true [dependencies] -kaspa-alloc.workspace = true # This changes the global allocator for all of the next dependencies so should be kept first +kaspa-alloc.workspace = true # This changes the global allocator for all of the next dependencies so should be kept first kaspa-consensus-core.workspace = true kaspa-consensus-notify.workspace = true kaspa-consensus.workspace = true @@ -36,6 +36,7 @@ rand.workspace = true rayon.workspace = true secp256k1.workspace = true tokio = { workspace = true, features = ["rt", "macros", "rt-multi-thread"] } +rustls.workspace = true [features] heap = ["dhat", "kaspa-alloc/heap"] diff --git a/simpa/src/main.rs b/simpa/src/main.rs index 1d14a3c68..79a360749 100644 --- a/simpa/src/main.rs +++ b/simpa/src/main.rs @@ -134,6 +134,8 @@ fn main() { init_allocator_with_default_settings(); + rustls::crypto::ring::default_provider().install_default().unwrap(); + // Get CLI arguments let args = Args::parse(); diff --git a/wallet/wasm/Cargo.toml b/wallet/wasm/Cargo.toml index 976665c52..b4b3d0f2c 100644 --- a/wallet/wasm/Cargo.toml +++ b/wallet/wasm/Cargo.toml @@ -23,4 +23,4 @@ wasm-bindgen-futures.workspace = true wasm-bindgen.workspace = true workflow-log.workspace = true workflow-terminal.workspace = true -workflow-wasm.workspace = true +workflow-wasm.workspace = true \ No newline at end of file