The Samba-Bugzilla – Attachment 10983 Details for
Bug 11233
GCRYCTL_ENABLE_QUICK_RANDOM undeclared
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch to not initialize gcrypt
patch.fix-gnutls.4.1 (text/plain), 2.50 KB, created by
Tom Schulz
on 2015-04-23 15:43:43 UTC
(
hide
)
Description:
Patch to not initialize gcrypt
Filename:
MIME Type:
Creator:
Tom Schulz
Created:
2015-04-23 15:43:43 UTC
Size:
2.50 KB
patch
obsolete
> >We no longer link against gcrypt if gnutls > 3.0.0 is found, as these >versions use libnettle. > >diff --git a/source4/lib/tls/tlscert.c b/source4/lib/tls/tlscert.c >index 8a19e0a..b44d46b 100644 >--- a/source4/lib/tls/tlscert.c >+++ b/source4/lib/tls/tlscert.c >@@ -24,7 +24,7 @@ > #if ENABLE_GNUTLS > #include <gnutls/gnutls.h> > #include <gnutls/x509.h> >-#if HAVE_GCRYPT_H >+#if defined(HAVE_GCRYPT_H) && !defined(HAVE_GNUTLS3) > #include <gcrypt.h> > #endif > >@@ -69,7 +69,7 @@ void tls_cert_generate(TALLOC_CTX *mem_ctx, > DEBUG(0,("Attempting to autogenerate TLS self-signed keys for https for hostname '%s'\n", > hostname)); > >-#ifdef HAVE_GCRYPT_H >+#if defined(HAVE_GCRYPT_H) && !defined(HAVE_GNUTLS3) > DEBUG(3,("Enabling QUICK mode in gcrypt\n")); > gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0); > #endif >diff --git a/source4/lib/tls/wscript b/source4/lib/tls/wscript >index ae96395..cbba87d 100644 >--- a/source4/lib/tls/wscript >+++ b/source4/lib/tls/wscript >@@ -19,9 +19,14 @@ def configure(conf): > conf.SET_TARGET_TYPE('gpg-error', 'DISABLED') > return > >- conf.check_cfg(package='gnutls', >- args='"gnutls >= 1.4.0 gnutls != 2.2.4 gnutls != 2.8.0 gnutls != 2.8.1" --cflags --libs', >- msg='Checking for gnutls >= 1.4.0 and broken versions', mandatory=False) >+ if conf.check_cfg(package='gnutls', >+ args='"gnutls >= 3.0.0" --cflags --libs', >+ msg='Checking for gnutls >= 3.0.0s', mandatory=False): >+ conf.DEFINE('HAVE_GNUTLS3', 1) >+ else: >+ conf.check_cfg(package='gnutls', >+ args='"gnutls >= 1.4.0 gnutls != 2.2.4 gnutls != 2.8.0 gnutls != 2.8.1" --cflags --libs', >+ msg='Checking for gnutls >= 1.4.0 and broken versions', mandatory=False) > > if 'HAVE_GNUTLS' in conf.env: > conf.DEFINE('ENABLE_GNUTLS', 1) >@@ -42,8 +48,13 @@ def configure(conf): > conf.CHECK_TYPES('gnutls_datum gnutls_datum_t', > headers='gnutls/gnutls.h', lib='gnutls') > >- conf.CHECK_FUNCS_IN('gcry_control', 'gcrypt', headers='gcrypt.h') >- conf.CHECK_FUNCS_IN('gpg_err_code_from_errno', 'gpg-error') >+ # GnuTLS3 moved to libnettle, so only do this in the < 3.0 case >+ if not 'HAVE_GNUTLS3' in conf.env: >+ conf.CHECK_FUNCS_IN('gcry_control', 'gcrypt', headers='gcrypt.h') >+ conf.CHECK_FUNCS_IN('gpg_err_code_from_errno', 'gpg-error') >+ else: >+ conf.SET_TARGET_TYPE('gcrypt', 'DISABLED') >+ conf.SET_TARGET_TYPE('gpg-error', 'DISABLED') > > > def build(bld):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11233
: 10983