Add support for setting DANE TLSA information

This commit is contained in:
Kim Alvefur
2018-01-30 20:21:29 +01:00
parent 550777a9d6
commit 6359275c5f
3 changed files with 44 additions and 0 deletions

View File

@ -686,6 +686,17 @@ static int set_alpn_cb(lua_State *L)
}
/*
* DANE
*/
static int set_dane(lua_State *L)
{
SSL_CTX *ctx = lsec_checkcontext(L, 1);
int ret = SSL_CTX_dane_enable(ctx);
lua_pushboolean(L, ret);
return 1;
}
/**
* Package functions
*/
@ -709,6 +720,8 @@ static luaL_Reg funcs[] = {
{"setcurveslist", set_curves_list},
#endif
{"setdane", set_dane},
{NULL, NULL}
};