mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-08 06:28:26 +01:00
Assuming curves list is available if EC is available
This commit is contained in:
parent
5ece6049e5
commit
8440bc3d59
@ -71,16 +71,12 @@ LSEC_API int luaopen_ssl_config(lua_State *L)
|
||||
lua_rawset(L, -3);
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#if defined(SSL_CTRL_SET_ECDH_AUTO) || defined(SSL_CTRL_SET_CURVES_LIST) || defined(SSL_CTX_set1_curves_list)
|
||||
lua_pushstring(L, "curves_list");
|
||||
lua_pushboolean(L, 1);
|
||||
lua_rawset(L, -3);
|
||||
#ifdef SSL_CTRL_SET_ECDH_AUTO
|
||||
lua_pushstring(L, "ecdh_auto");
|
||||
lua_pushboolean(L, 1);
|
||||
lua_rawset(L, -3);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
lua_rawset(L, -3);
|
||||
|
||||
|
@ -571,9 +571,7 @@ static int set_curve(lua_State *L)
|
||||
lua_pushboolean(L, 1);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_EC) && (defined(SSL_CTRL_SET_CURVES_LIST) || defined(SSL_CTX_set1_curves_list) || defined(SSL_CTRL_SET_ECDH_AUTO))
|
||||
/**
|
||||
* Set elliptic curves list.
|
||||
*/
|
||||
@ -590,9 +588,7 @@ static int set_curves_list(lua_State *L)
|
||||
return 2;
|
||||
}
|
||||
|
||||
#ifdef SSL_CTRL_SET_ECDH_AUTO
|
||||
SSL_CTX_set_ecdh_auto(ctx, 1);
|
||||
#endif
|
||||
|
||||
lua_pushboolean(L, 1);
|
||||
return 1;
|
||||
@ -704,9 +700,6 @@ static luaL_Reg funcs[] = {
|
||||
|
||||
#if !defined(OPENSSL_NO_EC)
|
||||
{"setcurve", set_curve},
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_EC) && (defined(SSL_CTRL_SET_CURVES_LIST) || defined(SSL_CTX_set1_curves_list) || defined(SSL_CTRL_SET_ECDH_AUTO))
|
||||
{"setcurveslist", set_curves_list},
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user