summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-01-21 16:55:42 +0000
committerMatt Caswell <matt@openssl.org>2021-01-27 15:00:35 +0000
commitb1eae34bbe546062c44d26882092fe9db96306d3 (patch)
tree55ba9205a1ef87ed4db117dded81a74928e7fcb5 /test
parentfa2a7490c0b22083388fb81497998730f000e82d (diff)
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)
Diffstat (limited to 'test')
-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 = "";