Fix check for error in DANE functions

This commit is contained in:
Bruno Silvestre
2019-07-11 10:20:53 -03:00
parent a2dcfffcfa
commit 8722f83e8f
2 changed files with 11 additions and 8 deletions

View File

@ -709,9 +709,10 @@ static int set_alpn_cb(lua_State *L)
*/
static int set_dane(lua_State *L)
{
int ret;
SSL_CTX *ctx = lsec_checkcontext(L, 1);
int ret = SSL_CTX_dane_enable(ctx);
lua_pushboolean(L, ret);
ret = SSL_CTX_dane_enable(ctx);
lua_pushboolean(L, (ret > 0));
return 1;
}
#endif