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:
+12
-3
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user