sec_mem: add note about the minimum size parameter.

Add a note indicating that the minimum size parameter to
CRYPTO_secure_malloc_init() should be small.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11149)
This commit is contained in:
Pauli 2020-02-22 10:35:26 +10:00
parent d27fd99110
commit 50e0402c22
1 changed files with 4 additions and 2 deletions

View File

@ -53,8 +53,10 @@ put all intermediate values and computations there.
CRYPTO_secure_malloc_init() creates the secure heap, with the specified
C<size> in bytes. The C<minsize> parameter is the minimum size to
allocate from the heap. Both C<size> and C<minsize> must be a power
of two.
allocate from the heap or zero to use a reasonable default value.
Both C<size> and, if specified, C<minsize> must be a power of two and
C<minsize> should generally be small, for example 16 or 32.
C<minsize> must be less than a quarter of C<size> in any case.
CRYPTO_secure_malloc_initialized() indicates whether or not the secure
heap as been initialized and is available.