ssld: remove init_prng command

This is no longer configurable so it's redundant.
This commit is contained in:
Simon Arlott 2016-04-25 19:02:03 +01:00
parent 8cbd70a8ed
commit 19d1853f71
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24
2 changed files with 1 additions and 45 deletions

View file

@ -72,7 +72,6 @@ struct _ssl_ctl
static void send_new_ssl_certs_one(ssl_ctl_t * ctl, const char *ssl_cert, static void send_new_ssl_certs_one(ssl_ctl_t * ctl, const char *ssl_cert,
const char *ssl_private_key, const char *ssl_dh_params, const char *ssl_private_key, const char *ssl_dh_params,
const char *ssl_cipher_list); const char *ssl_cipher_list);
static void send_init_prng(ssl_ctl_t * ctl, prng_seed_t seedtype, const char *path);
static void send_certfp_method(ssl_ctl_t *ctl, int method); static void send_certfp_method(ssl_ctl_t *ctl, int method);
@ -341,7 +340,6 @@ start_ssldaemon(int count, const char *ssl_cert, const char *ssl_private_key, co
ctl = allocate_ssl_daemon(F1, P2, pid); ctl = allocate_ssl_daemon(F1, P2, pid);
if(ircd_ssl_ok) if(ircd_ssl_ok)
{ {
send_init_prng(ctl, RB_PRNG_DEFAULT, NULL);
send_certfp_method(ctl, ConfigFileEntry.certfp_method); send_certfp_method(ctl, ConfigFileEntry.certfp_method);
if(ssl_cert != NULL && ssl_private_key != NULL) if(ssl_cert != NULL && ssl_private_key != NULL)
@ -723,34 +721,6 @@ send_new_ssl_certs_one(ssl_ctl_t * ctl, const char *ssl_cert, const char *ssl_pr
ssl_cmd_write_queue(ctl, NULL, 0, tmpbuf, len); ssl_cmd_write_queue(ctl, NULL, 0, tmpbuf, len);
} }
static void
send_init_prng(ssl_ctl_t * ctl, prng_seed_t seedtype, const char *path)
{
size_t len;
const char *s;
uint8_t seed = (uint8_t) seedtype;
if(path == NULL)
s = "";
else
s = path;
len = strlen(s) + 3;
if(len > sizeof(tmpbuf))
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Parameters for send_init_prng too long (%zd > %zd) to pass to ssld, not sending...",
len, sizeof(tmpbuf));
ilog(L_MAIN,
"Parameters for send_init_prng too long (%zd > %zd) to pass to ssld, not sending...",
len, sizeof(tmpbuf));
return;
}
len = snprintf(tmpbuf, sizeof(tmpbuf), "I%c%s%c", seed, s, nul);
ssl_cmd_write_queue(ctl, NULL, 0, tmpbuf, len);
}
static void static void
send_certfp_method(ssl_ctl_t *ctl, int method) send_certfp_method(ssl_ctl_t *ctl, int method)
{ {

View file

@ -895,18 +895,6 @@ zlib_process(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)
} }
#endif #endif
static void
init_prng(mod_ctl_t * ctl, mod_ctl_buf_t * ctl_buf)
{
char *path;
prng_seed_t seed_type;
seed_type = (prng_seed_t) ctl_buf->buf[1];
path = (char *) &ctl_buf->buf[2];
rb_init_prng(path, seed_type);
}
static void static void
ssl_new_keys(mod_ctl_t * ctl, mod_ctl_buf_t * ctl_buf) ssl_new_keys(mod_ctl_t * ctl, mod_ctl_buf_t * ctl_buf)
{ {
@ -1046,9 +1034,6 @@ mod_process_cmd_recv(mod_ctl_t * ctl)
ssl_new_keys(ctl, ctl_buf); ssl_new_keys(ctl, ctl_buf);
break; break;
} }
case 'I':
init_prng(ctl, ctl_buf);
break;
case 'S': case 'S':
{ {
process_stats(ctl, ctl_buf); process_stats(ctl, ctl_buf);
@ -1219,6 +1204,7 @@ main(int argc, char **argv)
setup_signals(); setup_signals();
rb_lib_init(NULL, NULL, NULL, 0, maxfd, 1024, 4096); rb_lib_init(NULL, NULL, NULL, 0, maxfd, 1024, 4096);
rb_init_rawbuffers(1024); rb_init_rawbuffers(1024);
rb_init_prng(NULL, RB_PRNG_DEFAULT);
ssld_ssl_ok = rb_supports_ssl(); ssld_ssl_ok = rb_supports_ssl();
mod_ctl = rb_malloc(sizeof(mod_ctl_t)); mod_ctl = rb_malloc(sizeof(mod_ctl_t));
mod_ctl->F = rb_open(ctlfd, RB_FD_SOCKET, "ircd control socket"); mod_ctl->F = rb_open(ctlfd, RB_FD_SOCKET, "ircd control socket");