mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
Subject: ssl: fix OpenSSL client method detection
This commit is contained in:
parent
19242db55b
commit
d7d8c081aa
2 changed files with 3 additions and 6 deletions
|
@ -474,10 +474,6 @@ CHECK_FUNCTION_EXISTS(_snprintf LWS_HAVE__SNPRINTF)
|
||||||
CHECK_FUNCTION_EXISTS(_vsnprintf LWS_HAVE__VSNPRINTF)
|
CHECK_FUNCTION_EXISTS(_vsnprintf LWS_HAVE__VSNPRINTF)
|
||||||
CHECK_FUNCTION_EXISTS(getloadavg LWS_HAVE_GETLOADAVG)
|
CHECK_FUNCTION_EXISTS(getloadavg LWS_HAVE_GETLOADAVG)
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS(TLS_client_method LWS_HAVE_TLS_CLIENT_METHOD)
|
|
||||||
CHECK_FUNCTION_EXISTS(TLSv1_2_client_method LWS_HAVE_TLSV1_2_CLIENT_METHOD)
|
|
||||||
|
|
||||||
|
|
||||||
if (NOT LWS_HAVE_GETIFADDRS)
|
if (NOT LWS_HAVE_GETIFADDRS)
|
||||||
if (LWS_WITHOUT_BUILTIN_GETIFADDRS)
|
if (LWS_WITHOUT_BUILTIN_GETIFADDRS)
|
||||||
message(FATAL_ERROR "No getifaddrs was found on the system. Turn off the LWS_WITHOUT_BUILTIN_GETIFADDRS compile option to use the supplied BSD version.")
|
message(FATAL_ERROR "No getifaddrs was found on the system. Turn off the LWS_WITHOUT_BUILTIN_GETIFADDRS compile option to use the supplied BSD version.")
|
||||||
|
@ -1032,6 +1028,8 @@ set (temp ${CMAKE_REQUIRED_LIBRARIES})
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${LIB_LIST})
|
set(CMAKE_REQUIRED_LIBRARIES ${LIB_LIST})
|
||||||
CHECK_FUNCTION_EXISTS(SSL_CTX_set1_param LWS_HAVE_SSL_CTX_set1_param)
|
CHECK_FUNCTION_EXISTS(SSL_CTX_set1_param LWS_HAVE_SSL_CTX_set1_param)
|
||||||
CHECK_FUNCTION_EXISTS(X509_VERIFY_PARAM_set1_host LWS_HAVE_X509_VERIFY_PARAM_set1_host)
|
CHECK_FUNCTION_EXISTS(X509_VERIFY_PARAM_set1_host LWS_HAVE_X509_VERIFY_PARAM_set1_host)
|
||||||
|
CHECK_FUNCTION_EXISTS(TLS_client_method LWS_HAVE_TLS_CLIENT_METHOD)
|
||||||
|
CHECK_FUNCTION_EXISTS(TLSv1_2_client_method LWS_HAVE_TLSV1_2_CLIENT_METHOD)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${temp})
|
set(CMAKE_REQUIRED_LIBRARIES ${temp})
|
||||||
# Generate the lws_config.h that includes all the public compilation settings.
|
# Generate the lws_config.h that includes all the public compilation settings.
|
||||||
configure_file(
|
configure_file(
|
||||||
|
|
|
@ -472,11 +472,10 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
|
||||||
/* choose the most recent spin of the api */
|
/* choose the most recent spin of the api */
|
||||||
#if defined(LWS_HAVE_TLS_CLIENT_METHOD)
|
#if defined(LWS_HAVE_TLS_CLIENT_METHOD)
|
||||||
method = (SSL_METHOD *)TLS_client_method();
|
method = (SSL_METHOD *)TLS_client_method();
|
||||||
#if defined(LWS_HAVE_TLSV1_2_CLIENT_METHOD)
|
#elif defined(LWS_HAVE_TLSV1_2_CLIENT_METHOD)
|
||||||
method = (SSL_METHOD *)TLSv1_2_client_method();
|
method = (SSL_METHOD *)TLSv1_2_client_method();
|
||||||
#else
|
#else
|
||||||
method = (SSL_METHOD *)SSLv23_client_method();
|
method = (SSL_METHOD *)SSLv23_client_method();
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
if (!method) {
|
if (!method) {
|
||||||
error = ERR_get_error();
|
error = ERR_get_error();
|
||||||
|
|
Loading…
Add table
Reference in a new issue