g10: Fix card-edit/kdf-setup for single salt.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 30 Mar 2018 07:55:01 +0000 (16:55 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 30 Mar 2018 07:55:01 +0000 (16:55 +0900)
* g10/card-util.c (gen_kdf_data): Use SALT_USER.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
g10/card-util.c

index 367e315..e33a417 100644 (file)
@@ -2017,7 +2017,9 @@ gen_kdf_data (unsigned char *data, int single_salt)
   gcry_randomize (p, 8, GCRY_STRONG_RANDOM);
   p += 8;
 
-  if (!single_salt)
+  if (single_salt)
+    salt_admin = salt_user;
+  else
     {
       memcpy (p, h2, sizeof h2);
       p += sizeof h2;