old disabled code
authorPierre Habouzit <madcoder@debian.org>
Tue, 3 Apr 2007 13:38:57 +0000 (15:38 +0200)
committerPierre Habouzit <madcoder@debian.org>
Tue, 3 Apr 2007 13:38:57 +0000 (15:38 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
lib-crypt/crypt-gpgme.c

index d17abb8..e575b3b 100644 (file)
@@ -3099,26 +3099,6 @@ static crypt_key_t *get_candidates (string_list_t * hints, unsigned int app,
       if (key_check_cap (key, KEY_CAP_CAN_SIGN))
         flags |= KEYFLAG_CANSIGN;
 
-#if 0                           /* DISABLED code */
-      if (!flags) {
-        /* Bug in gpg.  Capabilities are not listed for secret
-           keys.  Try to deduce them from the algorithm. */
-
-        switch (key->subkeys[0].pubkey_algo) {
-        case GPGME_PK_RSA:
-          flags |= KEYFLAG_CANENCRYPT;
-          flags |= KEYFLAG_CANSIGN;
-          break;
-        case GPGME_PK_ELG_E:
-          flags |= KEYFLAG_CANENCRYPT;
-          break;
-        case GPGME_PK_DSA:
-          flags |= KEYFLAG_CANSIGN;
-          break;
-        }
-      }
-#endif /* DISABLED code */
-
       for (idx = 0, uid = key->uids; uid; idx++, uid = uid->next) {
         k = p_new(crypt_key_t, 1);
         k->kobj = key;