Add locals add and remove subcommands

- `locals add` adds a local (unintroduced) certificate for encryption.
- `locals remove` removes/deacivates a local certificate.
- Overall cleanup
This commit is contained in:
Malte Meiboom
2026-05-19 16:07:48 +02:00
parent 14dca91d92
commit e6c6bf87d9
10 changed files with 162 additions and 51 deletions
+7 -6
View File
@@ -94,8 +94,8 @@ pub struct IntroducerAddCommand {
#[clap(
long = "cert-file",
help = "Import certificate from CERT_FILE and declare it as introducer.",
value_name = "CERT_FILE",
help = "Import certificate from <FILE> and declare it as introducer.",
value_name = "FILE",
conflicts_with = "cert"
)]
pub cert_file: Option<String>,
@@ -159,8 +159,9 @@ pub enum LocalsSubcommand {
)]
pub struct LocalsAddCommand {
#[clap(
long = "cert",
help = "Certificate to add."
long,
help = "Import a certificate from <FILE>.",
value_name = "FILE",
)]
pub cert_file: String,
}
@@ -168,12 +169,12 @@ pub struct LocalsAddCommand {
#[derive(Parser, Debug)]
#[clap(
name = "locals_remove",
about = "Certificate to remove.",
about = "Disable a Certificate.",
)]
pub struct LocalsRemoveCommand {
#[clap(
long = "cert",
help = "Certificate to removed."
help = "Certificate to be removed."
)]
pub cert: String,
}