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)
#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 = "";