This commit is contained in:
parent
6cb7ce4a78
commit
675dd4faf6
@ -33,7 +33,7 @@ pub fn renew_command(cert: &Certificate, ca_path: &str, file_name: Option<&str>)
|
||||
.join(" ");
|
||||
let opts = opts.trim();
|
||||
let renew_command = format!(
|
||||
"ssh-keygen -s {ca_path} {host_key} -I {} -n {} -z {} -V {:#x}:{:#x} {opts} {}",
|
||||
"ssh-keygen -s {ca_path} {host_key} -I {} -n {} -z {} -V {}:{} {opts} {}",
|
||||
escape(cert.key_id().into()),
|
||||
escape(cert.valid_principals().join(",").into()),
|
||||
cert.serial() + 1,
|
||||
@ -41,7 +41,7 @@ pub fn renew_command(cert: &Certificate, ca_path: &str, file_name: Option<&str>)
|
||||
expiry_date.as_secs(),
|
||||
escape(
|
||||
file_name
|
||||
.map(Cow::Borrowed)
|
||||
.map(|name| name.trim_end_matches("-cert.pub")).map(Cow::Borrowed)
|
||||
.unwrap_or_else(|| escape(format!("{}.pub", cert.key_id()).into()))
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user