aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Post release updates.Werner Koch2017-11-162-1/+5
| | | | --
* Release 2.4.4libassuan-2.4.4Werner Koch2017-11-163-4/+15
| | | | Signed-off-by: Werner Koch <[email protected]>
* Add special check version request \001\001Werner Koch2017-11-153-1/+4
| | | | | | | * src/assuan.c (assuan_check_version): Handle version "\001\001" * tests/version.c (main): Print extended version info. Signed-off-by: Werner Koch <[email protected]>
* Let configure create the VERSION file.Werner Koch2017-11-154-13/+36
| | | | | | | | | | * autogen.sh: Update from Libgpg-error * configure.ac: Create file VERSION. * Makefile.am (dist-hook): Do not create VERSION. (EXTRA_DIST): Add VERSION. -- GnuPG-bug-id: 3283
* Add an SPDX tag to all core files.Werner Koch2017-11-1556-580/+633
| | | | --
* Fix last commit.Werner Koch2017-11-151-2/+2
| | | | | | | | | * src/system-posix.c (__assuan_usleep): Its ysec and usecs -- Copy+Paste without even compiling was pretty dumb. Signed-off-by: Werner Koch <[email protected]>
* Fix the nanosleep case of __assuan_usleep.Werner Koch2017-11-152-3/+7
| | | | | | | | | | | * src/system-posix.c (__assuan_usleep): Handle full seconds. -- This function would have failed for any value >= 1000000 because the nsec field is limited to 999999999 and the function fails for larger values. Signed-off-by: Werner Koch <[email protected]>
* We can't support fd passing, if the system doesn't support it.NIIBE Yutaka2017-09-061-11/+19
| | | | | | | | | | * configure.ac (check_descriptor_passing): New. (use_descriptor_passing): Use check_descriptor_passing. -- GnuPG-bug-id: 3384 Signed-off-by: NIIBE Yutaka <[email protected]>
* Define INADDR_LOOPBACK if not defined.NIIBE Yutaka2017-09-061-0/+5
| | | | | | | | | | | | | | | | | | * src/assuan-socket.c (INADDR_LOOPBACK): Define. -- INADDR_LOOPBACK is not defined in some systems. When defined, its byte-order is not clearly defined in any specifications. So, best portable way is not to use the macro INADDR_LOOPBACK at all but use 0x7f000001 directly. Nevertheless, for systems which use libassuan, it's host byte-order. So, adding the definition works. GnuPG-bug-id: 2447 Suggested-by: Peter Dyballa Signed-off-by: NIIBE Yutaka <[email protected]>
* configure: Add flag to disable documentation build.Marcus Brinkmann2017-06-192-1/+19
| | | | | | | | | * configure.ac: Add new option --disable-doc. (BUILD_DOC): New automake conditional. * Makefile.am (SUBDIRS): Make doc optional based on BUILD_DOC. (DISTCHECK_CONFIGURE_FLAGS): New variable. Signed-Off-By: Marcus Brinkmann <[email protected]>
* Use gpgrt_free to release memory allocated by gpgrt_asprintf.NIIBE Yutaka2017-05-312-6/+6
| | | | | | | | * src/assuan-logging.c (_assuan_log_control_channel): Use gpgrt_free. * src/debug.c (_assuan_debug, _assuan_debug_add, _assuan_debug_end): Likewise. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Use macOS' compatibility macros to enable all features.Justus Winter2017-03-081-1/+2
| | | | | | | | | | | | * configure.ac: On macOS, use the compatibility macros to expose every feature of the libc. This is the equivalent of _GNU_SOURCE on GNU libc. -- Not defining this leads to compilation errors or superfluous warnings on macOS. GnuPG-bug-id: 2910 Signed-off-by: Justus Winter <[email protected]>
* EPROTO portability fix.Ben Kibbey2016-09-041-2/+2
| | | | | | | | | | * src/assuan-socket.c(socks5_connect): Return EPROTONOSUPPORT rather than EPROTO. -- OpenBSD, and maybe other systems, doesn't define EPROTO. Signed-off-by: Ben Kibbey <[email protected]>
* Post release updatesWerner Koch2016-07-142-1/+5
| | | | --
* Release 2.4.3.libassuan-2.4.3Werner Koch2016-07-145-6/+28
| | | | | | | * configure.ac: Set LT version to C7/A7/R3. * Makefile.am (distcheck-hook): New. Signed-off-by: Werner Koch <[email protected]>
* build: Update config.{guess,sub} to {2016-05-15,2016-06-20}.Werner Koch2016-07-132-77/+128
| | | | | | | * build-aux/config.guess: Update. * build-aux/config.sub: Update. Signed-off-by: Werner Koch <[email protected]>
* Improve test for inet_pton on Solaris.Werner Koch2016-07-131-0/+10
| | | | | | | | * configure.ac (HAVE_INET_PTON): Add a fallback test. -- GnuPG-bug-id: 1476 Signed-off-by: Werner Koch <[email protected]>
* Allow socket redirection with assuan_socket_connect.Werner Koch2016-07-131-7/+5
| | | | | | | | | * src/assuan-socket-connect.c (assuan_socket_connect): Use set_socketaddr function. -- GnuPG-bug-id: 2253 Signed-off-by: Werner Koch <[email protected]>
* Speedup closing fds before an exec.Werner Koch2016-07-131-0/+40
| | | | | | | | | | | * src/system-posix.c [__linux__]: Include dirent.h. (get_max_fds) [__linux__]: Return the actual used highest fd. -- This is the same code as introduced with the GnuPG commit 512c56af43027149e8beacf259746b8d7bf9b1a2 Signed-off-by: Werner Koch <[email protected]>
* Fix distcheck.Justus Winter2016-07-051-1/+1
| | | | | | * tests/Makefile.am (EXTRA_DIST): Drop compiled test. Signed-off-by: Justus Winter <[email protected]>
* Fix minor memory leaksWerner Koch2016-06-254-19/+24
| | | | | | | | | | | * src/assuan-pipe-connect.c (socketpair_connect): Always free CHILD_FDS. * src/assuan-uds.c (uds_sendfd): Clear CONTROL_U to silence Valgrind. * tests/fdpassing.c (main): Free FNAME. * src/assuan-handler.c (dispatch_command): Remove dead assignment. Signed-off-by: Werner Koch <[email protected]>
* Improve getting of max. number of open fds.Werner Koch2016-01-154-33/+76
| | | | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_FUNCS): Add getrlimit. * src/assuan-pipe-connect.c (MAX_OPEN_FDS): Remove non-used macro. * src/system.c (MAX_OPEN_FDS): Remove non-used macro. * src/system-posix.c: Include stdint.h, sys/time.h, sys/resource.h. (MAX_OPEN_FDS): Remove non-used macro. (get_max_fds): New. Taken from gnupg/common/exechelp-posix.c. (__assuan_spawn): Use it here. -- This is related to GnuPG-bug-id: 2071 Changing of get_max_fds from LPGLv3+ to LGPLv2+ approved by me as sole author or that code. Signed-off-by: Werner Koch <[email protected]>
* Post release updates.Werner Koch2015-12-022-1/+5
| | | | --
* Release 2.4.2.libassuan-2.4.2Werner Koch2015-12-022-2/+2
| | | | | | * configure.ac: Bump LT version to C7/A7/R2. Signed-off-by: Werner Koch <[email protected]>
* Fix typos found by codespell.Justus Winter2015-12-017-7/+7
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* New feature to test for SOCKS5 proxy availability.Werner Koch2015-11-274-7/+65
| | | | | | | | | | * src/assuan-socket.c (socks5_connect): Add special treatment for empty hostnames. (_assuan_sock_connect_byname): Add feature to test for proxy availibility. * tests/socks5.c (main): Add option --have-proxy. Signed-off-by: Werner Koch <[email protected]>
* Protect connect system hook against blocking (nPth).Werner Koch2015-11-262-1/+9
| | | | | | * src/assuan.h.in (ASSUAN_SYSTEM_NPTH_IMPL): Add wrapper for connect. Signed-off-by: Werner Koch <[email protected]>
* Do not use size_t with _assuan_read.Werner Koch2015-11-261-1/+1
| | | | * src/assuan-socket.c (do_readn): Use ssize_t for N.
* Post release updatesWerner Koch2015-11-232-1/+5
| | | | --
* Release 2.4.1.libassuan-2.4.1Werner Koch2015-11-232-2/+6
| | | | * configure.ac: Bump LT version to C7/A7/R1.
* Make socks5 test case a bit more robust.Werner Koch2015-11-231-12/+18
| | | | | * tests/socks5.c (main): Call gpgrt_init. Check for write and read errors. Allow building of some parts even w/o getaddrinfo.
* Also try port 9150 in Tor mode.Werner Koch2015-11-211-0/+10
| | | | | | | | * src/assuan-socket.c (TOR_PORT2): New. (_assuan_sock_wsa2errno): Map WSAECONNREFUSED. (socks5_connect): Fall back to TOR_PORT2. Signed-off-by: Werner Koch <[email protected]>
* Fix windows build with mingw-w64 2.0.xAndre Heinecke2015-11-211-0/+24
| | | | * src/assuan-socket.c: Add errno values not defined by mingw-w64 2.0
* Post release updates.Werner Koch2015-11-032-1/+5
| | | | --
* Release 2.4.0libassuan-2.4.0Werner Koch2015-11-032-6/+6
| | | | | | * configure.ac: Bump LT version to C7/A7/Ro. Signed-off-by: Werner Koch <[email protected]>
* w32: Use assuan_fd_t with the new socket functions.Werner Koch2015-11-031-5/+6
| | | | | | | | | * src/assuan-socket.c (socks5_connect): Use assuan_fd_t instead of int. (_assuan_sock_connect): Ditto. (_assuan_sock_connect_byname): Ditto. Signed-off-by: Werner Koch <[email protected]>
* Use asprintf function from libgpg-error.Werner Koch2015-11-037-234/+22
| | | | | | | | | | | | | | | | | | * configure.ac: Require libgpg-error 1.17. (vasprintf): Remove ac_replace. * src/assuan-defs.h [!HAVE_VASPRINTF]: Remove replace wrapper. * src/assuan-logging.c (_assuan_log_control_channel): (_assuan_log_control_channel): s/asprintf/gpgrt_asprintf/. * src/debug.c (_assuan_debug): s/vasprintf/gpgrt_vasprintf/. (_assuan_debug_begin): Ditto. (_assuan_debug_add): Ditto. s/asprintf/gpgrt_asprintf/. -- We plan to move more code into libgpg-error/gpgrt anyway thus this is a good start which also fixes this bug: GnuPG-bug-id: 1477 Signed-off-by: Werner Koch <[email protected]>
* Tests: Cope with broken HTTP servers.Werner Koch2015-10-261-2/+12
| | | | * tests/socks5.c (main): Use GET instead of HEAD
* 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.