blob: 33d00187e9aa73e2a50e68572149257347176def (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
diff --git a/src/tls.c b/src/tls.c
index aed5bfc..0d55861 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -86,14 +86,17 @@ shout_tls_t *shout_tls_new(shout_t *self, sock_t socket)
static inline int tls_setup(shout_tls_t *tls)
{
- SSL_METHOD *meth;
-
+ const SSL_METHOD *meth;
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
SSL_library_init();
SSL_load_error_strings();
SSLeay_add_all_algorithms();
SSLeay_add_ssl_algorithms();
- meth = TLSv1_client_method();
+ meth = SSLv23_client_method();
+else
+ meth = TLS_client_method();
+#endif
if (!meth)
goto error;
|