From d37f6c78ae4f2b5badf22ecf30fb398fea4218d8 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Thu, 15 Sep 2022 13:59:17 -0700 Subject: [PATCH] Fix alignment in neat_list() When neat_list() is printing information about a cipher suite that uses (EC)DH key exchange that was obtained using an old version of OpenSSL the rows are not properly aligned, since the key exchange input includes an unexpected trailing space. This commit fixes the problem by removing any trailing spaces from $kx. --- testssl.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/testssl.sh b/testssl.sh index 482366f..a069b9c 100755 --- a/testssl.sh +++ b/testssl.sh @@ -3331,6 +3331,7 @@ neat_list(){ local -i i len kx="${3//Kx=/}" + kx="$(strip_trailing_space "$kx")" enc="${4//Enc=/}" # In two cases LibreSSL uses very long names for encryption algorithms # and doesn't include the number of bits.