mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg,sm: New option --request-origin.
* g10/gpg.c (oRequestOrigin): New const. (opts): New option --request-origin. (main): Parse that option. * g10/options.h (struct opt): Add field request_origin. * g10/call-agent.c (start_agent): Send option to the agent. * sm/gpgsm.c (oRequestOrigin): New const. (opts): New option --request-origin. (main): Parse that option. * sm/gpgsm.h (struct opt): Add field request_origin. * sm/call-agent.c (start_agent): Send option to the agent. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
05c55ee260
commit
2cd35df5db
8 changed files with 67 additions and 0 deletions
|
@ -289,6 +289,23 @@ start_agent (ctrl_t ctrl, int flag_for_card)
|
|||
}
|
||||
}
|
||||
|
||||
/* Pass on the request origin. */
|
||||
if (opt.request_origin)
|
||||
{
|
||||
char *tmp = xasprintf ("OPTION pretend-request-origin=%s",
|
||||
str_request_origin (opt.request_origin));
|
||||
rc = assuan_transact (agent_ctx, tmp,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
xfree (tmp);
|
||||
if (rc)
|
||||
{
|
||||
log_error ("setting request origin '%s' failed: %s\n",
|
||||
str_request_origin (opt.request_origin),
|
||||
gpg_strerror (rc));
|
||||
write_status_error ("set_request_origin", rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* In DE_VS mode under Windows we require that the JENT RNG
|
||||
* is active. */
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue