d0e48515d2a2682caeb32f2a65967e4b24cb5ecf
[apps/madmutt.git] / lib-crypt / crypt-mod-pgp-gpgme.c
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 2004 g10 Code GmbH
4  *
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.
8  */
9
10 /* This is a crytpo module wrapping the gpgme based pgp code.  */
11
12 #include <lib-lib/lib-lib.h>
13
14 #include <lib-crypt/crypt-mod.h>
15 #include "crypt-gpgme.h"
16
17 static void crypt_mod_pgp_void_passphrase (void)
18 {
19     /* Handled by gpg-agent.  */
20 }
21
22 static int crypt_mod_pgp_valid_passphrase (void)
23 {
24     /* Handled by gpg-agent.  */
25     return 1;
26 }
27
28 struct crypt_module_specs crypt_mod_pgp_gpgme = { APPLICATION_PGP,
29     {
30         /* Common.  */
31         pgp_gpgme_init,
32         crypt_mod_pgp_void_passphrase,
33         crypt_mod_pgp_valid_passphrase,
34         pgp_gpgme_decrypt_mime,
35         pgp_gpgme_application_handler,
36         pgp_gpgme_encrypted_handler,
37         pgp_gpgme_findkeys,
38         pgp_gpgme_sign_message,
39         pgp_gpgme_verify_one,
40         pgp_gpgme_send_menu,
41
42         /* PGP specific.  */
43         pgp_gpgme_encrypt_message,
44         NULL,                        /* pgp_make_key_attachment, */
45         pgp_gpgme_check_traditional,
46         NULL,                        /* pgp_traditional_encryptsign  */
47         NULL,                        /* pgp_invoke_getkeys  */
48         pgp_gpgme_invoke_import,     /* pgp_invoke_import  */
49         pgp_gpgme_from_attachment_list,
50                                      /* pgp_extract_keys_from_attachment_list  */
51
52         NULL,                        /* smime_getkeys */
53         NULL,                        /* smime_verify_sender */
54         NULL,                        /* smime_build_smime_entity */
55         NULL,                        /* smime_invoke_import */
56     }
57 };