mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-18 18:19:39 -05:00
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.
This commit is contained in:
parent
e0d1cdff6a
commit
0016d45a9c
1 changed files with 7 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue