Lines 50-60
init_openssl(struct module *module)
Link Here
|
50 |
* cannot initialize the PRNG and so every attempt to use SSL fails. |
50 |
* cannot initialize the PRNG and so every attempt to use SSL fails. |
51 |
* It's actually an OpenSSL FAQ, and according to them, it's up to the |
51 |
* It's actually an OpenSSL FAQ, and according to them, it's up to the |
52 |
* application coders to seed the RNG. -- William Yodlowsky */ |
52 |
* application coders to seed the RNG. -- William Yodlowsky */ |
53 |
if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) { |
53 |
RAND_file_name(f_randfile, sizeof(f_randfile)); |
|
|
54 |
#ifdef HAVE_RAND_EGD |
55 |
if (RAND_egd(f_randfile) < 0) { |
54 |
/* Not an EGD, so read and write to it */ |
56 |
/* Not an EGD, so read and write to it */ |
|
|
57 |
#endif |
55 |
if (RAND_load_file(f_randfile, -1)) |
58 |
if (RAND_load_file(f_randfile, -1)) |
56 |
RAND_write_file(f_randfile); |
59 |
RAND_write_file(f_randfile); |
|
|
60 |
#ifdef HAVE_RAND_EGD |
57 |
} |
61 |
} |
|
|
62 |
#endif |
58 |
|
63 |
|
59 |
SSLeay_add_ssl_algorithms(); |
64 |
SSLeay_add_ssl_algorithms(); |
60 |
context = SSL_CTX_new(SSLv23_client_method()); |
65 |
context = SSL_CTX_new(SSLv23_client_method()); |
61 |
- |
|
|