mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
691dae270b
commit
008435b95c
3 changed files with 68 additions and 8 deletions
|
@ -147,6 +147,12 @@ struct
|
|||
that we use a hack for cleanup handling in gpg-agent.c: If the
|
||||
value is less than 2 the name has not yet been malloced. */
|
||||
int extra_socket;
|
||||
|
||||
/* This global options indicates the use of an extra socket for web
|
||||
browsers. Note that we use a hack for cleanup handling in
|
||||
gpg-agent.c: If the value is less than 2 the name has not yet
|
||||
been malloced. */
|
||||
int browser_socket;
|
||||
} opt;
|
||||
|
||||
|
||||
|
@ -188,7 +194,9 @@ struct server_control_s
|
|||
gnupg_fd_t fd;
|
||||
} thread_startup;
|
||||
|
||||
/* Flag indicating the connection is run in restricted mode. */
|
||||
/* Flag indicating the connection is run in restricted mode.
|
||||
A value of 1 if used for --extra-socket,
|
||||
a value of 2 is used for --browser-socket. */
|
||||
int restricted;
|
||||
|
||||
/* Private data of the server (command.c). */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue