diff options
author | Kevin McCarthy <kevin@8t8.us> | 2018-12-31 14:19:44 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2018-12-31 15:22:01 -0800 |
commit | 3aa8d8a0e7a38df94ab61d7dbf303dda56248cae (patch) | |
tree | 9f5be0e4961dc68e189a049e9f2e863da976b327 /crypt-gpgme.c | |
parent | 86db373c8b70c3d0bda1e157ebd8f3c9409446e6 (diff) |
Remove dead code.
Most of these have been "#if 0" out for 10-20 years. Any utility in
keeping them around is miniscule at this point.
There are a few other "#if 0" in the code, but I've kept them for now.
Some are utility functions that are not used, but I think still may
have some documentation value.
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r-- | crypt-gpgme.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c index cb2f248b..3decd8f4 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -4222,28 +4222,6 @@ static crypt_key_t *get_candidates (LIST * hints, unsigned int app, int secret) if (key->disabled) flags |= KEYFLAG_DISABLED; -#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 = safe_calloc (1, sizeof *k); @@ -4814,10 +4792,6 @@ static char *find_keys (ADDRESS *adrlist, unsigned int app, int oppenc_mode) int r; int key_selected; -#if 0 - *r_application = APPLICATION_PGP|APPLICATION_SMIME; -#endif - for (p = adrlist; p ; p = p->next) { key_selected = 0; @@ -4858,13 +4832,8 @@ static char *find_keys (ADDRESS *adrlist, unsigned int app, int oppenc_mode) } else if (! oppenc_mode) { -#if 0 - k_info = crypt_getkeybystr (crypt_hook_val, KEYFLAG_CANENCRYPT, - *r_application, &forced_valid); -#else k_info = crypt_getkeybystr (crypt_hook_val, KEYFLAG_CANENCRYPT, app, &forced_valid); -#endif } } else if (r == MUTT_NO) @@ -4896,11 +4865,7 @@ static char *find_keys (ADDRESS *adrlist, unsigned int app, int oppenc_mode) k_info = crypt_ask_for_key (buf, q->mailbox, KEYFLAG_CANENCRYPT, -#if 0 - *r_application, -#else app, -#endif &forced_valid); } @@ -4915,13 +4880,6 @@ static char *find_keys (ADDRESS *adrlist, unsigned int app, int oppenc_mode) keyID = crypt_fpr_or_lkeyid (k_info); -#if 0 - if (k_info->flags & KEYFLAG_ISX509) - *r_application &= ~APPLICATION_PGP; - if (!(k_info->flags & KEYFLAG_ISX509)) - *r_application &= ~APPLICATION_SMIME; -#endif - bypass_selection: keylist_size += mutt_strlen (keyID) + 4 + 1; safe_realloc (&keylist, keylist_size); |