openssl: keep compatibility with older TLS/SSL protocols
authorFelix Fietkau <nbd@openwrt.org>
Sun, 21 Feb 2016 20:28:58 +0000 (21:28 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 21 Feb 2016 20:28:58 +0000 (21:28 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ustream-openssl.c

index 4a3f0a27aa51008ac8047ea3853e70324ed1278c..83f61406136f460a1444b3847c90b0f8d3656a4d 100644 (file)
@@ -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)