mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
agent, tests: Support --disable-scdaemon build case.
* agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON. * tests/openpgp/defs.scm (create-gpghome): Likewise. * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise. -- We could modify gpg-agent to remove all support of scdaemon, with no inclusion of call-scd.c, divert-scd.c, and learncard.c, but it would not be worth to do that. GnuPG-bug-id: 3316 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
b13972dfbf
commit
05cb87276c
@ -1988,14 +1988,17 @@ static const char hlp_scd[] =
|
|||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
cmd_scd (assuan_context_t ctx, char *line)
|
cmd_scd (assuan_context_t ctx, char *line)
|
||||||
{
|
{
|
||||||
ctrl_t ctrl = assuan_get_pointer (ctx);
|
|
||||||
int rc;
|
int rc;
|
||||||
|
#ifdef BUILD_WITH_SCDAEMON
|
||||||
|
ctrl_t ctrl = assuan_get_pointer (ctx);
|
||||||
if (ctrl->restricted)
|
if (ctrl->restricted)
|
||||||
return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN));
|
return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN));
|
||||||
|
|
||||||
rc = divert_generic_cmd (ctrl, line, ctx);
|
rc = divert_generic_cmd (ctrl, line, ctx);
|
||||||
|
#else
|
||||||
|
(void)ctx; (void)line;
|
||||||
|
rc = gpg_error (GPG_ERR_NOT_SUPPORTED);
|
||||||
|
#endif
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,9 @@
|
|||||||
"faked-system-time 1008241200")
|
"faked-system-time 1008241200")
|
||||||
(create-file "gpg-agent.conf"
|
(create-file "gpg-agent.conf"
|
||||||
(string-append "pinentry-program " (tool 'pinentry))
|
(string-append "pinentry-program " (tool 'pinentry))
|
||||||
(string-append "scdaemon-program " (tool 'scdaemon))
|
(if (assoc "scdaemon" gpg-components)
|
||||||
|
(string-append "scdaemon-program " (tool 'scdaemon))
|
||||||
|
"# No scdaemon available")
|
||||||
)
|
)
|
||||||
(start-agent)
|
(start-agent)
|
||||||
(create-file
|
(create-file
|
||||||
|
@ -354,7 +354,9 @@
|
|||||||
(if (flag "--extended-key-format" *args*)
|
(if (flag "--extended-key-format" *args*)
|
||||||
"enable-extended-key-format" "#enable-extended-key-format")
|
"enable-extended-key-format" "#enable-extended-key-format")
|
||||||
(string-append "pinentry-program " (tool 'pinentry))
|
(string-append "pinentry-program " (tool 'pinentry))
|
||||||
(string-append "scdaemon-program " (tool 'scdaemon))
|
(if (assoc "scdaemon" gpg-components)
|
||||||
|
(string-append "scdaemon-program " (tool 'scdaemon))
|
||||||
|
"# No scdaemon available")
|
||||||
))
|
))
|
||||||
|
|
||||||
;; Initialize the test environment, install appropriate configuration
|
;; Initialize the test environment, install appropriate configuration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user