From: Andreas Schneider Date: Fri, 15 Mar 2019 13:54:13 +0000 (+0100) Subject: lib:crypto: Do not build AES-CMAC if we use GnuTLS that supports it X-Git-Tag: tevent-0.10.1~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3f969817553dc9c9db88741bad51100b4d24604;p=thirdparty%2Fsamba.git lib:crypto: Do not build AES-CMAC if we use GnuTLS that supports it This requires GnuTLS >= 3.6.5. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Aug 21 11:14:11 UTC 2019 on sn-devel-184 --- diff --git a/lib/crypto/wscript_build b/lib/crypto/wscript_build index dcac8fcd30c..4f1665a7fd9 100644 --- a/lib/crypto/wscript_build +++ b/lib/crypto/wscript_build @@ -26,7 +26,8 @@ bld.SAMBA_SUBSYSTEM('LIBCRYPTO_AES', bld.SAMBA_SUBSYSTEM('LIBCRYPTO_AES_CMAC', source='aes_cmac_128.c', - deps='talloc') + deps='talloc', + enabled=not bld.CONFIG_SET('HAVE_GNUTLS_AES_CMAC')) bld.SAMBA_SUBSYSTEM('LIBCRYPTO', source=''' @@ -53,7 +54,8 @@ bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO_AES_GCM', bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO_AES_CMAC', source='aes_cmac_128_test.c', autoproto='aes_cmac_test_proto.h', - deps='talloc') + deps='talloc', + enabled=not bld.CONFIG_SET('HAVE_GNUTLS_AES_CMAC')) bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO', source='md4test.c', diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c index 22353d4e1cd..86c537a9227 100644 --- a/source4/torture/local/local.c +++ b/source4/torture/local/local.c @@ -25,7 +25,9 @@ #include "../lib/crypto/test_proto.h" #include "../lib/crypto/aes_ccm_test_proto.h" #include "../lib/crypto/aes_gcm_test_proto.h" +#ifndef HAVE_GNUTLS_AES_CMAC #include "../lib/crypto/aes_cmac_test_proto.h" +#endif #include "lib/registry/tests/proto.h" #include "lib/replace/replace-testsuite.h" @@ -95,8 +97,10 @@ NTSTATUS torture_local_init(TALLOC_CTX *ctx) torture_suite_add_simple_test(suite, "crypto.md4", torture_local_crypto_md4); +#ifndef HAVE_GNUTLS_AES_CMAC torture_suite_add_simple_test(suite, "crypto.aes_cmac_128", torture_local_crypto_aes_cmac_128); +#endif torture_suite_add_simple_test(suite, "crypto.aes_ccm_128", torture_local_crypto_aes_ccm_128); torture_suite_add_simple_test(suite, "crypto.aes_gcm_128",