]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
OPENSSL_secure_malloc.pod: mention CRYPTO_secure_actual_size()
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 30 Mar 2026 08:30:41 +0000 (10:30 +0200)
committerTomas Mraz <tomas@openssl.foundation>
Wed, 8 Apr 2026 10:23:48 +0000 (12:23 +0200)
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 <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:23:57 2026
(Merged from https://github.com/openssl/openssl/pull/30623)

doc/man3/OPENSSL_secure_malloc.pod
util/missingcrypto.txt

index e9586be0ebfb45be793458757209352f4f71e813..510e3bac8fb8d8eea0f1e90e33af20ca3b0a67ad 100644 (file)
@@ -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<NULL> 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.
index ea3fe19994f1218e770f597ca79f283f11b208cb..fdc1c9215f9ae495b95604a2b66a4cb70135bc04 100644 (file)
@@ -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)