From: Eugene Syromiatnikov Date: Mon, 30 Mar 2026 08:30:41 +0000 (+0200) Subject: OPENSSL_secure_malloc.pod: mention CRYPTO_secure_actual_size() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef079ec8222d3d7ae6ee46134635d69a8533d9bf;p=thirdparty%2Fopenssl.git OPENSSL_secure_malloc.pod: mention CRYPTO_secure_actual_size() Add mentions to NAME, SYNOPSIS, and RETURN VALUES, and provide a short description (that it is identical to its OPENSSL_* counterpart) to DESCRIPTION. Signed-off-by: Eugene Syromiatnikov Reviewed-by: Nikola Pajkovsky Reviewed-by: Tomas Mraz MergeDate: Wed Apr 8 10:23:57 2026 (Merged from https://github.com/openssl/openssl/pull/30623) --- diff --git a/doc/man3/OPENSSL_secure_malloc.pod b/doc/man3/OPENSSL_secure_malloc.pod index e9586be0ebf..510e3bac8fb 100644 --- a/doc/man3/OPENSSL_secure_malloc.pod +++ b/doc/man3/OPENSSL_secure_malloc.pod @@ -8,7 +8,7 @@ OPENSSL_secure_zalloc, CRYPTO_secure_zalloc, OPENSSL_secure_malloc_array, CRYPTO_secure_malloc_array, OPENSSL_secure_calloc, CRYPTO_secure_calloc, OPENSSL_secure_free, CRYPTO_secure_free, OPENSSL_secure_clear_free, CRYPTO_secure_clear_free, OPENSSL_secure_actual_size, -CRYPTO_secure_allocated, +CRYPTO_secure_actual_size, CRYPTO_secure_allocated, CRYPTO_secure_used - secure heap storage =head1 SYNOPSIS @@ -42,6 +42,7 @@ CRYPTO_secure_used - secure heap storage void CRYPTO_secure_clear_free(void *ptr, size_t num, const char *, int); size_t OPENSSL_secure_actual_size(const void *ptr); + size_t CRYPTO_secure_actual_size(const void *ptr); int CRYPTO_secure_allocated(const void *ptr); size_t CRYPTO_secure_used(); @@ -119,6 +120,9 @@ OPENSSL_secure_actual_size() tells the actual size allocated to the pointer; implementations may allocate more space than initially requested, in order to "round up" and reduce secure heap fragmentation. +CRYPTO_secure_actual_size() is an alias to OPENSSL_secure_actual_size(), +identical in arguments, return value, and behaviour. + OPENSSL_secure_allocated() tells if a pointer is allocated in the secure heap. CRYPTO_secure_used() returns the number of bytes allocated in the @@ -141,6 +145,9 @@ return a pointer into the secure heap of the requested size, if it is initialised, a pointer returned by the underlying OPENSSL_malloc() call, if it is not, or C on error. +OPENSSL_secure_actual_size() and CRYPTO_secure_actual_size() return positive +size in bytes on success or 0 on error. + CRYPTO_secure_allocated() returns 1 if the pointer is in the secure heap, or 0 if not. CRYPTO_secure_malloc_done() returns 1 if the secure memory area is released, or 0 if not. diff --git a/util/missingcrypto.txt b/util/missingcrypto.txt index ea3fe19994f..fdc1c9215f9 100644 --- a/util/missingcrypto.txt +++ b/util/missingcrypto.txt @@ -391,7 +391,6 @@ CRYPTO_ocb128_new(3) CRYPTO_ocb128_setiv(3) CRYPTO_ocb128_tag(3) CRYPTO_ofb128_encrypt(3) -CRYPTO_secure_actual_size(3) CRYPTO_xts128_encrypt(3) Camellia_cbc_encrypt(3) Camellia_cfb128_encrypt(3)