summaryrefslogtreecommitdiffstats
path: root/agent/cache.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg: Improve passphrase caching.Werner Koch2014-09-171-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/cache.c (last_stored_cache_key): New. (agent_get_cache): Allow NULL for KEY. (agent_store_cache_hit): New. * agent/findkey.c (unprotect): Call new function and try to use the last stored key. * g10/revoke.c (create_revocation): Add arg CACHE_NONCE and pass to make_keysig_packet. (gen_standard_revoke): Add arg CACHE_NONCE and pass to create_revocation. * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke with cache nonce. -- This patch adds two features: 1. The key for the last passphrase successfully used for unprotecting a key is stored away. On a cache miss the stored away passphrase is tried as well. This helps for the common GPG use case of having a signing and encryption (sub)key with the same passphrase. See the code for more comments. 2. The now auto-generated revocation certificate does not anymore popup a passphrase prompt. Thus for standard key generation the passphrase needs to be given only once (well, two with the confirmation).
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-7/+7
| | | | | | | | | | | | | | | | | | | The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
* Port to npth.Marcus Brinkmann2012-01-251-19/+33
| | | | | | | | | | | | | | | | | | | | | * configure.ac: Don't check for PTH but for NPTH. (AH_BOTTOM): Remove PTH_SYSCALL_SOFT. (have_pth): Rename to ... (have_npth): ... this. (USE_GNU_NPTH): Rename to ... (USE_GNU_PTH): ... this. * m4/npth.m4: New file. * agent/Makefile.am, agent/cache.c, agent/call-pinentry.c, agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c, agent/trustlist.c, common/Makefile.am, common/estream.c, common/exechelp-posix.c, common/exechelp-w32.c, common/exechelp-w32ce.c, common/http.c, common/init.c, common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c, dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c, dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am, g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am, scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c, scd/scdaemon.c, tools/Makefile.am: Port to npth.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-6/+5
| | | | | | | | We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
* Init cache encryption on the fly.Werner Koch2010-11-291-20/+50
| | | | | add some debug code
* Re-implemented GPG's --passwd command and improved it.Werner Koch2010-10-261-1/+1
|
* Fix standard directories for Wince.Werner Koch2010-09-131-1/+1
| | | | | Typo fix.
* Obscure the cached passphrases.Werner Koch2010-09-021-123/+170
|
* s/CACHE_MODE_IMPGEN/CACHE_MODE_NONCE/.Werner Koch2010-09-011-4/+4
| | | | | Prepare for more use cases of the cache nonce.
* Use passphrase caching for import and genkey.Werner Koch2010-09-011-11/+25
|
* Fix bug #1053Werner Koch2009-05-151-2/+2
| | | | | Add option --qualitybar to command GET_PASSPHRASE.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* Updated FSF's address.Werner Koch2006-06-201-1/+2
|
* gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch2005-06-161-6/+14
| | | | | | | 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-10/+26
|
* (agent_put_cache): Fix the test for using the defaultWerner Koch2005-01-041-4/+5
| | | | | TTL.
* * preset-passphrase.c (preset_passphrase): Handle --passphrase.Werner Koch2004-12-211-4/+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: New option --max-cache-ttl. Suggested by AlexanderWerner Koch2004-08-201-2/+3
| | | | | | | Belopolsky. * cache.c (housekeeping): Use it here instead of the hardwired default of 1 hour.
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-01-091-0/+314
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-314/+0
| | | | 'GNUPG-1-9-BRANCH'.
* * gpg-agent.c (handle_signal): Flush cache on SIGHUP.Werner Koch2002-09-261-0/+29
| | | | | | | | * 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.
* * no-pth.c, Makefile.am: Removed.Werner Koch2002-05-231-18/+64
| | | | | | | | | | | | * call-scd.c: Seirialized all scdaeom access when using Pth. * cache.c: Made the cache Pth-thread-safe. (agent_unlock_cache_entry): New. * findkey.c (unprotect): Unlock the returned cache value. * command.c (cmd_get_passphrase): Ditto. * gpg-agent.c (main): Register pth_read/write with Assuan.
* sm/Werner Koch2002-05-141-4/+4
| | | | | | | | | | | | | | * gpgsm.c: New option --faked-system-time * sign.c (gpgsm_sign): And use it here. * certpath.c (gpgsm_validate_path): Ditto. common/ * gettime.c: New. agent/ * cache.c (housekeeping, agent_put_cache): Use our time() wrapper. / * doc/: New * configure.ac, Makefile.am: Added doc/
* Debug message cleanups.Werner Koch2002-04-271-1/+3
| | | | | Fixed passphrase caching.
* Doc fixes, moved some fizmes to TODO, fixed minor bugs.Werner Koch2002-03-181-1/+1
|
* * cache.c (housekeeping): Fixed linking in the remove case.Werner Koch2002-02-061-2/+4
|
* * cache.c: Add a few debug outputs.Werner Koch2002-02-011-0/+15
| | | | | | | | | | | | | | * protect.c (agent_private_key_type): New. * agent.h: Add PRIVATE_KEY_ enums. * findkey.c (agent_key_from_file): Use it to decide whether we have to unprotect a key. (unprotect): Cache the passphrase. * findkey.c (agent_key_from_file,agent_key_available): The key files do now require a ".key" suffix to make a script's life easier. * genkey.c (store_key): Ditto.
* * genkey.c (store_key): Protect the key.Werner Koch2002-01-311-2/+2
| | | | | | | (agent_genkey): Ask for the passphrase. * findkey.c (unprotect): Actually unprotect the key. * query.c (agent_askpin): Add an optional start_err_text.
* * gpg-agent.c (main): Disable core dumps.Werner Koch2002-01-191-0/+220
* cache.c: New. * command.c (cmd_get_passphrase): Use the cache. (cmd_clear_passphrase): Ditto. * gpg-agent.c: Removed unused cruft and implement the socket based server. (my_strusage): Take bug report address from configure.ac. * command.c (start_command_handler): Add an argument to start as regular server. (start_command_handler): Enable Assuan logging.