]> git.ipfire.org Git - thirdparty/git.git/commit
Makefile: allow specifying a SHA-1 for non-cryptographic uses
authorTaylor Blau <me@ttaylorr.com>
Thu, 26 Sep 2024 15:22:50 +0000 (11:22 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Sep 2024 18:27:47 +0000 (11:27 -0700)
commit06c92dafb86fd390285e20b743f5a61b45055546
tree890850f65e8a2bf6dc187595b8b2c5ffecd1b867
parent253ed9ecfffa3e50b95e08bb513fdf9efcc5a85f
Makefile: allow specifying a SHA-1 for non-cryptographic uses

Introduce _UNSAFE variants of the OPENSSL_SHA1, BLK_SHA1, and
APPLE_COMMON_CRYPTO_SHA1 compile-time knobs which indicate which SHA-1
implementation is to be used for non-cryptographic uses.

There are a couple of small implementation notes worth mentioning:

  - There is no way to select the collision detecting SHA-1 as the
    "fast" fallback, since the fast fallback is only for
    non-cryptographic uses, and is meant to be faster than our
    collision-detecting implementation.

  - There are no similar knobs for SHA-256, since no collision attacks
    are presently known and thus no collision-detecting implementations
    actually exist.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
hash.h