mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
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>
This commit is contained in:
parent
28195f8d27
commit
69db3285e4
@ -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);
|
||||
|
23
configure.ac
23
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
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user