mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 17:17:06 +02:00
BUG/MINOR: ssl_ckch: Dump CRL transaction only once if show command yield
When loaded CRL files are displayed via "show ssl crl-file" command, the in-progess transaction, if any, is also displayed. However, if the command yield, the transaction is re-displayed again and again. To fix the issue, old_crlfile_entry field is used to remember the transaction was already displayed. This patch must be backported as far as 2.5.
This commit is contained in:
parent
51095ee236
commit
9a99e54787
@ -3762,11 +3762,12 @@ static int cli_io_handler_show_crlfile(struct appctx *appctx)
|
|||||||
if (trash == NULL)
|
if (trash == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (!ctx->old_crlfile_entry) {
|
if (!ctx->old_crlfile_entry && crlfile_transaction.old_crlfile_entry) {
|
||||||
if (crlfile_transaction.old_crlfile_entry) {
|
chunk_appendf(trash, "# transaction\n");
|
||||||
chunk_appendf(trash, "# transaction\n");
|
chunk_appendf(trash, "*%s\n", crlfile_transaction.old_crlfile_entry->path);
|
||||||
chunk_appendf(trash, "*%s\n", crlfile_transaction.old_crlfile_entry->path);
|
if (applet_putchk(appctx, trash) == -1)
|
||||||
}
|
goto yield;
|
||||||
|
ctx->old_crlfile_entry = crlfile_transaction.old_crlfile_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First time in this io_handler. */
|
/* First time in this io_handler. */
|
||||||
|
Loading…
Reference in New Issue
Block a user