summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/RAND_load_file.3
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 15:48:22 +0000
committerschwarze <>2016-11-03 15:48:22 +0000
commitb55a697c676bec213476fdf1525e9291c5d4aaf6 (patch)
treed168499a4dfb3fdd832a07f798870ad797dfd972 /src/lib/libcrypto/man/RAND_load_file.3
parent67adc08f675407bec0b8772e99ac4b939530d7e9 (diff)
downloadopenbsd-b55a697c676bec213476fdf1525e9291c5d4aaf6.tar.gz
openbsd-b55a697c676bec213476fdf1525e9291c5d4aaf6.tar.bz2
openbsd-b55a697c676bec213476fdf1525e9291c5d4aaf6.zip
convert RAND manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/RAND_load_file.3')
-rw-r--r--src/lib/libcrypto/man/RAND_load_file.368
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
27returns a default path for the random seed file.
28.Fa buf
29points to a buffer of size
30.Fa num
31in which to store the filename.
32If
33.Fa num
34is too small for the path name, an error occurs.
35.Pp
36.Fn RAND_load_file
37used to allow for the state of the random number generator to be
38controlled by external sources.
39.Pp
40It is kept for ABI compatibility but is no longer functional, and should
41not used in new programs.
42.Pp
43.Fn RAND_write_file
44writes a number of random bytes (currently 1024) to file
45.Fa filename .
46.Sh RETURN VALUES
47.Fn RAND_load_file
48always returns 0.
49.Pp
50.Fn RAND_write_file
51returns the number of bytes written, and -1 if the bytes written were
52generated without appropriate seed.
53.Pp
54.Fn RAND_file_name
55returns a pointer to
56.Fa buf
57on success, and
58.Dv NULL
59on 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 ,
66and
67.Fn RAND_file_name
68are available in all versions of SSLeay and OpenSSL.