Add -D/--days flag

This commit is contained in:
Jan Trefil 2023-05-22 22:31:45 +02:00
parent bfa1c0ac18
commit 2f8d583a12

View file

@ -30,6 +30,13 @@ struct Args {
help = "List of IP addresses to be used, can be empty if at least one DNS name is provided"
)]
ip_addresses: Vec<IpAddr>,
#[clap(
long,
short = 'D',
help = "How many days should this certificate be valid for",
default_value = "365"
)]
days: u32,
}
fn main() -> ExitCode {
@ -110,6 +117,8 @@ subjectAltName = @alt_names
.arg(certificate)
.arg("-config")
.arg(file.path())
.arg("-days")
.arg("3650")
.status()?;
if !status.success() {