packages/libs/libshout/patches/150-openssl-1.1.patch
Rosen Penev f51d3846d8 libshout: Fix OpenSSL 1.1.0 without deprecated APIs
Previous patch was incomplete and broke with deprecated APIs
disabled.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-05-29 18:31:20 -07:00

21 lines
452 B
Diff

diff --git a/src/tls.c b/src/tls.c
index 4562c73..f946946 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -63,12 +63,16 @@ static inline int tls_setup(shout_tls_t *tls)
{
SSL_METHOD *meth;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
SSL_load_error_strings();
SSLeay_add_all_algorithms();
SSLeay_add_ssl_algorithms();
meth = TLSv1_client_method();
+#else
+ meth = TLS_client_method();
+#endif
if (!meth)
goto error;