From 2d058fe332a9aae11607a86c349aee33fa580542 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Tue, 10 Dec 2019 18:06:29 +0100
Subject: [PATCH 191/191] lib:crypto: Build intel aes-ni only if GnuTLS doesn't
provide AES CMAC
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Dec 10 20:30:57 UTC 2019 on sn-devel-184
(cherry picked from commit 20b9cae63d5a5881cc6100a2533fab683cc307aa)
---
lib/crypto/wscript_build | 3 ++-
third_party/aesni-intel/wscript | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/crypto/wscript_build b/lib/crypto/wscript_build
index 46ae5e9ba80..eb67af63f26 100644
--- a/lib/crypto/wscript_build
+++ b/lib/crypto/wscript_build
@@ -2,7 +2,8 @@
extra_deps = ''
-if bld.CONFIG_SET("HAVE_AESNI_INTEL"):
+if (bld.CONFIG_SET("HAVE_AESNI_INTEL") and
+ not bld.CONFIG_SET('HAVE_GNUTLS_AES_CMAC')):
extra_deps += ' aesni-intel'
bld.SAMBA_SUBSYSTEM('GNUTLS_HELPERS',
diff --git a/third_party/aesni-intel/wscript b/third_party/aesni-intel/wscript
index 955b5162140..382b3c6a7ff 100644
--- a/third_party/aesni-intel/wscript
+++ b/third_party/aesni-intel/wscript
@@ -21,7 +21,8 @@ def configure(conf):
raise Errors.WafError('--accel-aes=intelaesni selected and linker rejects -z noexecstack')
def build(bld):
- if not bld.CONFIG_SET('HAVE_AESNI_INTEL'):
+ if (not bld.CONFIG_SET('HAVE_AESNI_INTEL') or
+ bld.CONFIG_SET('HAVE_GNUTLS_AES_CMAC')):
return
bld.SAMBA_LIBRARY('aesni-intel',
--
2.23.0