NeoMutt  2025-12-11-949-g4870ee
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
cryptglue.c
Go to the documentation of this file.
1
23
36
37#include "config.h"
38#include <stdbool.h>
39#include <stdio.h>
40#include "mutt/lib.h"
41#include "core/lib.h"
42#include "cryptglue.h"
43#include "lib.h"
44#include "crypt_mod.h"
45#include "module_data.h"
46#ifndef CRYPT_BACKEND_GPGME
47#include "gui/lib.h"
48#endif
49#if defined(CRYPT_BACKEND_GPGME) || defined(USE_AUTOCRYPT)
50#include "config/lib.h"
51#endif
52#ifdef CRYPT_BACKEND_GPGME
53#include "crypt_gpgme.h"
54#endif
55#ifdef CRYPT_BACKEND_CLASSIC_PGP
56#include "pgpkey.h"
57#endif
58#ifdef USE_AUTOCRYPT
59#include "email/lib.h"
60#include "autocrypt/lib.h"
61#include "globals.h"
62#else
63struct Envelope;
64#endif
65
66struct Address;
67struct AddressList;
68
69#ifdef CRYPT_BACKEND_CLASSIC_PGP
70extern const struct CryptModuleSpecs CryptModPgpClassic;
71#endif
72
73#ifdef CRYPT_BACKEND_CLASSIC_SMIME
74extern const struct CryptModuleSpecs CryptModSmimeClassic;
75#endif
76
77#ifdef CRYPT_BACKEND_GPGME
78extern const struct CryptModuleSpecs CryptModPgpGpgme;
79extern const struct CryptModuleSpecs CryptModSmimeGpgme;
80#endif
81
82/* If the crypto module identifier by IDENTIFIER has been registered,
83 * call its function FUNC. Do nothing else. This may be used as an
84 * expression. */
85#define CRYPT_MOD_CALL_CHECK(mod_data, identifier, func) \
86 (crypto_module_lookup(mod_data, APPLICATION_##identifier) && \
87 (crypto_module_lookup(mod_data, APPLICATION_##identifier))->func)
88
89/* Call the function FUNC in the crypto module identified by
90 * IDENTIFIER. This may be used as an expression. */
91#define CRYPT_MOD_CALL(mod_data, identifier, func) \
92 (*(crypto_module_lookup(mod_data, APPLICATION_##identifier))->func)
93
99void crypt_init(void)
100{
101#ifdef CRYPT_BACKEND_GPGME
102 const bool c_crypt_use_gpgme = cs_subset_bool(NeoMutt->sub, "crypt_use_gpgme");
103#endif
104#ifdef CRYPT_BACKEND_CLASSIC_PGP
105 if (
106#ifdef CRYPT_BACKEND_GPGME
107 (!c_crypt_use_gpgme)
108#else
109 1
110#endif
111 )
113#endif
114
115#ifdef CRYPT_BACKEND_CLASSIC_SMIME
116 if (
117#ifdef CRYPT_BACKEND_GPGME
118 (!c_crypt_use_gpgme)
119#else
120 1
121#endif
122 )
124#endif
125
126#ifdef CRYPT_BACKEND_GPGME
127 if (c_crypt_use_gpgme)
128 {
131 }
132#endif
133
134#if defined(CRYPT_BACKEND_CLASSIC_PGP) || \
135 defined(CRYPT_BACKEND_CLASSIC_SMIME) || defined(CRYPT_BACKEND_GPGME)
137 ASSERT(mod_data);
138
139 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, init))
140 CRYPT_MOD_CALL(mod_data, PGP, init)();
141
142 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, init))
143 CRYPT_MOD_CALL(mod_data, SMIME, init)();
144#endif
145}
146
151void crypt_cleanup(struct NcryptModuleData *mod_data)
152{
153 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, cleanup))
154 (CRYPT_MOD_CALL(mod_data, PGP, cleanup))(mod_data);
155
156 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, cleanup))
157 (CRYPT_MOD_CALL(mod_data, SMIME, cleanup))(mod_data);
158
159#ifdef CRYPT_BACKEND_CLASSIC_PGP
161#endif
162
163#ifdef CRYPT_BACKEND_GPGME
165#endif
166}
167
175{
176 if (((WithCrypto & APPLICATION_PGP) != 0) && (type & APPLICATION_PGP))
177 mutt_message(_("Invoking PGP..."));
178 else if (((WithCrypto & APPLICATION_SMIME) != 0) && (type & APPLICATION_SMIME))
179 mutt_message(_("Invoking S/MIME..."));
180}
181
189{
191 ASSERT(mod_data);
192
193 if (((WithCrypto & APPLICATION_PGP) != 0) && (type & APPLICATION_PGP) &&
195 {
196 return true;
197 }
198
199 if (((WithCrypto & APPLICATION_SMIME) != 0) && (type & APPLICATION_SMIME) &&
201 {
202 return true;
203 }
204
205 return false;
206}
207
212{
214 ASSERT(mod_data);
215
216 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, void_passphrase))
217 CRYPT_MOD_CALL(mod_data, PGP, void_passphrase)();
218}
219
224{
226 ASSERT(mod_data);
227
228 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, valid_passphrase))
229 return CRYPT_MOD_CALL(mod_data, PGP, valid_passphrase)();
230
231 return false;
232}
233
237int crypt_pgp_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
238{
239#ifdef USE_AUTOCRYPT
240 const bool c_autocrypt = cs_subset_bool(NeoMutt->sub, "autocrypt");
241 if (c_autocrypt)
242 {
243 OptAutocryptGpgme = true;
244 int result = pgp_gpgme_decrypt_mime(fp_in, fp_out, b, b_dec);
245 OptAutocryptGpgme = false;
246 if (result == 0)
247 {
248 b->is_autocrypt = true;
249 return result;
250 }
251 }
252#endif
253
255 ASSERT(mod_data);
256
257 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, decrypt_mime))
258 return CRYPT_MOD_CALL(mod_data, PGP, decrypt_mime)(fp_in, fp_out, b, b_dec);
259
260 return -1;
261}
262
266int crypt_pgp_application_handler(struct Body *b_email, struct State *state)
267{
269 ASSERT(mod_data);
270
271 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, application_handler))
272 return CRYPT_MOD_CALL(mod_data, PGP, application_handler)(b_email, state);
273
274 return -1;
275}
276
280int crypt_pgp_encrypted_handler(struct Body *b_email, struct State *state)
281{
282#ifdef USE_AUTOCRYPT
283 const bool c_autocrypt = cs_subset_bool(NeoMutt->sub, "autocrypt");
284 if (c_autocrypt)
285 {
286 OptAutocryptGpgme = true;
287 int result = pgp_gpgme_encrypted_handler(b_email, state);
288 OptAutocryptGpgme = false;
289 if (result == 0)
290 {
291 b_email->is_autocrypt = true;
292 return result;
293 }
294 }
295#endif
296
298 ASSERT(mod_data);
299
300 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, encrypted_handler))
301 return CRYPT_MOD_CALL(mod_data, PGP, encrypted_handler)(b_email, state);
302
303 return -1;
304}
305
310{
312 ASSERT(mod_data);
313
314 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, pgp_invoke_getkeys))
315 CRYPT_MOD_CALL(mod_data, PGP, pgp_invoke_getkeys)(addr);
316}
317
321bool crypt_pgp_check_traditional(FILE *fp, struct Body *b, bool just_one)
322{
324 ASSERT(mod_data);
325
326 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, pgp_check_traditional))
327 return CRYPT_MOD_CALL(mod_data, PGP, pgp_check_traditional)(fp, b, just_one);
328
329 return false;
330}
331
335struct Body *crypt_pgp_traditional_encryptsign(struct Body *b, SecurityFlags flags, char *keylist)
336{
338 ASSERT(mod_data);
339
340 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, pgp_traditional_encryptsign))
341 return CRYPT_MOD_CALL(mod_data, PGP, pgp_traditional_encryptsign)(b, flags, keylist);
342
343 return NULL;
344}
345
350{
352 ASSERT(mod_data);
353
354 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, pgp_make_key_attachment))
355 return CRYPT_MOD_CALL(mod_data, PGP, pgp_make_key_attachment)();
356
357 return NULL;
358}
359
363char *crypt_pgp_find_keys(struct AddressList *addrlist, bool oppenc_mode)
364{
366 ASSERT(mod_data);
367
368 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, find_keys))
369 return CRYPT_MOD_CALL(mod_data, PGP, find_keys)(addrlist, oppenc_mode);
370
371 return NULL;
372}
373
377struct Body *crypt_pgp_sign_message(struct Body *b, const struct AddressList *from)
378{
380 ASSERT(mod_data);
381
382 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, sign_message))
383 return CRYPT_MOD_CALL(mod_data, PGP, sign_message)(b, from);
384
385 return NULL;
386}
387
391struct Body *crypt_pgp_encrypt_message(struct Email *e, struct Body *b, char *keylist,
392 int sign, const struct AddressList *from)
393{
394#ifdef USE_AUTOCRYPT
395 if (e->security & SEC_AUTOCRYPT)
396 {
398 return NULL;
399
400 OptAutocryptGpgme = true;
401 struct Body *result = pgp_gpgme_encrypt_message(b, keylist, sign, from);
402 OptAutocryptGpgme = false;
403
404 return result;
405 }
406#endif
407
409 ASSERT(mod_data);
410
411 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, pgp_encrypt_message))
412 return CRYPT_MOD_CALL(mod_data, PGP, pgp_encrypt_message)(b, keylist, sign, from);
413
414 return NULL;
415}
416
420void crypt_pgp_invoke_import(const char *fname)
421{
423 ASSERT(mod_data);
424
425 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, pgp_invoke_import))
426 CRYPT_MOD_CALL(mod_data, PGP, pgp_invoke_import)(fname);
427}
428
432int crypt_pgp_verify_one(struct Body *b, struct State *state, const char *tempf)
433{
435 ASSERT(mod_data);
436
437 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, verify_one))
438 return CRYPT_MOD_CALL(mod_data, PGP, verify_one)(b, state, tempf);
439
440 return -1;
441}
442
447{
449 ASSERT(mod_data);
450
451 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, send_menu))
452 return CRYPT_MOD_CALL(mod_data, PGP, send_menu)(e);
453
454 return 0;
455}
456
461{
463 ASSERT(mod_data);
464
465 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, pgp_extract_key_from_attachment))
466 CRYPT_MOD_CALL(mod_data, PGP, pgp_extract_key_from_attachment)(fp, b);
467}
468
472void crypt_pgp_set_sender(const char *sender)
473{
475 ASSERT(mod_data);
476
477 if (CRYPT_MOD_CALL_CHECK(mod_data, PGP, set_sender))
478 CRYPT_MOD_CALL(mod_data, PGP, set_sender)(sender);
479}
480
485{
487 ASSERT(mod_data);
488
489 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, void_passphrase))
490 CRYPT_MOD_CALL(mod_data, SMIME, void_passphrase)();
491}
492
497{
499 ASSERT(mod_data);
500
501 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, valid_passphrase))
502 return CRYPT_MOD_CALL(mod_data, SMIME, valid_passphrase)();
503
504 return false;
505}
506
510int crypt_smime_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
511{
513 ASSERT(mod_data);
514
515 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, decrypt_mime))
516 return CRYPT_MOD_CALL(mod_data, SMIME, decrypt_mime)(fp_in, fp_out, b, b_dec);
517
518 return -1;
519}
520
524int crypt_smime_application_handler(struct Body *b_email, struct State *state)
525{
527 ASSERT(mod_data);
528
529 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, application_handler))
530 return CRYPT_MOD_CALL(mod_data, SMIME, application_handler)(b_email, state);
531
532 return -1;
533}
534
539{
541 ASSERT(mod_data);
542
543 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, smime_getkeys))
544 CRYPT_MOD_CALL(mod_data, SMIME, smime_getkeys)(env);
545}
546
550int crypt_smime_verify_sender(struct Email *e, struct Message *msg)
551{
553 ASSERT(mod_data);
554
555 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, smime_verify_sender))
556 return CRYPT_MOD_CALL(mod_data, SMIME, smime_verify_sender)(e, msg);
557
558 return 1;
559}
560
564char *crypt_smime_find_keys(struct AddressList *addrlist, bool oppenc_mode)
565{
567 ASSERT(mod_data);
568
569 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, find_keys))
570 return CRYPT_MOD_CALL(mod_data, SMIME, find_keys)(addrlist, oppenc_mode);
571
572 return NULL;
573}
574
578struct Body *crypt_smime_sign_message(struct Body *b, const struct AddressList *from)
579{
581 ASSERT(mod_data);
582
583 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, sign_message))
584 return CRYPT_MOD_CALL(mod_data, SMIME, sign_message)(b, from);
585
586 return NULL;
587}
588
592struct Body *crypt_smime_build_smime_entity(struct Body *b, char *certlist)
593{
595 ASSERT(mod_data);
596
597 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, smime_build_smime_entity))
598 return CRYPT_MOD_CALL(mod_data, SMIME, smime_build_smime_entity)(b, certlist);
599
600 return NULL;
601}
602
606void crypt_smime_invoke_import(const char *infile, const char *mailbox)
607{
609 ASSERT(mod_data);
610
611 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, smime_invoke_import))
612 CRYPT_MOD_CALL(mod_data, SMIME, smime_invoke_import)(infile, mailbox);
613}
614
618int crypt_smime_verify_one(struct Body *b, struct State *state, const char *tempf)
619{
621 ASSERT(mod_data);
622
623 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, verify_one))
624 return CRYPT_MOD_CALL(mod_data, SMIME, verify_one)(b, state, tempf);
625
626 return -1;
627}
628
633{
635 ASSERT(mod_data);
636
637 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, send_menu))
638 return CRYPT_MOD_CALL(mod_data, SMIME, send_menu)(e);
639
640 return 0;
641}
642
646void crypt_smime_set_sender(const char *sender)
647{
649 ASSERT(mod_data);
650
651 if (CRYPT_MOD_CALL_CHECK(mod_data, SMIME, set_sender))
652 CRYPT_MOD_CALL(mod_data, SMIME, set_sender)(sender);
653}
Autocrypt end-to-end encryption.
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition autocrypt.c:717
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition helpers.c:47
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
static char * find_keys(const struct AddressList *addrlist, unsigned int app, bool oppenc_mode)
Find keys of the recipients of the message.
static int verify_one(struct Body *b, struct State *state, const char *tempfile, bool is_smime)
Do the actual verification step.
void gpgme_id_defaults_cleanup(struct NcryptModuleData *mod_data)
Free the GPGME IdDefaults cache.
static struct Body * sign_message(struct Body *b, const struct AddressList *from, bool use_smime)
Sign a message.
Wrapper for PGP/SMIME calls to GPGME.
const struct CryptModuleSpecs * crypto_module_lookup(struct NcryptModuleData *mod_data, int identifier)
Lookup a crypto module by name.
Definition crypt_mod.c:57
void crypto_module_register(const struct CryptModuleSpecs *specs)
Register a new crypto module.
Definition crypt_mod.c:41
Register crypto modules.
bool crypt_has_module_backend(SecurityFlags type)
Is there a crypto backend for a given type?
Definition cryptglue.c:188
char * crypt_smime_find_keys(struct AddressList *addrlist, bool oppenc_mode)
Wrapper for CryptModuleSpecs::find_keys()
Definition cryptglue.c:564
void crypt_invoke_message(SecurityFlags type)
Display an informative message.
Definition cryptglue.c:174
struct Body * crypt_smime_build_smime_entity(struct Body *b, char *certlist)
Wrapper for CryptModuleSpecs::smime_build_smime_entity()
Definition cryptglue.c:592
struct Body * crypt_smime_sign_message(struct Body *b, const struct AddressList *from)
Wrapper for CryptModuleSpecs::sign_message()
Definition cryptglue.c:578
int crypt_pgp_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
Wrapper for CryptModuleSpecs::decrypt_mime()
Definition cryptglue.c:237
struct Body * crypt_pgp_traditional_encryptsign(struct Body *b, SecurityFlags flags, char *keylist)
Wrapper for CryptModuleSpecs::pgp_traditional_encryptsign()
Definition cryptglue.c:335
char * crypt_pgp_find_keys(struct AddressList *addrlist, bool oppenc_mode)
Wrapper for CryptModuleSpecs::find_keys()
Definition cryptglue.c:363
void crypt_smime_getkeys(struct Envelope *env)
Wrapper for CryptModuleSpecs::smime_getkeys()
Definition cryptglue.c:538
struct Body * crypt_pgp_sign_message(struct Body *b, const struct AddressList *from)
Wrapper for CryptModuleSpecs::sign_message()
Definition cryptglue.c:377
#define CRYPT_MOD_CALL(mod_data, identifier, func)
Definition cryptglue.c:91
bool crypt_pgp_check_traditional(FILE *fp, struct Body *b, bool just_one)
Wrapper for CryptModuleSpecs::pgp_check_traditional()
Definition cryptglue.c:321
struct Body * crypt_pgp_make_key_attachment(void)
Wrapper for CryptModuleSpecs::pgp_make_key_attachment()
Definition cryptglue.c:349
SecurityFlags crypt_smime_send_menu(struct Email *e)
Wrapper for CryptModuleSpecs::send_menu()
Definition cryptglue.c:632
SecurityFlags crypt_pgp_send_menu(struct Email *e)
Wrapper for CryptModuleSpecs::send_menu()
Definition cryptglue.c:446
void crypt_pgp_invoke_getkeys(struct Address *addr)
Wrapper for CryptModuleSpecs::pgp_invoke_getkeys()
Definition cryptglue.c:309
bool crypt_smime_valid_passphrase(void)
Wrapper for CryptModuleSpecs::valid_passphrase()
Definition cryptglue.c:496
void crypt_pgp_invoke_import(const char *fname)
Wrapper for CryptModuleSpecs::pgp_invoke_import()
Definition cryptglue.c:420
void crypt_smime_void_passphrase(void)
Wrapper for CryptModuleSpecs::void_passphrase()
Definition cryptglue.c:484
void crypt_pgp_extract_key_from_attachment(FILE *fp, struct Body *b)
Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment()
Definition cryptglue.c:460
void crypt_smime_invoke_import(const char *infile, const char *mailbox)
Wrapper for CryptModuleSpecs::smime_invoke_import()
Definition cryptglue.c:606
int crypt_smime_verify_sender(struct Email *e, struct Message *msg)
Wrapper for CryptModuleSpecs::smime_verify_sender()
Definition cryptglue.c:550
void crypt_pgp_set_sender(const char *sender)
Wrapper for CryptModuleSpecs::set_sender()
Definition cryptglue.c:472
void crypt_smime_set_sender(const char *sender)
Wrapper for CryptModuleSpecs::set_sender()
Definition cryptglue.c:646
int crypt_smime_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
Wrapper for CryptModuleSpecs::decrypt_mime()
Definition cryptglue.c:510
int crypt_smime_verify_one(struct Body *b, struct State *state, const char *tempf)
Wrapper for CryptModuleSpecs::verify_one()
Definition cryptglue.c:618
void crypt_init(void)
Initialise the crypto backends.
Definition cryptglue.c:99
void crypt_pgp_void_passphrase(void)
Wrapper for CryptModuleSpecs::void_passphrase()
Definition cryptglue.c:211
void crypt_cleanup(struct NcryptModuleData *mod_data)
Clean up backend.
Definition cryptglue.c:151
#define CRYPT_MOD_CALL_CHECK(mod_data, identifier, func)
Definition cryptglue.c:85
bool crypt_pgp_valid_passphrase(void)
Wrapper for CryptModuleSpecs::valid_passphrase()
Definition cryptglue.c:223
int crypt_pgp_verify_one(struct Body *b, struct State *state, const char *tempf)
Wrapper for CryptModuleSpecs::verify_one()
Definition cryptglue.c:432
struct Body * crypt_pgp_encrypt_message(struct Email *e, struct Body *b, char *keylist, int sign, const struct AddressList *from)
Wrapper for CryptModuleSpecs::pgp_encrypt_message()
Definition cryptglue.c:391
Wrapper around crypto functions.
Structs that make up an email.
bool OptAutocryptGpgme
(pseudo) use Autocrypt context inside ncrypt/crypt_gpgme.c
Definition globals.c:44
Global variables.
const struct CryptModuleSpecs CryptModSmimeGpgme
GPGME SMIME - Implements CryptModuleSpecs -.
const struct CryptModuleSpecs CryptModSmimeClassic
CLI SMIME - Implements CryptModuleSpecs -.
const struct CryptModuleSpecs CryptModPgpGpgme
GPGME PGP - Implements CryptModuleSpecs -.
const struct CryptModuleSpecs CryptModPgpClassic
CLI PGP - Implements CryptModuleSpecs -.
int pgp_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() -.
int pgp_gpgme_encrypted_handler(struct Body *b, struct State *state)
Manage a PGP or S/MIME encrypted MIME part - Implements CryptModuleSpecs::encrypted_handler() -.
struct Body * pgp_gpgme_encrypt_message(struct Body *b, char *keylist, bool sign, const struct AddressList *from)
PGP encrypt an email - Implements CryptModuleSpecs::pgp_encrypt_message() -.
int crypt_pgp_application_handler(struct Body *b_email, struct State *state)
Wrapper for CryptModuleSpecs::application_handler() - Implements handler_t -.
Definition cryptglue.c:266
int crypt_smime_application_handler(struct Body *b_email, struct State *state)
Wrapper for CryptModuleSpecs::application_handler() - Implements handler_t -.
Definition cryptglue.c:524
int crypt_pgp_encrypted_handler(struct Body *b_email, struct State *state)
Wrapper for CryptModuleSpecs::encrypted_handler() - Implements handler_t -.
Definition cryptglue.c:280
#define mutt_message(...)
Definition logging2.h:93
Convenience wrapper for the gui headers.
@ MODULE_ID_NCRYPT
ModuleNcrypt, Ncrypt
Definition module_api.h:82
Convenience wrapper for the library headers.
#define _(a)
Definition message.h:28
API for encryption/signing of emails.
uint16_t SecurityFlags
Definition lib.h:104
@ SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition lib.h:101
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition lib.h:106
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition lib.h:107
#define WithCrypto
Definition lib.h:132
Ncrypt private Module data.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:666
void pgp_id_defaults_cleanup(struct PgpCache **pgp_id_defaults)
Free the PGP IdDefaults cache.
Definition pgpkey.c:617
PGP key management routines.
#define ASSERT(COND)
Definition signal2.h:59
An email address.
Definition address.h:35
The body of an email.
Definition body.h:36
bool is_autocrypt
Flag autocrypt-decrypted messages for replying.
Definition body.h:50
The envelope/body of an email.
Definition email.h:39
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition email.h:43
The header of an Email.
Definition envelope.h:57
A local copy of an email.
Definition message.h:34
Ncrypt private Module data.
Definition module_data.h:39
struct PgpCache * pgp_id_defaults
PGP IdDefaults cache.
Definition module_data.h:53
Container for Accounts, Notifications.
Definition neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49
Keep track when processing files.
Definition state.h:54