From 8c4c762da229b5f7c83e3946eab8875df9dd88c6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 26 Mar 2023 15:58:08 +0200 Subject: [PATCH] lighttpd: Disable tests for DES and MD5 These are legacy ciphers, which we don't support any longer. --- pkgs/servers/http/lighttpd/default.nix | 5 +++ .../lighttpd/disable-legacy-crypt-tests.patch | 37 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/servers/http/lighttpd/disable-legacy-crypt-tests.patch diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index ec727c464954..b942589b791c 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -22,6 +22,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-FqyNuV5xlim6YZSbmfiib+upRqgdGFIVsoN5u0EWsLQ="; }; + patches = [ + # disable tests for des/md5, which we don't support any more + ./disable-legacy-crypt-tests.patch + ]; + postPatch = '' patchShebangs tests # Linux sandbox has an empty hostname and not /etc/hosts, which fails some tests diff --git a/pkgs/servers/http/lighttpd/disable-legacy-crypt-tests.patch b/pkgs/servers/http/lighttpd/disable-legacy-crypt-tests.patch new file mode 100644 index 000000000000..3bf50551652e --- /dev/null +++ b/pkgs/servers/http/lighttpd/disable-legacy-crypt-tests.patch @@ -0,0 +1,37 @@ +diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t +index 25016e60..e0427046 100755 +--- a/tests/mod-fastcgi.t ++++ b/tests/mod-fastcgi.t +@@ -79,7 +79,7 @@ EOF + ok($tf->handle_http($t) == 0, 'FastCGI + bin-copy-environment'); + + SKIP: { +- skip "no crypt-des under openbsd", 2 if $^O eq 'openbsd'; ++ skip "no crypt-des", 2; + + $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - plain'); + + SKIP: { +- skip "no crypt-des under openbsd", 2 if $^O eq 'openbsd'; ++ skip "no crypt-des", 2; + $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; + ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (apr-md5, wrong password)'); + + SKIP: { +- skip "no crypt-md5 under cygwin", 1 if $^O eq 'cygwin'; +- skip "no crypt-md5 under darwin", 1 if $^O eq 'darwin'; +- skip "no crypt-md5 under openbsd",1 if $^O eq 'openbsd'; ++ skip "no crypt-md5", 1; + $t->{REQUEST} = ( <