From 7219f16c2ae8ae289194f8c5362d25e5f6fe6de7 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Thu, 16 Nov 2017 14:22:56 -0500 Subject: [PATCH] Yet another fix for OpenSSL 1.1.1 When the certificate signature algorithm is RSA-PSS and OpenSSL 1.1.1 is used $cert_sign_algo contains some trailing space characters, which causes the algorithm not to be recognized in the case statement. This PR fixes the problem by removing any trailing space characters from $cert_sign_algo. --- testssl.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/testssl.sh b/testssl.sh index be9d296..cb673d2 100755 --- a/testssl.sh +++ b/testssl.sh @@ -6192,6 +6192,7 @@ certificate_info() { fi cert_sig_algo=$($OPENSSL x509 -in $HOSTCERT -noout -text 2>>$ERRFILE | grep "Signature Algorithm" | sed 's/^.*Signature Algorithm: //' | sort -u ) + cert_sig_algo="${cert_sig_algo%% *}" cert_key_algo=$($OPENSSL x509 -in $HOSTCERT -noout -text 2>>$ERRFILE | awk -F':' '/Public Key Algorithm:/ { print $2 }' | sort -u ) out "$indent" ; pr_bold " Signature Algorithm "