fix condition of ac_check_status

This commit is contained in:
NIIBE Yutaka
2011-05-12 18:05:39 +09:00
parent 82fc1c7e93
commit c04e5d816c
2 changed files with 8 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
2011-05-12 NIIBE Yutaka <gniibe@fsij.org>
* src/openpgp.c (cmd_pso, cmd_internal_authenticate)
(cmd_update_binary, cmd_write_binary): Don't check pw locked.
* tool/dfuse.py (DFU_STM32.verify): Add missing colon.
* tool/dfuse.py (get_device): Restrict to STMicro DfuSe.

View File

@@ -766,8 +766,7 @@ cmd_pso (void)
{
DEBUG_SHORT (len);
if (gpg_pw_locked (PW_ERR_PW1)
|| !ac_check_status (AC_OTHER_AUTHORIZED))
if (!ac_check_status (AC_OTHER_AUTHORIZED))
{
DEBUG_INFO ("security error.");
GPG_SECURITY_FAILURE ();
@@ -783,7 +782,7 @@ cmd_pso (void)
GPG_ERROR ();
}
else
{ /* XXX: not yet supported */
{
DEBUG_INFO (" - ??");
DEBUG_BYTE (cmd_APDU[2]);
DEBUG_INFO (" - ??");
@@ -813,8 +812,7 @@ cmd_internal_authenticate (void)
{
DEBUG_SHORT (len);
if (gpg_pw_locked (PW_ERR_PW1)
|| !ac_check_status (AC_OTHER_AUTHORIZED))
if (!ac_check_status (AC_OTHER_AUTHORIZED))
{
DEBUG_INFO ("security error.");
GPG_SECURITY_FAILURE ();
@@ -855,7 +853,7 @@ cmd_update_binary (void)
DEBUG_INFO (" - UPDATE BINARY\r\n");
if (gpg_pw_locked (PW_ERR_PW3) || !ac_check_status (AC_ADMIN_AUTHORIZED))
if (!ac_check_status (AC_ADMIN_AUTHORIZED))
{
DEBUG_INFO ("security error.");
GPG_SECURITY_FAILURE ();
@@ -926,7 +924,7 @@ cmd_write_binary (void)
DEBUG_INFO (" - WRITE BINARY\r\n");
if (gpg_pw_locked (PW_ERR_PW3) || !ac_check_status (AC_ADMIN_AUTHORIZED))
if (!ac_check_status (AC_ADMIN_AUTHORIZED))
{
DEBUG_INFO ("security error.");
GPG_SECURITY_FAILURE ();