From 0016d45a9cea4c0d601a4409448f348414575ee3 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 16 Feb 2026 18:22:53 +0100 Subject: [PATCH] BUG/MINOR: ssl: clarify ssl-f-use errors in post-section parsing crtlist_load_crt() in post_section_frontend_crt_init() won't give details about the line being parsed, this should be done by the caller. Modify post_section_frontend_crt_init() to ouput the right error format. Must be backported to 3.2. --- src/cfgparse-ssl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cfgparse-ssl.c b/src/cfgparse-ssl.c index 967b0519f..5053cf336 100644 --- a/src/cfgparse-ssl.c +++ b/src/cfgparse-ssl.c @@ -2561,8 +2561,11 @@ static int post_section_frontend_crt_init() entry->ssl_conf = crtlist_dup_ssl_conf(n->ssl_conf); err_code |= crtlist_load_crt(n->ckch_conf->crt, n->ckch_conf, newlist, entry, n->filename, n->linenum, &err); - if (err_code & ERR_CODE) + if (err_code & ERR_CODE) { + ha_alert("parsing [%s:%d] : %s", n->filename, n->linenum, err); + ha_free(&err); goto error; + } LIST_DELETE(&n->list); /* n->ssl_conf is reused so we don't free them here */ @@ -2574,7 +2577,8 @@ static int post_section_frontend_crt_init() if (newlist) { if (ebst_insert(&crtlists_tree, &newlist->node) != &newlist->node) { - memprintf(&err, "Couldn't create the crt-list '%s', this name is already used by another crt-list!", crtlist_name); + memprintf(&err, "parsing [%s:%d] : Couldn't create the crt-list '%s', this name is already used by another crt-list!", + curproxy->conf.file, curproxy->conf.line, crtlist_name); err_code |= ERR_ALERT | ERR_FATAL; goto error; } @@ -2594,7 +2598,7 @@ static int post_section_frontend_crt_init() error: if (err) - ha_alert("%s.\n", err); + ha_alert("%s", err); free(err); list_for_each_entry_safe(n, r, &cur_crtlist, list) {