summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-02-21 21:28:58 +0100
committerFelix Fietkau <nbd@openwrt.org>2016-02-21 21:28:58 +0100
commit6ba14990e63fc956e8aff3b0b09be1fd3aaa6d75 (patch)
tree0f2026f669ae19b6f7c2adafcd372a0c5c8c20f2
parent053c4ccca9372d7550759e540b7458ca57db1538 (diff)
downloadustream-ssl-6ba14990e63fc956e8aff3b0b09be1fd3aaa6d75.tar.gz
openssl: keep compatibility with older TLS/SSL protocols
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--ustream-openssl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ustream-openssl.c b/ustream-openssl.c
index 4a3f0a2..83f6140 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -35,17 +35,14 @@ __ustream_ssl_context_new(bool server)
_init = true;
}
-#ifdef CYASSL_OPENSSL_H_
if (server)
+#ifdef CYASSL_OPENSSL_H_
m = SSLv23_server_method();
- else
- m = SSLv23_client_method();
#else
- if (server)
m = TLSv1_2_server_method();
- else
- m = TLSv1_2_client_method();
#endif
+ else
+ m = SSLv23_client_method();
c = SSL_CTX_new((void *) m);
if (!c)