Implement VERIFY with empty data

This commit is contained in:
NIIBE Yutaka
2013-01-28 12:10:14 +09:00
parent eae955b15e
commit 9dde59867d
4 changed files with 38 additions and 0 deletions

View File

@@ -41,6 +41,17 @@ gpg_pw_get_err_counter (uint8_t which)
return flash_cnt123_get_value (pw_err_counter_p[which]);
}
int
gpg_pw_get_retry_counter (int who)
{
if (who == 0x81 || who == 0x82)
return PASSWORD_ERRORS_MAX - gpg_pw_get_err_counter (PW_ERR_PW1);
else if (who == 0x83)
return PASSWORD_ERRORS_MAX - gpg_pw_get_err_counter (PW_ERR_PW3);
else
return PASSWORD_ERRORS_MAX - gpg_pw_get_err_counter (PW_ERR_RC);
}
int
gpg_pw_locked (uint8_t which)
{