1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-17 15:44:34 +02:00
Werner Koch 457bce5cd3 gpg: Improve passphrase caching.
* 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).
2014-09-17 15:12:08 +02:00
..
2014-07-23 14:35:22 +02:00
2014-04-15 19:44:50 +02:00
2014-01-31 14:35:49 +01:00
2007-07-04 19:49:40 +00:00
2014-08-14 15:21:21 +02:00
2013-11-15 15:49:34 +01:00
2014-08-13 10:11:36 +02:00
2014-09-17 15:12:08 +02:00
2014-08-13 10:11:36 +02:00
2014-08-13 10:11:36 +02:00
2014-08-14 15:21:21 +02:00
2014-09-17 15:12:08 +02:00
2014-04-28 10:36:16 +09:00
2014-09-17 15:12:08 +02:00
2008-12-12 08:54:50 +00:00
2014-03-06 16:23:10 +09:00
2014-01-29 17:45:05 +01:00