diff options
author | Werner Koch <[email protected]> | 2015-06-11 07:36:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-06-11 07:36:27 +0000 |
commit | 008435b95cbca19adc217178dc9d793eca584345 (patch) | |
tree | 8b521f649608bf4183ba571163c21e55d3252c6a /agent/command.c | |
parent | agent: Add option --allow-emacs-pinentry (diff) | |
download | gnupg-008435b95cbca19adc217178dc9d793eca584345.tar.gz gnupg-008435b95cbca19adc217178dc9d793eca584345.zip |
agent: Add experimental option --browser-socket.
* agent/agent.h (opt): Add field "browser_socket".
* agent/command.c (cmd_setkeydesc): Use a different message for
restricted==2.
* agent/gpg-agent.c (oBrowserSocket): New.
(opts): Add --browser-socket.
(socket_name_browser, redir_socket_name_browser): New.
(socket_nonce_browser): New.
(cleanup): Cleanup browser socket.
(main): Implement option.
(start_connection_thread_browser): New.
(handle_connections): Add arg listen_fd_browser and use it.
--
This is very similar to --extra-socket but intended to be used by a web
browser session. AS of now it only displays a different "Note: in
the Pinentry than --extra-socket but it may eventually be tweaked for
the use by browser extensions making use of gpg-agent.
It is marked experimental and and thus may be removed in later
versions.
To better support the different "client classes", it would be useful
to add corresponsing cache classes so that each class has its own
cache.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/command.c')
-rw-r--r-- | agent/command.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/agent/command.c b/agent/command.c index 82d93e954..ccd51069b 100644 --- a/agent/command.c +++ b/agent/command.c @@ -730,8 +730,12 @@ cmd_setkeydesc (assuan_context_t ctx, char *line) xfree (ctrl->server_local->keydesc); if (ctrl->restricted) - ctrl->server_local->keydesc = strconcat - (_("Note: Request from a remote site."), "%0A%0A", desc, NULL); + { + ctrl->server_local->keydesc = strconcat + ((ctrl->restricted == 2 + ? _("Note: Request from the web browser.") + : _("Note: Request from a remote site.") ), "%0A%0A", desc, NULL); + } else ctrl->server_local->keydesc = xtrystrdup (desc); if (!ctrl->server_local->keydesc) |