In factory_reset(), StatusBytes::PasswordNotChecked is also a legal response to "verify" calls to a card (with a bad password).
This commit is contained in:
parent
5eea5c861d
commit
19ca7d9308
1 changed files with 4 additions and 2 deletions
|
@ -271,7 +271,8 @@ impl CardApp {
|
||||||
let resp =
|
let resp =
|
||||||
apdu::send_command(&mut self.card_client, verify, false)?;
|
apdu::send_command(&mut self.card_client, verify, false)?;
|
||||||
if !(resp.status() == StatusBytes::SecurityStatusNotSatisfied
|
if !(resp.status() == StatusBytes::SecurityStatusNotSatisfied
|
||||||
|| resp.status() == StatusBytes::AuthenticationMethodBlocked)
|
|| resp.status() == StatusBytes::AuthenticationMethodBlocked
|
||||||
|
|| matches!(resp.status(), StatusBytes::PasswordNotChecked(_)))
|
||||||
{
|
{
|
||||||
return Err(anyhow!("Unexpected status for reset, at pw1."));
|
return Err(anyhow!("Unexpected status for reset, at pw1."));
|
||||||
}
|
}
|
||||||
|
@ -285,7 +286,8 @@ impl CardApp {
|
||||||
apdu::send_command(&mut self.card_client, verify, false)?;
|
apdu::send_command(&mut self.card_client, verify, false)?;
|
||||||
|
|
||||||
if !(resp.status() == StatusBytes::SecurityStatusNotSatisfied
|
if !(resp.status() == StatusBytes::SecurityStatusNotSatisfied
|
||||||
|| resp.status() == StatusBytes::AuthenticationMethodBlocked)
|
|| resp.status() == StatusBytes::AuthenticationMethodBlocked
|
||||||
|
|| matches!(resp.status(), StatusBytes::PasswordNotChecked(_)))
|
||||||
{
|
{
|
||||||
return Err(anyhow!("Unexpected status for reset, at pw3."));
|
return Err(anyhow!("Unexpected status for reset, at pw3."));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue