2 * Copyright notice from original mutt:
3 * Copyright (C) 2004 g10 Code GmbH
5 * This file is part of mutt-ng, see http://www.muttng.org/.
6 * It's licensed under the GNU General Public License,
7 * please see the file GPL in the top level source directory.
11 This is a crytpo module wrapping the gpgme based smime code.
14 #include <lib-lib/lib-lib.h>
16 #include <lib-crypt/crypt-mod.h>
17 #include "crypt-gpgme.h"
19 static void crypt_mod_smime_init (void)
24 static int crypt_mod_smime_decrypt_mime (FILE * a, FILE ** b, BODY * c,
27 return smime_gpgme_decrypt_mime (a, b, c, d);
30 static int crypt_mod_smime_application_handler (BODY * m, STATE * s)
32 return smime_gpgme_application_handler (m, s);
35 static char *crypt_mod_smime_findkeys (address_t * to, address_t * cc,
38 return smime_gpgme_findkeys (to, cc, bcc);
41 static BODY *crypt_mod_smime_sign_message (BODY * a)
43 return smime_gpgme_sign_message (a);
46 static int crypt_mod_smime_verify_one (BODY * sigbdy, STATE * s,
49 return smime_gpgme_verify_one (sigbdy, s, tempf);
52 static int crypt_mod_smime_send_menu (HEADER * msg, int *redraw)
54 return smime_gpgme_send_menu (msg, redraw);
57 static BODY *crypt_mod_smime_build_smime_entity (BODY * a, char *certlist)
59 return smime_gpgme_build_smime_entity (a, certlist);
62 static int crypt_mod_smime_verify_sender (HEADER * h)
64 return smime_gpgme_verify_sender (h);
67 struct crypt_module_specs crypt_mod_smime_gpgme = { APPLICATION_SMIME,
70 crypt_mod_smime_decrypt_mime,
71 crypt_mod_smime_application_handler,
72 NULL, /* encrypted_handler */
73 crypt_mod_smime_findkeys,
74 crypt_mod_smime_sign_message,
75 crypt_mod_smime_verify_one,
76 crypt_mod_smime_send_menu,
78 NULL, /* pgp_encrypt_message */
79 NULL, /* pgp_make_key_attachment */
80 NULL, /* pgp_check_traditional */
81 NULL, /* pgp_traditional_encryptsign */
82 NULL, /* pgp_invoke_getkeys */
83 NULL, /* pgp_invoke_import */
84 NULL, /* pgp_extract_keys_from_attachment_list */
86 NULL, /* smime_getkeys */
87 crypt_mod_smime_verify_sender,
88 crypt_mod_smime_build_smime_entity,
89 NULL, /* smime_invoke_import */