From fa8bad20db100d95cf089b0b2d897c339327215c Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Tue, 16 Jul 2019 13:20:30 +0200 Subject: Use -n instead of ! -z --- include/tests_dns | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/tests_dns') diff --git a/include/tests_dns b/include/tests_dns index a2732b16..b7cf2ba8 100644 --- a/include/tests_dns +++ b/include/tests_dns @@ -38,7 +38,7 @@ # # Description : Validate DNSSEC signiture is checked # Register --test-no DNS-1600 --weight L --network YES --category security --description "Validate DNSSEC igniture is checked" # if [ "${SKIPTEST}" -eq 0 ]; then -# if [ ! -z "${DIGBINARY}" ]; then +# if [ -n "${DIGBINARY}" ]; then # # GOOD=$("${DIGBINARY}" +short +time=1 $SIGOKDNS) # BAD=$("${DIGBINARY}" +short +time=1 $SIGFAILDNS) @@ -47,16 +47,16 @@ # LogText "Result: received timeout, can't determine DNSSEC validation" # Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_UNKOWN}" --color YELLOW # #ReportException "${TEST_NO}" "Exception found, both query failed, due to connection timeout" -# elif [ -z "${GOOD}" -a ! -z "${BAD}" ]; then +# elif [ -z "${GOOD}" -a -n "${BAD}" ]; then # LogText "Result: good signature failed, yet bad signature was accepted" # Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_UNKOWN}" --color YELLOW # #ReportException "${TEST_NO}" "Exception found, OK failed, bad signature was accepted" -# elif [ ! -z "${GOOD}" -a ! -z "${BAD}" ]; then +# elif [ -n "${GOOD}" -a -n "${BAD}" ]; then # Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_SUGGESTION}" --color YELLOW # LogText "Note: Using DNSSEC validation can protect from DNS hijacking" # #ReportSuggestion "${TEST_NO}" "Altered DNS queries are accepted, configure DNSSEC valdating name servers" # AddHP 2 2 -# elif [ ! -z "${GOOD}" -a -z "${BAD}" ]; then +# elif [ -n "${GOOD}" -a -z "${BAD}" ]; then # Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_OK}" --color GREEN # LogText "Result: altered DNS responses were ignored" # AddHP 0 2 -- cgit v1.2.3