* options.h, getkey.c (merge_selfsigs_subkey), gpg.c (main), sig-check.c
[gnupg.git] / g10 / getkey.c
index 4a84381..241f153 100644 (file)
@@ -1331,16 +1331,24 @@ parse_key_usage(PKT_signature *sig)
       /* first octet of the keyflags */
       flags=*p;
 
-      if(flags & 3)
+      if(flags & 1)
+       {
+         key_usage |= PUBKEY_USAGE_CERT;
+         flags&=~1;
+       }
+
+      if(flags & 2)
        {
          key_usage |= PUBKEY_USAGE_SIG;
-         flags&=~3;
+         flags&=~2;
        }
 
-      if(flags & 12)
+      /* We do not distinguish between encrypting communications and
+        encrypting storage. */
+      if(flags & (0x04|0x08))
        {
          key_usage |= PUBKEY_USAGE_ENC;
-         flags&=~12;
+         flags&=~(0x04|0x08);
        }
 
       if(flags & 0x20)
@@ -2035,10 +2043,6 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
 
     subpk->is_valid = 1;
 
-#ifndef DO_BACKSIGS
-    /* Pretend the backsig is present and accounted for. */
-    subpk->backsig=2;
-#else
     /* Find the first 0x19 embedded signature on our self-sig. */
     if(subpk->backsig==0)
       {
@@ -2078,7 +2082,6 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
            free_seckey_enc(backsig);
          }
       }
-#endif
 }