From b993bed67b62a94abfd7d412118335e2456fc188 Mon Sep 17 00:00:00 2001 From: trivernis Date: Wed, 31 Jan 2024 15:47:15 +0100 Subject: [PATCH] Fix issues with static secrets --- .helix/languages.toml | 11 +++++++++++ Cargo.toml | 2 +- src/protocol/encrypted/crypt_handling.rs | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .helix/languages.toml diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 00000000..315493ec --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,11 @@ +[language-server.rust-analyzer] +command = "rust-analyzer" + +[language-server.rust-analyzer.config] +inlayHints.bindingModeHints.enable = false +inlayHints.closingBraceHints.minLines = 10 +inlayHints.closureReturnTypeHints.enable = "with_block" +inlayHints.discriminantHints.enable = "fieldless" +inlayHints.lifetimeElisionHints.enable = "skip_trivial" +inlayHints.typeHints.hideClosureInitialization = false +cargo.features = "all" diff --git a/Cargo.toml b/Cargo.toml index 74cb938e..747983ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ rmp-serde = { version = "1.1.2", optional = true } bincode = { version = "1.3.3", optional = true } serde_json = { version = "1.0.113", optional = true } chacha20poly1305 = { version = "0.10.1", optional = true } -x25519-dalek = { version = "2.0.0", optional = true } +x25519-dalek = { version = "2.0.0", optional = true, features = ["static_secrets"] } rand = { version = "0.8.5", optional = true } rand_core = { version = "0.6.4", optional = true } sha2 = { version = "0.10.8", optional = true } diff --git a/src/protocol/encrypted/crypt_handling.rs b/src/protocol/encrypted/crypt_handling.rs index 4e8de598..8af30936 100644 --- a/src/protocol/encrypted/crypt_handling.rs +++ b/src/protocol/encrypted/crypt_handling.rs @@ -2,7 +2,8 @@ use crate::prelude::encrypted::{EncryptedStream, Keys}; use crate::prelude::{IPCError, IPCResult}; use crate::protocol::AsyncProtocolStream; use bytes::Bytes; -use chacha20poly1305::aead::{Aead, NewAead}; +use chacha20poly1305::aead::Aead; +use chacha20poly1305::KeyInit; use chacha20poly1305::{ChaCha20Poly1305, Key, Nonce}; use rand::thread_rng; use rand_core::RngCore;