From a5b41326f65b6356443cac9622296deecfdac200 Mon Sep 17 00:00:00 2001 From: Schmiddiii Date: Wed, 17 Jan 2024 11:27:57 +0100 Subject: [PATCH] Update dependencies --- presage-cli/Cargo.toml | 12 ++++++------ presage-cli/src/main.rs | 4 +++- presage-store-cipher/Cargo.toml | 2 +- presage-store-sled/Cargo.toml | 12 ++++++------ presage-store-sled/src/lib.rs | 9 +++++++-- presage/Cargo.toml | 11 +++++------ 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/presage-cli/Cargo.toml b/presage-cli/Cargo.toml index 8f3f7c9b5..efb62dfc0 100644 --- a/presage-cli/Cargo.toml +++ b/presage-cli/Cargo.toml @@ -9,7 +9,7 @@ presage = { path = "../presage" } presage-store-sled = { path = "../presage-store-sled" } anyhow = { version = "1.0", features = ["backtrace"] } -base64 = "0.12" +base64 = "0.21" chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] } clap = { version = ">=4.2.4", features = ["derive"] } directories = "3.0" @@ -18,8 +18,8 @@ futures = "0.3" hex = "0.4" log = "0.4" mime_guess = "2.0" -tempfile = "3.3" -tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "io-std", "io-util"] } -qr2term = { version = "0.2.2" } -notify-rust = "4.6.0" -url = "2.2" +tempfile = "3.9" +tokio = { version = "1.35", features = ["macros", "rt-multi-thread", "io-std", "io-util"] } +qr2term = { version = "0.2.3" } +notify-rust = "4.10.0" +url = "2.5" diff --git a/presage-cli/src/main.rs b/presage-cli/src/main.rs index 8b3565f29..dfbacb2d2 100644 --- a/presage-cli/src/main.rs +++ b/presage-cli/src/main.rs @@ -5,6 +5,7 @@ use std::path::PathBuf; use std::time::UNIX_EPOCH; use anyhow::{anyhow, bail, Context as _}; +use base64::prelude::*; use chrono::Local; use clap::{ArgGroup, Parser, Subcommand}; use directories::ProjectDirs; @@ -677,7 +678,8 @@ async fn run(subcommand: Cmd, config_store: S) -> anyhow::Re } fn parse_base64_profile_key(s: &str) -> anyhow::Result { - let bytes = base64::decode(s)? + let bytes = BASE64_STANDARD + .decode(s)? .try_into() .map_err(|_| anyhow!("profile key of invalid length"))?; Ok(ProfileKey::create(bytes)) diff --git a/presage-store-cipher/Cargo.toml b/presage-store-cipher/Cargo.toml index 1f0d75f63..9a93a9d79 100644 --- a/presage-store-cipher/Cargo.toml +++ b/presage-store-cipher/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" sha2 = "0.10" thiserror = "1.0" -zeroize = { version = "1.6.0", features = ["derive"] } +zeroize = { version = "1.7.0", features = ["derive"] } diff --git a/presage-store-sled/Cargo.toml b/presage-store-sled/Cargo.toml index c58470091..79fcb5789 100644 --- a/presage-store-sled/Cargo.toml +++ b/presage-store-sled/Cargo.toml @@ -5,21 +5,21 @@ edition = "2021" authors = ["Gabriel Féron "] [build-dependencies] -prost-build = "0.10" +prost-build = "> 0.10, <= 0.12" [dependencies] presage = { path = "../presage" } presage-store-cipher = { path = "../presage-store-cipher", optional = true } async-trait = "0.1" -base64 = "0.12" -fs_extra = "1.2" -log = "0.4.8" +base64 = "0.21" +fs_extra = "1.3" +log = "0.4.20" sled = { version = "0.34" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" -prost = "0.10" +prost = "> 0.10, <= 0.12" sha2 = "0.10" quickcheck_macros = "1.0.0" @@ -29,7 +29,7 @@ futures = "0.3" quickcheck = "1.0.3" quickcheck_async = "0.1" rand = "0.8" -tokio = { version = "1.0", default-features = false, features = ["time"] } +tokio = { version = "1.35", default-features = false, features = ["time"] } [features] default = ["encryption"] diff --git a/presage-store-sled/src/lib.rs b/presage-store-sled/src/lib.rs index 760b46007..89a3b5dbf 100644 --- a/presage-store-sled/src/lib.rs +++ b/presage-store-sled/src/lib.rs @@ -6,6 +6,7 @@ use std::{ }; use async_trait::async_trait; +use base64::prelude::*; use log::{debug, error, trace, warn}; use presage::libsignal_service::zkgroup::GroupMasterKeyBytes; use presage::libsignal_service::{ @@ -290,7 +291,7 @@ impl SledStore { } Thread::Group(group_id) => format!( "{SLED_TREE_THREADS_PREFIX}:group:{}", - base64::encode(group_id) + BASE64_STANDARD.encode(group_id) ), }; let mut hasher = Sha256::new(); @@ -1174,7 +1175,11 @@ mod tests { impl fmt::Debug for KeyPair { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - writeln!(f, "{}", base64::encode(self.0.public_key.serialize())) + writeln!( + f, + "{}", + BASE64_STANDARD.encode(self.0.public_key.serialize()) + ) } } diff --git a/presage/Cargo.toml b/presage/Cargo.toml index bccc76c34..4da98c394 100644 --- a/presage/Cargo.toml +++ b/presage/Cargo.toml @@ -6,19 +6,18 @@ authors = ["Gabriel Féron "] edition = "2021" [dependencies] -libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "54ce3c44d706ef8af6f2620734e4041602333a5e" } -libsignal-service-hyper = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "54ce3c44d706ef8af6f2620734e4041602333a5e" } +libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "0ad842f7646b21feca3c79d1e7f73d052529314d" } +libsignal-service-hyper = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "0ad842f7646b21feca3c79d1e7f73d052529314d" } base64 = "0.21" futures = "0.3" -log = "0.4.8" +log = "0.4.20" rand = "0.8" serde = "1.0" serde_json = "1.0" thiserror = "1.0" -url = "2.2" -parking_lot = "0.11" -tokio = { version = "1.0", default-features = false, features = ["sync", "time"] } +url = "2.5" +tokio = { version = "1.35", default-features = false, features = ["sync", "time"] } sha2 = "0.10.8" [dev-dependencies]