Restrict Protected to some heap types. (#6471)

* Restrict `Protected` to some heap types.

* Comment abut Protected usage.

* Remove Protected from crypto, use secrecy crate for existing uses.

* use a parse function

* fix error convert

* Rename and move secretY string function.

* std result
This commit is contained in:
cheme
2020-07-01 11:59:07 +02:00
committed by GitHub
parent ece0364170
commit 424d5c722d
6 changed files with 62 additions and 67 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ use sc_client_api::execution_extensions::ExecutionStrategies;
use std::{io, future::Future, path::{PathBuf, Path}, pin::Pin, net::SocketAddr, sync::Arc};
pub use sc_transaction_pool::txpool::Options as TransactionPoolOptions;
use sc_chain_spec::ChainSpec;
use sp_core::crypto::Protected;
use sp_core::crypto::SecretString;
pub use sc_telemetry::TelemetryEndpoints;
use prometheus_endpoint::Registry;
#[cfg(not(target_os = "unknown"))]
@@ -130,7 +130,7 @@ pub enum KeystoreConfig {
/// The path of the keystore.
path: PathBuf,
/// Node keystore's password.
password: Option<Protected<String>>
password: Option<SecretString>
},
/// In-memory keystore. Recommended for in-browser nodes.
InMemory,