protection improvement (1): different S2K for PW1 and Reset-code

This commit is contained in:
NIIBE Yutaka
2012-06-14 09:13:59 +09:00
parent a2855c9442
commit a5d77ec5af
6 changed files with 33 additions and 4 deletions

View File

@@ -543,7 +543,7 @@ proc_resetting_code (const uint8_t *data, int len)
newpw_len = len;
newpw = data;
sha256 (newpw, newpw_len, new_ks);
resetcode_s2k (newpw, newpw_len, new_ks);
new_ks0[0] = newpw_len;
r = gpg_change_keystring (admin_authorized, old_ks, BY_RESETCODE, new_ks);
if (r <= -2)