BUILD: ssl/lua: CacheCert needs OpenSSL

Return an lua error when trying to use CacheCert.set() and OpenSSL was
not used to build HAProxy.
This commit is contained in:
William Lallemand 2022-03-30 15:05:42 +02:00
parent 30fcca18a5
commit 5213918fe2

View File

@ -11369,6 +11369,7 @@ static struct cfg_kw_list cfg_kws = {{ },{
INITCALL1(STG_REGISTER, cfg_register_keywords, &cfg_kws);
#ifdef USE_OPENSSL
/*
* This function replace a ckch_store by another one, and rebuild the ckch_inst and all its dependencies.
@ -11551,6 +11552,18 @@ end:
return 0;
}
#else
__LJMP static int hlua_ckch_set(lua_State *L)
{
WILL_LJMP(luaL_error(L, "'CertCache.set' needs an HAProxy built with OpenSSL"));
return 0;
}
#endif /* ! USE_OPENSSL */
/* This function can fail with an abort() due to an Lua critical error.
* We are in the initialisation process of HAProxy, this abort() is
* tolerated.