1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

context: fall back if no build-time mbedtls version

This commit is contained in:
Lio DongMiao 2024-03-07 08:28:44 +00:00 committed by Andy Green
parent 50375030a3
commit 0fd97f652a

View file

@ -785,7 +785,16 @@ lws_create_context(const struct lws_context_creation_info *info)
#endif /* network */
#if defined(LWS_WITH_MBEDTLS)
lwsl_cx_notice(context, "LWS: %s, MbedTLS-%s %s%s", library_version, MBEDTLS_VERSION_STRING, opts_str, s);
{
char mbedtls_version[32];
#if defined(MBEDTLS_VERSION_C)
mbedtls_version_get_string(mbedtls_version);
#else
lws_snprintf(mbedtls_version, sizeof(mbedtls_version), "%s", MBEDTLS_VERSION_STRING);
#endif
lwsl_cx_notice(context, "LWS: %s, MbedTLS-%s %s%s", library_version, mbedtls_version, opts_str, s);
}
#else
lwsl_cx_notice(context, "LWS: %s, %s%s", library_version, opts_str, s);
#endif