diff --git a/src/config.rs b/src/config.rs index 492dbcc..aa766fb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -20,6 +20,8 @@ pub struct Config { domain_file: Option, #[arg(short, long, value_name = "FILE")] revocation_list: Option, + #[arg(short = 'x', long, default_value_t = 1296000)] + expiration: u64, } impl Config { @@ -51,4 +53,12 @@ impl Config { pub fn domains(&self) -> &[String] { &self.domain } + + pub fn expiration(&self) -> Option { + if self.expiration != 0 { + Some(self.expiration) + } else { + None + } + } }