mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
sm: Fix returning of the ephemeral flag in keyboxd mode.
* sm/keydb.c (search_status_cb): Skip over the ubid.
This commit is contained in:
parent
c81a7b0936
commit
b810320b1b
14
sm/keydb.c
14
sm/keydb.c
@ -1512,6 +1512,7 @@ search_status_cb (void *opaque, const char *line)
|
|||||||
KEYDB_HANDLE hd = opaque;
|
KEYDB_HANDLE hd = opaque;
|
||||||
gpg_error_t err = 0;
|
gpg_error_t err = 0;
|
||||||
const char *s;
|
const char *s;
|
||||||
|
unsigned int n;
|
||||||
|
|
||||||
if ((s = has_leading_keyword (line, "PUBKEY_INFO")))
|
if ((s = has_leading_keyword (line, "PUBKEY_INFO")))
|
||||||
{
|
{
|
||||||
@ -1522,13 +1523,14 @@ search_status_cb (void *opaque, const char *line)
|
|||||||
hd->last_ubid_valid = 0;
|
hd->last_ubid_valid = 0;
|
||||||
while (*s && !spacep (s))
|
while (*s && !spacep (s))
|
||||||
s++;
|
s++;
|
||||||
if (hex2fixedbuf (s, hd->last_ubid, sizeof hd->last_ubid))
|
if (!(n=hex2fixedbuf (s, hd->last_ubid, sizeof hd->last_ubid)))
|
||||||
hd->last_ubid_valid = 1;
|
|
||||||
else
|
|
||||||
err = gpg_error (GPG_ERR_INV_VALUE);
|
err = gpg_error (GPG_ERR_INV_VALUE);
|
||||||
while (spacep (s))
|
else
|
||||||
s++;
|
{
|
||||||
hd->last_is_ephemeral = (*s == 'e');
|
hd->last_ubid_valid = 1;
|
||||||
|
s += n;
|
||||||
|
hd->last_is_ephemeral = (*s == 'e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user