aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Implemented more gpg-agen options to support certain passphrase policies.Werner Koch2007-08-271-0/+28
| | | | | New tool gpg-check-pattern.
* Factored common gpgconf constants outWerner Koch2007-08-021-18/+1
| | | | | Fixed W32 compare_filenames
* Changed to GPLv3.Werner Koch2007-07-041-4/+7
| | | | | Removed intl/.
* A bunch of minor changes for Windows.Werner Koch2007-07-041-24/+35
|
* More W32 related changesWerner Koch2007-06-261-5/+7
|
* Implemented the --gen-key command as we can't use the gpgsm-gencert.sh under ↵Werner Koch2007-06-211-29/+40
| | | | Windows.
* [w32] gpg-agent is now started automagically by gpgsm.Werner Koch2007-06-201-1/+1
|
* Made percent_escape more general.Werner Koch2007-06-191-8/+23
| | | | | | Added regression tests support to jnlib. W32 changes.
* jnlib/Marcus Brinkmann2007-06-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-18 Marcus Brinkmann <[email protected]> * stringhelp.h (percent_escape): New prototype. * stringhelp.c (percent_escape): New function. agent/ 2007-06-18 Marcus Brinkmann <[email protected]> * gpg-agent.c (main): Percent escape pathname in --gpgconf-list output. g10/ 2007-06-18 Marcus Brinkmann <[email protected]> * gpg.c (gpgconf_list): Percent escape output of --gpgconf-list. scdaemon/ 2007-06-18 Marcus Brinkmann <[email protected]> * scdaemon.c (main): Percent escape output of --gpgconf-list. sm/ 2007-06-18 Marcus Brinkmann <[email protected]> * gpgsm.c (main): Percent escape output of --gpgconf-list.
* Add missing fiels for W32.Werner Koch2007-06-181-0/+10
| | | | | | New agent commands: GETINFO and KILLAGENT (w32 only). Agent does now detach from the console.
* A whole bunch of changes to allow building for Windows.Werner Koch2007-06-141-11/+31
| | | | | See the ChangeLogs for details.
* First steps towards supporting W32.Werner Koch2007-06-061-16/+0
| | | | | | | This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
* Improved logging for error orginating from libgcrypt.Werner Koch2007-04-201-45/+2
|
* Support for a global gpgconf configuration file.Werner Koch2007-03-061-1/+10
|
* agent/Werner Koch2007-02-141-0/+14
| | | | | | | | | | * gpg-agent.c: New option --pinentry-touch-file. (get_agent_socket_name): New. * agent.h (opt): Add pinentry_touch_file. * call-pinentry.c (start_pinentry): Send new option to the pinentry.
* agent/Werner Koch2007-01-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * protect-tool.c (get_passphrase): New arg OPT_CHECK. (get_new_passphrase): Enable OTP_CHECK on the first call. * command.c (cmd_get_passphrase): Implement option --check. * gpg-agent.c (MIN_PASSPHRASE_LEN): New (parse_rereadable_options): New option --min-passphrase-len. * genkey.c (check_passphrase_constraints): New. (agent_genkey, agent_protect_and_store): Call new function. Fix memory leak. * call-pinentry.c (agent_askpin): Allow translation of the displayed error message. (agent_popup_message_start): Remove arg CANCEL_BTN. (popup_message_thread): Use --one-button option. * command.c (cmd_passwd): Now that we don't distinguish between assuan and regular error codes we can jump to the end on error. common/ * simple-pwquery.c (simple_pwquery): New arg OPT_CHECK.
* Made some PIN pads work.Werner Koch2006-11-201-15/+74
| | | | | Some cleanups for 64 bit CPUs.
* New command GETEVENTCOUNTER.Werner Koch2006-11-141-0/+2
| | | | | | | | | | * command.c (bump_key_eventcounter): New. (bump_card_eventcounter): New. (cmd_geteventcounter): New command. * gpg-agent.c (handle_signal): Call bump_card_eventcounter. * findkey.c (agent_write_private_key): Call bump_key_eventcounter. * trustlist.c (agent_reload_trustlist): Ditto.
* gpg-agent.c (main): In detached mode connect standard descriptors to /dev/null.Werner Koch2006-11-091-1/+10
| | | | | Other minor fixes
* .Werner Koch2006-10-231-0/+5
|
* Allow for a global trustlist.Werner Koch2006-09-151-7/+0
|
* The big Assuan error code removal.Werner Koch2006-09-061-1/+2
|
* Minor changes and typo fixes.Werner Koch2006-09-061-1/+1
|
* Allow for 4k ssh keys and better error reporting.Werner Koch2006-08-291-2/+25
|
* Various smaller changesWerner Koch2006-06-271-1/+2
|
* Updated FSF's address.Werner Koch2006-06-201-1/+2
|
* PIN caching of cards does now work.Werner Koch2006-02-091-1/+1
|
* Use a default argument for --write-env-file.Werner Koch2005-08-161-2/+7
|
* gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch2005-06-161-3/+8
| | | | | | | char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
* New debugging optionhs, updates to the manual.Werner Koch2005-06-071-0/+6
|
* * command.c (cmd_updatestartuptty): New.Werner Koch2005-06-031-20/+84
| | | | | | | | | | | | | | | | | | | | * gpg-agent.c: New option --write-env-file. * gpg-agent.c (handle_connections): Make sure that the signals we are handling are not blocked.Block signals while creating new threads. * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H! (es_func_fd_read, es_func_fd_write): Protect against EINTR. * gpg-agent.texi (Agent UPDATESTARTUPTTY): New. * scdaemon.c (handle_connections): Make sure that the signals we are handling are not blocked.Block signals while creating new threads. (handle_connections): Include the file descriptor into the name of the thread.
* * configure.ac (gl_INIT): Add gnulib stuff.Werner Koch2005-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS by a simple check. (putc_unlocked): Removed check. Not used. (strsep, mkdtemp, asprintf): Replaced checks by gnulib checks. (xsize): Added will probably come handy soon. (CFLAGS): Use -Wformat-security instead of -Wformat-nonliteral. Add --Wno-format-y2k. * gl/, gl/m4/: New. * gpg-agent.c: Include setenv.h. * Makefile.am (AM_CPPFLAGS): Added. * util.h: Add some includes for gnulib. (ttyname, isascii): Define them inline. * fseeko.c, ftello.c: Removed. * strsep.c, mkdtemp.c: Removed. * ttyname.c, isascii.c: Removed. * mkdtemp.c: Removed. * exec.c: Include mkdtemp.h * keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/ftello.c. * keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/iobuf.c. * scdaemon.c: Include mkdtemp.h. * misc.c: Include setenv.h. * symcryptrun.c: Include mkdtemp.h.
* * 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
|