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.
This commit is contained in:
David Cooper 2017-11-16 14:22:56 -05:00 committed by GitHub
parent 54b9119162
commit 7219f16c2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 "