feat: update piv meta
This commit is contained in:
@@ -10,6 +10,7 @@ use x509::SubjectPublicKeyInfo;
|
||||
use yubikey::{Key, PinPolicy, TouchPolicy, YubiKey};
|
||||
use yubikey::certificate::PublicKeyInfo;
|
||||
use yubikey::piv::{AlgorithmId, ManagementAlgorithmId, metadata, Origin, RetiredSlotId, SlotId};
|
||||
use crate::pkiutil::bytes_to_pem;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
@@ -131,6 +132,11 @@ impl Command for CommandImpl {
|
||||
json.insert("issuer", k.certificate().issuer().to_string());
|
||||
json.insert("serial", k.certificate().serial().to_string());
|
||||
json.insert("certificate_hex", k.certificate().encode_hex::<String>());
|
||||
|
||||
if !json_output {
|
||||
information!("Subject: {}", k.certificate().subject());
|
||||
information!("Certificate: {}", bytes_to_pem("CERTIFICATE", k.certificate().as_ref()));
|
||||
}
|
||||
} else {
|
||||
util_msg::when(MessageType::DEBUG, || {
|
||||
debugging!("Slot: {:x}", Into::<u8>::into(k.slot()));
|
||||
|
||||
Reference in New Issue
Block a user