]> git.ipfire.org Git - thirdparty/openssl.git/commit
Secure memory fixes
authorTodd Short <tshort@akamai.com>
Mon, 11 Apr 2016 20:03:42 +0000 (16:03 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 2 May 2016 16:58:03 +0000 (12:58 -0400)
commite8408681b3fff91b794a1a5c65fd190019d6e9ee
tree04f3c0e8dc43687b4f323e3e33c8a52861aeab64
parentfbaf30d087a2db2b4e22279e819d481fca21ac5c
Secure memory fixes

Fix some of the variables to be (s)size_t, so that more than 1GB of
secure memory can be allocated. The arena has to be a power of 2, and
2GB fails because it ends up being a negative 32-bit signed number.

The |too_late| flag is not strictly necessary; it is easy to figure
out if something is secure memory by looking at the arena. As before,
secure memory allocations will not fail, but now they can be freed
correctly. Once initialized, secure memory can still be used, even if
allocations occured before initialization.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/mem_sec.c
doc/crypto/OPENSSL_secure_malloc.pod
include/openssl/crypto.h
test/secmemtest.c