From e666fd530902ff22d0ca2b7f75de278791919584 Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic <73236646+NikolaMilosa@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:47:57 +0200 Subject: [PATCH] fix: autodetection of HSM (#845) --- Cargo.Bazel.lock | 426 ++++++++++++++++++++++++++++++++++++++++++++++- Cargo.lock | 71 ++++++++ Cargo.toml | 9 +- 3 files changed, 502 insertions(+), 4 deletions(-) diff --git a/Cargo.Bazel.lock b/Cargo.Bazel.lock index 51d7a69fd..e5ae07f24 100644 --- a/Cargo.Bazel.lock +++ b/Cargo.Bazel.lock @@ -1,5 +1,5 @@ { - "checksum": "0805447f342c03bed3926c2b434a39ff0578371bb563d7cbf89319269dbab0ca", + "checksum": "4dac898a5aa7fb14205c8de0457534452a508d981367acdee074cb5781b66b10", "crates": { "actix-codec 0.5.2": { "name": "actix-codec", @@ -8952,6 +8952,111 @@ }, "license": "MIT" }, + "dbus 0.9.7": { + "name": "dbus", + "version": "0.9.7", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/dbus/0.9.7/download", + "sha256": "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "dbus", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "dbus", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.158", + "target": "libc" + }, + { + "id": "libdbus-sys 0.2.5", + "target": "libdbus_sys" + } + ], + "selects": { + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2018", + "version": "0.9.7" + }, + "license": "Apache-2.0/MIT" + }, + "dbus-secret-service 4.0.2": { + "name": "dbus-secret-service", + "version": "4.0.2", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/dbus-secret-service/4.0.2/download", + "sha256": "1caa0c241c01ad8d99a78d553567d38f873dd3ac16eca33a5370d650ab25584e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "dbus_secret_service", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "dbus_secret_service", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "dbus 0.9.7", + "target": "dbus" + }, + { + "id": "futures-util 0.3.30", + "target": "futures_util" + }, + { + "id": "num 0.4.3", + "target": "num" + }, + { + "id": "once_cell 1.19.0", + "target": "once_cell" + }, + { + "id": "rand 0.8.5", + "target": "rand" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "4.0.2" + }, + "license": "MIT OR Apache-2.0" + }, "deadpool 0.10.0": { "name": "deadpool", "version": "0.10.0", @@ -28270,6 +28375,42 @@ "compile_data_glob": [ "**" ], + "crate_features": { + "common": [ + "apple-native", + "sync-secret-service" + ], + "selects": {} + }, + "deps": { + "common": [], + "selects": { + "cfg(any(target_os = \"macos\", target_os = \"ios\"))": [ + { + "id": "security-framework 2.11.1", + "target": "security_framework" + } + ], + "cfg(target_os = \"freebsd\")": [ + { + "id": "dbus-secret-service 4.0.2", + "target": "dbus_secret_service" + } + ], + "cfg(target_os = \"linux\")": [ + { + "id": "dbus-secret-service 4.0.2", + "target": "dbus_secret_service" + } + ], + "cfg(target_os = \"openbsd\")": [ + { + "id": "dbus-secret-service 4.0.2", + "target": "dbus_secret_service" + } + ] + } + }, "edition": "2021", "version": "3.2.1" }, @@ -28442,6 +28583,76 @@ }, "license": "MIT OR Apache-2.0" }, + "libdbus-sys 0.2.5": { + "name": "libdbus-sys", + "version": "0.2.5", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/libdbus-sys/0.2.5/download", + "sha256": "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" + } + }, + "targets": [ + { + "Library": { + "crate_name": "libdbus_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "libdbus_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "pkg-config" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "libdbus-sys 0.2.5", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.5" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "pkg-config 0.3.30", + "target": "pkg_config" + } + ], + "selects": {} + }, + "links": "dbus" + }, + "license": "Apache-2.0/MIT" + }, "libflate 2.1.0": { "name": "libflate", "version": "2.1.0", @@ -30799,6 +31010,73 @@ }, "license": "MIT" }, + "num 0.4.3": { + "name": "num", + "version": "0.4.3", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/num/0.4.3/download", + "sha256": "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "num-bigint", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "num-bigint 0.4.6", + "target": "num_bigint" + }, + { + "id": "num-complex 0.4.6", + "target": "num_complex" + }, + { + "id": "num-integer 0.1.46", + "target": "num_integer" + }, + { + "id": "num-iter 0.1.45", + "target": "num_iter" + }, + { + "id": "num-rational 0.4.2", + "target": "num_rational" + }, + { + "id": "num-traits 0.2.19", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.4.3" + }, + "license": "MIT OR Apache-2.0" + }, "num-bigint 0.2.6": { "name": "num-bigint", "version": "0.2.6", @@ -31031,6 +31309,51 @@ }, "license": "MIT/Apache-2.0" }, + "num-complex 0.4.6": { + "name": "num-complex", + "version": "0.4.6", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/num-complex/0.4.6/download", + "sha256": "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_complex", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num_complex", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "num-traits 0.2.19", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.4.6" + }, + "license": "MIT OR Apache-2.0" + }, "num-conv 0.1.0": { "name": "num-conv", "version": "0.1.0", @@ -31132,6 +31455,47 @@ "compile_data_glob": [ "**" ], + "crate_features": { + "common": [], + "selects": { + "aarch64-unknown-linux-gnu": [ + "i128", + "std" + ], + "arm-unknown-linux-gnueabi": [ + "i128", + "std" + ], + "armv7-unknown-linux-gnueabi": [ + "i128", + "std" + ], + "i686-unknown-freebsd": [ + "i128", + "std" + ], + "i686-unknown-linux-gnu": [ + "i128", + "std" + ], + "powerpc-unknown-linux-gnu": [ + "i128", + "std" + ], + "s390x-unknown-linux-gnu": [ + "i128", + "std" + ], + "x86_64-unknown-freebsd": [ + "i128", + "std" + ], + "x86_64-unknown-linux-gnu": [ + "i128", + "std" + ] + } + }, "deps": { "common": [ { @@ -31150,6 +31514,61 @@ }, "license": "MIT OR Apache-2.0" }, + "num-rational 0.4.2": { + "name": "num-rational", + "version": "0.4.2", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/num-rational/0.4.2/download", + "sha256": "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_rational", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num_rational", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "num-bigint", + "num-bigint-std", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "num-bigint 0.4.6", + "target": "num_bigint" + }, + { + "id": "num-integer 0.1.46", + "target": "num_integer" + }, + { + "id": "num-traits 0.2.19", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.4.2" + }, + "license": "MIT OR Apache-2.0" + }, "num-traits 0.2.19": { "name": "num-traits", "version": "0.2.19", @@ -51147,6 +51566,10 @@ "i686-linux-android", "x86_64-linux-android" ], + "cfg(target_os = \"freebsd\")": [ + "i686-unknown-freebsd", + "x86_64-unknown-freebsd" + ], "cfg(target_os = \"haiku\")": [], "cfg(target_os = \"hermit\")": [], "cfg(target_os = \"linux\")": [ @@ -51163,6 +51586,7 @@ "i686-apple-darwin", "x86_64-apple-darwin" ], + "cfg(target_os = \"openbsd\")": [], "cfg(target_os = \"redox\")": [], "cfg(target_os = \"wasi\")": [ "wasm32-wasi" diff --git a/Cargo.lock b/Cargo.lock index 9be101201..970e55dc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1768,6 +1768,30 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "dbus" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" +dependencies = [ + "libc", + "libdbus-sys", + "winapi", +] + +[[package]] +name = "dbus-secret-service" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1caa0c241c01ad8d99a78d553567d38f873dd3ac16eca33a5370d650ab25584e" +dependencies = [ + "dbus", + "futures-util", + "num", + "once_cell", + "rand", +] + [[package]] name = "deadpool" version = "0.10.0" @@ -5720,6 +5744,10 @@ name = "keyring" version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "030a9b84bb2a2f3673d4c8b8236091ed5d8f6b66a56d8085471d8abd5f3c6a80" +dependencies = [ + "dbus-secret-service", + "security-framework", +] [[package]] name = "language-tags" @@ -5748,6 +5776,15 @@ version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +[[package]] +name = "libdbus-sys" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" +dependencies = [ + "pkg-config", +] + [[package]] name = "libflate" version = "2.1.0" @@ -6219,6 +6256,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -6258,6 +6309,15 @@ dependencies = [ "smallvec", ] +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -6284,6 +6344,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.6", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" diff --git a/Cargo.toml b/Cargo.toml index 0537ada37..bae45d46b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -148,7 +148,10 @@ ic-transport-types = "0.37.1" ic-utils = "0.37.0" include_dir = "0.7.4" itertools = "0.13.0" -keyring = "3.2.1" +keyring = { version = "3.2.1", features = [ + "apple-native", + "sync-secret-service", +] } lazy_static = "1.5.0" log = "0.4.22" lru = "0.12.4" @@ -174,8 +177,8 @@ retry = "2.0.0" reverse_geocoder = "4.1.1" ring = "0.17.8" rstest = { version = "0.22.0", default-features = false } -rust_decimal = "1.36.0" # or the latest version -rust_decimal_macros = "1.36.0" # optional, for using macros +rust_decimal = "1.36.0" # or the latest version +rust_decimal_macros = "1.36.0" # optional, for using macros serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0.209" serde_json = "1.0.127"