aboutsummaryrefslogtreecommitdiffstats
path: root/src/op-support.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-08-06 17:17:18 +0000
committerWerner Koch <[email protected]>2009-08-06 17:17:18 +0000
commit0fcf3ee915a1c90bd7471ec371924a1ff7a5fcdd (patch)
treebb3ff05956cb91ba2dae86d75b3ac900fe3dc488 /src/op-support.c
parentAdd issing file. (diff)
downloadgpgme-0fcf3ee915a1c90bd7471ec371924a1ff7a5fcdd.tar.gz
gpgme-0fcf3ee915a1c90bd7471ec371924a1ff7a5fcdd.zip
Fix detection of invalid signer keys.
Support the new INV_SGNR status code.
Diffstat (limited to 'src/op-support.c')
-rw-r--r--src/op-support.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/op-support.c b/src/op-support.c
index c3ba7785..90e1283e 100644
--- a/src/op-support.c
+++ b/src/op-support.c
@@ -162,8 +162,8 @@ _gpgme_op_reset (gpgme_ctx_t ctx, int type)
}
-/* Parse the INV_RECP status line in ARGS and return the result in
- KEY. */
+/* Parse the INV_RECP or INV-SNDR status line in ARGS and return the
+ result in KEY. */
gpgme_error_t
_gpgme_parse_inv_recp (char *args, gpgme_invalid_key_t *key)
{
@@ -177,7 +177,7 @@ _gpgme_parse_inv_recp (char *args, gpgme_invalid_key_t *key)
inv_key->next = NULL;
errno = 0;
reason = strtol (args, &tail, 0);
- if (errno || args == tail || *tail != ' ')
+ if (errno || args == tail || (*tail && *tail != ' '))
{
/* The crypto backend does not behave. */
free (inv_key);
@@ -236,7 +236,7 @@ _gpgme_parse_inv_recp (char *args, gpgme_invalid_key_t *key)
break;
}
- while (*tail == ' ')
+ while (*tail && *tail == ' ')
tail++;
if (*tail)
{