From: Matt Caswell Date: Thu, 21 Jan 2021 16:55:42 +0000 (+0000) Subject: Fix running mingw dhparam test under wine X-Git-Tag: openssl-3.0.0-alpha11~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1eae34bbe546062c44d26882092fe9db96306d3;p=thirdparty%2Fopenssl.git Fix running mingw dhparam test under wine The dhparam test was failing to properly handle line endings when running a mingw configured build under wine. Fixes #13557 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13923) --- diff --git a/test/recipes/20-test_dhparam.t b/test/recipes/20-test_dhparam.t index 42eef173b74..a4d05dea7ad 100644 --- a/test/recipes/20-test_dhparam.t +++ b/test/recipes/20-test_dhparam.t @@ -36,11 +36,13 @@ sub checkdhparams { #Text file. Check it looks like PEM open(PEMFILE, '<', $file) or die $!; if (my $firstline = ) { - chomp($firstline); + $firstline =~ s/\R$//; if ($firstline eq "-----BEGIN DH PARAMETERS-----") { $pemtype = "PKCS3"; } elsif ($firstline eq "-----BEGIN X9.42 DH PARAMETERS-----") { $pemtype = "X9.42"; + } else { + $pemtype = ""; } } else { $pemtype = "";