mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
ssl: Make RAND_egd optional
Fixes compilation with LibreSSL.
This commit is contained in:
parent
6eba447e8a
commit
f4a58ba3b5
@ -84,11 +84,16 @@ init_openssl(struct module *module)
|
|||||||
* cannot initialize the PRNG and so every attempt to use SSL fails.
|
* cannot initialize the PRNG and so every attempt to use SSL fails.
|
||||||
* It's actually an OpenSSL FAQ, and according to them, it's up to the
|
* It's actually an OpenSSL FAQ, and according to them, it's up to the
|
||||||
* application coders to seed the RNG. -- William Yodlowsky */
|
* application coders to seed the RNG. -- William Yodlowsky */
|
||||||
if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) {
|
RAND_file_name(f_randfile, sizeof(f_randfile));
|
||||||
|
#ifdef HAVE_RAND_EGD
|
||||||
|
if (RAND_egd(f_randfile) < 0) {
|
||||||
/* Not an EGD, so read and write to it */
|
/* Not an EGD, so read and write to it */
|
||||||
|
#endif
|
||||||
if (RAND_load_file(f_randfile, -1))
|
if (RAND_load_file(f_randfile, -1))
|
||||||
RAND_write_file(f_randfile);
|
RAND_write_file(f_randfile);
|
||||||
|
#ifdef HAVE_RAND_EGD
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SSLeay_add_ssl_algorithms();
|
SSLeay_add_ssl_algorithms();
|
||||||
context = SSL_CTX_new(SSLv23_client_method());
|
context = SSL_CTX_new(SSLv23_client_method());
|
||||||
|
Loading…
Reference in New Issue
Block a user