Use CLI error type to render errors from yubikey.verify_pin()
This ensures that the attempts-before-blocked counter is displayed to users during the plugin protocol.
This commit is contained in:
+2
-2
@@ -328,10 +328,10 @@ impl Stub {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if yubikey.verify_pin(pin.expose_secret().as_bytes()).is_err() {
|
if let Err(e) = yubikey.verify_pin(pin.expose_secret().as_bytes()) {
|
||||||
return Ok(Err(identity::Error::Identity {
|
return Ok(Err(identity::Error::Identity {
|
||||||
index: self.identity_index,
|
index: self.identity_index,
|
||||||
message: "Invalid YubiKey PIN".to_owned(),
|
message: format!("{:?}", Error::YubiKey(e)),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user