diff options
Diffstat (limited to 'src/lib/libcrypto/man/RAND_load_file.3')
| -rw-r--r-- | src/lib/libcrypto/man/RAND_load_file.3 | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/RAND_load_file.3 b/src/lib/libcrypto/man/RAND_load_file.3 new file mode 100644 index 0000000000..fb521a8e9c --- /dev/null +++ b/src/lib/libcrypto/man/RAND_load_file.3 | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | .Dd $Mdocdate: November 3 2016 $ | ||
| 2 | .Dt RAND_LOAD_FILE 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm RAND_load_file , | ||
| 6 | .Nm RAND_write_file , | ||
| 7 | .Nm RAND_file_name | ||
| 8 | .Nd PRNG seed file | ||
| 9 | .Sh SYNOPSIS | ||
| 10 | .In openssl/rand.h | ||
| 11 | .Ft const char * | ||
| 12 | .Fo RAND_file_name | ||
| 13 | .Fa "char *buf" | ||
| 14 | .Fa "size_t num" | ||
| 15 | .Fc | ||
| 16 | .Ft int | ||
| 17 | .Fo RAND_load_file | ||
| 18 | .Fa "const char *filename" | ||
| 19 | .Fa "long max_bytes" | ||
| 20 | .Fc | ||
| 21 | .Ft int | ||
| 22 | .Fo RAND_write_file | ||
| 23 | .Fa "const char *filename" | ||
| 24 | .Fc | ||
| 25 | .Sh DESCRIPTION | ||
| 26 | .Fn RAND_file_name | ||
| 27 | returns a default path for the random seed file. | ||
| 28 | .Fa buf | ||
| 29 | points to a buffer of size | ||
| 30 | .Fa num | ||
| 31 | in which to store the filename. | ||
| 32 | If | ||
| 33 | .Fa num | ||
| 34 | is too small for the path name, an error occurs. | ||
| 35 | .Pp | ||
| 36 | .Fn RAND_load_file | ||
| 37 | used to allow for the state of the random number generator to be | ||
| 38 | controlled by external sources. | ||
| 39 | .Pp | ||
| 40 | It is kept for ABI compatibility but is no longer functional, and should | ||
| 41 | not used in new programs. | ||
| 42 | .Pp | ||
| 43 | .Fn RAND_write_file | ||
| 44 | writes a number of random bytes (currently 1024) to file | ||
| 45 | .Fa filename . | ||
| 46 | .Sh RETURN VALUES | ||
| 47 | .Fn RAND_load_file | ||
| 48 | always returns 0. | ||
| 49 | .Pp | ||
| 50 | .Fn RAND_write_file | ||
| 51 | returns the number of bytes written, and -1 if the bytes written were | ||
| 52 | generated without appropriate seed. | ||
| 53 | .Pp | ||
| 54 | .Fn RAND_file_name | ||
| 55 | returns a pointer to | ||
| 56 | .Fa buf | ||
| 57 | on success, and | ||
| 58 | .Dv NULL | ||
| 59 | on error. | ||
| 60 | .Sh SEE ALSO | ||
| 61 | .Xr RAND_add 3 , | ||
| 62 | .Xr RAND_cleanup 3 | ||
| 63 | .Sh HISTORY | ||
| 64 | .Fn RAND_load_file , | ||
| 65 | .Fn RAND_write_file , | ||
| 66 | and | ||
| 67 | .Fn RAND_file_name | ||
| 68 | are available in all versions of SSLeay and OpenSSL. | ||
