X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fcryptglue.c;h=904e4bb1efa55d3e5fc25f5087ac56e7ffd60fe3;hb=1e73e3243b4a748ee98b58f6f2512a14785bb36d;hp=046e7779b58e26477a99041d437d107d8042495d;hpb=82589516e2473b5451218d7b00a9dfbc3e18f3ca;p=apps%2Fmadmutt.git diff --git a/lib-crypt/cryptglue.c b/lib-crypt/cryptglue.c index 046e777..904e4bb 100644 --- a/lib-crypt/cryptglue.c +++ b/lib-crypt/cryptglue.c @@ -23,22 +23,62 @@ #include "mutt.h" #include "crypt.h" -#include "crypt-mod.h" - -/* - Generic -*/ - -extern struct crypt_module_specs crypt_mod_pgp_gpgme; -extern struct crypt_module_specs crypt_mod_smime_gpgme; +#include "crypt-gpgme.h" + +struct crypt_module_specs crypt_mod_SMIME_gpgme = { + smime_gpgme_init, + smime_gpgme_decrypt_mime, + smime_gpgme_application_handler, + NULL, /* encrypted_handler */ + smime_gpgme_findkeys, + smime_gpgme_sign_message, + smime_gpgme_verify_one, + smime_gpgme_send_menu, + + NULL, /* pgp_encrypt_message */ + NULL, /* pgp_make_key_attachment */ + NULL, /* pgp_check_traditional */ + NULL, /* pgp_traditional_encryptsign */ + NULL, /* pgp_invoke_getkeys */ + NULL, /* pgp_invoke_import */ + NULL, /* pgp_extract_keys_from_attachment_list */ + + NULL, /* smime_getkeys */ + smime_gpgme_verify_sender, + smime_gpgme_build_smime_entity, + NULL, /* smime_invoke_import */ +}; + +struct crypt_module_specs crypt_mod_PGP_gpgme = { + pgp_gpgme_init, + pgp_gpgme_decrypt_mime, + pgp_gpgme_application_handler, + pgp_gpgme_encrypted_handler, + pgp_gpgme_findkeys, + pgp_gpgme_sign_message, + pgp_gpgme_verify_one, + pgp_gpgme_send_menu, + + /* PGP specific. */ + pgp_gpgme_encrypt_message, + NULL, /* pgp_make_key_attachment, */ + pgp_gpgme_check_traditional, + NULL, /* pgp_traditional_encryptsign */ + NULL, /* pgp_invoke_getkeys */ + pgp_gpgme_invoke_import, /* pgp_invoke_import */ + pgp_gpgme_from_attachment_list, + /* pgp_extract_keys_from_attachment_list */ + + NULL, /* smime_getkeys */ + NULL, /* smime_verify_sender */ + NULL, /* smime_build_smime_entity */ + NULL, /* smime_invoke_import */ +}; void crypt_init (void) { - crypto_module_register (&crypt_mod_pgp_gpgme); - crypto_module_register (&crypt_mod_smime_gpgme); - (CRYPT_MOD_CALL(PGP, init))(); - (CRYPT_MOD_CALL (SMIME, init)) (); + (CRYPT_MOD_CALL(SMIME, init))(); } /* Show a message that a backend will be invoked. */ @@ -53,12 +93,7 @@ void crypt_invoke_message (int type) } -/* - - PGP - -*/ - +/* PGP */ /* Decrypt a PGP/MIME message. */ int crypt_pgp_decrypt_mime (FILE * a, FILE ** b, BODY * c, BODY ** d)