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
+3 -2
View File
@@ -1,3 +1,4 @@
//! locals subcommand
use anyhow::Result;
use crate::cli::cli_args::{LocalsCommand, LocalsSubcommand};
@@ -11,10 +12,10 @@ pub mod remove;
pub async fn dispatch(cmd: LocalsCommand, config: HuskConfigContainer) -> Result<()> {
match cmd.subcommand {
LocalsSubcommand::Add(add_cmd) => {
add::dispatch(add_cmd, &config).await?;
add::dispatch(add_cmd, config).await?;
},
LocalsSubcommand::Remove(rm_cmd) => {
remove::dispatch(rm_cmd, &config).await?;
remove::dispatch(rm_cmd, config).await?;
},
LocalsSubcommand::List => {
let context = HuskContext::new(&config.into())?;