Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion secretstore/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "secretstore"
version = "1.1.0"
version = "1.1.1"
description = "Store a secret (such as a private key) in an encrypted file"
license = "MIT"
edition = "2021"
Expand All @@ -18,3 +18,6 @@ rand = "0.9.0"
rand_core = { version = "0.6.4", features = ["getrandom"] }
scrypt = "0.11.0"
zeroize = "1.8.1"
# password-hash 0.5.0 -> ^1; 1.7.3 is 1.81, 1.8.3 is 1.85
base64ct = "=1.7.3"

12 changes: 6 additions & 6 deletions secretstore/src/secretstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl SecretStore {
&self,
path_for_secret_file: &str,
encryption_password: &str,
allow_weak_password: Option<Options>,
options: Option<Options>,
) -> Result<(), String> {
let file_exists = fs::exists(path_for_secret_file).map_err(|e| {
format!(
Expand All @@ -163,7 +163,7 @@ impl SecretStore {

// Create contents
let encrypted_payload =
self.assemble_encrypted_payload(encryption_password, allow_weak_password)?;
self.assemble_encrypted_payload(encryption_password, options)?;

// Set restricted permissions
#[cfg(feature = "unixfilepermissions")]
Expand Down Expand Up @@ -203,7 +203,7 @@ impl SecretStore {
pub fn assemble_encrypted_payload(
&self,
encryption_password: &str,
allow_weak_password: Option<Options>,
options: Option<Options>,
) -> Result<Vec<u8>, String> {
let mut encrypted = self.scrambled_secret_data.clone();
let _res = encrypt_scrambled_secret_data(
Expand All @@ -212,7 +212,7 @@ impl SecretStore {
self.encryption_version,
encryption_password,
&self.encryption_aux_data,
allow_weak_password.unwrap_or_default().allow_weak_password,
options.unwrap_or_default().allow_weak_password,
)?;
assemble_payload(
self.format_version,
Expand Down Expand Up @@ -310,12 +310,12 @@ impl SecretStoreCreator {
secretstore: &SecretStore,
path_for_secret_file: &str,
encryption_password: &str,
allow_weak_password: Option<Options>,
options: Option<Options>,
) -> Result<(), String> {
secretstore.write_to_file(
path_for_secret_file,
encryption_password,
allow_weak_password,
options,
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions seedstore-tool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "seedstore-tool"
version = "1.1.0"
version = "1.1.1"
description = "Store a secret (such as a private key) in an encrypted file"
license = "MIT"
edition = "2021"

[dependencies]
bip39 = "2.1.0"
seedstore = { version = "1.1.0", path = "../seedstore", features = ["toolhelper"] }
seedstore = { path = "../seedstore", features = ["toolhelper"] }
4 changes: 2 additions & 2 deletions seedstore/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "seedstore"
version = "1.1.0"
version = "1.1.1"
description = "Store bitcoin secret material (BIP39 mnemonic entropy, or similar) in an encrypted file"
license = "MIT"
edition = "2021"
Expand All @@ -16,7 +16,7 @@ toolhelper = ["rpassword"]
bip39 = { version = "2.1.0", features = ["zeroize"] }
bitcoin = "0.32.5"
rpassword = { version = "7.4.0", optional = true }
secretstore = { version = "1.1.0", path = "../secretstore" }
secretstore = { path = "../secretstore" }
zeroize = "1.8.1"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions seedstore/src/keystore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ impl KeyStore {
&self,
path_for_secret_file: &str,
encryption_password: &str,
allow_weak_password: Option<Options>,
options: Option<Options>,
) -> Result<(), String> {
SecretStoreCreator::write_to_file(
&self.secretstore,
path_for_secret_file,
encryption_password,
allow_weak_password,
options,
)
}

Expand Down Expand Up @@ -205,12 +205,12 @@ impl KeyStoreCreator {
seedstore: &KeyStore,
path_for_secret_file: &str,
encryption_password: &str,
allow_weak_password: Option<Options>,
options: Option<Options>,
) -> Result<(), String> {
seedstore.write_to_file(
path_for_secret_file,
encryption_password,
allow_weak_password,
options,
)
}
}
8 changes: 4 additions & 4 deletions seedstore/src/seedstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ impl SeedStore {
&self,
path_for_secret_file: &str,
encryption_password: &str,
allow_weak_password: Option<Options>,
options: Option<Options>,
) -> Result<(), String> {
SecretStoreCreator::write_to_file(
&self.secretstore,
path_for_secret_file,
encryption_password,
allow_weak_password,
options,
)
}

Expand Down Expand Up @@ -423,12 +423,12 @@ impl SeedStoreCreator {
seedstore: &SeedStore,
path_for_secret_file: &str,
encryption_password: &str,
allow_weak_password: Option<Options>,
options: Option<Options>,
) -> Result<(), String> {
seedstore.write_to_file(
path_for_secret_file,
encryption_password,
allow_weak_password,
options,
)
}
}
Expand Down