[svn] gpgme - r1455 - trunk/src
svn author wk
cvs at cvs.gnupg.org
Tue Mar 9 12:15:53 CET 2010
Author: wk
Date: 2010-03-09 12:15:53 +0100 (Tue, 09 Mar 2010)
New Revision: 1455
Modified:
trunk/src/ChangeLog
trunk/src/engine-gpgsm.c
Log:
Hack to start the agent as a side-effect of a secret key listing
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2010-02-17 21:40:02 UTC (rev 1454)
+++ trunk/src/ChangeLog 2010-03-09 11:15:53 UTC (rev 1455)
@@ -1,3 +1,7 @@
+2010-03-09 Werner Koch <wk at g10code.com>
+
+ * engine-gpgsm.c (gpgsm_keylist): Try to start the agent.
+
2010-02-17 Werner Koch <wk at g10code.com>
* posix-io.c (notify_table): Change implementation.
Modified: trunk/src/engine-gpgsm.c
===================================================================
--- trunk/src/engine-gpgsm.c 2010-02-17 21:40:02 UTC (rev 1454)
+++ trunk/src/engine-gpgsm.c 2010-03-09 11:15:53 UTC (rev 1455)
@@ -1538,6 +1538,18 @@
if (!pattern)
pattern = "";
+ /* Hack to make sure that the agent is started. Only if the agent
+ has been started an application may connect to the agent via
+ GPGME_PROTOCOL_ASSUAN - for example to look for smartcards. We
+ do this only if a secret key listing has been requested. In
+ general this is not needed because a secret key listing starts
+ the agent. However on a fresh installation no public keys are
+ available and thus there is no need for gpgsm to ask the agent
+ whether a secret key exists for the public key. */
+ if (secret_only)
+ gpgsm_assuan_simple_command (gpgsm->assuan_ctx, "GETINFO agent-check",
+ NULL, NULL);
+
/* Always send list-mode option because RESET does not reset it. */
if (asprintf (&line, "OPTION list-mode=%d", (list_mode & 3)) < 0)
return gpg_error_from_errno (errno);
More information about the Gnupg-commits
mailing list