Skip to content

Commit 775ed60

Browse files
committed
Fix weird bash globbing (3.0)
What was problematic was the error message when the certificate stores were missing. This fixes it by redirecting the error message to /dev/null so that if the sub function detects the missing file it returns with an error by the program and not by executing "basename" As for 3.2 this is for the 3.0 branch.
1 parent 3eb3994 commit 775ed60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

testssl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7094,7 +7094,7 @@ determine_trust() {
70947094
ca_bundles="$CA_BUNDLES_PATH/*.pem"
70957095
fi
70967096
for bundle_fname in $ca_bundles; do
7097-
certificate_file[i]=$(basename ${bundle_fname//.pem})
7097+
certificate_file[i]=$(basename ${bundle_fname//.pem 2>/dev/null})
70987098
if [[ ! -r $bundle_fname ]]; then
70997099
prln_warning "\"$bundle_fname\" cannot be found / not readable"
71007100
return 1

0 commit comments

Comments
 (0)