revert wrong change of src/ac.c

This commit is contained in:
NIIBE Yutaka
2010-11-08 14:06:54 +09:00
parent 749a7a1d35
commit 074feda7ae
2 changed files with 4 additions and 4 deletions

View File

@@ -38,9 +38,9 @@
* src/openpgp-do.c (gpg_do_write_prvkey): Remove multiple call
of flash_do_release.
Bug fixes.
* src/openpgp-do.c (gpg_do_write_prvkey): compare with != operator.
* src/ac.c (verify_admin_0): Don't hardcode 6, but use strlen.
Bug fix.
* src/openpgp-do.c (gpg_do_write_prvkey): Don't hardcode 6, but
use strlen.
* src/flash.c, src/gnuk.ld.in: Rename "Flash DO Pool" to "Flash
Data Pool", because it's not only DO.

View File

@@ -195,7 +195,7 @@ verify_admin_0 (const uint8_t *pw, int buf_len, int pw_len_known)
/* For empty PW3, pass phrase should be OPENPGP_CARD_INITIAL_PW3 */
{
if ((pw_len_known >=0 && pw_len_known != strlen (OPENPGP_CARD_INITIAL_PW3))
|| buf_len != (int)strlen (OPENPGP_CARD_INITIAL_PW3)
|| buf_len < (int)strlen (OPENPGP_CARD_INITIAL_PW3)
|| strncmp ((const char *)pw, OPENPGP_CARD_INITIAL_PW3,
strlen (OPENPGP_CARD_INITIAL_PW3)) != 0)
/* It is failure, but we don't try to lock for the case of empty PW3 */