mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-20 01:02:44 +02:00
scd: Fix unblock PIN by a Reset Code with KDF.
* scd/app-openpgp.c (do_change_pin): Use correct CHVNO=1 for
pin2hash_if_kdf, for user's PIN.
--
GnuPG-bug-id: 5413
Signed-off-by: Kirill Elagin <kirelagin@gmail.com>
(cherry picked from commit f209d7d2db
)
This commit is contained in:
parent
22fe23f46d
commit
6c4216094e
|
@ -2924,7 +2924,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr,
|
||||||
if (!rc)
|
if (!rc)
|
||||||
{
|
{
|
||||||
strcpy (buffer+pinlen0, pinvalue);
|
strcpy (buffer+pinlen0, pinvalue);
|
||||||
rc = pin2hash_if_kdf (app, 0, buffer+pinlen0, &pinlen);
|
rc = pin2hash_if_kdf (app, 1, buffer+pinlen0, &pinlen);
|
||||||
}
|
}
|
||||||
if (!rc)
|
if (!rc)
|
||||||
rc = iso7816_reset_retry_counter_with_rc (app->slot, 0x81,
|
rc = iso7816_reset_retry_counter_with_rc (app->slot, 0x81,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user