445 |
{ |
{ |
446 |
const char *s; |
const char *s; |
447 |
|
|
448 |
fprintf(stderr, "ERROR: Could not initialize the SSL context -- %s\n", |
fprintf(stderr, "ERROR: Could not initialize the SSL Server context -- %s\n", |
449 |
s = ERR_lib_error_string(ERR_get_error())); |
s = ERR_lib_error_string(ERR_get_error())); |
450 |
ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL context -- %s\n", s); |
ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Server context -- %s\n", s); |
451 |
} |
} |
452 |
|
|
453 |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2); |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2); |
454 |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL); |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL); |
455 |
SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_NONE, NULL); |
SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_NONE, NULL); |
456 |
|
|
457 |
|
if ((ServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) |
458 |
|
{ |
459 |
|
const char *s; |
460 |
|
|
461 |
|
fprintf(stderr, "ERROR: Could not initialize the SSL Client context -- %s\n", |
462 |
|
s = ERR_lib_error_string(ERR_get_error())); |
463 |
|
ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Client context -- %s\n", s); |
464 |
|
} |
465 |
|
|
466 |
|
SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2); |
467 |
|
SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL); |
468 |
|
SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_NONE, NULL); |
469 |
|
|
470 |
bio_spare_fd = save_spare_fd("SSL private key validation"); |
bio_spare_fd = save_spare_fd("SSL private key validation"); |
471 |
#endif /* HAVE_LIBCRYPTO */ |
#endif /* HAVE_LIBCRYPTO */ |
472 |
} |
} |