2002-02-25 Marcus Brinkmann <marcus@g10code.de>

* verify.c (_gpgme_verify_status_handler): Parse the args line to
	see if the problem is due to a missing key, and report that back
	to the user.
This commit is contained in:
Marcus Brinkmann 2002-02-25 19:08:51 +00:00
parent 5547faf658
commit d75d6fb262
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2002-02-25 Marcus Brinkmann <marcus@g10code.de>
* verify.c (_gpgme_verify_status_handler): Parse the args line to
see if the problem is due to a missing key, and report that back
to the user.
2002-02-25 Marcus Brinkmann <marcus@g10code.de> 2002-02-25 Marcus Brinkmann <marcus@g10code.de>
* context.h (struct gpgme_context_s): New member include_certs. * context.h (struct gpgme_context_s): New member include_certs.

View File

@ -191,9 +191,14 @@ _gpgme_verify_status_handler (GpgmeCtx ctx, GpgStatusCode code, char *args)
break; break;
case STATUS_ERRSIG: case STATUS_ERRSIG:
ctx->result.verify->status = GPGME_SIG_STAT_ERROR; /* The return code is the 6th argument, if it is 9, the problem
/* FIXME: Distinguish between a regular error and a missing key. is a missing key. */
This is encoded in the args. */ for (p = args, i = 0; p && i < 5; i++)
p = strchr (p, ' ');
if (p && *(++p) == '9' && *(++p) == '\0')
ctx->result.verify->status = GPGME_SIG_STAT_NOKEY;
else
ctx->result.verify->status = GPGME_SIG_STAT_ERROR;
/* Store the keyID in the fpr field. */ /* Store the keyID in the fpr field. */
p = ctx->result.verify->fpr; p = ctx->result.verify->fpr;
for (i = 0; i < DIM(ctx->result.verify->fpr) for (i = 0; i < DIM(ctx->result.verify->fpr)