agent: New commands PUT_SECRET and GET_SECRET.
authorWerner Koch <wk@gnupg.org>
Mon, 2 Jul 2018 19:24:15 +0000 (21:24 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 2 Jul 2018 19:36:19 +0000 (21:36 +0200)
commit8a915cd9faf052b4faa3c415f2ac5aa8d6ea1efe
tree8e79cbb1d6a1836c11c77b21908886c8c4b7b270
parent58baf40af641f8cbf597e508a292e85ae94688f1
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>
agent/agent.h
agent/cache.c
agent/command.c