Add creating an introducer from a files

- Introducers can now be created by specifying a file. The certificate
  gets imported and declared as an introducer for the passed domains.
- Add some checks, so that the imported certificate can actually be used
  as an introducer (certificate is alive, not revoked, has certification
  capabilities)
This commit is contained in:
Malte Meiboom
2026-05-13 11:49:40 +02:00
parent 0df4c723d9
commit 4ddc3db6c0
5 changed files with 61 additions and 18 deletions
+12 -3
View File
@@ -80,9 +80,18 @@ pub enum IntroducerSubcommand {
pub struct IntroducerAddCommand {
#[clap(
long = "cert",
help = "Certificate to declare as introducer."
help = "Certificate to declare as introducer.",
conflicts_with = "cert_file"
)]
pub cert: String,
pub cert: Option<String>,
#[clap(
long = "cert-file",
help = "Import certificate from CERT_FILE and declare it as introducer.",
value_name = "CERT_FILE",
conflicts_with = "cert"
)]
pub cert_file: Option<String>,
#[clap(
long = "domains",
@@ -146,7 +155,7 @@ pub struct LocalAddCommand {
long = "cert",
help = "Certificate to add."
)]
pub cert: String,
pub cert_file: String,
}
#[derive(Parser, Debug)]