From 1eb2a5ab9d0f5747f8e4e579691659a8bd8b789d Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Mon, 9 Jan 2023 09:14:10 -0500 Subject: [PATCH] radicle: Use 'RAD_PASSPHRASE' unmodified Keep the passphrase as is by removing 'trim_end()'. Signed-off-by: Slack Coder --- radicle/src/profile.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/radicle/src/profile.rs b/radicle/src/profile.rs index 2b61c387..df5c12e8 100644 --- a/radicle/src/profile.rs +++ b/radicle/src/profile.rs @@ -16,14 +16,12 @@ use std::path::{Path, PathBuf}; use thiserror::Error; use crate::crypto::ssh::agent::Agent; -use crate::crypto::ssh::{Keystore, Passphrase}; +use crate::crypto::ssh::{keystore, Keystore, Passphrase}; use crate::crypto::{PublicKey, Signer}; use crate::node; use crate::storage::git::transport; use crate::storage::git::Storage; -use radicle_crypto::ssh::keystore; - /// Environment variables used by radicle. pub mod env { pub use std::env::*; @@ -39,8 +37,7 @@ pub mod env { let Ok(passphrase) = std::env::var(RAD_PASSPHRASE) else { return None; }; - - Some(super::Passphrase::from(passphrase.trim_end().to_owned())) + Some(super::Passphrase::from(passphrase)) } } @@ -49,7 +46,7 @@ pub enum Error { #[error(transparent)] Io(#[from] io::Error), #[error(transparent)] - Keystore(#[from] crate::crypto::ssh::keystore::Error), + Keystore(#[from] keystore::Error), #[error(transparent)] MemorySigner(#[from] keystore::MemorySignerError), #[error("no profile found at the filepath '{0}'")]