summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-05-12 23:39:54 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2019-05-13 21:01:57 -0400
commitd5774fc6b3a979975aefc3da837a94ae0015c46e (patch)
treeb8474301dc988863e0c36853df28aa3d47403c49
parentda6a94efbba3b131ed253ae820d173749df1c60b (diff)
downloadlighttpd1.4-d5774fc6b3a979975aefc3da837a94ae0015c46e.tar.gz
lighttpd1.4-d5774fc6b3a979975aefc3da837a94ae0015c46e.zip
[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)
-rwxr-xr-xtests/mod-secdownload.t11
1 files changed, 11 insertions, 0 deletions
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");