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>
This commit is contained in:
Kirill Elagin 2021-04-27 20:34:35 +09:00 committed by NIIBE Yutaka
parent 4fcfac6feb
commit f209d7d2db
1 changed files with 1 additions and 1 deletions

View File

@ -3454,7 +3454,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr,
rc = pin2hash_if_kdf (app, 0, resetcode, &result1, &resultlen1);
if (!rc)
rc = pin2hash_if_kdf (app, 0, pinvalue, &result2, &resultlen2);
rc = pin2hash_if_kdf (app, 1, pinvalue, &result2, &resultlen2);
if (!rc)
{
bufferlen = resultlen1 + resultlen2;