From d5774fc6b3a979975aefc3da837a94ae0015c46e Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 12 May 2019 23:39:54 -0400 Subject: [PATCH] [tests] skip mod-secdownload HMAC-SHA1,HMAC-SHA256 skip mod-secdownload.t HMAC-SHA1, HMAC-SHA256 tests if crypto algorithms are not available (e.g. lighttpd build without openssl) --- tests/mod-secdownload.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/mod-secdownload.t b/tests/mod-secdownload.t index 91276cdd..3907a944 100755 --- a/tests/mod-secdownload.t +++ b/tests/mod-secdownload.t @@ -80,6 +80,15 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; ok($tf->handle_http($t) == 0, 'secdownload - timeout (md5)'); + +if (!$tf->has_feature("SSL support")) { + + for (1..4) { ok(1, "secdownload (hmac-sha1) (skipped) - (missing SSL support)"); } + for (1..5) { ok(1, "secdownload (hmac-sha256) (skipped) - (missing SSL support)"); } + +} +else { + ## HMAC-SHA1 $f = "/index.html"; $thex = sprintf("%08x", time); @@ -192,6 +201,8 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; ok($tf->handle_http($t) == 0, 'secdownload - timeout (hmac-sha256)'); +} # SKIP if lighttpd built without crypto algorithms (e.g. without openssl) + ## THE END ok($tf->stop_proc == 0, "Stopping lighttpd");