BUG/MINOR: ssl/cli: Remove empty lines from CLI output

There were empty lines in the output of "show ssl ca-file <cafile>" and
"show ssl crl-file <crlfile>" commands when an empty line should only
mark the end of the output. This patch adds a space to those lines.

This patch should be backported to 2.5.
This commit is contained in:
Remi Tricot-Le Breton 2022-04-05 16:44:21 +02:00 committed by William Lallemand
parent 80296b4bd5
commit e8041fe8bc

View File

@ -2960,7 +2960,7 @@ static int cli_io_handler_show_cafile_detail(struct appctx *appctx)
if (ca_index && ca_index-1 != i) if (ca_index && ca_index-1 != i)
continue; continue;
chunk_appendf(out, "\nCertificate #%d:\n", i+1); chunk_appendf(out, " \nCertificate #%d:\n", i+1);
retval = show_cert_detail(cert, NULL, out); retval = show_cert_detail(cert, NULL, out);
if (retval < 0) if (retval < 0)
goto end_no_putchk; goto end_no_putchk;
@ -3619,7 +3619,7 @@ static int cli_io_handler_show_crlfile_detail(struct appctx *appctx)
if (index && index-1 != i) if (index && index-1 != i)
continue; continue;
chunk_appendf(out, "\nCertificate Revocation List #%d:\n", i+1); chunk_appendf(out, " \nCertificate Revocation List #%d:\n", i+1);
retval = show_crl_detail(crl, out); retval = show_crl_detail(crl, out);
if (retval < 0) if (retval < 0)
goto end_no_putchk; goto end_no_putchk;