fix build for NO_SERVER
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
82bac6baec
commit
8721f4f5f1
1 changed files with 2 additions and 11 deletions
13
lib/ssl.c
13
lib/ssl.c
|
@ -23,6 +23,7 @@
|
|||
|
||||
int openssl_websocket_private_data_index;
|
||||
|
||||
#ifndef LWS_NO_SERVER
|
||||
static int
|
||||
OpenSSL_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
|
||||
{
|
||||
|
@ -55,7 +56,6 @@ lws_context_init_server_ssl(struct lws_context_creation_info *info,
|
|||
int error;
|
||||
int n;
|
||||
|
||||
#ifndef LWS_NO_SERVER
|
||||
if (info->port != CONTEXT_PORT_NO_LISTEN) {
|
||||
|
||||
context->use_ssl = info->ssl_cert_filepath != NULL &&
|
||||
|
@ -75,16 +75,6 @@ lws_context_init_server_ssl(struct lws_context_creation_info *info,
|
|||
lwsl_notice(" Using non-SSL mode\n");
|
||||
}
|
||||
|
||||
#else
|
||||
if (info->ssl_cert_filepath != NULL &&
|
||||
info->ssl_private_key_filepath != NULL) {
|
||||
lwsl_notice(" Not compiled for OpenSSl support!\n");
|
||||
return 1;
|
||||
}
|
||||
lwsl_notice(" Compiled without SSL support\n");
|
||||
}
|
||||
#endif /* no server */
|
||||
|
||||
/* basic openssl init */
|
||||
|
||||
SSL_library_init();
|
||||
|
@ -195,6 +185,7 @@ lws_context_init_server_ssl(struct lws_context_creation_info *info,
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
LWS_VISIBLE void
|
||||
lws_ssl_destroy(struct libwebsocket_context *context)
|
||||
|
|
Loading…
Add table
Reference in a new issue