Fixes for the UI server engine .

This commit is contained in:
Werner Koch 2009-11-17 13:06:05 +00:00
parent aff1ed3fb6
commit 1cb08a35a6
3 changed files with 32 additions and 21 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -1153,6 +1153,7 @@ uiserver_sign (void *engine, gpgme_data_t in, gpgme_data_t out,
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);
@ -1169,8 +1170,9 @@ uiserver_sign (void *engine, gpgme_data_t in, gpgme_data_t out,
(mode == GPGME_SIG_MODE_DETACH) ? " --detached" : "") < 0)
return gpg_error_from_errno (errno);
key = gpgme_signers_enum (ctx, 0);
if (key)
{
gpgme_key_t key = gpgme_signers_enum (ctx, 0);
const char *s = NULL;
if (key && key->uids)

View File

@ -286,9 +286,13 @@ _gpgme_sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
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;