From: David Shaw Date: Thu, 9 Jan 2003 17:24:41 +0000 (+0000) Subject: The latest GnuPG has new abilities to work with disabled keys. Part X-Git-Tag: mutt-1-5-4-rel~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=845de726e9900876ddf0a5aec165342b09b41c59;p=mutt The latest GnuPG has new abilities to work with disabled keys. Part of this change will eventually involve moving the 'd' that indicates a disabled key to a different part of the key listing. To smooth this transition, as of version 1.2.2, GnuPG will start giving the 'd' in both places (and will do this for a good long time). Here is a patch so mutt will accept either the old or new syntax. --- diff --git a/gnupgparse.c b/gnupgparse.c index cec23991..d566fe3a 100644 --- a/gnupgparse.c +++ b/gnupgparse.c @@ -281,7 +281,23 @@ static pgp_key_t *parse_pub_line (char *buf, int *is_subkey, pgp_key_t *k) case 11: /* signature class */ break; case 12: /* key capabilities */ - break; + dprint (2, (debugfile, "capabilities info: %s\n", p)); + + while(*p) + { + if(*p=='D') + { + flags |= KEYFLAG_DISABLED; + break; + } + + p++; + } + + if (!is_uid && !(*is_subkey && option (OPTPGPIGNORESUB))) + k->flags |= flags; + + break; default: break; } diff --git a/pgppubring.c b/pgppubring.c index 892c9ded..9e1e1179 100644 --- a/pgppubring.c +++ b/pgppubring.c @@ -897,8 +897,6 @@ static void pgpring_dump_keyblock (pgp_key_t *p) putchar ('r'); if (p->flags & KEYFLAG_EXPIRED) putchar ('e'); - if (p->flags & KEYFLAG_DISABLED) - putchar ('d'); for (uid = p->address; uid; uid = uid->next, first = 0) { @@ -922,7 +920,11 @@ static void pgpring_dump_keyblock (pgp_key_t *p) 1900 + tp->tm_year, tp->tm_mon + 1, tp->tm_mday); print_userid (uid->addr); + printf ("::"); + if (p->flags & KEYFLAG_DISABLED) + putchar ('D'); printf (":\n"); + if (dump_fingerprints) print_fingerprint (p); }