tls/openssl: don't use deprecated function in 1.1.0+

SSLv23_client_method() was deprecated in OpenSSL 1.1.0. It is left as
macro to TLS_client_method.
This commit is contained in:
Dmitry Podgorny
2019-11-01 10:33:19 +00:00
parent 7caf88a6a8
commit 296df2fca9

View File

@@ -118,7 +118,11 @@ tls_t *tls_new(xmpp_conn_t *conn)
tls->ctx = conn->ctx;
tls->sock = conn->sock;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
tls->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
#else
tls->ssl_ctx = SSL_CTX_new(TLS_client_method());
#endif
if (tls->ssl_ctx == NULL)
goto err;