aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Flush data before clearing the confidential flag.Werner Koch2023-06-161-1/+3
| | | | | | | | | | | | | * src/context.c (assuan_end_confidential): Flush data. -- This is required so that for example gpg-agent won't reveal a password in a log file if requested via get_passphrase --data X X X X (Note that --data is required in any case because the default of returing it with the OK line can't be secured).
* build: Better cross build support.NIIBE Yutaka2023-06-161-3/+3
| | | | | | | | | | * configure.ac: Use AX_CC_FOR_BUILD. * src/Makefile.am: Use EXEEXT_FOR_BUILD. * m4/ax_cc_for_build.m4: New from libgpg-error. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix an explanation for socket on Windows.NIIBE Yutaka2023-06-161-1/+1
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix the previous commit.NIIBE Yutaka2023-06-161-1/+1
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Don't access NULL by wipememory.NIIBE Yutaka2023-06-161-1/+1
| | | | | | | | | | | * src/assuan-inquire.c (assuan_inquire): Check mb->buf. -- There is a case where mb->buf may be cleared already by get_membuf. Fixes-commit: d812e28af637144d078005887cb7519d7a2d0c58 Signed-off-by: NIIBE Yutaka <[email protected]>
* client: Wipe the inbound buffer when CONFIDENTIAL.NIIBE Yutaka2023-06-161-0/+2
| | | | | | | | | * src/client.c (assuan_transact): Wipe the buffer. -- GnuPG-bug-id: 5977 Signed-off-by: NIIBE Yutaka <[email protected]>
* server,client: Wipe the outbound buffer when CONFIDENTIAL.NIIBE Yutaka2023-06-161-0/+2
| | | | | | | | | * src/assuan-buffer.c (assuan_send_data): Wipe the buffer. -- GnuPG-bug-id: 5977 Signed-off-by: NIIBE Yutaka <[email protected]>
* server: Wipe out the memory used by assuan_inquire if CONFIDENTIAL.NIIBE Yutaka2023-06-161-1/+7
| | | | | | | | | | * src/assuan-inquire.c (assuan_inquire): Wipe the memory and inbound buffer. -- GnuPG-bug-id: 5977 Signed-off-by: NIIBE Yutaka <[email protected]>
* Release 2.5.5.libassuan-2.5.5Werner Koch2021-03-222-2/+2
|
* Support Unicode when starting servers on Windows.Werner Koch2021-03-093-21/+36
| | | | | | | | | * src/assuan-socket.c (utf8_to_wchar): Rename to (_assuan_utf8_to_wchar): this and give global scope. * src/system-w32.c (__assuan_spawn): Use CreateProcessW. -- GnuPG-bug-id: 4398
* m4: Update with newer autoconf constructs.NIIBE Yutaka2020-11-171-1/+2
| | | | | | * src/libassuan.m4: Replace AC_HELP_STRING to AS_HELP_STRING. Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix crash when logging.Ben Kibbey2020-11-121-1/+1
| | | | | | * src/assuan-logging.c (_assuan_log_control_channel): Use gpgrt_malloc. Signed-off-by: Ben Kibbey <[email protected]>
* Release 2.5.4libassuan-2.5.4Werner Koch2020-10-233-3/+3
|
* Support Unicode socket file names under Windows.Werner Koch2020-10-202-10/+6
| | | | | | | | | | * src/assuan-socket.c [W32]: Always use CreateFileW. Drop support for Windows-CE (read_port_and_nonce): Use gpgrt_fopen. -- GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <[email protected]>
* build: Use Requires.private and Libs.private.NIIBE Yutaka2020-02-251-1/+2
| | | | | | | | | * configure.ac (LIBASSUAN_CONFIG_LIBS): Remove NETLIBS. * src/libassuan.pc.in: Distinguish static link. * tests/Makefile.am: Don't need to link NETLIBS. GnuPG-bug-id: 4624 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Fix bad-function-cast warning.Werner Koch2019-11-271-0/+7
| | | | | | | | | | | | | * src/w32-fd-t.inc.h (assuan_fd_from_posix_fd): Avoid compiler warning. -- The actual warning was: warning: cast from function call of type 'intptr_t' {aka 'int'} to non-matching type 'void *' [-Wbad-function-cast] return (assuan_fd_t)(HANDLE) _get_osfhandle (fd); Signed-off-by: Werner Koch <[email protected]>
* doc: Minor comment cleanup and beautification.Werner Koch2019-11-272-63/+81
| | | | --
* libassuan.pc: Fix to have -I for Cflags and -L for Libs.NIIBE Yutaka2019-08-201-2/+2
| | | | | | | | * src/libassuan.pc.in (Cflags): Add -I flag. (Libs): Add -L flag. GnuPG-bug-id: 4678 Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Use {CFLAGS,CPPFLAGS,LDFLAGS}_FOR_BUILD for helper programs.Daniel Kahn Gillmor2019-07-181-1/+2
| | | | | | | | | | | | | | | | | | * src/Makefile.am: pass distinct build flags to CC_FOR_BUILD. -- We don't want to use the standard CFLAGS, CPPFLAGS, and LDFLAGS for build helper tools because when cross-compiling they might include choices that only make sense for the platform we are aiming to build for. That said, the environment might offer standard build flags for non-cross-built helper tools too. So we include those flags in the right place here. Debian-bug-id: 932213 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Release 2.5.3libassuan-2.5.3Werner Koch2019-02-113-4/+4
|
* socks5: Fix compiler warning on Windows.Werner Koch2019-01-251-1/+1
| | | | | | | | | * src/assuan-socket.c (socks5_connect): Use cast macro to get the hightest socket number. -- GnuPG-bug-id: 3381 Signed-off-by: Werner Koch <[email protected]>
* socks5: Implement timeout to detect bogus service.NIIBE Yutaka2019-01-251-0/+26
| | | | | | | | | | | * src/assuan-socket.c (TIMEOUT_NOT_WAITING_SOCKS5_FOREVER): New. (socks5_connect): Call 'select' in order to not waiting response forever. -- GnuPG-bug-id: 3381 Signed-off-by: NIIBE Yutaka <[email protected]>
* Release 2.5.2libassuan-2.5.2Werner Koch2018-12-132-3/+3
| | | | | | * configure.ac: Bump LT version to C8/A8/R2. Signed-off-by: Werner Koch <[email protected]>
* libassuan.vers: Remove duplicates.NIIBE Yutaka2018-11-141-2/+0
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* server: Don't call _assuan_waitpid on server side.NIIBE Yutaka2018-11-142-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * src/server.c (_assuan_server_finish): Never call waitpid here. * src/assuan-socket-server.c (accept_connection_bottom): Indentation. -- The waitpid/wait only makes sense by parent catching its child process. Since the commit 93595de1ede96dedfcaa93c7442536a2cde0b6ef (for version 0.6.5, in 2004-04-21), CTX->PID on server side has client PID. In the commit cb53f862ff2a864da822d1c16d3df6a02157608b (2009-11-19), call of _assuan_waitpid was introduced in assuan_server_finish, but this call always fails because the process is not a child process of server. (If we could catch exit of non-child process, it might cause a dead lock, since client does call waitpid too.) The indentation fix is to show the place where PID is assigned. Signed-off-by: NIIBE Yutaka <[email protected]>
* socket: Use union for sockaddr access.NIIBE Yutaka2018-11-081-15/+21
| | | | | | | | | | | | | | | | | | | | | | | * src/assuan-socket.c (socks5_connect, use_socks): Use union to access, instead of using cast to the pointer. -- In some machine like 32-bit ARM, alignment requirement of struct sockaddr and struct sockaddr_in (or struct sockaddr_in6) is different. Although it is completely valid to use the value of the address by cast here, because the object should be allocated by struct sockaddr_in or struct sockaddr_in6 to be referred by struct sockaddr *. But compiler doesn't assume such a usage, thus, emits warnings. The API with struct sockaddr * is a bit difficult thing. I examined GNU C library for the implementation of the connect function, it uses transparent union, the GCC feature. It would be too much, if we do same thing here. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Update gpg-error.m4 and libassuan.m4.NIIBE Yutaka2018-11-021-0/+1
| | | | | | | * m4/gpg-error.m4: Update to 2018-11-02. * src/libassuan.m4: Add AC_MSG_NOTICE. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Update gpg-error.m4 and libassuan.m4.NIIBE Yutaka2018-10-291-9/+9
| | | | | | | * m4/gpg-error.m4: Update to 2018-10-26. * src/libassuan.m4: Follow the change of gpgrt-config. Signed-off-by: NIIBE Yutaka <[email protected]>
* libassuan.m4: Better backward compatibility support.NIIBE Yutaka2018-10-261-3/+15
| | | | | | | * m4/gpg-error.m4: Update. * src/libassuan.m4: Don't assume libassuan-config is newer. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix libassuan.m4.NIIBE Yutaka2018-10-261-1/+1
| | | | | | * src/libassuan.m4: Use AC_PATH_PROG to detect libassuan-config. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix previous commit.NIIBE Yutaka2018-10-261-0/+1
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Improve libassuan.m4.NIIBE Yutaka2018-10-261-4/+4
| | | | | | | | * src/libassuan.m4: Don't try gpgrt-config when LIBASSUAN_CONFIG set. Fall back to detecting libassuan-config, when gpgrt-config doesn't work well. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix previous commit.NIIBE Yutaka2018-10-251-1/+1
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Relax requirements.NIIBE Yutaka2018-10-251-4/+10
| | | | | | | | | * m4/gpg-error.m4: Update from libgpg-error 1.33. * src/libassuan.m4: Don't require AM_PATH_GPG_ERROR. Only when gpgrt-config is available and works well, use it. * configure.ac (AM_PATH_GPG_ERROR): No requirement any more. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Use LIBASSUAN_CONFIG_LIBS (instead of LIB).NIIBE Yutaka2018-10-252-3/+3
| | | | | | | | | * configure.ac (LIBASSUAN_CONFIG_LIBS): Rename from *_LIB. (LIBASSUAN_CONFIG_EXTRA_LIBS): Remove. * src/libassuan-config.in: Follow the change. * src/libassuan.pc.in: Likewise. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix libassuan.pc.NIIBE Yutaka2018-10-241-1/+1
| | | | | | * src/libassuan.pc.in: Fix typo. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix previous commit.NIIBE Yutaka2018-10-241-2/+1
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Compatibility to pkg-config.NIIBE Yutaka2018-10-241-0/+10
| | | | | | * src/libassuan-config.in: Support --variable and --modversion. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Make libassuan.m4 use gpg-error-config.NIIBE Yutaka2018-10-241-10/+10
| | | | | | | | | | * src/libassuan.m4: Use gpg-error-config. -- The option --with-libassuan-prefix let it use libassuan-config. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Provide libassuan.pc, generated by configure.NIIBE Yutaka2018-10-243-5/+21
| | | | | | | | | | | * configure.ac (PACKAGE, VERSION): Remove. Generate src/libassuan.pc. * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. (assuan.h): Use PACKAGE_VERSION and VERSION_NUMBER vars. * src/libassuan-config.in: Use @PACKAGE_VERSION@. * src/libassuan.pc.in: New. Signed-off-by: NIIBE Yutaka <[email protected]>
* Silence two minor warning on Windows.NIIBE Yutaka2018-02-262-4/+2
| | | | | | | | * src/assuan-defs.h [HAVE_W64_SYSTEM] (SOCKET2HANDLE): Care for size of integer. * src/stpcpy.c: No K&R anymore. Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix previous commit.NIIBE Yutaka2018-02-231-2/+2
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* Better credential support for other OSes.NIIBE Yutaka2018-02-201-33/+63
| | | | | | | | | | | | | | | | * configure.ac (HAVE_UCRED_H, HAVE_SYS_UCRED_H): Check these headers unconditionally. (HAVE_SO_PEERCRED, HAVE_LOCAL_PEEREID): Remove. (HAVE_STRUCT_SOCKPEERCRED_PID): New. (HAVE_GETPEEREID): New. * src/assuan-socket-server.c (accept_connection_bottom): Add support for OpenBSD, macOS, and FreeBSD. -- Code in gpg-agent/command-ssh.c are integrated. Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix regression in ASSUAN_SYSTEM_NPTH_IMPL.Werner Koch2017-12-071-2/+2
| | | | | | | | | * src/assuan.h.in (ASSUAN_SYSTEM_NPTH_IMPL): A void fucntion can't assign. -- Fixes-commit: a627350eed5dc32bac41195462f27dee1987b0f5 Signed-off-by: Werner Koch <[email protected]>
* Release 2.5.0libassuan-2.5.0Werner Koch2017-12-073-3/+3
| | | | Signed-off-by: Werner Koch <[email protected]>
* Allow change of system hooks for assuan_sock_...NIIBE Yutaka2017-12-074-2/+16
| | | | | | | | | | | * src/assuan-socket.c (assuan_sock_set_system_hooks): New. * src/assuan.h.in (assuan_sock_set_system_hooks): New prototype. * src/libassuan.def: Add new function. * src/libassuan.vers: Add new function. -- Co-authored-by: [email protected] Signed-off-by: Werner Koch <[email protected]>
* Use wrapped __assuan_usleep for _assuan_npth_usleep.NIIBE Yutaka2017-12-061-1/+3
| | | | | | | | | | | | | | | * src/assuan.h.in (_assuan_npth_usleep): Wrap __assuan_usleep. -- Assuan should support system hooks for nPth before npth_init. Before the call of npth_init, npth_unprotect and npth_protect do nothing, whiile npth_usleep may crash. No use of npth_usleep is better. Signed-off-by: NIIBE Yutaka <[email protected]>
* Wrap assuan_close for nPth.NIIBE Yutaka2017-11-301-6/+10
| | | | | | | | | | | * src/assuan.h.in (_assuan_npth_close): New. (_assuan_system_npth): Use _assuan_npth_close. -- In some situation, closesocket on Windows may block. Signed-off-by: NIIBE Yutaka <[email protected]>
* Add special check version request \001\001Werner Koch2017-11-152-1/+3
| | | | | | | * 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]>
* Add an SPDX tag to all core files.Werner Koch2017-11-1554-580/+631
| | | | --