Combining APPLE_COMMON_CRYPTO=1 and NO_OPENSSL=1 produces unexpected result
- From
Jack Nagel <jacknagel@gmail.com>
- Date
- Nov 25, 2015, 15:10 UTC
- Message-ID
- <CAMYxyaVQyVRQb-b0nVv412tMZ3rEnOfUPRakg2dEREg5_Ba5Ag@mail.gmail.com>
When compiling git on OS X (where APPLE_COMMON_CRYPTO=1 is the default) and specifying NO_OPENSSL=1, the resulting git uses the BLK_SHA1 implementation rather than the functions available in CommonCrypto.
$ uname -a Darwin broadwell.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
$ make NO_OPENSSL=1 [...] $ nm git | grep _SHA1_ 0000000100173f00 t _blk_SHA1_Block 0000000100174e80 T _blk_SHA1_Final 000000010018fbb0 s _blk_SHA1_Final.pad 0000000100173de0 T _blk_SHA1_Init 0000000100173e10 T _blk_SHA1_Update
However, with OpenSSL available, it does use the CommonCrypto functions:
$ make
[...]
$ nm git | grep _SHA1_
U _CC_SHA1_Final
U _CC_SHA1_Init
U _CC_SHA1_UpdateI would not expect the presence of NO_OPENSSL=1 to change the behavior here, since neither case actually makes use of the OpenSSL SHA1 functions.