-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Description
There is a repeatable problem with building of openssl cloned with GIT on Windows.
When source comes from official distribution all line endings are preserved and remain normal unix style endings. But when git clones repository it may convert these into windows style endings.
MinGW comes bundled with pretty outdated Perl (5.8.8 if memory serves...) which could get confused by these different styles and produce unexpected behavior. This is what happening during execution of Configure script. When ignored ciphers are determined this code is executed:
if ($sdirs) {
my $dir;
foreach $dir (@skip) {
s/(\s)$dir /$1/;
s/\s$dir$//;
}
}
$sdirs = 0 unless /\\$/;
In code $sdirs = 0 unless /$/; under normal circumstances pattern /$/ returns 1 if it is still processing these directories but if line ending is not normal unix style it will return nothing and allow $sdirs = 0. So only the first line of *SDIRS= * gets processed and the rest ... objects \ md2 md4 md5 sha mdc2 hmac ripemd whrlpool \ … is skipped.
Result of this error is a Makefile which is trying to process ALL ciphers disregarding no-cipher attributes and will produce this error:
gcc -I.. -I../.. -I../asn1 -I../evp -I../../include -DOPENSSL_THREADS
-DDSO_WIN32 -mno-cygwin -DL_ENDIAN -DOPENSSL_NO_CAPIENG
-fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM -c -o
md2_dgst.o md2_dgst.c
In file included from md2_dgst.c:62:
../../include/openssl/md2.h:64:2: #error MD2 is disabled.
make[2]: *** [md2_dgst.o] Error 1
make[2]: Leaving directory
Unfortunately I am not that good with Perl and could not provide constructive solution for the problem. The best would be to fix Perl itself but I do not think that will fly. So the next best thing would be the different means of checking if end of the list is reached.