b6b438
From 32aea65d8f1c896a78f93d1183fb9bdf88eee7df Mon Sep 17 00:00:00 2001
b6b438
From: Andreas Schneider <asn@samba.org>
b6b438
Date: Fri, 22 Feb 2019 13:28:01 +0100
b6b438
Subject: [PATCH 058/187] lib:crypto: Don't build RC4 if we have GnuTLS >=
b6b438
 3.4.7
b6b438
b6b438
We have a GnuTLS DCEPRC backupkey implementation for the server and the
b6b438
test. However this is only working with GnuTLS >= 3.4.7. So we need to
b6b438
keep this around till we can require at least GnuTLS in a newer version.
b6b438
b6b438
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031
b6b438
b6b438
Signed-off-by: Andreas Schneider <asn@samba.org>
b6b438
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
b6b438
(cherry picked from commit 9ede63fbada7842cd9ae120936bc6bd4b6ad16ac)
b6b438
---
b6b438
 lib/crypto/wscript_build | 25 ++++++++++++++++++++-----
b6b438
 1 file changed, 20 insertions(+), 5 deletions(-)
b6b438
b6b438
diff --git a/lib/crypto/wscript_build b/lib/crypto/wscript_build
b6b438
index 46b0e084328..a26c10b627b 100644
b6b438
--- a/lib/crypto/wscript_build
b6b438
+++ b/lib/crypto/wscript_build
b6b438
@@ -12,12 +12,27 @@ bld.SAMBA_SUBSYSTEM('GNUTLS_HELPERS',
b6b438
                     ''',
b6b438
                     deps='gnutls samba-errors');
b6b438
 
b6b438
+# We have a GnuTLS DCEPRC backupkey implementation for the server and the test.
b6b438
+# However this is only working with GnuTLS >= 3.4.7. So we need to keep this
b6b438
+# around till we can require at least GnuTLS in a newer version.
b6b438
+bld.SAMBA_SUBSYSTEM('LIBCRYPTO_RC4',
b6b438
+                    source='arcfour.c',
b6b438
+                    deps='talloc',
b6b438
+                    enabled=not bld.CONFIG_SET('HAVE_GNUTLS_3_4_7'))
b6b438
+
b6b438
 bld.SAMBA_SUBSYSTEM('LIBCRYPTO',
b6b438
-        source='''md4.c arcfour.c
b6b438
-        aes.c rijndael-alg-fst.c aes_cmac_128.c aes_ccm_128.c aes_gcm_128.c
b6b438
-        ''',
b6b438
-        deps='talloc' + extra_deps
b6b438
-        )
b6b438
+        source='''
b6b438
+               md4.c
b6b438
+               aes.c
b6b438
+               rijndael-alg-fst.c
b6b438
+               aes_cmac_128.c
b6b438
+               aes_ccm_128.c
b6b438
+               aes_gcm_128.c
b6b438
+               ''',
b6b438
+        deps='''
b6b438
+             talloc
b6b438
+             LIBCRYPTO_RC4
b6b438
+             ''' + extra_deps)
b6b438
 
b6b438
 bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO',
b6b438
         source='''md4test.c
b6b438
-- 
b6b438
2.23.0
b6b438