diff options
author | Matt Caswell <matt@openssl.org> | 2021-01-21 17:55:42 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-01-27 16:00:35 +0100 |
commit | b1eae34bbe546062c44d26882092fe9db96306d3 (patch) | |
tree | 55ba9205a1ef87ed4db117dded81a74928e7fcb5 | |
parent | Fix typo in thread_once comments (diff) | |
download | openssl-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.t | 4 |
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 = ""; |