Test Key::list

Adds a live-against-the-device test which ensures keys can be
successfully listed.
This commit is contained in:
Tony Arcieri
2019-12-07 09:42:18 -08:00
parent cb9d5221b2
commit d1d384d304
9 changed files with 55 additions and 37 deletions
+2
View File
@@ -35,6 +35,7 @@ impl From<PinPolicy> for u8 {
impl PinPolicy {
/// Writes the `PinPolicy` in the format the YubiKey expects during key generation or
/// importation.
#[cfg(feature = "untested")]
pub(crate) fn write(self, buf: &mut [u8]) -> usize {
match self {
PinPolicy::Default => 0,
@@ -84,6 +85,7 @@ impl From<TouchPolicy> for u8 {
impl TouchPolicy {
/// Writes the `TouchPolicy` in the format the YubiKey expects during key generation
/// or importation.
#[cfg(feature = "untested")]
pub(crate) fn write(self, buf: &mut [u8]) -> usize {
match self {
TouchPolicy::Default => 0,