mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
Bump secrecy from 0.6.0 to 0.7.0 (#7568)
* Bump secrecy from 0.6.0 to 0.7.0 Bumps [secrecy](https://github.com/iqlusioninc/crates) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/iqlusioninc/crates/releases) - [Commits](https://github.com/iqlusioninc/crates/compare/secrecy/v0.6.0...secrecy/v0.7.0) Signed-off-by: dependabot[bot] <support@github.com> * Fix compilation errors Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
Generated
+2
-2
@@ -7648,9 +7648,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "secrecy"
|
||||
version = "0.6.0"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f"
|
||||
checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0"
|
||||
dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
@@ -22,8 +22,7 @@ use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use structopt::StructOpt;
|
||||
use crate::error;
|
||||
use sp_core::crypto::{SecretString, Zeroize};
|
||||
use std::str::FromStr;
|
||||
use sp_core::crypto::SecretString;
|
||||
|
||||
/// default sub directory for the key store
|
||||
const DEFAULT_KEYSTORE_CONFIG_PATH: &'static str = "keystore";
|
||||
@@ -72,21 +71,15 @@ impl KeystoreParams {
|
||||
let password = if self.password_interactive {
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
{
|
||||
let mut password = input_keystore_password()?;
|
||||
let secret = std::str::FromStr::from_str(password.as_str())
|
||||
.map_err(|()| "Error reading password")?;
|
||||
password.zeroize();
|
||||
Some(secret)
|
||||
let password = input_keystore_password()?;
|
||||
Some(SecretString::new(password))
|
||||
}
|
||||
#[cfg(target_os = "unknown")]
|
||||
None
|
||||
} else if let Some(ref file) = self.password_filename {
|
||||
let mut password = fs::read_to_string(file)
|
||||
let password = fs::read_to_string(file)
|
||||
.map_err(|e| format!("{}", e))?;
|
||||
let secret = std::str::FromStr::from_str(password.as_str())
|
||||
.map_err(|()| "Error reading password")?;
|
||||
password.zeroize();
|
||||
Some(secret)
|
||||
Some(SecretString::new(password))
|
||||
} else {
|
||||
self.password.clone()
|
||||
};
|
||||
@@ -104,10 +97,8 @@ impl KeystoreParams {
|
||||
let (password_interactive, password) = (self.password_interactive, self.password.clone());
|
||||
|
||||
let pass = if password_interactive {
|
||||
let mut password = rpassword::read_password_from_tty(Some("Key password: "))?;
|
||||
let pass = Some(FromStr::from_str(&password).map_err(|()| "Error reading password")?);
|
||||
password.zeroize();
|
||||
pass
|
||||
let password = rpassword::read_password_from_tty(Some("Key password: "))?;
|
||||
Some(SecretString::new(password))
|
||||
} else {
|
||||
password
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ tiny-bip39 = { version = "0.8", optional = true }
|
||||
regex = { version = "1.3.1", optional = true }
|
||||
num-traits = { version = "0.2.8", default-features = false }
|
||||
zeroize = { version = "1.0.0", default-features = false }
|
||||
secrecy = { version = "0.6.0", default-features = false }
|
||||
secrecy = { version = "0.7.0", default-features = false }
|
||||
lazy_static = { version = "1.4.0", default-features = false, optional = true }
|
||||
parking_lot = { version = "0.10.0", optional = true }
|
||||
sp-debug-derive = { version = "2.0.0", path = "../debug-derive" }
|
||||
|
||||
Reference in New Issue
Block a user