summaryrefslogtreecommitdiff
path: root/src/secmem.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2004-04-15 09:00:22 +0000
committerWerner Koch <wk@gnupg.org>2004-04-15 09:00:22 +0000
commit3eff0ccc9115c4c5d52aff7201f8fb6d604408e7 (patch)
treed30e00d5728303a06e30eab387650d4b2f6b06a0 /src/secmem.c
parent07de64be8e3d42addbf280a55071da49ff4d3e31 (diff)
downloadlibgcrypt-3eff0ccc9115c4c5d52aff7201f8fb6d604408e7.tar.gz
About to release 1.2
Diffstat (limited to 'src/secmem.c')
-rw-r--r--src/secmem.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/secmem.c b/src/secmem.c
index 544326eb..163bf20e 100644
--- a/src/secmem.c
+++ b/src/secmem.c
@@ -477,8 +477,7 @@ _gcry_secmem_malloc_internal (size_t size)
if (!pool_okay)
{
log_info (_
- ("operation is not possible without initialized secure memory\n"));
- log_info (_("(you may have used the wrong program for this task)\n"));
+ ("operation is not possible without initialized secure memory\n"));
exit (2);
}
if (show_warning && !suspend_warning)
@@ -487,7 +486,7 @@ _gcry_secmem_malloc_internal (size_t size)
print_warn ();
}
- /* blocks are always a multiple of 32 */
+ /* Blocks are always a multiple of 32. */
size = ((size + 31) / 32) * 32;
mb = mb_get_new ((memblock_t *) pool, size);
@@ -612,10 +611,10 @@ _gcry_secmem_term ()
if (!pool_okay)
return;
- memset (pool, 0xff, pool_size);
- memset (pool, 0xaa, pool_size);
- memset (pool, 0x55, pool_size);
- memset (pool, 0x00, pool_size);
+ wipememory2 (pool, 0xff, pool_size);
+ wipememory2 (pool, 0xaa, pool_size);
+ wipememory2 (pool, 0x55, pool_size);
+ wipememory2 (pool, 0x00, pool_size);
#if HAVE_MMAP
if (pool_is_mmapped)
munmap (pool, pool_size);