0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

libratbox: remove RB_PRNG_EGD in its entirety (closes #85)

This commit is contained in:
William Pitcock 2015-03-01 01:05:14 -06:00
parent 125652041b
commit e861902fd9
4 changed files with 2 additions and 16 deletions

View file

@ -157,7 +157,6 @@ const char *rb_get_iotype(void);
typedef enum
{
RB_PRNG_EGD,
RB_PRNG_FILE,
#ifdef _WIN32
RB_PRNGWIN32,

View file

@ -603,10 +603,6 @@ rb_init_prng(const char *path, prng_seed_t seed_type)
switch (seed_type)
{
case RB_PRNG_EGD:
if(RAND_egd(path) == -1)
return -1;
break;
case RB_PRNG_FILE:
if(RAND_load_file(path, -1) == -1)
return -1;

View file

@ -630,11 +630,7 @@ main(int argc, char *argv[])
rb_lib_init(ircd_log_cb, ircd_restart_cb, ircd_die_cb, !server_state_foreground, maxconnections, DNODE_HEAP_SIZE, FD_HEAP_SIZE);
rb_linebuf_init(LINEBUF_HEAP_SIZE);
if(ConfigFileEntry.use_egd && (ConfigFileEntry.egdpool_path != NULL))
{
rb_init_prng(ConfigFileEntry.egdpool_path, RB_PRNG_EGD);
} else
rb_init_prng(NULL, RB_PRNG_DEFAULT);
rb_init_prng(NULL, RB_PRNG_DEFAULT);
seed_random(NULL);

View file

@ -323,12 +323,7 @@ start_ssldaemon(int count, const char *ssl_cert, const char *ssl_private_key, co
rb_close(P1);
ctl = allocate_ssl_daemon(F1, P2, pid);
if(ssl_ok)
{
if(ConfigFileEntry.use_egd && (ConfigFileEntry.egdpool_path != NULL))
send_init_prng(ctl, RB_PRNG_EGD, ConfigFileEntry.egdpool_path);
else
send_init_prng(ctl, RB_PRNG_DEFAULT, NULL);
}
send_init_prng(ctl, RB_PRNG_DEFAULT, NULL);
if(ssl_ok && ssl_cert != NULL && ssl_private_key != NULL)
send_new_ssl_certs_one(ctl, ssl_cert, ssl_private_key,
ssl_dh_params != NULL ? ssl_dh_params : "");