Subject: ssl: fix OpenSSL client method detection
This commit is contained in:
parent
8553ecfb3a
commit
ea2596be2d
2 changed files with 3 additions and 6 deletions
|
@ -463,10 +463,6 @@ CHECK_FUNCTION_EXISTS(_snprintf LWS_HAVE__SNPRINTF)
|
|||
CHECK_FUNCTION_EXISTS(_vsnprintf LWS_HAVE__VSNPRINTF)
|
||||
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 (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.")
|
||||
|
@ -952,6 +948,8 @@ set (temp ${CMAKE_REQUIRED_LIBRARIES})
|
|||
set(CMAKE_REQUIRED_LIBRARIES ${LIB_LIST})
|
||||
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(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})
|
||||
# Generate the lws_config.h that includes all the public compilation settings.
|
||||
configure_file(
|
||||
|
|
|
@ -362,11 +362,10 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
|
|||
/* choose the most recent spin of the api */
|
||||
#if defined(LWS_HAVE_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();
|
||||
#else
|
||||
method = (SSL_METHOD *)SSLv23_client_method();
|
||||
#endif
|
||||
#endif
|
||||
if (!method) {
|
||||
error = ERR_get_error();
|
||||
|
|
Loading…
Add table
Reference in a new issue