Skip to content

Commit 3c64a61

Browse files
committed
tls: summarize tls library version on context creation
1 parent 4200b75 commit 3c64a61

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

CMakeLists-implied-options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,14 +369,14 @@ endif()
369369

370370
set(LWS_WITH_CLIENT 1)
371371
if (LWS_WITHOUT_CLIENT)
372-
set(LWS_WITH_CLIENT 0)
372+
set(LWS_WITH_CLIENT OFF)
373373
set(LWS_WITH_SECURE_STREAMS 0)
374374
set(LWS_WITH_SECURE_STREAMS_PROXY_API 0)
375375
set(LWS_WITH_LHP 0)
376376
endif()
377377
set(LWS_WITH_SERVER 1)
378378
if (LWS_WITHOUT_SERVER)
379-
set(LWS_WITH_SERVER)
379+
set(LWS_WITH_SERVER OFF)
380380
endif()
381381

382382
if (LWS_WITH_SERVER)

lib/core/context.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,20 @@ lws_create_context(const struct lws_context_creation_info *info)
859859
#if defined(LWS_WITH_SCHANNEL)
860860
lwsl_cx_notice(context, "LWS: %s, SChannel, %s%s", library_version, opts_str, s);
861861
#else
862-
#if defined(LWS_WITH_SSL)
862+
#if defined(LWS_WITH_TLS)
863+
#if defined(USE_WOLFSSL)
864+
lwsl_cx_notice(context, "LWS: %s, wolfSSL %s, %s%s", library_version, wolfSSL_lib_version(), opts_str, s);
865+
#elif defined(LWS_WITH_BORINGSSL)
866+
lwsl_cx_notice(context, "LWS: %s, BoringSSL, %s%s", library_version, opts_str, s);
867+
#elif defined(LWS_WITH_AWSLC)
868+
lwsl_cx_notice(context, "LWS: %s, AWS-LC, %s%s", library_version, opts_str, s);
869+
#elif defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000L)
870+
lwsl_cx_notice(context, "LWS: %s, %s, %s%s", library_version, OpenSSL_version(OPENSSL_VERSION), opts_str, s);
871+
#elif defined(OPENSSL_VERSION_NUMBER)
872+
lwsl_cx_notice(context, "LWS: %s, %s, %s%s", library_version, SSLeay_version(SSLEAY_VERSION), opts_str, s);
873+
#else
863874
lwsl_cx_notice(context, "LWS: %s, OpenSSL, %s%s", library_version, opts_str, s);
875+
#endif
864876
#else
865877
lwsl_cx_notice(context, "LWS: %s, %s%s", library_version, opts_str, s);
866878
#endif
@@ -1305,13 +1317,15 @@ lws_create_context(const struct lws_context_creation_info *info)
13051317
context->max_http_header_pool);
13061318
#endif
13071319

1320+
#if defined(LWS_WITH_NETWORK)
13081321
#if defined(LWS_WITH_SERVER)
13091322
if (info->server_string) {
13101323
context->server_string = info->server_string;
13111324
context->server_string_len = (short)
13121325
strlen(context->server_string);
13131326
}
13141327
#endif
1328+
#endif
13151329

13161330
#if defined(LWS_WITH_NETWORK) && LWS_MAX_SMP > 1
13171331
/* each thread serves his own chunk of fds */

lib/tls/openssl/openssl-tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ extern int openssl_websocket_private_data_index,
2929
openssl_SSL_CTX_private_data_index;
3030
#if defined(LWS_WITH_NETWORK)
3131
static char openssl_ex_indexes_acquired;
32-
static int openssl_contexts_using_global_init;
3332
#endif
33+
static int openssl_contexts_using_global_init;
3434

3535
void
3636
lws_tls_err_describe_clear(void)

0 commit comments

Comments
 (0)