aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Support hostname based SOCKS5 connection.Werner Koch2015-10-267-80/+324
| | | | | | | | | | | | | | | | | | | | | | | * src/assuan.h.in (ASSUAN_SOCK_SOCKS): New. (ASSUAN_SOCK_TOR): New. (assuan_sock_connect_byname): New. * src/libassuan.def, src/libassuan.vers: Add that function. * src/assuan-socket.c (socks5_connect): Add args socksport, credentials, hostname, and hostport. Implement user/password authentication and domainname address type. Change callers accordingly. (_assuan_sock_connect_byname): New. (assuan_sock_connect_byname): New. * tests/socks5.c (main): Add options --byname, --user, and --pass. -- The assuan_sock_connect_byname may eventually be extended to work without Tor or SOCKS by using getaddrinfo. Or we move that all to libgpgrt (aka libgpg-error). Signed-off-by: Werner Koch <[email protected]>
* Support SOCKS5 for assuan_sock_connect.Werner Koch2015-10-185-12/+496
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* Post release updatesWerner Koch2015-08-282-1/+5
|
* Release 2.3.0libassuan-2.3.0Werner Koch2015-08-287-10/+23
| | | | | | * configure.ac: Set LT version to C6/A6/R0. Signed-off-by: Werner Koch <[email protected]>
* Support Cygwin local sockets.Werner Koch2015-08-283-58/+299
| | | | | | | | | | | | | | | | | | | | * src/assuan-socket.c (cygwin_fdtable, cygwin_fdtable_cs): New. (is_cygwin_fd, insert_cygwin_fd, delete_cygwin_fd): New. (assuan_sock_init) [W32]: Init the CS. (assuan_sock_deinit) [W32]: Deinit the CS. (read_port_and_nonce): Add arg cygwin and detect Cygwin socket files. (_assuan_sock_set_flag): Add "cygwin" flag. (_assuan_sock_get_flag): Ditto. (do_readn, do_writen): New. (_assuan_sock_bind): Create a Cygwin socket file depending on a socket flag. (_assuan_sock_connect): Handle the cygwin socket protocol. (_assuan_sock_check_nonce): Ditto. -- This code has not been tested. Signed-off-by: Werner Koch <[email protected]>
* Read up remaining lines in assuan_inquire after reaching MAXLENWerner Koch2015-08-282-11/+19
| | | | | | | | | | | | * src/assuan-inquire.c (assuan_inquire): Clear return args on error. Read up remaining lines after MAXLEN has been hit. -- If we would stop immediately at MAXLEN, as we did, the client would continue to send data which the server may consider as new Assuan commands. Signed-off-by: Werner Koch <[email protected]>
* Add configure option --enable-build-timestamp.Werner Koch2015-08-251-1/+10
| | | | | | | | | | | | * configure.ac (BUILD_TIMESTAMP): Set to "<none>" by default. -- This is based on libgpg-error commit d620005fd1a655d591fccb44639e22ea445e4554 but changed to be disabled by default. Check there for some background. Signed-off-by: Werner Koch <[email protected]>
* Wipe the context before releasing as an extra safeguard.Werner Koch2015-08-072-1/+15
| | | | | | | | | | | | * src/assuan-defs.h (wipememory2, wipememory): New. Taken from GnuPG. * src/assuan.c (assuan_release): Wipe the context. -- The assuan context has buffers which may carry senitive information. These buffers could be wiped out with each flush but that is too expensive. Thus we only wipe them when freeing the context. Signed-off-by: Werner Koch <[email protected]>
* Add assuan_sock_set_flag and assuan_sock_get_flag.Werner Koch2015-06-307-11/+95
| | | | | | | | | | | | | | | | * src/assuan-socket.c (_assuan_sock_set_flag): New. (assuan_sock_set_flag): New. (_assuan_sock_get_flag, assuan_sock_get_flag): New. * src/assuan.h.in (assuan_sock_set_flag): New. (assuan_sock_get_flag): New. * src/libassuan.def: Add them. * src/libassuan.vers: Add them. -- These new functions are intended for a Cygwin socket emulation. This commit merely introduces a generic framework. Signed-off-by: Werner Koch <[email protected]>
* Return GPG_ERR_SOURCE_ASSUAN on errors with no CTX.Werner Koch2015-06-261-1/+1
| | | | | | | * src/assuan-defs.h (_assuan_error): Use error source Assuan if no CTX is given. Signed-off-by: Werner Koch <[email protected]>
* Do not segv if NULL is passed for CTX in sendfd and receivefd.Werner Koch2015-06-263-4/+12
| | | | | | | | | | | * src/assuan-buffer.c (assuan_sendfd): Check that CTX is not NULL. (assuan_receivefd): Ditto. -- This change is to align the behaviour with that of assuan_send_data. Suggested-by: Andre Heinecke. Signed-off-by: Werner Koch <[email protected]>
* Fix documentation for assuan_inquire.Neal H. Walfield2015-06-011-6/+6
| | | | | * doc/assuan.texi (assuan_inquire): Fix and improve description of this function.
* Post release updatesWerner Koch2015-05-122-1/+5
| | | | --
* Release 2.2.1libassuan-2.2.1Werner Koch2015-05-122-2/+6
|
* clean up assuan documentationDaniel Kahn Gillmor2015-05-071-9/+9
| | | | | | | | | * doc/assuan.texi: fix documentation -- Reading up on assuan to create python bindings uncovered a few bugs in the documentation.
* Documentation cleanups.Neal H. Walfield2015-05-071-102/+136
|
* w32: Use -static-libgcc to avoid linking to libgcc_s_sjlj-1.dll.Werner Koch2015-01-301-0/+4
| | | | | | | | | | | | | | | | * src/Makefile.am (extra_ltoptions): New. (libassuan_la_LDFLAGS): Use it. -- Since gcc 4.8 there is a regression in that plain C programs may link to libgcc_s.a which has a dependency on libgcc_s_sjlj.dll. This is for example triggered by using long long arithmetic on a 32 bit Windows (e.g symbol __udivdi3). This patch does not change anything right now but we add it anyway in case long long will ever be used. Signed-off-by: Werner Koch <[email protected]>
* Update config.* and other build-aux filesWerner Koch2015-01-286-1712/+4589
| | | | --
* Require the use of automake 1.14Werner Koch2015-01-282-4/+5
| | | | | | * configure.ac (AM_INIT_AUTOMAKE): Add serial-tests. * src/Makefile.am (INCLUDES): Rename to AM_CPPFLAGS and remove the nonexistent ../include/.
* w32: Fix assuan_connect_fdWerner Koch2015-01-281-10/+21
| | | | | | | | | | | | * src/assuan-socket-connect.c (assuan_socket_connect_fd): Map fd to assuan_fd_t. -- This function is actually not used by GnuPG. The function should have taken an assuan_fd but given that it did not we use our usual mapping from Windows libc fds to an assuan fd. Signed-off-by: Werner Koch <[email protected]>
* Fix gcc warning about unused values.Werner Koch2015-01-281-23/+24
| | | | | | | | | | * src/debug.h: Remove traling ", 0" expression part where not useful. -- gcc 4.9 detected this. Probably taken from gpgme but used differently. Signed-off-by: Werner Koch <[email protected]>
* doc: Fix syntax problems in lgpg.tex and gpl.texiWerner Koch2015-01-282-17/+11
| | | | --
* Fix WSAEADDRINUSE EADDRINUSE mismatch.Werner Koch2015-01-272-3/+5
| | | | | | | | | | | | * src/w32-sock-nonce.inc.h (EADDRINUSE): Avoid redefining. * src/assuan-socket.c (_assuan_sock_bind): Set error to EADDRINUSE. -- With the latest mingw-w64 EADDRINUSE is defined but to a different value than WSAEADDRINUSE. We need to use EADDRINUSE becuase that is what applications expect. Signed-off-by: Werner Koch <[email protected]>
* Comment updatesWerner Koch2015-01-271-14/+16
| | | | --
* Post release updatesWerner Koch2014-12-113-5/+8
| | | | --
* Release 2.2.0libassuan-2.2.0Werner Koch2014-12-113-8/+9
| | | | | | * configure.ac: Set LT version to C5/A5/R0. (AM_INIT_AUTOMAKE): Add options. * Makefile.am (AUTOMAKE_OPTIONS): Remove.
* Do not allow LFs in the redirected name.Werner Koch2014-11-281-1/+8
| | | | | | | | * src/assuan-socket.c (eval_redirection): Stop parsing at the first LF. -- Avoiding LFs in file names is better for logging.
* Implement socket file redirection.Werner Koch2014-11-288-24/+286
| | | | | | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_FUNC): Check for stat. * src/assuan-socket.c (SUN_LEN): Add. (eval_redirection): New. (_assuan_sock_connect) [!W32]: Implement socket file redirection. (_assuan_sock_set_sockaddr_un): New. (assuan_sock_set_sockaddr_un): New. -- This feature is useful to allow sockets with standard names even on file system which do not supports socket and to help with shared home directories. For example to use GnuPG 2.1 with shared home directories one will be abale to do: rm ~/.gnupg/S.gpg-agent || true printf "%%Assuan%%\nsocket=${HOME}/.gnupg/S.gpg-agent_${HOSTNAME}\n" \ > ~/.gnupg/S.gpg-agent Signed-off-by: Werner Koch <[email protected]>
* Post release updates.Werner Koch2014-11-072-1/+4
| | | | --
* Release 2.1.3.libassuan-2.1.3Werner Koch2014-11-072-2/+4
| | | | * configure.ac: Set LT version to C4/A4/R3.
* w32: Remove I/O delays due to our 100ms delay after an EAGAIN.Werner Koch2014-11-072-0/+46
| | | | | | | * src/system-w32.c (__assuan_read): Retry using select. Map WSAECONNRESET to EPIPE. (__assuan_write): Retry using select. * src/assuan-buffer.c (readline) [W32]: Return EOF instead of EPIPE.
* Post release updatesWerner Koch2014-08-172-1/+5
| | | | --
* Release 2.1.2.libassuan-2.1.2Werner Koch2014-08-173-4/+8
| | | | * configure.ac: Set LT version to C4/A4/R2.
* Update build systemWerner Koch2014-08-172-38/+116
| | | | | * autogen.sh: Add --find-version stuff. Taken from GnuPG. * configure.ac: Change accordingly
* Update copyright infoWerner Koch2014-08-174-28/+78
| | | | --
* Fix possible segv in a call to _assuan_debug.Werner Koch2014-08-171-1/+1
| | | | | | | | | * src/context.c (assuan_set_error): Do not pass NULL for %s in the trace function. -- This likely fixes GnuPG-bug-id: 1659
* Avoid a vasprintf call if tracing has not been enabled.Werner Koch2014-06-301-12/+16
| | | | * src/debug.c (_assuan_debug): Check wether CAT want to be logged.
* Fix NULL deref when tracing is enabled and malloc fails.Werner Koch2014-04-162-7/+12
| | | | | | | | | * src/debug.h (TRACE_ERR): Check CTX before a deref. * src/assuan-defs.h (_assuan_error): Turn into an inline function and check CTX before a deref. -- Found by Hans-Christoph Steiner with cppcheck.
* Use the generic autogen.sh script.Werner Koch2014-01-103-81/+202
| | | | | | * autogen.rc: New. * Makefile.am (EXTRA_DIST): Add it. * autogen.sh: Update from GnuPG.
* Move helper scripts to build-aux.Werner Koch2014-01-1012-14/+15
| | | | | | | | | | * compile, config.guess, config.rpath, config.sub, depcomp, ltmain.sh * doc/mdate-sh, doc/texinfo.tex, install-sh, missing: Move to build-aux/. * Makefile.am (EXTRA_DIST): Remove config.rpath - it is implicitly distributed. * configure.ac (AC_CONFIG_AUX_DIR): New. (AM_SILENT_RULES): New.
* Update libtool and autogen.sh.Werner Koch2014-01-065-108/+316
| | | | | | | | | | | -- This is the version from current libgpg-error which already has the changes done here plus these: bf0d67db * Update libtool to support Android. dd05f379 * Fix libtool 2.4.2 to correctly detect .def files. 6971fe55 * Update to libtool 2.4.2.
* Add build support for ppc64le.Werner Koch2013-12-033-68/+113
| | | | | | | | * config.guess, config.sub: Update to latest version (2013-11-29). * m4/libtool.m4: Add patches for ppc64le. -- We don't want to update libtool, thus we use patches supplied by IBM.
* Post release version bump.Werner Koch2013-06-242-1/+5
| | | | --
* Release 2.1.1.libassuan-2.1.1Werner Koch2013-06-242-2/+5
| | | | * configure.ac: Set LT version to C4/A4/R1.
* Changes to support W64.Werner Koch2013-06-193-8/+12
| | | | | | | | | | | | * configure.ac (have_dosish_system): Set for W64. * src/assuan-defs.h (SOCKET2HANDLE, HANDLE2SOCKET): Add versions for W64. * src/assuan-handler.c (assuan_command_parse_fd) [W64]: Use strtoull to parse an FD. -- Note that these changes are not complete but merely sufficient to allow building of GpgEX.
* Add hack to have different names for 64 bit Windows DLLs.Werner Koch2013-06-171-0/+13
| | | | | | | | | | | | | | | | * ltmain.sh: Prefix the SO number for W64 with a "6". -- We need to stick to libtool 2.4.2 anyway, thus we take the easy way and hack libtool instead of adding "-release 6" to the Makefile. This also avoids an extra dash before the 6 and thus yields a prettier name than the one produced by the -release option. The header files and def files are supposed to be identical for w32 and w64 thus we don't need to do any special code for them. Having a different namespace for 64 bit DLLs is such a good idea that I hope this or a similar feature will be provided by future libtool versions.
* Support building for w64.Werner Koch2013-06-171-1/+4
|
* Post release version bump.Werner Koch2013-02-222-1/+5
| | | | --
* Release version 2.1.0.libassuan-2.1.0Werner Koch2013-02-224-7/+13
| | | | * configure.ac: Bump LT version to C4/A4/R0.
* Add assuan_check_version and ASSUAN_VERSION_NUMBER.Werner Koch2013-02-229-28/+247
| | | | | | | | | | | | | | | | | | | | * src/assuan.c (assuan_check_version): New. (digitp, parse_version_number, parse_version_string) (compare_versions): New. Taken from libksba. * configure.ac (VERSION_NUMBER): New ac_subst. * src/Makefile.am (assuan.h): Pass VERSION and VERSION_NUMBER to mkheader. * src/assuan.h.in (ASSUAN_VERSION, ASSUAN_VERSION_NUMBER): New macros. (assuan_check_version): New prototype. * src/libassuan.def, src/libassuan.vers: Add assuan_check_version. * src/mkheader.c (write_special, main): Support version and version_number. * tests/version.c: New. * tests/Makefile.am (TESTS): Add version. -- All our other libs have a version number check, thus we should have one in Libassuan as well.