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 classic smime code.
18 #include "crypt-mod.h"
21 static void crypt_mod_smime_void_passphrase (void)
23 smime_void_passphrase ();
26 static int crypt_mod_smime_valid_passphrase (void)
28 return smime_valid_passphrase ();
31 static int crypt_mod_smime_decrypt_mime (FILE * a, FILE ** b, BODY * c,
34 return smime_decrypt_mime (a, b, c, d);
36 static int crypt_mod_smime_application_handler (BODY * m, STATE * s)
38 return smime_application_smime_handler (m, s);
41 static char *crypt_mod_smime_findkeys (ADDRESS * to, ADDRESS * cc,
44 return smime_findKeys (to, cc, bcc);
47 static BODY *crypt_mod_smime_sign_message (BODY * a)
49 return smime_sign_message (a);
52 static int crypt_mod_smime_verify_one (BODY * sigbdy, STATE * s,
55 return smime_verify_one (sigbdy, s, tempf);
58 static int crypt_mod_smime_send_menu (HEADER * msg, int *redraw)
60 return smime_send_menu (msg, redraw);
63 static void crypt_mod_smime_getkeys (ENVELOPE * env)
68 static int crypt_mod_smime_verify_sender (HEADER * h)
70 return smime_verify_sender (h);
73 static BODY *crypt_mod_smime_build_smime_entity (BODY * a, char *certlist)
75 return smime_build_smime_entity (a, certlist);
78 static void crypt_mod_smime_invoke_import (char *infile, char *mailbox)
80 smime_invoke_import (infile, mailbox);
84 struct crypt_module_specs crypt_mod_smime_classic = { APPLICATION_SMIME,
87 crypt_mod_smime_void_passphrase,
88 crypt_mod_smime_valid_passphrase,
89 crypt_mod_smime_decrypt_mime,
90 crypt_mod_smime_application_handler,
91 NULL, /* encrypted_handler */
92 crypt_mod_smime_findkeys,
93 crypt_mod_smime_sign_message,
94 crypt_mod_smime_verify_one,
95 crypt_mod_smime_send_menu,
97 NULL, /* pgp_encrypt_message */
98 NULL, /* pgp_make_key_attachment */
99 NULL, /* pgp_check_traditional */
100 NULL, /* pgp_traditional_encryptsign */
101 NULL, /* pgp_invoke_getkeys */
102 NULL, /* pgp_invoke_import */
103 NULL, /* pgp_extract_keys_from_attachment_list */
105 crypt_mod_smime_getkeys,
106 crypt_mod_smime_verify_sender,
107 crypt_mod_smime_build_smime_entity,
108 crypt_mod_smime_invoke_import,