diff options
author | Conrad Ludgate <conradludgate@gmail.com> | 2023-08-18 21:45:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-18 20:45:29 +0000 |
commit | aa8e5f5c04524d3d5c6f1d5b6c4616dbdb8d40be (patch) | |
tree | 74a027ed4cc186426851afc42cb0da23c3de043d /atuin-client | |
parent | 69a772d1caa52464612b602d7342a2d5aa27048c (diff) |
Update dependencies (#1181)
Diffstat (limited to 'atuin-client')
-rw-r--r-- | atuin-client/Cargo.toml | 4 | ||||
-rw-r--r-- | atuin-client/src/database.rs | 2 | ||||
-rw-r--r-- | atuin-client/src/encryption.rs | 12 | ||||
-rw-r--r-- | atuin-client/src/kv.rs | 2 | ||||
-rw-r--r-- | atuin-client/src/record/sqlite_store.rs | 2 | ||||
-rw-r--r-- | atuin-client/src/sync.rs | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/atuin-client/Cargo.toml b/atuin-client/Cargo.toml index 78f7b515d..732b6a74d 100644 --- a/atuin-client/Cargo.toml +++ b/atuin-client/Cargo.toml @@ -44,11 +44,11 @@ sql-builder = "3" lazy_static = "1" memchr = "2.5" rmp = { version = "0.8.11" } -typed-builder = "0.14.0" +typed-builder = { workspace = true } tokio = { workspace = true } semver = { workspace = true } futures = "0.3" -xsalsa20poly1305 = "0.9.0" +crypto_secretbox = "0.1.1" generic-array = { version = "0.14", features = ["serde"] } # encryption diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs index e37eb2b8a..b69c7cb2d 100644 --- a/atuin-client/src/database.rs +++ b/atuin-client/src/database.rs @@ -166,7 +166,7 @@ impl Sqlite { .bind(h.session.as_str()) .bind(h.hostname.as_str()) .bind(h.deleted_at.map(|t|t.timestamp_nanos())) - .execute(tx) + .execute(&mut **tx) .await?; Ok(()) diff --git a/atuin-client/src/encryption.rs b/atuin-client/src/encryption.rs index d6c5f893d..056c56d7b 100644 --- a/atuin-client/src/encryption.rs +++ b/atuin-client/src/encryption.rs @@ -12,15 +12,15 @@ use std::{io::prelude::*, path::PathBuf}; use base64::prelude::{Engine, BASE64_STANDARD}; use chrono::{DateTime, Utc}; +pub use crypto_secretbox::Key; +use crypto_secretbox::{ + aead::{Nonce, OsRng}, + AeadCore, AeadInPlace, KeyInit, XSalsa20Poly1305, +}; use eyre::{bail, ensure, eyre, Context, Result}; use fs_err as fs; use rmp::{decode::Bytes, Marker}; use serde::{Deserialize, Serialize}; -pub use xsalsa20poly1305::Key; -use xsalsa20poly1305::{ - aead::{Nonce, OsRng}, - AeadInPlace, KeyInit, XSalsa20Poly1305, -}; use crate::{history::History, settings::Settings}; @@ -240,7 +240,7 @@ fn error_report<E: std::fmt::Debug>(err: E) -> eyre::Report { #[cfg(test)] mod test { - use xsalsa20poly1305::{aead::OsRng, KeyInit, XSalsa20Poly1305}; + use crypto_secretbox::{aead::OsRng, KeyInit, XSalsa20Poly1305}; use crate::history::History; diff --git a/atuin-client/src/kv.rs b/atuin-client/src/kv.rs index 5710424fa..1ca6b5e8d 100644 --- a/atuin-client/src/kv.rs +++ b/atuin-client/src/kv.rs @@ -218,8 +218,8 @@ impl KvStore { #[cfg(test)] mod tests { + use crypto_secretbox::{KeyInit, XSalsa20Poly1305}; use rand::rngs::OsRng; - use xsalsa20poly1305::{KeyInit, XSalsa20Poly1305}; use crate::record::sqlite_store::SqliteStore; diff --git a/atuin-client/src/record/sqlite_store.rs b/atuin-client/src/record/sqlite_store.rs index 14a7e2779..db709f20b 100644 --- a/atuin-client/src/record/sqlite_store.rs +++ b/atuin-client/src/record/sqlite_store.rs @@ -72,7 +72,7 @@ impl SqliteStore { .bind(r.version.as_str()) .bind(r.data.data.as_str()) .bind(r.data.content_encryption_key.as_str()) - .execute(tx) + .execute(&mut **tx) .await?; Ok(()) diff --git a/atuin-client/src/sync.rs b/atuin-client/src/sync.rs index f62dca33a..6704ad53c 100644 --- a/atuin-client/src/sync.rs +++ b/atuin-client/src/sync.rs @@ -6,7 +6,7 @@ use chrono::prelude::*; use eyre::Result; use atuin_common::api::AddHistoryRequest; -use xsalsa20poly1305::Key; +use crypto_secretbox::Key; use crate::{ api_client, |