]> Kevux Git Server - rit/commitdiff
meson: require SecurityFramework when it's used as SHA1 backend
authorPatrick Steinhardt <ps@pks.im>
Mon, 30 Dec 2024 14:24:06 +0000 (15:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Dec 2024 14:50:45 +0000 (06:50 -0800)
The Security framework is required when we use CommonCrypto either as
HTTPS or SHA1 backend, but we only require it in case it is set up as
HTTPS backend. Fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build

index 6fa4d90..bc75ad9 100644 (file)
@@ -1329,7 +1329,7 @@ https_backend = get_option('https_backend')
 sha1_backend = get_option('sha1_backend')
 sha256_backend = get_option('sha256_backend')
 
-security_framework = dependency('Security', required: https_backend == 'CommonCrypto')
+security_framework = dependency('Security', required: https_backend == 'CommonCrypto' or sha1_backend == 'CommonCrypto')
 core_foundation_framework = dependency('CoreFoundation', required: security_framework.found())
 if https_backend == 'auto' and security_framework.found()
   https_backend = 'CommonCrypto'