diff --git a/check_ssl_cert b/check_ssl_cert index b78cef0..6dfba3d 100755 --- a/check_ssl_cert +++ b/check_ssl_cert @@ -5091,6 +5091,11 @@ main() { verboselog "cannot find nmap: disabling connection checks and ciphers checks" debuglog "cannot find nmap: disabling connection checks and ciphers checks" DISABLE_NMAP=1 + + if [ -n "${IGNORE_CONNECTION_STATE}" ] ; then + unknown "--ignore-connection-state requires nmap" + fi + else if [ ! -x "${NMAP_BIN}" ]; then unknown "${NMAP_BIN} is not executable" diff --git a/test/integration_tests.sh b/test/integration_tests.sh index ec12384..b0bfec7 100755 --- a/test/integration_tests.sh +++ b/test/integration_tests.sh @@ -43,15 +43,13 @@ fi create_temporary_test_file() { - SUFFIX=$1 - if mktemp --help 2>&1 | grep -q 'TEMPLATE must end with XXXXXX'; then # no suffix possible SUFFIX= fi # create a temporary file - TEMPFILE="$(mktemp "${TMPDIR}/XXXXXX${SUFFIX}" 2>/dev/null)" + TEMPFILE="$(mktemp "${TMPDIR}/XXXXXX" 2>/dev/null)" if [ -z "${TEMPFILE}" ] || [ ! -w "${TEMPFILE}" ]; then fail 'temporary file creation failure.' @@ -1300,11 +1298,11 @@ testGithubComCRL() { GITHUB_CRL_URI=$(${OPENSSL} x509 -in "${TEMPFILE_GITHUB_CERT}" -noout -text | grep -A 6 "X509v3 CRL Distribution Points" | grep "http://" | head -1 | sed -e "s/.*URI://") - create_temporary_test_file '.crl' + create_temporary_test_file TEMPFILE_CRL=${TEMPFILE} echo "${GITHUB_CRL_URI}" - curl --silent --output "${TEMPFILE_CRL}" "${GITHUB_CRL_URI}" + curl --silent "${GITHUB_CRL_URI}" --output "${TEMPFILE_CRL}" # shellcheck disable=SC2086 ${SCRIPT} ${TEST_DEBUG} --file "${TEMPFILE_CRL}" --ignore-exp --ignore-maximum-validity