Wrapper around crypto functions. More...
#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "core/lib.h"
#include "cryptglue.h"
#include "lib.h"
#include "crypt_mod.h"
#include "config/lib.h"
#include "email/lib.h"
#include "autocrypt/lib.h"
#include "crypt_gpgme.h"
#include "globals.h"
Go to the source code of this file.
Macros | |
#define | CRYPT_MOD_CALL_CHECK(identifier, func) |
#define | CRYPT_MOD_CALL(identifier, func) (*(crypto_module_lookup(APPLICATION_##identifier))->func) |
Variables | |
const struct CryptModuleSpecs | CryptModPgpClassic |
CLI PGP - Implements CryptModuleSpecs. | |
const struct CryptModuleSpecs | CryptModSmimeClassic |
CLI SMIME - Implements CryptModuleSpecs. | |
const struct CryptModuleSpecs | CryptModPgpGpgme |
GPGME PGP - Implements CryptModuleSpecs. | |
const struct CryptModuleSpecs | CryptModSmimeGpgme |
GPGME SMIME - Implements CryptModuleSpecs. | |
Wrapper around crypto functions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file cryptglue.c.
#define CRYPT_MOD_CALL_CHECK | ( | identifier, | |
func | |||
) |
Definition at line 80 of file cryptglue.c.
#define CRYPT_MOD_CALL | ( | identifier, | |
func | |||
) | (*(crypto_module_lookup(APPLICATION_##identifier))->func) |
Definition at line 86 of file cryptglue.c.
void crypt_init | ( | void | ) |
Initialise the crypto backends.
This calls CryptModuleSpecs::init()
Definition at line 94 of file cryptglue.c.
void crypt_cleanup | ( | void | ) |
Clean up backend.
Definition at line 142 of file cryptglue.c.
void crypt_invoke_message | ( | SecurityFlags | type | ) |
Display an informative message.
type | Crypto type, see SecurityFlags |
Show a message that a backend will be invoked.
Definition at line 157 of file cryptglue.c.
bool crypt_has_module_backend | ( | SecurityFlags | type | ) |
Is there a crypto backend for a given type?
type | Crypto type, see SecurityFlags |
true | Backend is present |
false | Backend is not present |
Definition at line 171 of file cryptglue.c.
void crypt_pgp_void_passphrase | ( | void | ) |
Wrapper for CryptModuleSpecs::void_passphrase()
Definition at line 191 of file cryptglue.c.
bool crypt_pgp_valid_passphrase | ( | void | ) |
Wrapper for CryptModuleSpecs::valid_passphrase()
Definition at line 200 of file cryptglue.c.
Wrapper for CryptModuleSpecs::decrypt_mime()
Definition at line 211 of file cryptglue.c.
void crypt_pgp_invoke_getkeys | ( | struct Address * | addr | ) |
Wrapper for CryptModuleSpecs::pgp_invoke_getkeys()
Definition at line 274 of file cryptglue.c.
bool crypt_pgp_check_traditional | ( | FILE * | fp, |
struct Body * | b, | ||
bool | just_one | ||
) |
Wrapper for CryptModuleSpecs::pgp_check_traditional()
Definition at line 283 of file cryptglue.c.
struct Body * crypt_pgp_traditional_encryptsign | ( | struct Body * | a, |
SecurityFlags | flags, | ||
char * | keylist | ||
) |
Wrapper for CryptModuleSpecs::pgp_traditional_encryptsign()
Definition at line 294 of file cryptglue.c.
struct Body * crypt_pgp_make_key_attachment | ( | void | ) |
Wrapper for CryptModuleSpecs::pgp_make_key_attachment()
Definition at line 305 of file cryptglue.c.
char * crypt_pgp_find_keys | ( | struct AddressList * | addrlist, |
bool | oppenc_mode | ||
) |
Wrapper for CryptModuleSpecs::find_keys()
Definition at line 316 of file cryptglue.c.
Wrapper for CryptModuleSpecs::sign_message()
Definition at line 327 of file cryptglue.c.
struct Body * crypt_pgp_encrypt_message | ( | struct Email * | e, |
struct Body * | a, | ||
char * | keylist, | ||
int | sign, | ||
const struct AddressList * | from | ||
) |
Wrapper for CryptModuleSpecs::pgp_encrypt_message()
Definition at line 338 of file cryptglue.c.
void crypt_pgp_invoke_import | ( | const char * | fname | ) |
Wrapper for CryptModuleSpecs::pgp_invoke_import()
Definition at line 364 of file cryptglue.c.
Wrapper for CryptModuleSpecs::verify_one()
Definition at line 373 of file cryptglue.c.
SecurityFlags crypt_pgp_send_menu | ( | struct Email * | e | ) |
Wrapper for CryptModuleSpecs::send_menu()
Definition at line 384 of file cryptglue.c.
void crypt_pgp_extract_key_from_attachment | ( | FILE * | fp, |
struct Body * | top | ||
) |
Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment()
Definition at line 395 of file cryptglue.c.
void crypt_pgp_set_sender | ( | const char * | sender | ) |
Wrapper for CryptModuleSpecs::set_sender()
Definition at line 404 of file cryptglue.c.
void crypt_smime_void_passphrase | ( | void | ) |
Wrapper for CryptModuleSpecs::void_passphrase()
Definition at line 413 of file cryptglue.c.
bool crypt_smime_valid_passphrase | ( | void | ) |
Wrapper for CryptModuleSpecs::valid_passphrase()
Definition at line 422 of file cryptglue.c.
Wrapper for CryptModuleSpecs::decrypt_mime()
Definition at line 433 of file cryptglue.c.
void crypt_smime_getkeys | ( | struct Envelope * | env | ) |
Wrapper for CryptModuleSpecs::smime_getkeys()
Definition at line 455 of file cryptglue.c.
Wrapper for CryptModuleSpecs::smime_verify_sender()
Definition at line 464 of file cryptglue.c.
char * crypt_smime_find_keys | ( | struct AddressList * | addrlist, |
bool | oppenc_mode | ||
) |
Wrapper for CryptModuleSpecs::find_keys()
Definition at line 475 of file cryptglue.c.
Wrapper for CryptModuleSpecs::sign_message()
Definition at line 486 of file cryptglue.c.
Wrapper for CryptModuleSpecs::smime_build_smime_entity()
Definition at line 497 of file cryptglue.c.
void crypt_smime_invoke_import | ( | const char * | infile, |
const char * | mailbox | ||
) |
Wrapper for CryptModuleSpecs::smime_invoke_import()
Definition at line 508 of file cryptglue.c.
Wrapper for CryptModuleSpecs::verify_one()
Definition at line 517 of file cryptglue.c.
SecurityFlags crypt_smime_send_menu | ( | struct Email * | e | ) |
Wrapper for CryptModuleSpecs::send_menu()
Definition at line 528 of file cryptglue.c.
void crypt_smime_set_sender | ( | const char * | sender | ) |
Wrapper for CryptModuleSpecs::set_sender()
Definition at line 539 of file cryptglue.c.
|
extern |
CLI PGP - Implements CryptModuleSpecs.
Definition at line 42 of file crypt_mod_pgp_classic.c.
|
extern |
CLI SMIME - Implements CryptModuleSpecs.
Definition at line 56 of file crypt_mod_smime_classic.c.
|
extern |
GPGME PGP - Implements CryptModuleSpecs.
Definition at line 58 of file crypt_mod_pgp_gpgme.c.
|
extern |
GPGME SMIME - Implements CryptModuleSpecs.
Definition at line 58 of file crypt_mod_smime_gpgme.c.