mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
scd:openpgp: Fix PIN pin2hash_if_kdf.
* scd/app-openpgp.c (pin2hash_if_kdf): DEK had been changed to pointer to allocated memory, so, we need to use DEKLEN for the length. -- GnuPG-bug-id: 7121 Fixes-commit: 20e85585ed20af67ce68e637ea5c3637615ba2e9 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
97b37db144
commit
bb57c808b2
@ -2534,7 +2534,7 @@ pin2hash_if_kdf (app_t app, int chvno, const char *pin,
|
|||||||
err = gcry_kdf_derive (pin, pinlen,
|
err = gcry_kdf_derive (pin, pinlen,
|
||||||
GCRY_KDF_ITERSALTED_S2K,
|
GCRY_KDF_ITERSALTED_S2K,
|
||||||
DIGEST_ALGO_SHA256, salt, 8,
|
DIGEST_ALGO_SHA256, salt, 8,
|
||||||
s2k_count, sizeof (dek), dek);
|
s2k_count, deklen, dek);
|
||||||
if (!err)
|
if (!err)
|
||||||
{
|
{
|
||||||
*r_pinlen = deklen;
|
*r_pinlen = deklen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user