NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
crypt_mod_smime_gpgme.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stdbool.h>
31
#include <stdio.h>
32
#include "
lib.h
"
33
#include "
crypt_gpgme.h
"
34
#include "
crypt_mod.h
"
35
41
static
void
smime_gpgme_void_passphrase
(
void
)
42
{
43
}
44
50
static
bool
smime_gpgme_valid_passphrase
(
void
)
51
{
52
return
true
;
53
}
54
58
const
struct
CryptModuleSpecs
CryptModSmimeGpgme
= {
59
// clang-format off
60
APPLICATION_SMIME
,
61
62
smime_gpgme_init
,
63
NULL,
/* cleanup */
64
smime_gpgme_void_passphrase
,
65
smime_gpgme_valid_passphrase
,
66
smime_gpgme_decrypt_mime
,
67
smime_gpgme_application_handler
,
68
NULL,
/* encrypted_handler */
69
smime_gpgme_find_keys
,
70
smime_gpgme_sign_message
,
71
smime_gpgme_verify_one
,
72
smime_gpgme_send_menu
,
73
NULL,
/* set_sender */
74
75
NULL,
/* pgp_encrypt_message */
76
NULL,
/* pgp_make_key_attachment */
77
NULL,
/* pgp_check_traditional */
78
NULL,
/* pgp_traditional_encryptsign */
79
NULL,
/* pgp_invoke_getkeys */
80
NULL,
/* pgp_invoke_import */
81
NULL,
/* pgp_extract_key_from_attachment */
82
83
NULL,
/* smime_getkeys */
84
smime_gpgme_verify_sender
,
85
smime_gpgme_build_smime_entity
,
86
NULL,
/* smime_invoke_import */
87
// clang-format on
88
};
crypt_gpgme.h
Wrapper for PGP/SMIME calls to GPGME.
crypt_mod.h
Register crypto modules.
CryptModSmimeGpgme
const struct CryptModuleSpecs CryptModSmimeGpgme
GPGME SMIME - Implements CryptModuleSpecs -.
Definition
crypt_mod_smime_gpgme.c:58
smime_gpgme_application_handler
int smime_gpgme_application_handler(struct Body *b, struct State *state)
Manage the MIME type "application/pgp" or "application/smime" - Implements CryptModuleSpecs::applicat...
Definition
crypt_gpgme.c:2883
smime_gpgme_decrypt_mime
int smime_gpgme_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
Decrypt an encrypted MIME part - Implements CryptModuleSpecs::decrypt_mime() -.
Definition
crypt_gpgme.c:2014
smime_gpgme_find_keys
char * smime_gpgme_find_keys(const struct AddressList *addrlist, bool oppenc_mode)
Find the keyids of the recipients of a message - Implements CryptModuleSpecs::find_keys() -.
Definition
crypt_gpgme.c:3711
smime_gpgme_init
void smime_gpgme_init(void)
Initialise the crypto module - Implements CryptModuleSpecs::init() -.
Definition
crypt_gpgme.c:3919
smime_gpgme_send_menu
SecurityFlags smime_gpgme_send_menu(struct Email *e)
Ask the user whether to sign and/or encrypt the email - Implements CryptModuleSpecs::send_menu() -.
Definition
crypt_gpgme.c:4103
smime_gpgme_sign_message
struct Body * smime_gpgme_sign_message(struct Body *b, const struct AddressList *from)
Cryptographically sign the Body of a message - Implements CryptModuleSpecs::sign_message() -.
Definition
crypt_gpgme.c:1046
smime_gpgme_build_smime_entity
struct Body * smime_gpgme_build_smime_entity(struct Body *b, char *keylist)
Encrypt the email body to all recipients - Implements CryptModuleSpecs::smime_build_smime_entity() -.
Definition
crypt_gpgme.c:1100
smime_gpgme_verify_sender
int smime_gpgme_verify_sender(struct Email *e, struct Message *msg)
Does the sender match the certificate?
Definition
crypt_gpgme.c:4194
smime_gpgme_valid_passphrase
static bool smime_gpgme_valid_passphrase(void)
Ensure we have a valid passphrase - Implements CryptModuleSpecs::valid_passphrase() -.
Definition
crypt_mod_smime_gpgme.c:50
smime_gpgme_verify_one
int smime_gpgme_verify_one(struct Body *b, struct State *state, const char *tempfile)
Check a signed MIME part against a signature - Implements CryptModuleSpecs::verify_one() -.
Definition
crypt_gpgme.c:1732
smime_gpgme_void_passphrase
static void smime_gpgme_void_passphrase(void)
Forget the cached passphrase - Implements CryptModuleSpecs::void_passphrase() -.
Definition
crypt_mod_smime_gpgme.c:41
lib.h
API for encryption/signing of emails.
APPLICATION_SMIME
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition
lib.h:107
CryptModuleSpecs
Definition
crypt_mod.h:48