[Pkg-gnupg-commit] [gnupg2] 210/241: build: Require at least Libassuan 2.4.1.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 20:32:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 69db3285e4612ad24462149a4d64cc32c090a491
Author: Werner Koch <wk at gnupg.org>
Date: Wed Dec 2 18:47:50 2015 +0100
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 at gnupg.org>
---
agent/gpg-agent.c | 16 ----------------
configure.ac | 23 ++---------------------
dirmngr/dirmngr.c | 13 -------------
dirmngr/http.c | 4 ----
scd/scdaemon.c | 11 -----------
5 files changed, 2 insertions(+), 65 deletions(-)
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 04b03d3..b60287d 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 bd84633..81a1eca 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 97d2e15..f249d68 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 6427951..74b6911 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 0f92efe..e8218ca 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list