BUG/MINOR: ssl: Remove empty lines from "show ssl ocsp-response <id>" output
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Tue, 11 Jan 2022 09:11:10 +0000 (10:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Feb 2022 13:40:23 +0000 (14:40 +0100)
commit5e5111a18b82ac6c18611d2167d07b429aa1098e
tree18fbb5030a9d00431d77c67e208b3ecf3b6a8464
parenta4007ecd571fa3fd4ee1b1654ea25799b70a3816
BUG/MINOR: ssl: Remove empty lines from "show ssl ocsp-response <id>" output

There were empty lines in the output of the CLI's "show ssl
ocsp-response <id>" command. The plain "show ssl ocsp-response" command
(without parameter) was already managed in commit
cc750efbc5c2180ed63b222a51029609ea96d0f7. This patch adds an extra space
to those lines so that the only existing empty lines actually mark the
end of the output. This requires to post-process the buffer filled by
OpenSSL's OCSP_RESPONSE_print function (which produces the output of the
"openssl ocsp -respin <ocsp.pem>" command). This way the output of our
command still looks the same as openssl's one.

Must be backported in 2.5.

(cherry picked from commit 2e7d1eb2a7dad61ee5661086005d3f85ee6ad6ba)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ssl_sock.c