summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2018-03-30 09:55:01 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2018-03-30 09:55:01 +0200
commit130ad98240c066383fa0a99bcf5e0ec72bc0dff9 (patch)
tree8e8d437d4ba0aec0d252dc49b15c214c395126cf /g10
parentg10,scd: Support single salt for KDF data object. (diff)
downloadgnupg2-130ad98240c066383fa0a99bcf5e0ec72bc0dff9.tar.xz
gnupg2-130ad98240c066383fa0a99bcf5e0ec72bc0dff9.zip
g10: Fix card-edit/kdf-setup for single salt.
* g10/card-util.c (gen_kdf_data): Use SALT_USER. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10')
-rw-r--r--g10/card-util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/card-util.c b/g10/card-util.c
index 367e31538..e33a41706 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -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;