[Pkg-e-devel] Bug#638644: Could be built without gcrypt dependency
Andreas Metzler
ametzler at downhill.at.eu.org
Sat Aug 20 14:17:14 UTC 2011
Package: ecore
Version: 1.0.0-2
Tags: upstream
User: ametzler at downhill.at.eu.org
Usertags: gnutls3
This package links against libgcrypt. Afaict the only gcrypt related
code is this one:
---------------------------
#if USE_GNUTLS
# include <gnutls/gnutls.h>
# include <gnutls/x509.h>
# include <gcrypt.h>
#elif USE_OPENSSL
[...]
#if USE_GNUTLS
# ifdef EFL_HAVE_PTHREAD
#include <pthread.h>
GCRY_THREAD_OPTION_PTHREAD_IMPL;
# endif
[...]
#ifdef EFL_HAVE_PTHREAD
if (gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread))
WRN("YOU ARE USING PTHREADS, BUT I CANNOT INITIALIZE THREADSAFE GCRYPT OPERATIONS!");
#endif
if (gnutls_global_init())
return ECORE_CON_SSL_ERROR_INIT_FAILED;
---------------------------
Starting with gnutls version 2.12. this should not be necessary
anymore. Quoting its NEWS:
------------------------------
** libgnutls: Added gnutls_global_set_mutex() to allow setting
alternative locking procedures. By default the system available
locking is used. In *NIX pthreads are used and in windows the
critical section API. This follows a different approach than the
previous versions that depended on libgcrypt initialization. The
locks are now set by default in systems that support it. Programs
that used gcry_control() to set thread locks should insert it into
a block of
#if GNUTLS_VERSION_NUMBER <= 0x020b00
gcry_control(...)
#endif
------------------------------
Of course the configure script will also need to changed to only
search for and link against gcrypt if gnutls is << 2.12.
gnutls 3.0.0 uses nettle instead of gcrypt as crypto backend and
therefore the abovementioned code (and linking aginst libgcrypt) does not
make too much sense anymore.
cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
More information about the Pkg-e-devel
mailing list