40241e2df8ee9cef5f6bccaf90eea733a9656e63
[openssl.git] / doc / crypto / RAND_egd.pod
1 =pod
2
3 =head1 NAME
4
5 RAND_egd - query entropy gathering daemon
6
7 =head1 SYNOPSIS
8
9  #include <openssl/rand.h>
10
11  int RAND_egd(const char *path);
12
13 =head1 DESCRIPTION
14
15 RAND_egd() queries the entropy gathering daemon EGD on socket B<path>.
16
17 EGD is available from http://www.lothar.com/tech/crypto/ (C<perl
18 Makefile.PL; make; make install> to install). It is run as B<egd>
19 I<path>, where I<path> is an absolute path designating a socket. When
20 RAND_egd() is called with that path as an argument, it tries to read
21 random bytes that EGD has collected. The read is performed in
22 non-blocking mode.
23
24 Alternatively, the EGD-compatible daemon PRNGD can be used. It is
25 available from
26 http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html .
27
28 =head1 RETURN VALUE
29
30 RAND_egd() returns the number of bytes read from the daemon on
31 success, and -1 if the connection failed or the daemon did not return
32 enough data to fully seed the PRNG.
33
34 =head1 SEE ALSO
35
36 L<rand(3)|rand(3)>, L<RAND_add(3)|RAND_add(3)>, L<RAND_cleanup(3)|RAND_cleanup(3)>
37
38 =head1 HISTORY
39
40 RAND_egd() is available since OpenSSL 0.9.5.
41
42 =cut