]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
doc/man3/RAND_load_file.pod: RAND_load_file on non-regular files with bytes=-1
authorEugene Syromiatnikov <esyr@openssl.org>
Fri, 29 Aug 2025 08:29:26 +0000 (10:29 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 9 Sep 2025 18:22:17 +0000 (20:22 +0200)
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 <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28379)

(cherry picked from commit 0daaf33275196dd5af9535d69b0d521b9e4d03de)

doc/man3/RAND_load_file.pod

index fd00bf883d401c131cffaa8c7667b2b7a131fcec..9fad4d7175f3f535bb6847563b22fcfb0672e194 100644 (file)
@@ -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<filename> and
 adds them to the PRNG. If B<max_bytes> is nonnegative,
 up to B<max_bytes> are read;
-if B<max_bytes> is -1, the complete file is read.
+if B<max_bytes> 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