Skip to content

Commit

Permalink
Fix application salt path
Browse files Browse the repository at this point in the history
The path was duplicated because it is added in the filestore and in the salt path string
  • Loading branch information
sosthene-nitrokey committed Apr 26, 2023
1 parent 6beabd1 commit f09a02d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/backend/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use trussed::{
};

use super::Error;
use crate::{Pin, PinId, BACKEND_DIR, MAX_PIN_LENGTH};
use crate::{Pin, PinId, MAX_PIN_LENGTH};

pub(crate) const SIZE: usize = 256;
pub(crate) const CHACHA_TAG_LEN: usize = 16;
Expand Down Expand Up @@ -497,10 +497,7 @@ fn pin_len(pin: &Pin) -> u8 {
fn app_salt_path() -> PathBuf {
const SALT_PATH: &str = "application_salt";

let mut path = PathBuf::new();
path.push(&PathBuf::from(BACKEND_DIR));
path.push(&PathBuf::from(SALT_PATH));
path
PathBuf::from(SALT_PATH)
}

pub(crate) fn get_app_salt<S: Filestore, R: CryptoRng + RngCore>(
Expand Down

0 comments on commit f09a02d

Please sign in to comment.