mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-29 04:49:44 +01:00
Fix weird bash globbing #2429
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"
This commit is contained in:
parent
f3c7eb4333
commit
92b28c5f1c
@ -7619,7 +7619,7 @@ determine_trust() {
|
||||
ca_bundles="$CA_BUNDLES_PATH/*.pem"
|
||||
fi
|
||||
for bundle_fname in $ca_bundles; do
|
||||
certificate_file[i]=$(basename ${bundle_fname//.pem})
|
||||
certificate_file[i]=$(basename ${bundle_fname//.pem 2>/dev/null})
|
||||
if [[ ! -r $bundle_fname ]]; then
|
||||
prln_warning "\"$bundle_fname\" cannot be found / not readable"
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user