From a7c33e89059a1463d778c399a364ce6a84c7de9d Mon Sep 17 00:00:00 2001 From: Remi Tricot-Le Breton Date: Wed, 7 Feb 2024 16:38:47 +0100 Subject: [PATCH] REGTESTS: ssl: Fix empty line in cli command input The 'set ssl cert' command was failing because of empty lines in the contents of the PEM file used to perform the update. We were also missing the issuer in the newly created ckch_store, which then raised an error when committing the transaction. (cherry picked from commit 66b20aada4ffc5b3956f43d05f03a32033bd86b6) Signed-off-by: Christopher Faulet --- reg-tests/ssl/show_ssl_ocspresponse.vtc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reg-tests/ssl/show_ssl_ocspresponse.vtc b/reg-tests/ssl/show_ssl_ocspresponse.vtc index 186aecc..8b1db16 100644 --- a/reg-tests/ssl/show_ssl_ocspresponse.vtc +++ b/reg-tests/ssl/show_ssl_ocspresponse.vtc @@ -111,7 +111,8 @@ haproxy h1 -cli { # Change the server certificate's OCSP response through a transaction shell { - printf "set ssl cert ${testdir}/show_ocsp_server.pem <<\n$(cat ${testdir}/show_ocsp_server.pem)\n\n" | socat "${tmpdir}/h1/stats" - + printf "set ssl cert ${testdir}/show_ocsp_server.pem <<\n$(cat ${testdir}/show_ocsp_server.pem | sed '/^$/d')\n\n" | socat "${tmpdir}/h1/stats" - + printf "set ssl cert ${testdir}/show_ocsp_server.pem.issuer <<\n$(cat ${testdir}/show_ocsp_server.pem.issuer | sed '/^$/d')\n\n" | socat "${tmpdir}/h1/stats" - printf "set ssl cert ${testdir}/show_ocsp_server.pem.ocsp <<\n$(cat ${testdir}/show_ocsp_server.pem.ocsp|openssl base64)\n\n" | socat "${tmpdir}/h1/stats" - } -- 1.7.10.4