diff options
author | Werner Koch <wk@gnupg.org> | 2015-10-18 16:24:34 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-10-18 16:37:52 +0200 |
commit | 85ece74a11718338dcd76d6e43ea8100183df02f (patch) | |
tree | d4e880ffea00bc432aff88b9331d387957340e5e /configure.ac | |
parent | 3aec1981cfd0a7b29750965c065a45ad928e66dc (diff) | |
download | libassuan-85ece74a11718338dcd76d6e43ea8100183df02f.tar.gz |
Support SOCKS5 for assuan_sock_connect.
* src/assuan-socket.c: Include netinet/in.h and arpa/inet.h.
(SOCKS_PORT, TOR_PORT): New constants.
(tor_mode): New variable.
(_assuan_sock_set_flag): Add flags "tor-mode" and "socks".
(_assuan_sock_get_flag): Ditto.
(do_readn, do_writen): Always build.
(socks5_connect): New.
(use_socks): New.
(_assuan_sock_connect): Divert to socks5_connect if requested.
* tests/socks5.c: New.
* configure.ac (AH_TOP): Define GPGRT_ENABLE_ES_MACROS.
(AC_CHECK_FUNC): Check for getaddrinfo.
* tests/Makefile.am (testtools): New. Add socks5.
(AM_LDFLAGS): Add -no-install for easier debugging.
--
A future extension might be a new assuan_sock_direct_connect call
takes the hostname as a string and returns a new socket. This allows
the proxy to do the resolving. However, in the long term these socket
wrapper should be moved to libgpgrt (aka libgpg-error).
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 040ce7f..8e8768f 100644 --- a/configure.ac +++ b/configure.ac @@ -126,6 +126,10 @@ AH_TOP([ /* Enable gpg-error's strerror macro under W32CE. */ #define GPG_ERR_ENABLE_ERRNO_MACROS 1 + +/* Provide the es_ macro for estream. */ +#define GPGRT_ENABLE_ES_MACROS 1 + ]) AH_BOTTOM([ @@ -356,7 +360,7 @@ AM_PATH_GPG_ERROR(1.8,, AC_MSG_ERROR([libgpg-error was not found])) # # Checks for library functions. # -AC_CHECK_FUNCS([flockfile funlockfile inet_pton stat]) +AC_CHECK_FUNCS([flockfile funlockfile inet_pton stat getaddrinfo]) # On some systems (e.g. Solaris) nanosleep requires linking to librl. # Given that we use nanosleep only as an optimization over a select |