aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-defs.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* doc/Marcus Brinkmann2007-08-091-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-08-09 Marcus Brinkmann <[email protected]> * assuan.texi (External I/O Loop): New chapter. src/ 2007-08-09 Marcus Brinkmann <[email protected]> * assuan.h (assuan_process_done, assuan_inquire_ext): New prototypes. * assuan-defs.h (struct assuan_context_s): New members in_process_next, in_command, inquire_cb, inquire_cb_data, inquire_r_buffer, inquire_r_buffer_len, inquire_membuf. (_assuan_inquire_ext_cb, _assuan_inquire_release): New prototypes. * assuan-handler.c (PROCESS_DONE): New macro. (dummy_handler, std_handler_nop, std_handler_cancel) (std_handler_option, std_handler_bye, std_handler_auth) (std_handler_reset, std_handler_end): Use PROCESS_DONE to optionally call assuan_process_done if CTX->in_process_next is true. (assuan_process_done, process_next): New functions. (assuan_process_next): Rewritten to support external event handling. * mkerrors: Do not clear high bits of -1 for old style EOF. * assuan-inquire.c (_assuan_inquire_release) (_assuan_inquire_ext_cb, assuan_inquire_ext): New functions. * assuan-pipe-server.c (_assuan_release_context): Call _assuan_inquire_release.
* Introduced new type for better support of W32 HADNLES vs. file descriptors.Werner Koch2007-07-121-13/+24
|
* 2007-07-08 Marcus Brinkmann <[email protected]>Marcus Brinkmann2007-07-081-4/+6
| | | | | | | | * assuan-defs.h (struct assuan_context_s): Have full peercred structure for HAVE_SO_PEERCRED. * assuan-connect.c (assuan_get_peercred) [!HAVE_SO_PEERCRED]: Do not try to set PID, UID and GID.
* Switched to LGPLv3.libassuan-1.0.2Werner Koch2007-07-051-6/+4
|
* 2007-07-04 Marcus Brinkmann <[email protected]>Marcus Brinkmann2007-07-041-4/+4
| | | | | | | | | Change _WIN32 to HAVE_W32_SYSTEM for consistency. * assuan-defs.h (struct assuan_context_s): Have full peercred structure even if not HAVE_SO_PEERCRED, but not if HAVE_W32_SYSTEM.
* A couple of Changes for WindowsWerner Koch2007-07-041-0/+2
|
* Various minor changes for W32Werner Koch2007-06-121-0/+7
|
* New functions assuan_set_io_monitor and assuan_register_post_cmd_notifyWerner Koch2006-11-141-0/+14
|
* portability fixeslibassuan-0.9.3Werner Koch2006-10-101-1/+1
|
* Fixed problems Nelson H. F. Beebe reported when doing build tests on severalWerner Koch2006-09-191-1/+3
| | | | | platforms.
* 2006-09-19 Marcus Brinkmann <[email protected]>Marcus Brinkmann2006-09-191-2/+2
| | | | | | | | | | * mkerrors (_assuan_error): Change return type to assuan_error_t. * assuan-buffer.c (_assuan_read_line): Change return type to assuan_error_t. Map returned value of -1. (_assuan_write_line): Change type of RC to assuan_error_t. * assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for prototypes.
* 2006-09-19 Marcus Brinkmann <[email protected]>Marcus Brinkmann2006-09-191-1/+1
| | | | | * assuan-defs.h (unsetenv): Define correctly.
* Preparing a new releaselibassuan-0.9.0Werner Koch2006-09-141-21/+30
|
* More tweaks for descriptor passing.Werner Koch2006-09-131-0/+1
| | | | | gpg-connect-agent may now be used as a test program.
* Integrated descriptor passing.Werner Koch2006-09-121-23/+27
|
* fixesWerner Koch2006-09-101-3/+3
|
* Changes to support gpg-error style error codes.Werner Koch2006-09-061-13/+36
|
* Fixed and clarified copyright noticesWerner Koch2005-10-241-1/+2
|
* 2005-10-08 Marcus Brinkmann <[email protected]>Marcus Brinkmann2005-10-081-0/+3
| | | | | | | | * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]: Define to _assuan_*. * setenv.c: Include "assuan-defs.h". (__add_to_environ): Make static.
* 2005-10-07 Marcus Brinkmann <[email protected]>Marcus Brinkmann2005-10-071-1/+12
| | | | | | | | | | | | | | | | | | | | * configure.ac: Invoke AC_CANONICAL_HOST. Define _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED and __EXTENSIONS__ on Solaris. Add stpcy as replacement function. Add setenv as replacement function (and check for unistd.h). src/ 2005-10-06 Marcus Brinkmann <[email protected]> * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype. (stpcpy) [!HAVE_STPCPY]: Likewise. * stpcpy.c: New LGPL'ed file from the GNU C Library. * setenv.c: New file. * assuan-domain-connect.c (read_int): New function. (write_int): New function. (domain_reader): Use read_int. (domain_sendfd): Use write_int.
* * assuan-util.c (assuan_set_flag, assuan_get_flag): New.Werner Koch2005-05-221-4/+12
| | | | | | | | | * assuan-defs.h (struct assuan_context_s): New field flags. * assuan.h (assuan_flag_t): New with one flag value ASSUAN_NO_WAITPID for now. * assuan-pipe-connect.c (do_finish): Take care of the no_waitpid flag.
* (struct assuan_io): Renamed elements READ andWerner Koch2005-03-221-2/+2
| | | | | | WRITE to READFNC and WRITEFNC to avoid problems with read defined as macros. Changed callers. Noted by Ville Skytt��.
* * autogen.sh: Add Option --build-w32.Werner Koch2004-12-181-1/+6
| | | | | | | | | | | * assuan-logging.c (_assuan_w32_strerror): New. * assuan-defs.h (w32_strerror): new. * assuan-pipe-connect.c (assuan_pipe_connect2, fix_signals): Factored signal code out to new function. (build_w32_commandline, create_inheritable_pipe): New. Taken from gnupg 1.9. (assuan_pipe_connect2) [W32]: Implemented for W32.
* * configure.ac: Define HAVE_W32_SYSTEM and HAVE_DOSISH_SYSTEM.Werner Koch2004-12-071-3/+3
| | | | | | | | | | Add -lwsock2 to the config lib flags for W32. * assuan-logging.c, assuan-io.c: Include config.h * assuan-pipe-connect.c (assuan_pipe_connect2) [_WIN32]: Return error Not Imlemented.
* Avoid warnings about unknown pragmas.Werner Koch2004-11-261-3/+5
|
* * assuan-logging.c (_assuan_log_printf): New.Werner Koch2004-11-241-0/+7
| | | | | | | | | | | * assuan-domain-connect.c (LOG): Removed and replaced all callers by _assuan_log_printf. This is needed for C89 and gcc 2.95 which both don't have C99 style variable arg macros. * assuan-pipe-connect.c (LOG): Ditto. * assuan-socket-connect.c (LOG): Ditto. * assuan-socket.c[!_WIN32]: Fixed includes.
* 2004-11-23 Timo Schulz <[email protected]>Timo Schulz2004-11-241-6/+42
| | | | | | | | | | | | | | | | | | * assuan-socket.c (_assuan_sock_connect): Get local port from the sun_path[] file. (_assuan_sock_bind): Write local port to the sun_path[] file. * assuan-socket-connect.c (assuan_socket_connect): Use DIRSEP_C for a better portability. (assuan-defs.h): Define DIRSEP_C. 2004-11-22 Timo Schulz <[email protected]> * assuan-io.c (_assuan_simple_read, _assuan_simple_write): W32 support. * assuan-socket.c (_assuan_close): New. (_assuan_sock_new): New. (_assuan_sock_bind): New.
* * assuan-listen.c (assuan_set_hello_line, assuan_accept): AllowWerner Koch2004-05-111-0/+2
| | | | | | | | for multi line hello strings. * assuan-buffer.c (_assuan_write_line): New with parts of .. (assuan_write_line): .. factored out.
* * assuan-socket-server.c (accept_connection_bottom): Save the pidWerner Koch2004-04-211-5/+1
| | | | | | | | | | | | | of the peer if it is available. * assuan-socket-connect.c (assuan_socket_connect): Do not save the dummy SERVED_PID arg. * assuan-pipe-connect.c (do_finish): Don't wait if the pid is 0. (assuan_pipe_connect2): Store the parents pid in the environment of the child. * assuan-pipe-server.c (assuan_init_pipe_server): Initialize the peer's pid from the environment. * assuan-connect.c (assuan_get_pid): Do not return 0 as a PID.
* * assuan-buffer.c: Changed formatting of the debug output prefix.Werner Koch2003-12-161-0/+3
| | | | | | | | * assuan-util.c (assuan_set_log_stream): Set global log stream if it has not been done yet. * assuan-logging.c (_assuan_set_default_log_stream): New. (assuan_set_assuan_log_prefix): New.
* * funopen.c (_assuan_funopen): Renamed from funopen, to keep theWerner Koch2003-12-111-4/+6
| | | | | | | name space clean and avoid duplicate definitions if another library uses the same replacement. * assuan-defs.h (funopen): Renamed prototype and add a macro.
* * libassuan.m4: New. Based on libgrypt.m4.Werner Koch2003-04-291-1/+8
| | | | | | | | | | | * Makefile.am (m4data_DATA): New. * assuan.h (AssuanCommand): Removed. * assuan-handler.c: Remove the cmd_id element, (assuan_register_command): Likewise. Note that semantics changed. (_assuan_register_std_commands): Adjusted.
* 2002-11-24 Neal H. Walfield <[email protected]>Neal Walfield2002-11-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | * assuan.h (assuan_sendfd): New prototype. (assuan_receivefd): New prototype. * assuan-buffer.c (assuan_sendfd): New function. (assuan_receivefd): New function. * assuan-handler.c (parse_cmd_input_output): Recognize incoming file descriptors and act appropriately. * assuan-defs.h (struct assuan_io): Add fields sendfd and receivefd. (struct assuan_context_s): Add fields pendingfds and pendingfdscount. * assuan-pipe-server.c (_assuan_new_context): Update IO to reflect new features. * assuan-domain-connect.c (do_deinit): Cleanup any unreceived file descriptors. (domain_reader): Receive file descriptors. (domain_sendfd): New function. (domain_receivefd): New function. (_assuan_domain_init): Update initialization code to reflect new features.
* 2002-11-24 Neal H. Walfield <[email protected]>Neal Walfield2002-11-241-2/+8
| | | | | | | | | | | | * assuan.h: Add prototype for assuan_domain_connect and assuan_init_domain_server. * assuan-defs.h: Include <unistd.h>. Add prototype for _assuan_domain_init. * assuan-domain-connect.c: New file. * assuan-domain-server.c: New file. * Makefile.am (libassuan_a_SOURCES): Add assuan-domain-connect.c and assuan-domain-server.c
* 2002-11-23 Neal H. Walfield <[email protected]>Neal Walfield2002-11-231-1/+25
| | | | | | | | | | | | | | | | | | | | | * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c. * assuan-io.c: Restore. (_assuan_simple_read): Rename from _assuan_read. (_assuan_simple_write): Rename from _assuan_write. * assuan-defs.h (_assuan_simple_read): New prototype. (_assuan_simple_write): Likewise. * assuan-pipe-server.c (pipe_reader): Remove. (pipe_writer): Remove. (_assuan_new_context): Initialize IO is with _assuan_simple_read and _assuan_simple_write. * assuan-socket-connect.c (socket_reader): Remove. (socket_writer): Remove. (assuan_socket_connect): Initialize IO is with _assuan_simple_read and _assuan_simple_write. * assuan-socket-server.c (io): New local variable. (assuan_init_socket_server): Initialize CTX->io. (assuan_init_connected_socket_server): Likewise.
* 2002-11-20 Neal H. Walfield <[email protected]>Neal Walfield2002-11-211-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * assuan-defs.h (struct assuan_io): New structure. (struct assuan_context_s): New field, io. (_assuan_read): Depreciated. (_assuan_write): Likewise. * assuan-pipe-server.c: Include <unistd.h>. (pipe_reader): New function. (pipe_writer): Likewise. (_assuan_new_context.IO): New local static. Set to pipe_reader and pipe_writer. Use it to initialize new context. * assuan-socket-connect.c (socket_reader): New function. (socket_writer): New function. (assuan_socket_connect.IO): New local static. Set to socket_reader and socket_writer. Use it to initialize new context. * assuan-buffer.c (writen): Take an ASSUAN_CONTEXT rather than a file descriptor. Do not use _assuan_write but the write method in the supplied context. (readline): Likewise for _assuan_read. (assuan_write_line): When calling writen, pass CTX; not the file descriptor directly. (_assuan_cookie_write_data): Likewise. (_assuan_cookie_write_flush): Likewise. (_assuan_read_line): Likewise for readline. * Makefile.am (libassuan_a_SOURCES): Remove assuan-io.c. * assuan-io.c: Removed.
* 2002-09-05 Neal H. Walfield <[email protected]>Neal Walfield2002-10-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * assuan-defs.h (_assuan_read_wrapper): Depreciated. * assuan-util.c (_assuan_read_wrapper): Removed. * assuan-defs.h (_assuan_write_wrapper): Depreciated. * assuan-util.c (_assuan_write_wrapper): Removed. * assuan.h (assuan_set_io_fun): Depreciated. * assuan-util.c (assuan_set_io_fun): Removed. * assuan-defs.h (_assuan_read): New function. (_assuan_write): Likewise. * assuan-io.c: New file. * assuan-buffer.c (writen): Use _assuan_write rather than doing the work here. (readline): Likewise for _assuan_read. * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c. 2002-09-05 Neal H. Walfield <[email protected]> * gpg-agent.c (main) [USE_GNU_PTH]: No need to call assuan_set_io_func as assuan is smart.
* Changed the lincese for Assuan to LGPL.V0-3-10NEWPG-0-3-10Werner Koch2002-07-301-13/+13
|
* * assuan-util.c (assuan_set_io_func): New.V0-3-8V0-3-7NEWPG-0-3-8NEWPG-0-3-7Werner Koch2002-05-231-0/+5
| | | | | | | | | * assuan-buffer.c (writen, readline): Use the new functions instead of pth. * assuan-socket-server.c (accept_connection): Don't use the pth_accept - using the assuan included accept code would be a bad idea within Pth so we don't need a replacement function.
* A bunch of new features. Allow empty responses on an inquiry.Werner Koch2002-02-181-7/+3
|
* * assuan-connect.c: Move all except assuan_get_pid to...Werner Koch2002-01-211-1/+8
| | | | | | | | | | | | | | | | | * assuan-pipe-connect.c: this. (assuan_pipe_disconnect): Removed. (do_finish, do_deinit): New (assuan_pipe_connect): and set them into the context. * assuan-socket-connect.c: New. * assuan-util.c (_assuan_log_sanitized_string): New. * assuan-pipe-server.c (assuan_init_pipe_server): Factored most code out to ... (_assuan_new_context): new func. (_assuan_release_context): New * assuan-connect.c (assuan_pipe_connect): Use the new functions.
* * assuan.h: Added Invalid Option error code.Werner Koch2002-01-201-0/+1
| | | | | | | | | * assuan-handler.c (std_handler_option): New. (std_cmd_tbl): Add OPTION as standard command. (assuan_register_option_handler): New. (dispatch_command): Use case insensitive matching as a fallback. (my_strcasecmp): New.
* * assuan-buffer.c (_assuan_read_line): Add output logging.Werner Koch2002-01-191-3/+12
| | | | | | | | | | | | | | | | | | | (assuan_write_line): Ditto. (_assuan_cookie_write_data): Ditto. (_assuan_cookie_write_flush): Ditto. * assuan-util.c (_assuan_log_print_buffer): New. (assuan_set_log_stream): New. (assuan_begin_confidential): New. (assuan_end_confidential): New. * assuan-defs.h: Add a few handler variables. * assuan-pipe-server.c (assuan_deinit_pipe_server): Removed. (deinit_pipe_server): New. (assuan_deinit_server): New. Changed all callers to use this. * assuan-listen.c (assuan_accept): Use the accept handler. * assuan-handler.c (process_request): Use the close Handler. * assuan-socket-server.c: New.
* * assuan-handler.c (assuan_set_okay_line): New.Werner Koch2002-01-101-0/+1
| | | | | (process_request): And use it here.
* assuan/Marcus Brinkmann2001-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | 2001-12-14 Marcus Brinkmann <[email protected]> * assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH. assuan.h: Define ASSUAN_LINELENGTH. agent/ 2001-12-14 Marcus Brinkmann <[email protected]> * query.c (LINELENGTH): Removed. (agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH. sm/ 2001-12-14 Marcus Brinkmann <[email protected]> * call-agent.c (LINELENGTH): Removed. (gpgsm_agent_pksign): Use ASSUAN_LINELENGTH, not LINELENGTH. (gpgsm_agent_pkdecrypt): Likewise.
* * assuan-connect.c (assuan_pipe_connect): Implemented the initalWerner Koch2001-12-121-2/+4
| | | | | | | | | | | | | | | handshake. * assuan-client.c (read_from_server): Renamed to (_assuan_read_from_server): this and made external. * assuan-listen.c (assuan_set_hello_line): New. (assuan_accept): Use a custom hello line is available. * assuan-buffer.c (assuan_read_line): New. (assuan_pending_line): New. (_assuan_write_line): Renamed to .. (assuan_write_line): this, made public and changed all callers.
* assuan-connect.c (assuan_pipe_connect): Add more error reporting.Werner Koch2001-12-051-0/+3
| | | | | | | assuan-client.c: New. assuan-inquire.c: New. assuan-handler.c (process_request): Check for nested invocations.
* * assuan-handler.c (assuan_register_input_notify): New.Werner Koch2001-11-271-1/+3
| | | | | (assuan_register_output_notify): New.
* * assuan-handler.c (assuan_register_bye_notify)Werner Koch2001-11-251-0/+4
| | | | | | | (assuan_register_reset_notify) (assuan_register_cancel_notify): New and call them from the standard handlers.
* * assuan-connect.c (assuan_get_pid): New - actually done by Marcus in gpgme.Werner Koch2001-11-241-1/+1
| | | | | Set the line length back to the old value.