You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm doing a small CLI utility that works with Yubikey. As part of its functionality I wanted to detect whether a keypair already existing in a certain slot before generating it, to prevent users from accidentally overwriting that keypair.
But to my surprise, the implementation of metadata command can only return Error::NotSupported and Error::GenericError:
As a result, it is impossible to ditinguish between "not found" and other errors.
NIST defines a separate response code 6a 88 as "Referenced data or reference data not found" and this is exactly what Yubikey returned when I tried to execute this command on an empty slot.
I understand that returning another error type from the method may be considered as a breaking change, but it would be welcomed :)
The text was updated successfully, but these errors were encountered:
Hello! I'm doing a small CLI utility that works with Yubikey. As part of its functionality I wanted to detect whether a keypair already existing in a certain slot before generating it, to prevent users from accidentally overwriting that keypair.
But to my surprise, the implementation of
metadata
command can only returnError::NotSupported
andError::GenericError
:yubikey.rs/src/piv.rs
Lines 931 to 937 in b07612e
As a result, it is impossible to ditinguish between "not found" and other errors.
NIST defines a separate response code
6a 88
as "Referenced data or reference data not found" and this is exactly what Yubikey returned when I tried to execute this command on an empty slot.I understand that returning another error type from the method may be considered as a breaking change, but it would be welcomed :)
The text was updated successfully, but these errors were encountered: