Skip to content

Commit 3742e46

Browse files
committed
provided_client_ssl_ctx: only exists if not mbedtls
1 parent 0d4fd31 commit 3742e46

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/tls/openssl/openssl-server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ lws_tls_server_vhost_backend_init(const struct lws_context_creation_info *info,
531531
}
532532
/* Added for sniffing packets on hub side */
533533
#if defined(LWS_HAVE_SSL_CTX_set_keylog_callback) && \
534-
defined(LWS_WITH_TLS)
534+
defined(LWS_WITH_TLS) && (defined(LWS_WITH_CLIENT) || defined(LWS_WITH_SERVER))
535535
SSL_CTX_set_keylog_callback(vhost->tls.ssl_ctx, lws_klog_dump);
536536
#endif
537537

lib/tls/openssl/openssl-tls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ lws_context_init_ssl_library(struct lws_context *cx,
9797
#endif
9898
#endif
9999
if (!lws_check_opt(info->options, LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT)) {
100+
#if !defined(LWS_WITH_MBEDTLS)
100101
if (!info->provided_client_ssl_ctx)
102+
#endif
101103
lwsl_cx_info(cx, " SSL disabled: no "
102104
"LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT");
103105
return 0;

0 commit comments

Comments
 (0)