feat: v1.10.0, SSH CA works

This commit is contained in:
2024-09-07 00:43:30 +08:00
parent cbf127a297
commit 61854b7abf
6 changed files with 65 additions and 22 deletions

View File

@@ -72,7 +72,7 @@ impl Command for CommandImpl {
//
// [identifier] will be nistp256 or nistp384
let mut ssh_pub_key = vec![];
ssh_pub_key.write_string(&format!("ecdsa-sha2-{}", ssh_algorithm).as_bytes());
ssh_pub_key.write_string(format!("ecdsa-sha2-{}", ssh_algorithm).as_bytes());
let mut ecc_key_blob = vec![];
ecc_key_blob.write_string(ssh_algorithm.as_bytes());
ecc_key_blob.write_string(&ec_key_point);
@@ -85,7 +85,7 @@ impl Command for CommandImpl {
println!(
"{}ecdsa-sha2-{} {} Yubikey-PIV-{}",
if ca { "cert-authority " } else { "" },
if ca { "cert-authority,principals=\"root\" " } else { "" },
ssh_algorithm,
STANDARD.encode(&ssh_pub_key),
slot_id