From 00d2d15d81094af7f3c5980eeb31f6b1eb14ce65 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 26 Feb 2002 22:41:31 +0000 Subject: [PATCH] 2002-02-26 Marcus Brinkmann * verify.c (_gpgme_verify_status_handler): Fix the last change. --- gpgme/ChangeLog | 4 ++++ gpgme/verify.c | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 1b7930f..b8d396a 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2002-02-26 Marcus Brinkmann + + * verify.c (_gpgme_verify_status_handler): Fix the last change. + 2002-02-25 Marcus Brinkmann * engine.c (_gpgme_engine_op_encrypt_sign): New function. diff --git a/gpgme/verify.c b/gpgme/verify.c index ae63579..fd5debf 100644 --- a/gpgme/verify.c +++ b/gpgme/verify.c @@ -193,9 +193,14 @@ _gpgme_verify_status_handler (GpgmeCtx ctx, GpgStatusCode code, char *args) case STATUS_ERRSIG: /* The return code is the 6th argument, if it is 9, the problem is a missing key. */ - for (p = args, i = 0; p && i < 5; i++) - p = strchr (p, ' '); - if (p && *(++p) == '9' && *(++p) == '\0') + for (p = args, i = 0; p && *p && i < 5; i++) + { + p = strchr (p, ' '); + if (p) + while (*p == ' ') + p++; + } + if (p && *(p++) == '9' && (*p == '\0' || *p == ' ')) ctx->result.verify->status = GPGME_SIG_STAT_NOKEY; else ctx->result.verify->status = GPGME_SIG_STAT_ERROR; -- 2.26.2