summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnupgparse.c15
-rw-r--r--pgppubring.c5
2 files changed, 15 insertions, 5 deletions
diff --git a/gnupgparse.c b/gnupgparse.c
index 3d8e1691..47532c9b 100644
--- a/gnupgparse.c
+++ b/gnupgparse.c
@@ -211,8 +211,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k)
k->numalg = atoi (p);
k->algorithm = pgp_pkalgbytype (atoi (p));
}
-
- k->flags |= pgp_get_abilities (atoi (p));
break;
}
case 5: /* 16 hex digits with the long keyid. */
@@ -285,13 +283,20 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k)
while(*p)
{
- if(*p=='D')
+ switch(*p++)
{
+ case 'D':
flags |= KEYFLAG_DISABLED;
break;
- }
- p++;
+ case 'e':
+ flags |= KEYFLAG_CANENCRYPT;
+ break;
+
+ case 's':
+ flags |= KEYFLAG_CANSIGN;
+ break;
+ }
}
if (!is_uid && !(*is_subkey && option (OPTPGPIGNORESUB)))
diff --git a/pgppubring.c b/pgppubring.c
index b97f910f..878b10af 100644
--- a/pgppubring.c
+++ b/pgppubring.c
@@ -926,6 +926,11 @@ static void pgpring_dump_keyblock (pgp_key_t p)
print_userid (uid->addr);
printf ("::");
+
+ if(pgp_canencrypt(p->numalg))
+ putchar ('e');
+ if(pgp_cansign(p->numalg))
+ putchar ('s');
if (p->flags & KEYFLAG_DISABLED)
putchar ('D');
printf (":\n");