projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ffd418a
)
Close PRNG source after reading our PBKDF2 salt from it.
author
Andrej Kacian
<ticho@claws-mail.org>
Fri, 8 Apr 2016 12:50:45 +0000
(14:50 +0200)
committer
Andrej Kacian
<ticho@claws-mail.org>
Fri, 8 Apr 2016 12:50:45 +0000
(14:50 +0200)
src/password.c
patch
|
blob
|
history
diff --git
a/src/password.c
b/src/password.c
index ac8fe5032a5c9371b717e14154c2b7241f33bc51..461a5b7fa960cf65683570a18f36cd0a0b98e69c 100644
(file)
--- a/
src/password.c
+++ b/
src/password.c
@@
-99,6
+99,12
@@
static void _generate_salt()
return;
}
return;
}
+#if defined G_OS_UNIX
+ close(rnd);
+#elif defined G_OS_WIN32
+ CryptReleaseContext(rnd, 0);
+#endif
+
prefs_common_get_prefs()->master_passphrase_salt =
g_base64_encode(salt, KD_SALT_LENGTH);
}
prefs_common_get_prefs()->master_passphrase_salt =
g_base64_encode(salt, KD_SALT_LENGTH);
}