Skip to content

Commit

Permalink
tls/openssl: don't use deprecated function in 1.1.0+
Browse files Browse the repository at this point in the history
SSLv23_client_method() was deprecated in OpenSSL 1.1.0. It is left as
macro to TLS_client_method.
  • Loading branch information
pasis committed Nov 25, 2019
1 parent 7caf88a commit 296df2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tls_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 296df2f

Please sign in to comment.