From: William Lallemand Date: Thu, 26 May 2022 09:20:13 +0000 (+0200) Subject: BUG/MINOR: ssl/lua: use correctly cert_ext in CertCache.set() X-Git-Tag: v2.6-dev12~110 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8c195a326ca4154a18c11ba0ef90f5e00579ed0;p=thirdparty%2Fhaproxy.git BUG/MINOR: ssl/lua: use correctly cert_ext in CertCache.set() Fix a typo that lead to using the wrong pointer when loading a certificate, which lead to always using the pem loader for every parameeter. Use the cert_ext->load() ptr instead of cert_exts->load() which was the first element of the cert_exts[] array. Enhance the error message with the field name. Should fix issue #1716 --- diff --git a/src/hlua.c b/src/hlua.c index 470a6754fd..4b361a66b1 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -11573,8 +11573,8 @@ __LJMP static int hlua_ckch_set(lua_State *L) } /* appply the change on the duplicate */ - if (cert_exts->load(filename, payload, ckch, &err) != 0) { - memprintf(&err, "%sCan't load the payload\n", err ? err : ""); + if (cert_ext->load(filename, payload, ckch, &err) != 0) { + memprintf(&err, "%sCan't load the payload for '%s'\n", err ? err : "", cert_ext->ext); errcode |= ERR_ALERT | ERR_FATAL; goto end; }