diff options
author | Werner Koch <[email protected]> | 2020-01-07 17:36:18 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-01-07 17:36:18 +0000 |
commit | d5c00354bb02ae6cb2e3a72136a1a95cb2db7f3f (patch) | |
tree | 04627604e7c88322bbf94c9b8114c1ad43b2d76f /agent/agent.h | |
parent | kbx: Make sure the tables are joined in a select. (diff) | |
download | gnupg-d5c00354bb02ae6cb2e3a72136a1a95cb2db7f3f.tar.gz gnupg-d5c00354bb02ae6cb2e3a72136a1a95cb2db7f3f.zip |
agent: First changes to support a PIN cache for scdaemon.
* agent/agent.h (CACHE_MODE_PIN): New.
* agent/cache.c (housekeeping): Special handling of new new mode.
(agent_flush_cache): Ditto. Add arg 'pincache_only' and change
caller.
(agent_put_cache): Support new mode.
(agent_get_cache): Ditto.
* agent/call-scd.c (wait_child_thread): Flush the entire PIN cache.
(start_scd): Ditto.
(agent_card_killscd): Ditto.
(handle_pincache_put): New. Uses a dummy encryption key for now.
(pincache_put_cb): New.
(inq_needpin): Prepare for PINCACHE_GET inquiry.
(learn_status_cb): Handle the PINENTRY_PUT status line.
(get_serialno_cb): Ditto
(agent_card_pksign): Ditto.
(padding_info_cb): Ditto.
(agent_card_readcert): Ditto.
(agent_card_readkey): Ditto.
(agent_card_writekey): Ditto.
(card_getattr_cb): Ditto.
(card_cardlist_cb): Ditto.
(card_keyinfo_cb): Ditto.
(pass_status_thru): Ditto.
--
Take care: This is not finished.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/agent.h')
-rw-r--r-- | agent/agent.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/agent/agent.h b/agent/agent.h index 84e5e782b..e08507cb2 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -322,6 +322,7 @@ typedef enum CACHE_MODE_USER, /* GET_PASSPHRASE related cache. */ CACHE_MODE_SSH, /* SSH related cache. */ CACHE_MODE_NONCE, /* This is a non-predictable nonce. */ + CACHE_MODE_PIN, /* PINs stored/retrieved by scdaemon. */ CACHE_MODE_DATA /* Arbitrary data. */ } cache_mode_t; @@ -479,7 +480,7 @@ int agent_clear_passphrase (ctrl_t ctrl, void initialize_module_cache (void); void deinitialize_module_cache (void); void agent_cache_housekeeping (void); -void agent_flush_cache (void); +void agent_flush_cache (int pincache_only); int agent_put_cache (ctrl_t ctrl, const char *key, cache_mode_t cache_mode, const char *data, int ttl); char *agent_get_cache (ctrl_t ctrl, const char *key, cache_mode_t cache_mode); |