From 2f8d583a12ec5a7b25852c6b920d1e7eaa149862 Mon Sep 17 00:00:00 2001 From: Jan Trefil <8711792+htrefil@users.noreply.github.com> Date: Mon, 22 May 2023 22:31:45 +0200 Subject: [PATCH] Add -D/--days flag --- rkvm-certificate-gen/src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rkvm-certificate-gen/src/main.rs b/rkvm-certificate-gen/src/main.rs index b265ca1..533e0c5 100644 --- a/rkvm-certificate-gen/src/main.rs +++ b/rkvm-certificate-gen/src/main.rs @@ -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, + #[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() {