From 0152ba7c987443d641ce1091c79f90ef2cc46498 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 22 Mar 2018 15:50:31 +0900 Subject: scd: Support KDF DO setup. * g10/call-agent.c (learn_status_cb): Parse the capability for KDF. * g10/card-util.c (gen_kdf_data, kdf_setup): New. (card_edit): New admin command cmdKDFSETUP to call kdf_setup. * scd/app-openpgp.c (do_getattr): Emit KDF capability. -- GnuPG-bug-id: 3823 Signed-off-by: NIIBE Yutaka --- g10/call-agent.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'g10/call-agent.c') diff --git a/g10/call-agent.c b/g10/call-agent.c index ea530e7ac..fdacf6a90 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -591,6 +591,8 @@ learn_status_cb (void *opaque, const char *line) parm->extcap.ki = abool; else if (!strcmp (p, "aac")) parm->extcap.aac = abool; + else if (!strcmp (p, "kdf")) + parm->extcap.kdf = abool; else if (!strcmp (p, "si")) parm->status_indicator = strtoul (p2, NULL, 10); } -- cgit v1.2.3 From 2cd35df5db3c4dfe37616dcfb1fcc644959449ef Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 23 Mar 2018 09:06:20 +0100 Subject: 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 --- g10/call-agent.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'g10/call-agent.c') diff --git a/g10/call-agent.c b/g10/call-agent.c index fdacf6a90..6ee82a5a4 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -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 -- cgit v1.2.3