1 From 398602cad11b96025552e981f210f93c6ce03218 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?K=C3=A9vin=20THIERRY?= <kevin.thierry@open.eurogiciel.org>
3 Date: Tue, 2 Sep 2014 16:04:25 +0200
4 Subject: [PATCH] Do not set gcrypt thread callback
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Setting gcrypt thread callback is only for older versions of gcrypt
10 which is not our case.
12 Related patch on gnupg project:
13 https://gitorious.org/gnupg/mainline/commit/a2d9e48fcca6cfc2dfadef6dbd3579a30314676b
15 Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
17 agent/gpg-agent.c | 17 -----------------
18 scd/scdaemon.c | 16 ----------------
19 2 files changed, 33 deletions(-)
21 diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
22 index b00d899..2634016 100644
23 --- a/agent/gpg-agent.c
24 +++ b/agent/gpg-agent.c
25 @@ -277,12 +277,6 @@ static int check_for_running_agent (int silent, int mode);
26 /* Pth wrapper function definitions. */
27 ASSUAN_SYSTEM_PTH_IMPL;
29 -GCRY_THREAD_OPTION_PTH_IMPL;
30 -static int fixed_gcry_pth_init (void)
32 - return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
36 #ifndef PTH_HAVE_PTH_THREAD_ID
37 static unsigned long pth_thread_id (void)
38 @@ -592,17 +586,6 @@ main (int argc, char **argv )
39 init_common_subsystems ();
42 - /* Libgcrypt requires us to register the threading model first.
43 - Note that this will also do the pth_init. */
44 - gcry_threads_pth.init = fixed_gcry_pth_init;
45 - err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
48 - log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
49 - gpg_strerror (err));
53 /* Check that the libraries are suitable. Do it here because
54 the option parsing may need services of the library. */
55 if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
56 diff --git a/scd/scdaemon.c b/scd/scdaemon.c
57 index 064d342..320e2c7 100644
60 @@ -205,12 +205,6 @@ static void handle_connections (int listen_fd);
61 /* Pth wrapper function definitions. */
62 ASSUAN_SYSTEM_PTH_IMPL;
64 -GCRY_THREAD_OPTION_PTH_IMPL;
65 -static int fixed_gcry_pth_init (void)
67 - return pth_self ()? 0 : (pth_init () == FALSE) ? errno : 0;
73 @@ -407,16 +401,6 @@ main (int argc, char **argv )
74 init_common_subsystems ();
77 - /* Libgcrypt requires us to register the threading model first.
78 - Note that this will also do the pth_init. */
79 - gcry_threads_pth.init = fixed_gcry_pth_init;
80 - err = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
83 - log_fatal ("can't register GNU Pth with Libgcrypt: %s\n",
84 - gpg_strerror (err));
87 /* Check that the libraries are suitable. Do it here because
88 the option parsing may need services of the library */
89 if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )