From: Nikos Mavrogiannopoulos Date: Wed, 21 Oct 2015 07:13:56 +0000 (+0200) Subject: tests: testdane will not check hosts which are unreachable X-Git-Tag: gnutls_3_5_0~618 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5c402f74a29fea656f6b82f5dcff43524b06b36;p=thirdparty%2Fgnutls.git tests: testdane will not check hosts which are unreachable --- diff --git a/tests/suite/testdane b/tests/suite/testdane index 12d3ce19e7..05d9cde1cf 100755 --- a/tests/suite/testdane +++ b/tests/suite/testdane @@ -38,14 +38,17 @@ echo "*** Testing good HTTPS hosts ***" HOSTS="good.dane.verisignlabs.com www.freebsd.org www.kumari.net torproject.org fedoraproject.org" HOSTS="${HOSTS} nohats.ca" for host in ${HOSTS}; do - echo -n "${host}: " - "${DANETOOL}" --check "${host}" >/dev/null 2>&1 - if [ $? != 0 ]; then - echo "Error checking ${host}" - exit 1 + nc "${host}" 443 /dev/null 2>&1 + if [ $? != 0 ]; then + echo "Error checking ${host}" + exit 1 + fi + echo "ok" fi - echo "ok" done echo "" @@ -53,14 +56,17 @@ echo "*** Testing good SMTP hosts ***" #HOSTS="dougbarton.us nlnetlabs.nl" HOSTS="nlnetlabs.nl" for host in ${HOSTS}; do - echo -n "${host}: " - "${DANETOOL}" --check "${host}" --port 25 >/dev/null 2>&1 - if [ $? != 0 ]; then - echo "Error checking ${host}" - exit 1 + nc "${host}" 25 /dev/null 2>&1 + if [ $? != 0 ]; then + echo "Error checking ${host}" + exit 1 + fi + echo "ok" fi - echo "ok" done echo "" @@ -70,13 +76,17 @@ echo "*** Testing bad HTTPS hosts ***" HOSTS="bad-hash.dane.verisignlabs.com bad-params.dane.verisignlabs.com" HOSTS="${HOSTS} bad-sig.dane.verisignlabs.com" for host in ${HOSTS}; do - echo -n "${host}: " - "${DANETOOL}" --check "${host}" >/dev/null 2>&1 - if [ $? = 0 ]; then - echo "Checking ${host} should have failed" - exit 1 + + nc "${host}" 443 /dev/null 2>&1 + if [ $? = 0 ]; then + echo "Checking ${host} should have failed" + exit 1 + fi + echo "ok" fi - echo "ok" done