Change default recipient type to p256tag

Identities generated with older versions of `age-plugin-yubikey` show
their legacy recipient in comments; newer identities only show the new
recipient.
This commit is contained in:
Jack Grigg
2025-12-21 13:44:19 +00:00
parent 971d63957c
commit 0068b1f343
9 changed files with 107 additions and 48 deletions
+2 -3
View File
@@ -22,7 +22,6 @@ use crate::{
error::Error,
fl,
native::p256tag,
piv_p256,
recipient::TAG_BYTES,
util::{otp_serial_prefix, Metadata},
Recipient, IDENTITY_PREFIX,
@@ -395,8 +394,8 @@ pub(crate) fn list_slots(
match key.slot() {
SlotId::Retired(slot) => {
// Only P-256 keys are compatible with us.
let recipient = piv_p256::Recipient::from_certificate(key.certificate())
.map(Recipient::PivP256);
let recipient =
p256tag::Recipient::from_certificate(key.certificate()).map(Recipient::P256Tag);
Some((key, slot, recipient))
}
_ => None,