+2009-11-13 <wk@g10code.com>
+
+ * sign.c (_gpgme_sign_status_handler): Handle SIG_CREATED_SEEN.
+ * engine-uiserver.c (uiserver_sign): Make sending SENDER optional.
+
2009-11-10 Marcus Brinkmann <marcus@g10code.de>
* op-support.c (_gpgme_op_reset): Instead of last change, only set
gpgme_error_t err = 0;
const char *protocol;
char *cmd;
+ gpgme_key_t key;
if (!uiserver || !in || !out)
return gpg_error (GPG_ERR_INV_VALUE);
(mode == GPGME_SIG_MODE_DETACH) ? " --detached" : "") < 0)
return gpg_error_from_errno (errno);
- {
- gpgme_key_t key = gpgme_signers_enum (ctx, 0);
- const char *s = NULL;
-
- if (key && key->uids)
- s = key->uids->email;
-
- if (s && strlen (s) < 80)
- {
- char buf[100];
-
- strcpy (stpcpy (buf, "SENDER --info "), s);
- err = uiserver_assuan_simple_command (uiserver->assuan_ctx, buf,
- uiserver->status.fnc,
- uiserver->status.fnc_value);
- }
- else
- err = gpg_error (GPG_ERR_INV_VALUE);
- gpgme_key_unref (key);
- if (err)
+ key = gpgme_signers_enum (ctx, 0);
+ if (key)
+ {
+ const char *s = NULL;
+
+ if (key && key->uids)
+ s = key->uids->email;
+
+ if (s && strlen (s) < 80)
+ {
+ char buf[100];
+
+ strcpy (stpcpy (buf, "SENDER --info "), s);
+ err = uiserver_assuan_simple_command (uiserver->assuan_ctx, buf,
+ uiserver->status.fnc,
+ uiserver->status.fnc_value);
+ }
+ else
+ err = gpg_error (GPG_ERR_INV_VALUE);
+ gpgme_key_unref (key);
+ if (err)
{
free (cmd);
return err;
break;
case GPGME_STATUS_EOF:
+ /* The UI server does not send information about the created
+ signature. This is irrelevant for this protocol and thus we
+ should not check for that. */
if (opd->result.invalid_signers)
err = gpg_error (GPG_ERR_UNUSABLE_SECKEY);
- else if (!opd->sig_created_seen)
+ else if (!opd->sig_created_seen
+ && ctx->protocol != GPGME_PROTOCOL_UISERVER)
err = gpg_error (GPG_ERR_GENERAL);
break;