diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-16 13:08:38 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-03-16 14:20:54 -0700 |
| commit | da279e00b59b533c7f9bc49b573e14e188e33c7f (patch) | |
| tree | 868016d3beb0062d1ddf39ad51635d3cacb8c22c /Makefile | |
| parent | ea1007726f35c6b6e1715dcfc35b66bfbd954f12 (diff) | |
| download | git-lt/sha1dc.tar.gz | |
sha1dc: integrate the sha1dc code with the git buildlt/sha1dc
This adds the proper magic to actually build the sha1dc code as part
of git when USE_SHA1DC is enabled.
This includes
- adjusting the sha1dc include directives for git use
- adding the proper USE_SHA1DC logic to the Makefile
- adding the SHA1DC case to the "hash.h" header
- adding the proper "git platform" wrappers for the SHA1 interface
Much of this comes from Jeff King's previous integration effort, with
modifications for the new world order of hash.h.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -142,6 +142,10 @@ all:: # Define PPC_SHA1 environment variable when running make to make use of # a bundled SHA1 routine optimized for PowerPC. # +# Define USE_SHA1DC to unconditionally enable the collision-detecting sha1 +# algorithm. This is slower, but may detect attempted collision attacks. +# Takes priority over other *_SHA1 knobs. +# # Define SHA1_MAX_BLOCK_SIZE to limit the amount of data that will be hashed # in one call to the platform's SHA1_Update(). e.g. APPLE_COMMON_CRYPTO # wants 'SHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' defined. @@ -1386,6 +1390,11 @@ ifdef APPLE_COMMON_CRYPTO SHA1_MAX_BLOCK_SIZE = 1024L*1024L*1024L endif +ifdef USE_SHA1DC + LIB_OBJS += sha1dc/sha1.o + LIB_OBJS += sha1dc/ubc_check.o + BASIC_CFLAGS += -DSHA1DC +else ifdef BLK_SHA1 LIB_OBJS += block-sha1/sha1.o BASIC_CFLAGS += -DSHA1_BLK @@ -1403,6 +1412,7 @@ else endif endif endif +endif ifdef SHA1_MAX_BLOCK_SIZE LIB_OBJS += compat/sha1-chunked.o |
