X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fcryptglue.c;fp=lib-crypt%2Fcryptglue.c;h=ea5ba5919e691658527385f09573fad2425c35d3;hb=848103a9e131502955368274d94a818050978cc2;hp=742c4a0daa8e99e6aa59d73538de60a4c64bcdac;hpb=6d2a5b1e45ea9606d27a23c068bd4e8e5f94f341;p=apps%2Fmadmutt.git diff --git a/lib-crypt/cryptglue.c b/lib-crypt/cryptglue.c index 742c4a0..ea5ba59 100644 --- a/lib-crypt/cryptglue.c +++ b/lib-crypt/cryptglue.c @@ -26,67 +26,60 @@ #include "crypt-mod.h" #include "crypt-gpgme.h" -static struct crypt_module_specs crypt_mod_smime_gpgme = { APPLICATION_SMIME, - { - 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_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 */ }; -static struct crypt_module_specs crypt_mod_pgp_gpgme = { APPLICATION_PGP, - { - 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 */ - } +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. */ @@ -101,12 +94,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)