summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-01-21 17:55:42 +0100
committerMatt Caswell <matt@openssl.org>2021-01-27 16:00:35 +0100
commitb1eae34bbe546062c44d26882092fe9db96306d3 (patch)
tree55ba9205a1ef87ed4db117dded81a74928e7fcb5
parentFix typo in thread_once comments (diff)
downloadopenssl-b1eae34bbe546062c44d26882092fe9db96306d3.tar.xz
openssl-b1eae34bbe546062c44d26882092fe9db96306d3.zip
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 <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13923)
-rw-r--r--test/recipes/20-test_dhparam.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/recipes/20-test_dhparam.t b/test/recipes/20-test_dhparam.t
index 42eef173b7..a4d05dea7a 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 = <PEMFILE>) {
- 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 = "";