eapi-bump librsvg
[sgilles-overlay.git] / www-client / elinks / files / elinks-0.12_pre5-rand-egd.patch
blob6c5679a95bbda50654e7aae217c06eb041cf7c2a
1 --- a/src/network/ssl/ssl.c
2 +++ b/src/network/ssl/ssl.c
3 @@ -84,11 +84,16 @@ init_openssl(struct module *module)
4 * cannot initialize the PRNG and so every attempt to use SSL fails.
5 * It's actually an OpenSSL FAQ, and according to them, it's up to the
6 * application coders to seed the RNG. -- William Yodlowsky */
7 - if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) {
8 + RAND_file_name(f_randfile, sizeof(f_randfile));
9 +#ifdef HAVE_RAND_EGD
10 + if (RAND_egd(f_randfile) < 0) {
11 /* Not an EGD, so read and write to it */
12 +#endif
13 if (RAND_load_file(f_randfile, -1))
14 RAND_write_file(f_randfile);
15 +#ifdef HAVE_RAND_EGD
17 +#endif
19 SSLeay_add_ssl_algorithms();
20 context = SSL_CTX_new(SSLv23_client_method());