From 6a7a6f7f674171357963f096ecec1124b8b83d53 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Thu, 19 Nov 2015 12:33:06 -0200 Subject: [PATCH] Keep 'sslv23' for compability, but deprected. (it will be removed in the next version) --- src/context.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/context.c b/src/context.c index e39d38f..1c1c148 100644 --- a/src/context.c +++ b/src/context.c @@ -35,6 +35,9 @@ typedef const SSL_METHOD LSEC_SSL_METHOD; typedef SSL_METHOD LSEC_SSL_METHOD; #endif +#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) +#define SSLv23_method() TLS_method() +#endif /*-- Compat - Lua 5.1 --------------------------------------------------------*/ @@ -93,10 +96,8 @@ static int set_option_flag(const char *opt, unsigned long *flag) */ static LSEC_SSL_METHOD* str2method(const char *method) { -#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) -#define SSLv23_method TLS_method -#endif - if (!strcmp(method, "any")) return SSLv23_method(); + if (!strcmp(method, "any")) return SSLv23_method(); + if (!strcmp(method, "sslv23")) return SSLv23_method(); // deprecated #ifndef OPENSSL_NO_SSL3 if (!strcmp(method, "sslv3")) return SSLv3_method(); #endif