Merge pull request #50 from linj-fork/fix-age

Fix the bug that args.days is not used
This commit is contained in:
htrefil 2023-09-30 09:53:06 +02:00 committed by GitHub
commit 6c555aace8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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() {