]> granicus.if.org Git - neomutt/commitdiff
The latest GnuPG has new abilities to work with disabled keys. Part
authorDavid Shaw <dshaw@jabberwocky.com>
Thu, 9 Jan 2003 17:24:41 +0000 (17:24 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Thu, 9 Jan 2003 17:24:41 +0000 (17:24 +0000)
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.

gnupgparse.c
pgppubring.c

index cec23991b105c2898d314e9ca9c5f3699a910cf1..d566fe3a1997f802399686fef37af5eb26388788 100644 (file)
@@ -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;
     }
index 892c9ded18372c2f0cc20d0ee59ca14eeb3cebd6..9e1e1179f4ef7555ffcd48d113d9d44fcc22b618 100644 (file)
@@ -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);
       }