clear random data after free

This commit is contained in:
NIIBE Yutaka
2012-06-15 13:26:27 +09:00
parent 2d5246e7fa
commit abd64bc495
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
2012-06-15 Niibe Yutaka <gniibe@fsij.org> 2012-06-15 Niibe Yutaka <gniibe@fsij.org>
* src/random.c (random_bytes_free): Clear out random bytes.
More protection improvements. More protection improvements.
* src/random.c (RANDOM_BYTES_LENGTH): It's 32 now (was: 16). * src/random.c (RANDOM_BYTES_LENGTH): It's 32 now (was: 16).
* src/gnuk.h (struct key_data_internal): Remove check, random, * src/gnuk.h (struct key_data_internal): Remove check, random,

View File

@@ -58,7 +58,7 @@ random_bytes_get (void)
void void
random_bytes_free (const uint8_t *p) random_bytes_free (const uint8_t *p)
{ {
(void)p; memset (p, 0, RANDOM_BYTES_LENGTH);
neug_flush (); neug_flush ();
} }