From: Eugene Syromiatnikov Date: Fri, 29 Aug 2025 08:29:26 +0000 (+0200) Subject: doc/man3/RAND_load_file.pod: RAND_load_file on non-regular files with bytes=-1 X-Git-Tag: openssl-3.2.6~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8536f06cfc40c939084b9c4d2f72539fe25ddd5;p=thirdparty%2Fopenssl.git doc/man3/RAND_load_file.pod: RAND_load_file on non-regular files with bytes=-1 Mention that RAND_load_file attempts to read only RAND_DRBG_STRENGTH bytes on non-regular files if the number of bytes to be read is not specified explicitly. Signed-off-by: Eugene Syromiatnikov Reviewed-by: Paul Dale Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/28379) (cherry picked from commit 0daaf33275196dd5af9535d69b0d521b9e4d03de) --- diff --git a/doc/man3/RAND_load_file.pod b/doc/man3/RAND_load_file.pod index fd00bf883d4..9fad4d7175f 100644 --- a/doc/man3/RAND_load_file.pod +++ b/doc/man3/RAND_load_file.pod @@ -19,7 +19,9 @@ RAND_load_file, RAND_write_file, RAND_file_name - PRNG seed file RAND_load_file() reads a number of bytes from file B and adds them to the PRNG. If B is nonnegative, up to B are read; -if B is -1, the complete file is read. +if B is -1, the complete file is read (unless the file +is not a regular file, in that case a fixed number of bytes, +256 in the current implementation, is attempted to be read). RAND_load_file() can read less than the complete file or the requested number of bytes if it doesn't fit in the return value type. Do not load the same file multiple times unless its contents have