Fix the bug that args.days is not used

This commit is contained in:
Lin Jian 2023-09-30 02:17:13 +08:00
parent 59d5b6b6d7
commit 2c4a8f5c6c
No known key found for this signature in database
GPG key ID: A6698D36434F75A5

View file

@ -51,6 +51,7 @@ fn main() -> ExitCode {
&args.key,
&args.dns_names,
&args.ip_addresses,
args.days,
);
match result {
@ -77,6 +78,7 @@ fn run(
key: &Path,
dns_names: &[String],
ip_addresses: &[IpAddr],
days: u32,
) -> Result<(), Error> {
let mut config = "[req]
prompt = no
@ -118,7 +120,7 @@ subjectAltName = @alt_names
.arg("-config")
.arg(file.path())
.arg("-days")
.arg("3650")
.arg(days.to_string())
.status()?;
if !status.success() {