From 6b5ce68d1ae305d307c02a86d027cb96269b0e08 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Mon, 11 Apr 2022 13:36:56 -0400 Subject: [PATCH] More OpenSSL compatibility fixes This commit fixes yet another issue with using OpenSSL 3.X with the 3.0 branch. When $OPENSSL is used to obtain a fingerprint, OpenSSL 3.X prepends the fingerprint with "sha1" or "sha256" rather than "SHA1" or "SHA256". --- testssl.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testssl.sh b/testssl.sh index 31b21c2..f0b25df 100755 --- a/testssl.sh +++ b/testssl.sh @@ -8181,7 +8181,9 @@ determine_cert_fingerprint_serial() { result="${result//serial=}" result="${result//:/}" result="${result//SHA1 /}" + result="${result//sha1 /}" result="${result//SHA256 /}" + result="${result//sha256 /}" # When the serial number is too large we'll get a 0x0a LF after 70 ASCII chars (see #2010). # Thus we clean them here so that it is displayed correctly. result="${result/[$'\n\r']/}"