Do not bother initializing OpenSSL if only listening locally
This commit is contained in:
parent
bcec18dfc9
commit
7f8c7de6ba
|
@ -509,12 +509,15 @@ AppServer * appserver_new_event(char const * app, int options, Event * event)
|
|||
# ifdef DEBUG
|
||||
fprintf(stderr, "DEBUG: Using certificate \"%s\"\n", crt);
|
||||
# endif
|
||||
if(!(options & ASO_LOCAL))
|
||||
if((appserver->ssl_ctx = SSL_CTX_new(SSLv3_server_method())) == NULL
|
||||
|| SSL_CTX_set_cipher_list(appserver->ssl_ctx,
|
||||
SSL_DEFAULT_CIPHER_LIST) != 1
|
||||
|| SSL_CTX_use_certificate_file(appserver->ssl_ctx, crt,
|
||||
|| SSL_CTX_use_certificate_file(
|
||||
appserver->ssl_ctx, crt,
|
||||
SSL_FILETYPE_PEM) == 0
|
||||
|| SSL_CTX_use_PrivateKey_file(appserver->ssl_ctx, crt,
|
||||
|| SSL_CTX_use_PrivateKey_file(
|
||||
appserver->ssl_ctx, crt,
|
||||
SSL_FILETYPE_PEM) == 0)
|
||||
{
|
||||
error_set_code(1, "%s", _appserver_error_ssl());
|
||||
|
|
Loading…
Reference in New Issue
Block a user