ssl: OpenSSL v1.1 deprecated TLSv1_2_client_method
This commit is contained in:
parent
61ef337671
commit
8553ecfb3a
3 changed files with 18 additions and 1 deletions
|
@ -463,6 +463,10 @@ 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.")
|
||||||
|
|
|
@ -337,7 +337,7 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
|
||||||
#else
|
#else
|
||||||
#if defined(LWS_USE_MBEDTLS)
|
#if defined(LWS_USE_MBEDTLS)
|
||||||
#else
|
#else
|
||||||
SSL_METHOD *method;
|
SSL_METHOD *method = NULL;
|
||||||
struct lws wsi;
|
struct lws wsi;
|
||||||
unsigned long error;
|
unsigned long error;
|
||||||
int n;
|
int n;
|
||||||
|
@ -359,7 +359,15 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
|
||||||
|
|
||||||
/* basic openssl init already happened in context init */
|
/* basic openssl init already happened in context init */
|
||||||
|
|
||||||
|
/* 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)
|
||||||
|
method = (SSL_METHOD *)TLSv1_2_client_method();
|
||||||
|
#else
|
||||||
method = (SSL_METHOD *)SSLv23_client_method();
|
method = (SSL_METHOD *)SSLv23_client_method();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
if (!method) {
|
if (!method) {
|
||||||
error = ERR_get_error();
|
error = ERR_get_error();
|
||||||
lwsl_err("problem creating ssl method %lu: %s\n",
|
lwsl_err("problem creating ssl method %lu: %s\n",
|
||||||
|
|
|
@ -114,4 +114,9 @@
|
||||||
/* SMTP */
|
/* SMTP */
|
||||||
#cmakedefine LWS_WITH_SMTP
|
#cmakedefine LWS_WITH_SMTP
|
||||||
|
|
||||||
|
/* OpenSSL various APIs */
|
||||||
|
|
||||||
|
#cmakedefine LWS_HAVE_TLS_CLIENT_METHOD
|
||||||
|
#cmakedefine LWS_HAVE_TLSV1_2_CLIENT_METHOD
|
||||||
|
|
||||||
${LWS_SIZEOFPTR_CODE}
|
${LWS_SIZEOFPTR_CODE}
|
||||||
|
|
Loading…
Add table
Reference in a new issue