25-test_pkcs8.t: Make text comparison ignore extra CR characters

This is needed to pass the test on MinGW.

Fixes #19921

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19957)
This commit is contained in:
Tomas Mraz 2022-12-22 11:26:14 +01:00
parent 177d433bda
commit a78a7917ae

View File

@ -35,6 +35,12 @@ SKIP: {
'-v2', 'sm4', '-v2prf', 'hmacWithSM3']))),
"Convert from PKCS#5 v2.0 format to PKCS#8 unencrypted format");
is_nofips(compare_text(srctop_file('test', 'certs', 'sm2.key'), 'sm2.key'), 0,
"compare test/certs/sm2.key to sm2.key")
is_nofips(compare_text(srctop_file('test', 'certs', 'sm2.key'), 'sm2.key',
sub {
my $in1 = $_[0];
my $in2 = $_[1];
$in1 =~ s/\r\n/\n/g;
$in2 =~ s/\r\n/\n/g;
$in1 ne $in2
}), 0, "compare test/certs/sm2.key to sm2.key")
}