Assuming that TLS 1.1 and TLS 1.2 are available

This commit is contained in:
Bruno Silvestre 2018-09-12 18:27:43 -03:00
parent 8440bc3d59
commit 113331fa0c

View File

@ -35,14 +35,13 @@ LSEC_API int luaopen_ssl_config(lua_State *L)
lua_pushstring(L, "tlsv1"); lua_pushstring(L, "tlsv1");
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
lua_rawset(L, -3); lua_rawset(L, -3);
#if (OPENSSL_VERSION_NUMBER >= 0x1000100fL)
lua_pushstring(L, "tlsv1_1"); lua_pushstring(L, "tlsv1_1");
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
lua_rawset(L, -3); lua_rawset(L, -3);
lua_pushstring(L, "tlsv1_2"); lua_pushstring(L, "tlsv1_2");
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
lua_rawset(L, -3); lua_rawset(L, -3);
#endif
lua_rawset(L, -3); lua_rawset(L, -3);
// Algorithms // Algorithms