diff options
author | Moritz Schulte <moritz@g10code.com> | 2004-06-17 20:36:13 +0000 |
---|---|---|
committer | Moritz Schulte <moritz@g10code.com> | 2004-06-17 20:36:13 +0000 |
commit | e48dd50afa44e0c6ee30f7ae6ebbe2a3d9179f7b (patch) | |
tree | 499908cd1df56ebbb660122665d1aeed291a98e1 /keymap.c | |
parent | 6c365235e8df76ca3fdaaeb6606738938672b58d (diff) |
This is the sequel to the crypto modularization changes I did on
2003-01-21. Moritz added another abstraction layer which cleans up
the code and allows the crypto modules to use their own option menu.
Everything should work as it used to but is now in a really good
shape for part III, the Return of the GnuPG Easy Makers. -wk
* crypt-mod-pgp-classic.c, crypt-mod-smime-classic.c, crypt-mod.c,
crypt-mod.h: New files.
* smime.c (smime_valid_passphrase, smime_send_menu): New functions.
* smime.h: Removed macro: smime_valid_passphrase.
Declared: smime_valid_passphrase, smime_send_menu.
* pgp.c: Include "mutt_menu.h".
(pgp_valid_passphrase, pgp_send_menu): New functions.
* pgp.h: Removed macro: pgp_valid_passphrase.
Declared: pgp_valid_passphrase, pgp_send_menu.
* mutt_curses.h: Declare: mutt_need_hard_redraw.
* mutt_crypt.h: Declare: crypt_pgp_valid_passphrase,
crypt_pgp_send_menu, crypt_smime_valid_passphrase,
crypt_smime_send_menu, crypt_init.
Adjust WithCrypto definition since the GPGME backend does not
exclude anymore the other `classic' backends.
(KEYFLAG_ISX509): New symbol.
* mutt.h (enum): New symbol: OPTCRYPTUSEGPGME.
(struct body): New member: is_signed_data, warnsig.
* main.c (main): Call crypt_init.
* keymap.c (km_get_table): Support for MENU_KEY_SELECT_PGP and
MENU_KEY_SELECT_SMIME.
(Menus): Added entries fuer MENU_KEY_SELECT_PGP and
MENU_KEY_SELECT_SMIME.
(km_init): Create bindings for MENU_KEY_SELECT_PGP and
MENU_KEY_SELECT_SMIME.
* keymap.h (enum): New enum symbols: MENU_KEY_SELECT_PGP,
MENU_KEY_SELECT_SMIME.
* init.h: New configuration variable: crypt_use_gpgme.
* compose.c (pgp_send_menu, smime_send_menu): Removed functions,
they are now contained in the crypto backend modules.
(mutt_compose_menu): Use crypt_pgp_send_menu and
crypt_smime_send_menu instead pgp_send_menu and smime_send_menu.
* cryptglue.c: Slightly rewritten in order to make use of the
module mechanism used to access crypto backends.
* curs_lib.c (mutt_need_hard_redraw): New function.
* crypt.c (crypt_forget_passphrase): Adjust for new crypto backend
interface.
(crypt_valid_passphrase): Stripped, use calls to
crypt_pgp_valid_passphrase and crypt_smime_valid_passphrase.
Diffstat (limited to 'keymap.c')
-rw-r--r-- | keymap.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -40,7 +40,11 @@ struct mapping_t Menus[] = { { "postpone", MENU_POST }, { "pgp", MENU_PGP }, { "smime", MENU_SMIME }, - +#ifdef HAVE_GPGME + { "key_select_pgp", MENU_KEY_SELECT_PGP }, + { "key_select_smime", MENU_KEY_SELECT_SMIME }, +#endif + #ifdef MIXMASTER { "mix", MENU_MIX }, #endif @@ -557,6 +561,11 @@ void km_init (void) if ((WithCrypto & APPLICATION_SMIME)) create_bindings (OpSmime, MENU_SMIME); +#ifdef CRYPT_BACKEND_GPGME + create_bindings (OpPgp, MENU_KEY_SELECT_PGP); + create_bindings (OpSmime, MENU_KEY_SELECT_SMIME); +#endif + #ifdef MIXMASTER create_bindings (OpMix, MENU_MIX); @@ -781,6 +790,13 @@ struct binding_t *km_get_table (int menu) case MENU_PGP: return (WithCrypto & APPLICATION_PGP)? OpPgp:NULL; +#ifdef CRYPT_BACKEND_GPGME + case MENU_KEY_SELECT_PGP: + return OpPgp; + case MENU_KEY_SELECT_SMIME: + return OpSmime; +#endif + #ifdef MIXMASTER case MENU_MIX: return OpMix; |