125 |
|
.handler = write_links_file, |
126 |
|
}; |
127 |
|
|
128 |
– |
struct event event_check_splitmode = |
129 |
– |
{ |
130 |
– |
.name = "check_splitmode", |
131 |
– |
.handler = check_splitmode, |
132 |
– |
.when = 60 |
133 |
– |
}; |
128 |
|
|
129 |
|
/* |
130 |
|
* print_startup - print startup information |
427 |
|
|
428 |
|
if ((ServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL) |
429 |
|
{ |
430 |
< |
const char *s; |
430 |
> |
const char *s = ERR_lib_error_string(ERR_get_error()); |
431 |
|
|
432 |
< |
fprintf(stderr, "ERROR: Could not initialize the SSL Server context -- %s\n", |
439 |
< |
s = ERR_lib_error_string(ERR_get_error())); |
432 |
> |
fprintf(stderr, "ERROR: Could not initialize the SSL Server context -- %s\n", s); |
433 |
|
ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Server context -- %s\n", s); |
434 |
|
} |
435 |
|
|
436 |
|
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1); |
437 |
< |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG); |
437 |
> |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_SINGLE_DH_USE); |
438 |
|
SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE, |
439 |
|
always_accept_verify_cb); |
440 |
|
SSL_CTX_set_session_id_context(ServerInfo.server_ctx, session_id, sizeof(session_id) - 1); |
455 |
|
|
456 |
|
if ((ServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) |
457 |
|
{ |
458 |
< |
const char *s; |
458 |
> |
const char *s = ERR_lib_error_string(ERR_get_error()); |
459 |
|
|
460 |
< |
fprintf(stderr, "ERROR: Could not initialize the SSL Client context -- %s\n", |
468 |
< |
s = ERR_lib_error_string(ERR_get_error())); |
460 |
> |
fprintf(stderr, "ERROR: Could not initialize the SSL Client context -- %s\n", s); |
461 |
|
ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Client context -- %s\n", s); |
462 |
|
} |
463 |
|
|
464 |
|
SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1); |
465 |
< |
SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG); |
465 |
> |
SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_SINGLE_DH_USE); |
466 |
|
SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE, |
467 |
|
always_accept_verify_cb); |
468 |
|
#endif /* HAVE_LIBCRYPTO */ |
658 |
|
ConfigServerHide.links_disabled = 1; |
659 |
|
|
660 |
|
if (splitmode) |
661 |
< |
event_addish(&event_check_splitmode, NULL); |
661 |
> |
event_addish(&splitmode_event, NULL); |
662 |
|
|
663 |
|
io_loop(); |
664 |
|
return 0; |