mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: New commands PUT_SECRET and GET_SECRET.
* agent/agent.h (CACHE_MODE_DATA): New const. * agent/cache.c (DEF_CACHE_TTL_DATA): new. (housekeeping): Tweak for CACHE_MODE_DATA. (cache_mode_equal): Ditto. (agent_get_cache): Ditto. (agent_put_cache): Implement CACHE_MODE_DATA. * agent/command.c (MAXLEN_PUT_SECRET): New. (parse_ttl): New. (cmd_get_secret): New. (cmd_put_secret): New. (register_commands): Register new commands. -- These commands allow to store secrets in memory for the lifetime of the gpg-agent process. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
58baf40af6
commit
8a915cd9fa
3 changed files with 237 additions and 12 deletions
|
@ -304,11 +304,12 @@ enum
|
|||
typedef enum
|
||||
{
|
||||
CACHE_MODE_IGNORE = 0, /* Special mode to bypass the cache. */
|
||||
CACHE_MODE_ANY, /* Any mode except ignore matches. */
|
||||
CACHE_MODE_ANY, /* Any mode except ignore and data matches. */
|
||||
CACHE_MODE_NORMAL, /* Normal cache (gpg-agent). */
|
||||
CACHE_MODE_USER, /* GET_PASSPHRASE related cache. */
|
||||
CACHE_MODE_SSH, /* SSH related cache. */
|
||||
CACHE_MODE_NONCE /* This is a non-predictable nonce. */
|
||||
CACHE_MODE_NONCE, /* This is a non-predictable nonce. */
|
||||
CACHE_MODE_DATA /* Arbitrary data. */
|
||||
}
|
||||
cache_mode_t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue