aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* * agent.h (out_of_core): s/__inline__/inine. Noted by Ray Link.Werner Koch2005-05-311-3/+5
| | | | | | | | | | | * dynload.h: s/__inline__/inline/. * tlv.c [GNUPG_MAJOR_VERSION==1]: Define constants instead of including a gnupg 1.4 header. * watchgnupg.c: Make sure that PF_LCOAL and AF_LOCAL are defines. Noted by Ray Link.
* * call-scd.c (start_scd): Don't test for an alive scdaemon here.Werner Koch2005-05-211-1/+7
| | | | | | | | | (agent_scd_check_aliveness): New. * gpg-agent.c (handle_tick): Test for an alive scdaemon. (handle_signal): Print thread info on SIGUSR1. * scdaemon.c (handle_signal): Print thread info on SIGUSR1.
* Changed the scdaemon to handle concurrent sessions. AdjustedWerner Koch2005-05-181-79/+17
| | | | | gpg-agent accordingly. Code cleanups.
* .Werner Koch2005-04-201-8/+71
|
* * gpg-agent.c (handle_connections): Need to check for events ifWerner Koch2005-02-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | select returns with -1. * tools.texi (gpg-connect-agent): New. * app-openpgp.c (get_one_do): Never try to get a non cacheable object from the cache. (get_one_do): Add new arg to return an error code. Changed all callers. (do_getattr): Let it return a proper error code. * app.c (select_application): Return an error code and the application context in an new arg. * command.c (open_card): Adjusted for that. Don't use the fallback if no card is present. Return an error if the card has been removed without a reset. (do_reset, cmd_serialno): Clear that error flag. (TEST_CARD_REMOVAL): New. Use it with all command handlers. * scdaemon.c (ticker_thread): Termintate if a shutdown is pending. * apdu.c: Added some PCSC error codes. (pcsc_error_to_sw): New. (reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu) (open_pcsc_reader): Do proper error code mapping. * gpg-connect-agent.c: New. * Makefile.am: Add it.
* * command-ssh.c (get_passphrase): Removed.Werner Koch2005-02-231-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (ssh_identity_register): Partly rewritten. (open_control_file, search_control_file, add_control_entry): New. (ssh_handler_request_identities): Return only files listed in our control file. * findkey.c (unprotect): Check for allocation error. * agent.h (opt): Add fields to record the startup terminal settings. * gpg-agent.c (main): Record them and do not force keep display with --enable-ssh-support. * command-ssh.c (start_command_handler_ssh): Use them here. * gpg-agent.c: Renamed option --ssh-support to --enable-ssh-support. * command.c (cmd_readkey): New. (register_commands): Register new command "READKEY". * command-ssh.c (ssh_request_process): Improved logging. * findkey.c (agent_write_private_key): Always use plain open. Don't depend on an umask for permissions. (agent_key_from_file): Factored file reading code out to .. (read_key_file): .. new function. (agent_public_key_from_file): New.
* 2005-02-14 Moritz Schulte <[email protected]>Moritz Schulte2005-02-141-1/+1
| | | | | | * command-ssh.c (uint32_construct): New macro ... (stream_read_uint32): ... use it; removed unnecessary cast.
* * AUTHORS: Copied from 1.4 and edited to refelct the changes inWerner Koch2005-02-031-178/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.9. * agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this function won't return. * gpg-agent.c (check_for_running_agent): Initialize pid to a default value if not needed. * command-ssh.c: Removed stdint.h. s/byte_t/unsigned char/, s/uint32/u32/ becuase that is what we have always used in GnuPG. (ssh_request_specs): Moved to top of file. (ssh_key_types): Ditto. (make_cstring): Ditto. (data_sign): Don't use a variable for the passphrase prompt, make it translatable. (ssh_request_process): * findkey.c (modify_description): Renamed arguments for clarity, polished documentation. Make comment a C-string. Fixed case of DESCRIPTION being just "%". (agent_key_from_file): Make sure comment string to a C-string. * gpg-agent.c (create_socket_name): Cleanup the implemntation, use DIMof, agent_exit, removed superflous args and return the allocated string as value. Documented. Changed callers. (create_server_socket): Cleanups similar to above. Changed callers. (cleanup_do): Renamed to .. (remove_socket): .. this. Changed caller. (handle_connections): The signals are to be handled in the select and not in the accept. Test all FDs after returning from a select. Remove the event tests from the accept calls. The select already assured that the accept won't block.
* 2005-01-26 Moritz Schulte <[email protected]>Moritz Schulte2005-01-261-114/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * command-ssh.c: New file. * Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c. * findkey.c (modify_description): New function. (agent_key_from_file): Support comment field in key s-expressions. * gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport. (opts) New entry for oSSHSupport. New variable: socket_name_ssh. (cleanup_do): New function based on cleanup(). (cleanup): Use cleanup_do() for socket_name and socket_name_ssh. (main): New switch case for oSSHSupport. (main): Move socket name creation code to ... (create_socket_name): ... this new function. (main): Use create_socket_name() for creating socket names for socket_name and for socket_name_ssh in case ssh support is enabled. Move socket creation code to ... (create_server_socket): ... this new function. (main): Use create_server_socket() for creating sockets. In case standard_socket is set, do not only store a socket name in socket_name, but also in socket_name_ssh. Generate additional environment info strings for ssh support. Pass additional ssh socket argument to handle_connections. (start_connection_thread_ssh): New function. (handle_connections): Use select to multiplex between gpg-agent and ssh-agent protocol. * agent.h (struct opt): New member: ssh_support. Declare function: start_command_handler_ssh.
* * preset-passphrase.c (preset_passphrase): Handle --passphrase.Werner Koch2004-12-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that pwquery may use stuff from jnlib. Conditionally add -lwsock2 (gpg_protect_tool_LDADD): Ditto. * preset-passphrase.c (main): Use default_homedir(). (main) [W32]: Initialize sockets. * simple-pwquery.c (agent_open) [W32]: Implement for W32. (readline) [W32]: Use recv instead of read. (writen) [W32]: Use send instead of write. (my_stpcpy): Define a stpcpy replacement so that this file continues to be self-contained. (agent_send_all_options) [W32]: Don't call ttyname. * gnupg-badge-openpgp.eps, gnupg-badge-openpgp.jpg: New * gnupg.texi: Add a logo. * sysnotes.texi: New. * gpgsm.c (main): Use default_homedir(). (main) [W32]: Default to disabled CRL checks. * gpgconf-comp.c (get_config_pathname) [DOSISH]: Detect absolute pathnames with a drive letter.
* * gpg-agent.c (main): Use default_homedir().Werner Koch2004-12-211-8/+1
| | | | | | | | | | | | | | | | | | | * protect-tool.c (main): Ditto. * signal.c (got_fatal_signal, got_usr_signal) (got_fatal_signal) [DOSISH]: Don't build. * simple-gettext.c: Include sysutils.h * homedir.c: New. * Makefile.am (libcommon_a_SOURCES): Add it. (EXTRA_DIST): Removed mkerror and mkerrtok. * gpgv.c, g10.c (main): Use default_hoemdir (). * scdaemon.c (main): Use default_homedir(). * gpgsm.c (main): Use default_homedir().
* * configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let allWerner Koch2004-12-201-69/+112
| | | | | | | | | | | | | | | | | | | | directories default to c:/gnupg. Require libassuan 0.6.9. * gpg-agent.c (main) [W32]: Now that Mutexes work we can remove the pth_init kludge. (main): Add new options --[no-]use-standard-socket. (check_for_running_agent): Check whether it is running on the standard socket. * sysutils.h [W32]: Define sleep. * util.h: Add prototype for mkdtemp. * call-agent.c (start_agent): Before starting a pipe server start to connect to a server on the standard socket. Use PATHSEP * call-dirmngr.c (start_dirmngr): Use PATHSEP. * import.c: Include unistd.h for dup and close.
* * query.c (initialize_module_query):Werner Koch2004-12-191-0/+4
| | | | | | | | | | * call-scd.c (initialize_module_call_scd): New. * w32-pth.c (pth_init): Enable debugging depending on env var. (pth_self): New. (pth_mutex_release, pth_mutex_acquire): Implemented directly using the W32 API.
* * maperror.c (map_assuan_err_with_source): Oops, args were swapped.Werner Koch2004-12-191-0/+6
| | | | | * w32-pth.c (pth_init): Enable debugging depending on env var.
* * configure.ac (AH_BOTTOM): Define EXEEXT_S.Werner Koch2004-12-181-6/+0
| | | | | | | | | | | | | | * autogen.sh: Updated --build-w32 feature. * gpg-agent.c (main): Remove special Pth initialize. * w32-pth.c (pth_init): Reverse return values. Use TRUE and FALSE constants. (pth_kill, pth_mutex_acquire, pth_attr_set, pth_join, pth_cancel): Ditto. * scdaemon.c (main) [W32]: Remove special Pth initialize..
* A whole bunch of changes to allow building for W32.Werner Koch2004-12-151-8/+8
|
* Yep. No lost threads anymore.Werner Koch2004-12-141-1/+1
| | | | | | | | | | | | | | (_pth_strerror): Renamed to ... (w32_strerror): .. this. And let callers provide a buffer. (spawn_helper_thread): Removed HD arg and hardwire the stack size to 32k. (do_pth_wait): Removed use of ATTR; not needed for the helper threads. (helper_thread): Renamed to .. (launch_thread): .. this. Release handle if not joinable. (struct pth_priv_hd_s): Renamed to ... (struct thread_info_s): .. this. Add member JOINABLE and TH.
* More fixes. First successful use; leaks threads, though.Werner Koch2004-12-141-5/+22
|
* VArious hacks to make it at least build under W32.Werner Koch2004-12-131-9/+39
| | | | | | | | | | * stringhelp.c (w32_strerror) [W32]: New. * w32-pth.c, w32-pth.h: Added real code written by Timo Schulz. Not finished, though. * gpgconf-comp.c <ignore-ocsp-service-url>: Fixed typo.
* First take on a W32 portWerner Koch2004-12-021-6/+6
|
* (parse_rereadable_options): Return "not handled"Werner Koch2004-10-221-5/+7
| | | | | | | | when the log file has not beend hadled. This is will let the main option processing continue. Fixed a bug introduced on 2004-09-4 resulting in logging to stderr until a HUP has been given. (main): Don't close the listen FD.
* (check_for_running_agent): New.Werner Koch2004-09-091-7/+70
| | | | | | | | (main): The default action is now to check for an already running agent. (parse_rereadable_options): Set logfile only on reread. (main): Do not print the "is development version" note.
* * gpg-agent.c: New option --max-cache-ttl. Suggested by AlexanderWerner Koch2004-08-201-2/+7
| | | | | | | Belopolsky. * cache.c (housekeeping): Use it here instead of the hardwired default of 1 hour.
* * trustlist.c (read_list): Allow colons in the fingerprint.Werner Koch2004-07-221-1/+1
| | | | | | | | | | | | | (headerblurb): Rephrased. * gpg-agent.c (handle_connections): Increase the stack size ot 256k. * de.po: Updated. * scdaemon.c (main): Bumbed thread stack size up to 512k. * keylist.c (list_cert_raw): Print the keygrip.
* 2004-06-20 Moritz Schulte <[email protected]>Moritz Schulte2004-06-201-0/+1
| | | | | * gpg-agent.c: Include <sys/stat.h> (build fix for BSD).
* * gpg-agent.c (handle_signal): Reload the trustlist on SIGHUP.Werner Koch2004-05-111-0/+7
| | | | | | | | | | | | | | | | (start_connection_thread): Hack to simulate a ticker. * trustlist.c (agent_trustlist_housekeeping) (agent_reload_trustlist): New. Protected all global functions here with a simple counter which is sufficient for Pth. * fingerprint.c (gpgsm_get_key_algo_info): New. * sign.c (gpgsm_sign): Don't assume RSA in the status line. * keylist.c (list_cert_colon): Really print the algorithm and key length. (list_cert_raw, list_cert_std): Ditto. (list_cert_colon): Reorganized to be able to tell whether a root certificate is trusted.
* * gpg-agent.c: Remove help texts for options lile --lc-ctype.Werner Koch2004-05-031-11/+22
| | | | | | | | | | (main): New option --allow-mark-trusted. * trustlist.c (agent_marktrusted): Use it here. * gpg-agent.texi (Agent Options): Add --allow-mark-trusted. * gpgconf-comp.c: Add --allow-mark-trusted for the gpg-agent.
* * gpg-agent.c (parse_rereadable_options): New arg REREAD. AllowWerner Koch2004-04-301-7/+23
| | | | | | | | | changing oLogFile. (current_logfile): New. * logging.c (log_set_file): Make sure the log stream will be closed even if the stderr fileno will be assigned to a new socket.
* * call-scd.c (start_scd): Send event-signal option. Always checkWerner Koch2004-04-211-7/+3
| | | | | | | | that the scdaemon is still running. * gpg-agent.c (handle_signal): Do not use SIGUSR{1,2} anymore for changing the verbosity.
* * gpg-agent.c (main): Tell the logging code taht we are runnignWerner Koch2004-04-161-8/+16
| | | | | | | | | | | detached. * logging.h (JNLIB_LOG_WITH_PREFIX): Add constants for the flag values. * logging.c (log_set_prefix): New flag DETACHED. (fun_writer): Take care of this flag. (log_test_fd): New.
* * configure.ac: Require libgcrypt 1.1.94.Werner Koch2004-04-061-4/+4
| | | | | | | | | | Introduce PACKAGE_GT and set it to gnupg2. * gpg-agent.c (main): Use new libgcrypt thread library register scheme. * Makevars (DOMAIN): Init from PACKAGE_GT
* (main): Use new libgcrypt thread library registerWerner Koch2004-04-061-11/+16
| | | | | scheme.
* 2004-03-23 Marcus Brinkmann <[email protected]>Marcus Brinkmann2004-03-231-3/+7
| | | | | | * gpg-agent.c (main): For now, always print the default config file name for --gpgconf-list.
* * gpg-agent.c (main) <gpgconf>: Fixed default value quoting.Werner Koch2004-03-171-1/+1
| | | | | | * scdaemon.c (main) <gpgconf>: Fixed default value quoting. * gpgsm.c (main) <gpgconf>: Fixed default value quoting.
* (parse_rereadable_options): Use the newWerner Koch2004-03-161-2/+3
| | | | | | DEFAULT_CACHE_TTL macro. (main): Updated --gpgconf-list output.
* (parse_rereadable_options): Use the newWerner Koch2004-03-161-17/+44
| | | | | | DEFAULT_CACHE_TTL macro. (main): Updated --gpgconf-list output.
* * protect-tool.c (main): Setup the used character set.Werner Koch2004-02-181-3/+77
| | | | | | | | * gpg-agent.c (main): Ditto. * gpg-agent.c (set_debug): New. New option --debug-level. (main): New option --gpgconf-list.
* * agent.h (server_control_s): Add connection_fd field.Werner Koch2004-01-291-0/+2
| | | | | | | | | | | | | * command.c (start_command_handler): Init it here. * gpg-agent.c (agent_init_default_ctrl): and here. * call-scd.c: Add the CTRL arg to all functions calling start_scd and pass it to start_scd. Changed all callers (start_scd): Keep track of the current active connection. (agent_reset_scd): New. * command.c (start_command_handler): Call it here. * learncard.c (agent_handle_learn): Add arg CTRL; changed caller. (send_cert_back): Ditto.
* (main): Set the prefixes for assuan logging.Werner Koch2003-12-161-0/+2
|
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-08-051-0/+1063
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-916/+0
| | | | 'GNUPG-1-9-BRANCH'.
* * gpg-agent.c (handle_signal): Flush cache on SIGHUP.Werner Koch2002-09-261-2/+10
| | | | | | | | * cache.c (agent_flush_cache): New. * gpg-agent.c, agent.h: Add --keep-display and --keep-tty. * query.c (start_pinentry): Implement them. The option passing needs more thoughts.
* * gpg-agent.c (create_private_keys_directory)Werner Koch2002-09-091-1/+73
| | | | | | (create_directories): New. (main): Try to create a home directory.
* 2002-09-04 Neal H. Walfield <[email protected]>Neal Walfield2002-09-051-1/+7
| | | | | * gpg-agent.c (main): Use sigaction, not signal.
* * query.c (agent_askpin): Provide the default desc text dependingNEWPG-0-9-1Werner Koch2002-08-221-1/+1
| | | | | | on the pininfo. Do the basic PIN verification only when min_digist is set.
* * query.c (agent_askpin): Hack to show the right default prompt.NEWPG-0-9-0Werner Koch2002-08-211-3/+3
| | | | | | | | | | | (agent_get_passphrase): Ditto. * Makefile.am: Renamed the binary protect-tool to gpg-protect-tool. * protect-tool.c: Removed the note about internal use only. * gpg-agent.c (main): New option --daemon so that the program is not accidently started in the background.
* * divert-scd.c (getpin_cb): Pass a more descritive text to theWerner Koch2002-08-211-5/+14
| | | | | | | | | | | pinentry. * Makefile.am: Renamed the binary protect-tool to gpg-protect-tool. * protect-tool.c: Removed the note about internal use only. * gpg-agent.c (main): New option --daemon so that the program is not accidently started in the background.
* * call-scd.c (learn_status_cb): Handle CERTINFO status.Werner Koch2002-08-161-4/+1
| | | | | | | | (agent_card_learn): Add args for certinfo cb. * learncard.c (release_certinfo,certinfo_cb): New. (send_cert_back): New. With factored out code from .. (agent_handle_learn): here. Return certinfo stuff.
* Minor changes for gettextNEWPG-0-3-10Werner Koch2002-08-101-1/+1
|
* Minor fixesWerner Koch2002-08-091-0/+6
|