From 2d1ce1ddf9ca56d7b3c4043a7579710a4e76fc7c Mon Sep 17 00:00:00 2001 From: Pauli Date: Thu, 5 Jun 2025 12:02:52 +1000 Subject: [PATCH] rand: document the EVP_RAND_nonce() return correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Tom Cosgrove Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27766) (cherry picked from commit e81b252a955ae380c3af6129b0f9054c2594b8d6) --- doc/man3/EVP_RAND.pod | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/man3/EVP_RAND.pod b/doc/man3/EVP_RAND.pod index fdb9ef9dcfd..da7559532e8 100644 --- a/doc/man3/EVP_RAND.pod +++ b/doc/man3/EVP_RAND.pod @@ -152,11 +152,8 @@ operating system. If I is specified, fresh entropy from a live source will be sought. This call operates as per NIST SP 800-90A and SP 800-90C. -EVP_RAND_nonce() creates a nonce in I of maximum length I -bytes from the RAND I. The function returns the length of the generated -nonce. If I is NULL, the length is still returned but no generation -takes place. This allows a caller to dynamically allocate a buffer of the -appropriate size. +EVP_RAND_nonce() creates a nonce in I of length I +bytes from the RAND I. EVP_RAND_enable_locking() enables locking for the RAND I and all of its parents. After this I will operate in a thread safe manner, albeit @@ -385,7 +382,7 @@ EVP_RAND_CTX_free() does not return a value. EVP_RAND_CTX_up_ref() returns 1 on success, 0 on error. -EVP_RAND_nonce() returns the length of the nonce. +EVP_RAND_nonce() returns 1 on success, 0 on error. EVP_RAND_get_strength() returns the strength of the random number generator in bits. -- 2.47.2