diff options
author | Werner Koch <wk@gnupg.org> | 2015-12-02 18:47:50 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-12-02 18:57:49 +0100 |
commit | 69db3285e4612ad24462149a4d64cc32c090a491 (patch) | |
tree | e19035a1f90ddd2a18a7bf2c28ac34dd33fe0622 | |
parent | gpg: Improve documentation. (diff) | |
download | gnupg2-69db3285e4612ad24462149a4d64cc32c090a491.tar.xz gnupg2-69db3285e4612ad24462149a4d64cc32c090a491.zip |
build: Require at least Libassuan 2.4.1.
* configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.4.1.
* agent/gpg-agent.c (create_server_socket): Remove check for
libassuan >= 2.3.0 and >= 2.1.4.
(main): Remove check for libassuan >= 2.1.4.
* scd/scdaemon.c (create_server_socket): Remove check for
libassuan >= 2.1.4.
* dirmngr/dirmngr.c (set_tor_mode): Remove check for
libassuan >= 2.3.0.
* dirmngr/http.c (http_raw_connect, send_request): Remove checks for
libassuan >= 2.3.0.
Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r-- | agent/gpg-agent.c | 16 | ||||
-rw-r--r-- | configure.ac | 23 | ||||
-rw-r--r-- | dirmngr/dirmngr.c | 13 | ||||
-rw-r--r-- | dirmngr/http.c | 4 | ||||
-rw-r--r-- | scd/scdaemon.c | 11 |
5 files changed, 2 insertions, 65 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 04b03d390..b60287d31 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -1682,17 +1682,12 @@ create_server_socket (char *name, int primary, int cygwin, agent_exit (2); } -#if ASSUAN_VERSION_NUMBER >= 0x020300 /* >= 2.3.0 */ if (cygwin) assuan_sock_set_flag (fd, "cygwin", 1); -#else - (void)cygwin; -#endif unaddr = xmalloc (sizeof *unaddr); addr = (struct sockaddr*)unaddr; -#if ASSUAN_VERSION_NUMBER >= 0x020104 /* >= 2.1.4 */ { int redirected; @@ -1713,17 +1708,6 @@ create_server_socket (char *name, int primary, int cygwin, log_info ("redirecting socket '%s' to '%s'\n", name, *r_redir_name); } } -#else /* Assuan < 2.1.4 */ - memset (unaddr, 0, sizeof *unaddr); - unaddr->sun_family = AF_UNIX; - if (strlen (name) + 1 >= sizeof (unaddr->sun_path)) - { - log_error (_("socket name '%s' is too long\n"), name); - *name = 0; /* Inhibit removal of the socket by cleanup(). */ - agent_exit (2); - } - strcpy (unaddr->sun_path, name); -#endif /* Assuan < 2.1.4 */ len = SUN_LEN (unaddr); rc = assuan_sock_bind (fd, addr, len); diff --git a/configure.ac b/configure.ac index bd84633c0..81a1eca61 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.6.0 NEED_LIBASSUAN_API=2 -NEED_LIBASSUAN_VERSION=2.1.0 +NEED_LIBASSUAN_VERSION=2.4.1 NEED_KSBA_API=1 NEED_KSBA_VERSION=1.2.0 @@ -757,26 +757,7 @@ AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION", if test "$have_libassuan" = "yes"; then AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version", [version of the libassuan library]) - # Starting with 2.4.1 we have Tor support in Libassuan. */ - ok=no - if test "$libassuan_version_major" -gt "2"; then - ok=yes - else - if test "$libassuan_version_major" -eq "2"; then - if test "$libassuan_version_minor" -gt "4"; then - ok=yes - else - if test "$libassuan_version_minor" -eq "4"; then - if test "$libassuan_version_micro" -ge "1"; then - ok=yes - fi - fi - fi - fi - fi - if test $ok = yes ;then - show_tor_support="only .onion" - fi + show_tor_support="only .onion" fi diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 97d2e15e6..f249d683f 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -473,9 +473,7 @@ set_tor_mode (void) { if (opt.use_tor) { -#if ASSUAN_VERSION_NUMBER >= 0x020300 /* >= 2.3.0 */ if (assuan_sock_set_flag (ASSUAN_INVALID_FD, "tor-mode", 1)) -#endif { log_error ("error enabling Tor mode: %s\n", strerror (errno)); log_info ("(is your Libassuan recent enough?)\n"); @@ -1135,7 +1133,6 @@ main (int argc, char **argv) dirmngr_exit (1); } -#if ASSUAN_VERSION_NUMBER >= 0x020104 /* >= 2.1.4 */ { int redirected; @@ -1159,16 +1156,6 @@ main (int argc, char **argv) socket_name, redir_socket_name); } } -#else /* Assuan < 2.1.4 */ - memset (&serv_addr, 0, sizeof serv_addr); - serv_addr.sun_family = AF_UNIX; - if (strlen (socket_name)+1 >= sizeof serv_addr.sun_path ) - { - log_error (_("socket name '%s' is too long\n"), socket_name); - dirmngr_exit (1); - } - strcpy (serv_addr.sun_path, socket_name); -#endif /* Assuan < 2.1.4 */ len = SUN_LEN (&serv_addr); diff --git a/dirmngr/http.c b/dirmngr/http.c index 642795196..74b6911a3 100644 --- a/dirmngr/http.c +++ b/dirmngr/http.c @@ -753,9 +753,7 @@ http_raw_connect (http_t *r_hd, const char *server, unsigned short port, { int mode; -#if ASSUAN_VERSION_NUMBER >= 0x020300 /* >= 2.3.0 */ if (assuan_sock_get_flag (ASSUAN_INVALID_FD, "tor-mode", &mode) || !mode) -#endif { log_error ("Tor support is not available\n"); return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED); @@ -1481,9 +1479,7 @@ send_request (http_t hd, const char *httphost, const char *auth, { int mode; -#if ASSUAN_VERSION_NUMBER >= 0x020300 /* >= 2.3.0 */ if (assuan_sock_get_flag (ASSUAN_INVALID_FD, "tor-mode", &mode) || !mode) -#endif { log_error ("Tor support is not available\n"); return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED); diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 0f92efe02..e8218ca9c 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -1082,7 +1082,6 @@ create_server_socket (const char *name, char **r_redir_name, unaddr = xmalloc (sizeof (*unaddr)); addr = (struct sockaddr*)unaddr; -#if ASSUAN_VERSION_NUMBER >= 0x020104 /* >= 2.1.4 */ { int redirected; @@ -1102,16 +1101,6 @@ create_server_socket (const char *name, char **r_redir_name, log_info ("redirecting socket '%s' to '%s'\n", name, *r_redir_name); } } -#else /* Assuan < 2.1.4 */ - memset (unaddr, 0, sizeof *unaddr); - unaddr->sun_family = AF_UNIX; - if (strlen (name) + 1 >= sizeof (unaddr->sun_path)) - { - log_error (_("socket name '%s' is too long\n"), name); - scd_exit (2); - } - strcpy (unaddr->sun_path, name); -#endif /* Assuan < 2.1.4 */ len = SUN_LEN (unaddr); |