network keying

This commit is contained in:
John Smith
2023-06-23 21:12:48 -04:00
parent bc6421acf7
commit acebcb7947
14 changed files with 119 additions and 21 deletions

View File

@@ -152,6 +152,11 @@ fn do_clap_matches(default_config_path: &OsStr) -> Result<clap::ArgMatches, clap
.long("panic")
.help("panic on ctrl-c instead of graceful shutdown"),
)
.arg(
Arg::new("network-key")
.long("network-key")
.help("password override to use for network isolation"),
)
;
#[cfg(feature = "rt-tokio")]
@@ -258,6 +263,9 @@ pub fn process_command_line() -> EyreResult<(Settings, ArgMatches)> {
if matches.occurrences_of("new-password") != 0 {
settingsrw.core.protected_store.new_device_encryption_key_password = Some(matches.value_of("new-password").unwrap().to_owned());
}
if matches.occurrences_of("network-key") != 0 {
settingsrw.core.network.network_key_password = Some(matches.value_of("new-password").unwrap().to_owned());
}
if matches.occurrences_of("dump-txt-record") != 0 {
// Turn off terminal logging so we can be interactive