mirror of
https://github.com/brunoos/luasec.git
synced 2025-02-13 23:42:49 +01:00
Using 'const SSL_METHOD*'
This change was introduced in OpenSSL 1.0.0. Start droping 0.9.8 code.
This commit is contained in:
parent
879ba6d4f9
commit
8212b89f1a
@ -29,12 +29,6 @@
|
|||||||
#include "ec.h"
|
#include "ec.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (OPENSSL_VERSION_NUMBER >= 0x1000000fL)
|
|
||||||
typedef const SSL_METHOD LSEC_SSL_METHOD;
|
|
||||||
#else
|
|
||||||
typedef SSL_METHOD LSEC_SSL_METHOD;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*--------------------------- Auxiliary Functions ----------------------------*/
|
/*--------------------------- Auxiliary Functions ----------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,7 +62,7 @@ static int set_option_flag(const char *opt, unsigned long *flag)
|
|||||||
/**
|
/**
|
||||||
* Find the protocol.
|
* Find the protocol.
|
||||||
*/
|
*/
|
||||||
static LSEC_SSL_METHOD* str2method(const char *method)
|
static const SSL_METHOD* str2method(const char *method)
|
||||||
{
|
{
|
||||||
if (!strcmp(method, "any")) return SSLv23_method();
|
if (!strcmp(method, "any")) return SSLv23_method();
|
||||||
if (!strcmp(method, "sslv23")) return SSLv23_method(); // deprecated
|
if (!strcmp(method, "sslv23")) return SSLv23_method(); // deprecated
|
||||||
@ -287,7 +281,7 @@ static int create(lua_State *L)
|
|||||||
{
|
{
|
||||||
p_context ctx;
|
p_context ctx;
|
||||||
const char *str_method;
|
const char *str_method;
|
||||||
LSEC_SSL_METHOD *method;
|
const SSL_METHOD *method;
|
||||||
|
|
||||||
str_method = luaL_checkstring(L, 1);
|
str_method = luaL_checkstring(L, 1);
|
||||||
method = str2method(str_method);
|
method = str2method(str_method);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user