summaryrefslogtreecommitdiffstats
path: root/gnupgparse.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-02-09 23:04:28 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-02-09 23:04:28 +0000
commitef27d6dd7737e9bcd4f131c4c8853f4fb9a4cd01 (patch)
tree062ade84e3dda7bdc60d54dbbb2e1e94f7d230bc /gnupgparse.c
parentcb5d7ef45ca9df14c24a0002baea9183c93a2451 (diff)
browser.h: re-insert the "tagged" component.
pgp support: fix handling of PGP 5 subkeys, algorithm 20.
Diffstat (limited to 'gnupgparse.c')
-rw-r--r--gnupgparse.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gnupgparse.c b/gnupgparse.c
index 4b192368..d4900a6e 100644
--- a/gnupgparse.c
+++ b/gnupgparse.c
@@ -225,8 +225,7 @@ pgp_key_t *gpg_get_candidates (struct pgp_vinfo * pgp, pgp_ring_t keyring,
k = NULL;
while (fgets (buf, sizeof (buf) - 1, fp))
{
- kk = parse_pub_line (buf, &is_sub, k);
- if (!kk)
+ if (!(kk = parse_pub_line (buf, &is_sub, k)))
continue;
/* Only append kk to the list if it's new. */
@@ -235,16 +234,22 @@ pgp_key_t *gpg_get_candidates (struct pgp_vinfo * pgp, pgp_ring_t keyring,
if (k)
kend = &k->next;
*kend = k = kk;
-
+
if (is_sub)
{
- k->flags |= KEYFLAG_SUBKEY;
- k->parent = mainkey;
+ pgp_uid_t **l;
+
+ k->flags |= KEYFLAG_SUBKEY;
+ k->parent = mainkey;
+ for (l = &k->address; *l; l = &(*l)->next)
+ ;
+ *l = pgp_copy_uids (mainkey->address, k);
}
else
mainkey = k;
}
}
+
if (ferror (fp))
mutt_perror ("fgets");