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