summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2016-04-11 16:03:42 -0400
committerRich Salz <rsalz@openssl.org>2016-05-02 12:58:03 -0400
commite8408681b3fff91b794a1a5c65fd190019d6e9ee (patch)
tree04f3c0e8dc43687b4f323e3e33c8a52861aeab64 /include
parentfbaf30d087a2db2b4e22279e819d481fca21ac5c (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/openssl/crypto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 0eaf6b103e..5e16318d7b 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -371,7 +371,7 @@ void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num,
const char *file, int line);
int CRYPTO_secure_malloc_init(size_t sz, int minsize);
-void CRYPTO_secure_malloc_done(void);
+int CRYPTO_secure_malloc_done(void);
void *CRYPTO_secure_malloc(size_t num, const char *file, int line);
void *CRYPTO_secure_zalloc(size_t num, const char *file, int line);
void CRYPTO_secure_free(void *ptr, const char *file, int line);