From 3d73e2faae0304cbadf5c5a5e1307cc2d6b86082 Mon Sep 17 00:00:00 2001 From: iliajie Date: Sun, 30 Oct 2022 20:56:32 +0200 Subject: [PATCH] Revert "Fix to always use `use Digest::SHA`" This reverts commit 7fb5e74e2b6582533500769774c89f3a9f11a9bc. --- miniserv.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miniserv.pl b/miniserv.pl index 10fb773da..aa7f26958 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -5654,12 +5654,12 @@ else { } # Send successful connection headers -eval "use Digest::SHA"; +eval "use Digest::SHA1"; if ($@) { - &http_error(500, "Missing Digest::SHA perl module"); + &http_error(500, "Missing Digest::SHA1 perl module"); } my $rkey = $key."258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; -my $sha1 = Digest::SHA->new; +my $sha1 = Digest::SHA1->new; $sha1->add($rkey); my $digest = $sha1->digest; $digest = &b64encode($digest); @@ -5721,7 +5721,7 @@ lc($rheader{'connection'}) =~ /upgrade/ || # Check the reply key my $brkey = $bsession_id."258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; -my $bsha1 = Digest::SHA->new; +my $bsha1 = Digest::SHA1->new; $bsha1->add($brkey); my $bdigest = $bsha1->digest; $bdigest = &b64encode($bdigest);