mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Require Libgcrypt 1.8
* configure.ac (NEED_LIBGCRYPT_VERSION): Require 1.8. * tools/gpgconf.c (show_version_libgcrypt): Remove conditional case for Libgcrypt < 1.8. * common/compliance.c (gnupg_rng_is_compliant): Ditto. * agent/pksign.c: Ditto. * agent/gpg-agent.c (thread_init_once): Ditto. (agent_libgcrypt_progress_cb): Ditto. * agent/command.c (cmd_getinfo): Ditto. -- Libgcrypt 1.7 reached end-of-life more than a year ago. Thus there is no reason to keep backward support for it. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
f05d1772c4
commit
99ab3aed15
6 changed files with 1 additions and 36 deletions
|
@ -984,9 +984,7 @@ thread_init_once (void)
|
|||
* has already been initialized but at that point nPth was not
|
||||
* initialized and thus Libgcrypt could not set its system call
|
||||
* clamp. */
|
||||
#if GCRYPT_VERSION_NUMBER >= 0x010800 /* 1.8.0 */
|
||||
gcry_control (GCRYCTL_REINIT_SYSCALL_CLAMP, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1864,23 +1862,6 @@ agent_libgcrypt_progress_cb (void *data, const char *what, int printchar,
|
|||
break;
|
||||
if (dispatch && dispatch->cb)
|
||||
dispatch->cb (dispatch->ctrl, what, printchar, current, total);
|
||||
|
||||
/* Libgcrypt < 1.8 does not know about nPth and thus when it reads
|
||||
* from /dev/random this will block the process. To mitigate this
|
||||
* problem we yield the thread when Libgcrypt tells us that it needs
|
||||
* more entropy. This way other threads have chance to run. */
|
||||
#if GCRYPT_VERSION_NUMBER < 0x010800 /* 1.8.0 */
|
||||
if (what && !strcmp (what, "need_entropy"))
|
||||
{
|
||||
#if GPGRT_VERSION_NUMBER < 0x011900 /* 1.25 */
|
||||
/* In older gpg-error versions gpgrt_yield is buggy for use with
|
||||
* nPth and thus we need to resort to a sleep call. */
|
||||
npth_usleep (1000); /* 1ms */
|
||||
#else
|
||||
gpgrt_yield ();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue