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