From 18d3fa933bb2bf57328e65443a69f4cd11f246ff Mon Sep 17 00:00:00 2001 From: FabianLars Date: Mon, 27 Jan 2025 20:36:03 +0100 Subject: [PATCH] chore(deps): Update rand to 0.9 --- Cargo.lock | 97 +++++++++++++++++-- plugins/notification/Cargo.toml | 2 +- .../process/permissions/schemas/schema.json | 2 +- plugins/stronghold/Cargo.toml | 6 +- plugins/stronghold/src/kdf.rs | 2 +- plugins/websocket/Cargo.toml | 2 +- 6 files changed, 96 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fae1d953..b14948ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,7 +84,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -2360,6 +2360,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71393ecc86efbf00e4ca13953979ba8b94cfe549a4b74cc26d8b62f4d8feac2b" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + [[package]] name = "ghash" version = "0.5.1" @@ -4606,7 +4618,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -4843,6 +4855,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.0", + "zerocopy 0.8.14", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -4863,6 +4886,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.0", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -4881,6 +4914,16 @@ dependencies = [ "getrandom 0.2.15", ] +[[package]] +name = "rand_core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +dependencies = [ + "getrandom 0.3.0", + "zerocopy 0.8.14", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -6681,7 +6724,7 @@ dependencies = [ "log", "maplit", "notify-rust", - "rand 0.8.5", + "rand 0.9.0", "serde", "serde_json", "serde_repr", @@ -6838,9 +6881,9 @@ dependencies = [ "iota-crypto", "iota_stronghold", "log", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand 0.9.0", + "rand_chacha 0.9.0", + "rand_core 0.9.0", "rust-argon2 2.1.0", "rusty-fork", "serde", @@ -6904,7 +6947,7 @@ dependencies = [ "futures-util", "http", "log", - "rand 0.8.5", + "rand 0.9.0", "serde", "serde_json", "tauri", @@ -7768,6 +7811,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -8642,6 +8694,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.7.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -8871,7 +8932,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +dependencies = [ + "zerocopy-derive 0.8.14", ] [[package]] @@ -8885,6 +8955,17 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "zerocopy-derive" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "zerofrom" version = "0.1.5" diff --git a/plugins/notification/Cargo.toml b/plugins/notification/Cargo.toml index eb684af3..23b69cd2 100644 --- a/plugins/notification/Cargo.toml +++ b/plugins/notification/Cargo.toml @@ -30,7 +30,7 @@ serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } -rand = "0.8" +rand = "0.9" time = { version = "0.3", features = ["serde", "parsing", "formatting"] } url = { version = "2", features = ["serde"] } serde_repr = "0.1" diff --git a/plugins/process/permissions/schemas/schema.json b/plugins/process/permissions/schemas/schema.json index 1243c7d3..95f67149 100644 --- a/plugins/process/permissions/schemas/schema.json +++ b/plugins/process/permissions/schemas/schema.json @@ -322,4 +322,4 @@ ] } } -} +} \ No newline at end of file diff --git a/plugins/stronghold/Cargo.toml b/plugins/stronghold/Cargo.toml index 7d40957a..373d9441 100644 --- a/plugins/stronghold/Cargo.toml +++ b/plugins/stronghold/Cargo.toml @@ -34,11 +34,11 @@ iota-crypto = "0.23" hex = "0.4" zeroize = { version = "1", features = ["zeroize_derive"] } rust-argon2 = { version = "2", optional = true } -rand_chacha = { version = "0.3.1", optional = true } -rand_core = { version = "0.6.4", features = ["getrandom"], optional = true } +rand_chacha = { version = "0.9", optional = true } +rand_core = { version = "0.9", features = ["os_rng"], optional = true } [dev-dependencies] -rand = "0.8" +rand = "0.9" rusty-fork = "0.3" [features] diff --git a/plugins/stronghold/src/kdf.rs b/plugins/stronghold/src/kdf.rs index 94e7b677..2389b1c4 100644 --- a/plugins/stronghold/src/kdf.rs +++ b/plugins/stronghold/src/kdf.rs @@ -32,7 +32,7 @@ fn create_or_get_salt(salt: &mut [u8], salt_path: &Path) { salt.clone_from_slice(&tmp); } else { // Generate new salt - let mut gen = ChaCha20Rng::from_entropy(); + let mut gen = ChaCha20Rng::from_os_rng(); gen.fill_bytes(salt); std::fs::write(salt_path, salt).expect("Failed to write salt for Stronghold") } diff --git a/plugins/websocket/Cargo.toml b/plugins/websocket/Cargo.toml index 34130573..040ec9ec 100644 --- a/plugins/websocket/Cargo.toml +++ b/plugins/websocket/Cargo.toml @@ -31,7 +31,7 @@ tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } http = "1" -rand = "0.8" +rand = "0.9" futures-util = "0.3" tokio = { version = "1", features = ["net", "sync"] } tokio-tungstenite = { version = "0.26" }