NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
cryptglue.c
Go to the documentation of this file.
1 
38 #include "config.h"
39 #include <stdbool.h>
40 #include <stdio.h>
41 #include "private.h"
42 #include "mutt/lib.h"
43 #include "cryptglue.h"
44 #include "ncrypt/lib.h"
45 #include "context.h"
46 #include "crypt_mod.h"
47 #include "mutt_globals.h"
48 #ifndef CRYPT_BACKEND_GPGME
49 #include "gui/lib.h"
50 #endif
51 #ifdef USE_AUTOCRYPT
52 #include "email/lib.h"
53 #include "autocrypt/lib.h"
54 #include "crypt_gpgme.h"
55 #include "options.h"
56 #else
57 struct Envelope;
58 #endif
59 
60 struct Address;
61 struct AddressList;
62 struct Mailbox;
63 struct State;
64 
65 #ifdef CRYPT_BACKEND_CLASSIC_PGP
67 #endif
68 
69 #ifdef CRYPT_BACKEND_CLASSIC_SMIME
71 #endif
72 
73 #ifdef CRYPT_BACKEND_GPGME
76 #endif
77 
78 /* If the crypto module identifier by IDENTIFIER has been registered,
79  * call its function FUNC. Do nothing else. This may be used as an
80  * expression. */
81 #define CRYPT_MOD_CALL_CHECK(identifier, func) \
82  (crypto_module_lookup(APPLICATION_##identifier) && \
83  (crypto_module_lookup(APPLICATION_##identifier))->func)
84 
85 /* Call the function FUNC in the crypto module identified by
86  * IDENTIFIER. This may be used as an expression. */
87 #define CRYPT_MOD_CALL(identifier, func) \
88  (*(crypto_module_lookup(APPLICATION_##identifier))->func)
89 
95 void crypt_init(void)
96 {
97 #ifdef CRYPT_BACKEND_CLASSIC_PGP
98  if (
99 #ifdef CRYPT_BACKEND_GPGME
100  (!C_CryptUseGpgme)
101 #else
102  1
103 #endif
104  )
106 #endif
107 
108 #ifdef CRYPT_BACKEND_CLASSIC_SMIME
109  if (
110 #ifdef CRYPT_BACKEND_GPGME
111  (!C_CryptUseGpgme)
112 #else
113  1
114 #endif
115  )
117 #endif
118 
119 #ifdef CRYPT_BACKEND_GPGME
120  if (C_CryptUseGpgme)
121  {
124  }
125 #endif
126 
127 #if defined(CRYPT_BACKEND_CLASSIC_PGP) || \
128  defined(CRYPT_BACKEND_CLASSIC_SMIME) || defined(CRYPT_BACKEND_GPGME)
129  if (CRYPT_MOD_CALL_CHECK(PGP, init))
130  CRYPT_MOD_CALL(PGP, init)();
131 
132  if (CRYPT_MOD_CALL_CHECK(SMIME, init))
133  CRYPT_MOD_CALL(SMIME, init)();
134 #endif
135 }
136 
140 void crypt_cleanup(void)
141 {
142  if (CRYPT_MOD_CALL_CHECK(PGP, cleanup))
143  (CRYPT_MOD_CALL(PGP, cleanup))();
144 
145  if (CRYPT_MOD_CALL_CHECK(SMIME, cleanup))
146  (CRYPT_MOD_CALL(SMIME, cleanup))();
147 }
148 
156 {
157  if (((WithCrypto & APPLICATION_PGP) != 0) && (type & APPLICATION_PGP))
158  mutt_message(_("Invoking PGP..."));
159  else if (((WithCrypto & APPLICATION_SMIME) != 0) && (type & APPLICATION_SMIME))
160  mutt_message(_("Invoking S/MIME..."));
161 }
162 
170 {
171  if (((WithCrypto & APPLICATION_PGP) != 0) && (type & APPLICATION_PGP) &&
173  {
174  return true;
175  }
176 
177  if (((WithCrypto & APPLICATION_SMIME) != 0) && (type & APPLICATION_SMIME) &&
179  {
180  return true;
181  }
182 
183  return false;
184 }
185 
190 {
193 }
194 
199 {
201  return CRYPT_MOD_CALL(PGP, valid_passphrase)();
202 
203  return false;
204 }
205 
209 int crypt_pgp_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
210 {
211 #ifdef USE_AUTOCRYPT
212  if (C_Autocrypt)
213  {
214  OptAutocryptGpgme = true;
215  int result = pgp_gpgme_decrypt_mime(fp_in, fp_out, b, cur);
216  OptAutocryptGpgme = false;
217  if (result == 0)
218  {
219  b->is_autocrypt = true;
220  return result;
221  }
222  }
223 #endif
224 
226  return CRYPT_MOD_CALL(PGP, decrypt_mime)(fp_in, fp_out, b, cur);
227 
228  return -1;
229 }
230 
236 int crypt_pgp_application_handler(struct Body *m, struct State *s)
237 {
239  return CRYPT_MOD_CALL(PGP, application_handler)(m, s);
240 
241  return -1;
242 }
243 
249 int crypt_pgp_encrypted_handler(struct Body *a, struct State *s)
250 {
251 #ifdef USE_AUTOCRYPT
252  if (C_Autocrypt)
253  {
254  OptAutocryptGpgme = true;
255  int result = pgp_gpgme_encrypted_handler(a, s);
256  OptAutocryptGpgme = false;
257  if (result == 0)
258  {
259  a->is_autocrypt = true;
260  return result;
261  }
262  }
263 #endif
264 
266  return CRYPT_MOD_CALL(PGP, encrypted_handler)(a, s);
267 
268  return -1;
269 }
270 
275 {
278 }
279 
283 int crypt_pgp_check_traditional(FILE *fp, struct Body *b, bool just_one)
284 {
286  return CRYPT_MOD_CALL(PGP, pgp_check_traditional)(fp, b, just_one);
287 
288  return 0;
289 }
290 
294 struct Body *crypt_pgp_traditional_encryptsign(struct Body *a, SecurityFlags flags, char *keylist)
295 {
296  if (CRYPT_MOD_CALL_CHECK(PGP, pgp_traditional_encryptsign))
297  return CRYPT_MOD_CALL(PGP, pgp_traditional_encryptsign)(a, flags, keylist);
298 
299  return NULL;
300 }
301 
306 {
307  if (CRYPT_MOD_CALL_CHECK(PGP, pgp_make_key_attachment))
308  return CRYPT_MOD_CALL(PGP, pgp_make_key_attachment)();
309 
310  return NULL;
311 }
312 
316 char *crypt_pgp_find_keys(struct AddressList *addrlist, bool oppenc_mode)
317 {
319  return CRYPT_MOD_CALL(PGP, find_keys)(addrlist, oppenc_mode);
320 
321  return NULL;
322 }
323 
327 struct Body *crypt_pgp_sign_message(struct Body *a, const struct AddressList *from)
328 {
330  return CRYPT_MOD_CALL(PGP, sign_message)(a, from);
331 
332  return NULL;
333 }
334 
338 struct Body *crypt_pgp_encrypt_message(struct Email *e, struct Body *a, char *keylist,
339  int sign, const struct AddressList *from)
340 {
341 #ifdef USE_AUTOCRYPT
342  if (e->security & SEC_AUTOCRYPT)
343  {
344  struct Mailbox *m = ctx_mailbox(Context);
346  return NULL;
347 
348  OptAutocryptGpgme = true;
349  struct Body *result = pgp_gpgme_encrypt_message(a, keylist, sign, from);
350  OptAutocryptGpgme = false;
351 
352  return result;
353  }
354 #endif
355 
356  if (CRYPT_MOD_CALL_CHECK(PGP, pgp_encrypt_message))
357  return CRYPT_MOD_CALL(PGP, pgp_encrypt_message)(a, keylist, sign, from);
358 
359  return NULL;
360 }
361 
365 void crypt_pgp_invoke_import(const char *fname)
366 {
367  if (CRYPT_MOD_CALL_CHECK(PGP, pgp_invoke_import))
368  CRYPT_MOD_CALL(PGP, pgp_invoke_import)(fname);
369 }
370 
374 int crypt_pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
375 {
377  return CRYPT_MOD_CALL(PGP, verify_one)(sigbdy, s, tempf);
378 
379  return -1;
380 }
381 
386 {
387  if (CRYPT_MOD_CALL_CHECK(PGP, send_menu))
388  return CRYPT_MOD_CALL(PGP, send_menu)(e);
389 
390  return 0;
391 }
392 
396 void crypt_pgp_extract_key_from_attachment(FILE *fp, struct Body *top)
397 {
398  if (CRYPT_MOD_CALL_CHECK(PGP, pgp_extract_key_from_attachment))
399  CRYPT_MOD_CALL(PGP, pgp_extract_key_from_attachment)(fp, top);
400 }
401 
405 void crypt_pgp_set_sender(const char *sender)
406 {
407  if (CRYPT_MOD_CALL_CHECK(PGP, set_sender))
408  CRYPT_MOD_CALL(PGP, set_sender)(sender);
409 }
410 
415 {
416  if (CRYPT_MOD_CALL_CHECK(SMIME, void_passphrase))
417  CRYPT_MOD_CALL(SMIME, void_passphrase)();
418 }
419 
424 {
425  if (CRYPT_MOD_CALL_CHECK(SMIME, valid_passphrase))
426  return CRYPT_MOD_CALL(SMIME, valid_passphrase)();
427 
428  return false;
429 }
430 
434 int crypt_smime_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
435 {
436  if (CRYPT_MOD_CALL_CHECK(SMIME, decrypt_mime))
437  return CRYPT_MOD_CALL(SMIME, decrypt_mime)(fp_in, fp_out, b, cur);
438 
439  return -1;
440 }
441 
447 int crypt_smime_application_handler(struct Body *m, struct State *s)
448 {
449  if (CRYPT_MOD_CALL_CHECK(SMIME, application_handler))
450  return CRYPT_MOD_CALL(SMIME, application_handler)(m, s);
451 
452  return -1;
453 }
454 
458 void crypt_smime_getkeys(struct Envelope *env)
459 {
460  if (CRYPT_MOD_CALL_CHECK(SMIME, smime_getkeys))
461  CRYPT_MOD_CALL(SMIME, smime_getkeys)(env);
462 }
463 
467 int crypt_smime_verify_sender(struct Mailbox *m, struct Email *e)
468 {
469  if (CRYPT_MOD_CALL_CHECK(SMIME, smime_verify_sender))
470  return CRYPT_MOD_CALL(SMIME, smime_verify_sender)(m, e);
471 
472  return 1;
473 }
474 
478 char *crypt_smime_find_keys(struct AddressList *addrlist, bool oppenc_mode)
479 {
480  if (CRYPT_MOD_CALL_CHECK(SMIME, find_keys))
481  return CRYPT_MOD_CALL(SMIME, find_keys)(addrlist, oppenc_mode);
482 
483  return NULL;
484 }
485 
489 struct Body *crypt_smime_sign_message(struct Body *a, const struct AddressList *from)
490 {
492  return CRYPT_MOD_CALL(SMIME, sign_message)(a, from);
493 
494  return NULL;
495 }
496 
500 struct Body *crypt_smime_build_smime_entity(struct Body *a, char *certlist)
501 {
502  if (CRYPT_MOD_CALL_CHECK(SMIME, smime_build_smime_entity))
503  return CRYPT_MOD_CALL(SMIME, smime_build_smime_entity)(a, certlist);
504 
505  return NULL;
506 }
507 
511 void crypt_smime_invoke_import(const char *infile, const char *mailbox)
512 {
513  if (CRYPT_MOD_CALL_CHECK(SMIME, smime_invoke_import))
514  CRYPT_MOD_CALL(SMIME, smime_invoke_import)(infile, mailbox);
515 }
516 
520 int crypt_smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
521 {
522  if (CRYPT_MOD_CALL_CHECK(SMIME, verify_one))
523  return CRYPT_MOD_CALL(SMIME, verify_one)(sigbdy, s, tempf);
524 
525  return -1;
526 }
527 
532 {
533  if (CRYPT_MOD_CALL_CHECK(SMIME, send_menu))
534  return CRYPT_MOD_CALL(SMIME, send_menu)(e);
535 
536  return 0;
537 }
538 
542 void crypt_smime_set_sender(const char *sender)
543 {
544  if (CRYPT_MOD_CALL_CHECK(SMIME, set_sender))
545  CRYPT_MOD_CALL(SMIME, set_sender)(sender);
546 }
Envelope
The header of an Email.
Definition: envelope.h:54
crypto_module_register
void crypto_module_register(struct CryptModuleSpecs *specs)
Register a new crypto module.
Definition: crypt_mod.c:51
crypt_pgp_make_key_attachment
struct Body * crypt_pgp_make_key_attachment(void)
Wrapper for CryptModuleSpecs::pgp_make_key_attachment()
Definition: cryptglue.c:305
verify_one
static int verify_one(struct Body *sigbdy, struct State *s, const char *tempfile, bool is_smime)
Do the actual verification step.
Definition: crypt_gpgme.c:1888
crypt_smime_getkeys
void crypt_smime_getkeys(struct Envelope *env)
Wrapper for CryptModuleSpecs::smime_getkeys()
Definition: cryptglue.c:458
_
#define _(a)
Definition: message.h:28
Mailbox
A mailbox.
Definition: mailbox.h:81
APPLICATION_SMIME
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:98
crypt_pgp_encrypted_handler
int crypt_pgp_encrypted_handler(struct Body *a, struct State *s)
Wrapper for CryptModuleSpecs::encrypted_handler()
Definition: cryptglue.c:249
ctx_mailbox
struct Mailbox * ctx_mailbox(struct Context *ctx)
wrapper to get the mailbox in a Context, or NULL
Definition: context.c:429
crypt_init
void crypt_init(void)
Initialise the crypto backends.
Definition: cryptglue.c:95
crypt_smime_void_passphrase
void crypt_smime_void_passphrase(void)
Wrapper for CryptModuleSpecs::void_passphrase()
Definition: cryptglue.c:414
crypt_smime_send_menu
SecurityFlags crypt_smime_send_menu(struct Email *e)
Wrapper for CryptModuleSpecs::send_menu()
Definition: cryptglue.c:531
Body
The body of an email.
Definition: body.h:34
Body::is_autocrypt
bool is_autocrypt
Flag autocrypt-decrypted messages for replying.
Definition: body.h:79
crypt_pgp_encrypt_message
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: cryptglue.c:338
OptAutocryptGpgme
WHERE bool OptAutocryptGpgme
(pseudo) use Autocrypt context inside ncrypt/crypt_gpgme.c
Definition: options.h:33
CryptModuleSpecs::application_handler
int(* application_handler)(struct Body *m, struct State *s)
Manage the MIME type "application/pgp" or "application/smime".
Definition: crypt_mod.h:91
CryptModuleSpecs::encrypted_handler
int(* encrypted_handler)(struct Body *m, struct State *s)
Manage a PGP or S/MIME encrypted MIME part.
Definition: crypt_mod.h:100
crypt_has_module_backend
bool crypt_has_module_backend(SecurityFlags type)
Is there a crypto backend for a given type?
Definition: cryptglue.c:169
crypt_pgp_find_keys
char * crypt_pgp_find_keys(struct AddressList *addrlist, bool oppenc_mode)
Wrapper for CryptModuleSpecs::find_keys()
Definition: cryptglue.c:316
crypt_pgp_decrypt_mime
int crypt_pgp_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Wrapper for CryptModuleSpecs::decrypt_mime()
Definition: cryptglue.c:209
crypt_pgp_invoke_import
void crypt_pgp_invoke_import(const char *fname)
Wrapper for CryptModuleSpecs::pgp_invoke_import()
Definition: cryptglue.c:365
crypt_smime_build_smime_entity
struct Body * crypt_smime_build_smime_entity(struct Body *a, char *certlist)
Wrapper for CryptModuleSpecs::smime_build_smime_entity()
Definition: cryptglue.c:500
Context
The "current" mailbox.
Definition: context.h:38
pgp_gpgme_encrypted_handler
int pgp_gpgme_encrypted_handler(struct Body *a, struct State *s)
Implements CryptModuleSpecs::encrypted_handler()
Definition: crypt_gpgme.c:3044
crypt_smime_invoke_import
void crypt_smime_invoke_import(const char *infile, const char *mailbox)
Wrapper for CryptModuleSpecs::smime_invoke_import()
Definition: cryptglue.c:511
mutt_globals.h
CryptModuleSpecs::void_passphrase
void(* void_passphrase)(void)
Forget the cached passphrase.
Definition: crypt_mod.h:61
C_Autocrypt
bool C_Autocrypt
Config: Enables the Autocrypt feature.
Definition: config.c:37
options.h
SecurityFlags
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:83
crypt_smime_decrypt_mime
int crypt_smime_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Wrapper for CryptModuleSpecs::decrypt_mime()
Definition: cryptglue.c:434
CryptModuleSpecs::decrypt_mime
int(* decrypt_mime)(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Decrypt an encrypted MIME part.
Definition: crypt_mod.h:82
crypt_smime_verify_one
int crypt_smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
Wrapper for CryptModuleSpecs::verify_one()
Definition: cryptglue.c:520
mutt_autocrypt_set_sign_as_default_key
int mutt_autocrypt_set_sign_as_default_key(struct Mailbox *m, struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:697
CryptModSmimeGpgme
struct CryptModuleSpecs CryptModSmimeGpgme
GPGME SMIME - Implements CryptModuleSpecs.
Definition: crypt_mod_smime_gpgme.c:59
CryptModuleSpecs::pgp_check_traditional
int(* pgp_check_traditional)(FILE *fp, struct Body *b, bool just_one)
Look for inline (non-MIME) PGP content.
Definition: crypt_mod.h:174
C_CryptUseGpgme
bool C_CryptUseGpgme
Config: Use GPGME crypto backend.
Definition: config.c:81
crypt_pgp_check_traditional
int crypt_pgp_check_traditional(FILE *fp, struct Body *b, bool just_one)
Wrapper for CryptModuleSpecs::pgp_check_traditional()
Definition: cryptglue.c:283
crypt_pgp_valid_passphrase
bool crypt_pgp_valid_passphrase(void)
Wrapper for CryptModuleSpecs::valid_passphrase()
Definition: cryptglue.c:198
lib.h
crypt_pgp_traditional_encryptsign
struct Body * crypt_pgp_traditional_encryptsign(struct Body *a, SecurityFlags flags, char *keylist)
Wrapper for CryptModuleSpecs::pgp_traditional_encryptsign()
Definition: cryptglue.c:294
crypt_pgp_sign_message
struct Body * crypt_pgp_sign_message(struct Body *a, const struct AddressList *from)
Wrapper for CryptModuleSpecs::sign_message()
Definition: cryptglue.c:327
APPLICATION_PGP
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:97
CryptModuleSpecs::cleanup
void(* cleanup)(void)
Clean up the crypt module.
Definition: crypt_mod.h:56
CryptModuleSpecs::valid_passphrase
bool(* valid_passphrase)(void)
Ensure we have a valid passphrase.
Definition: crypt_mod.h:71
crypto_module_lookup
struct CryptModuleSpecs * crypto_module_lookup(int identifier)
Lookup a crypto module by name.
Definition: crypt_mod.c:65
CRYPT_MOD_CALL
#define CRYPT_MOD_CALL(identifier, func)
Definition: cryptglue.c:87
crypt_cleanup
void crypt_cleanup(void)
Clean up backend.
Definition: cryptglue.c:140
crypt_mod.h
CryptModuleSpecs
Crypto API.
Definition: crypt_mod.h:44
Email::security
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition: email.h:39
crypt_pgp_application_handler
int crypt_pgp_application_handler(struct Body *m, struct State *s)
Wrapper for CryptModuleSpecs::application_handler()
Definition: cryptglue.c:236
crypt_gpgme.h
crypt_smime_valid_passphrase
bool crypt_smime_valid_passphrase(void)
Wrapper for CryptModuleSpecs::valid_passphrase()
Definition: cryptglue.c:423
WithCrypto
#define WithCrypto
Definition: lib.h:123
crypt_smime_set_sender
void crypt_smime_set_sender(const char *sender)
Wrapper for CryptModuleSpecs::set_sender()
Definition: cryptglue.c:542
lib.h
lib.h
crypt_smime_sign_message
struct Body * crypt_smime_sign_message(struct Body *a, const struct AddressList *from)
Wrapper for CryptModuleSpecs::sign_message()
Definition: cryptglue.c:489
crypt_pgp_verify_one
int crypt_pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
Wrapper for CryptModuleSpecs::verify_one()
Definition: cryptglue.c:374
State
Keep track when processing files.
Definition: state.h:44
crypt_smime_find_keys
char * crypt_smime_find_keys(struct AddressList *addrlist, bool oppenc_mode)
Wrapper for CryptModuleSpecs::find_keys()
Definition: cryptglue.c:478
crypt_pgp_extract_key_from_attachment
void crypt_pgp_extract_key_from_attachment(FILE *fp, struct Body *top)
Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment()
Definition: cryptglue.c:396
pgp_gpgme_encrypt_message
struct Body * pgp_gpgme_encrypt_message(struct Body *a, char *keylist, bool sign, const struct AddressList *from)
Implements CryptModuleSpecs::pgp_encrypt_message()
Definition: crypt_gpgme.c:1382
context.h
CryptModuleSpecs::init
void(* init)(void)
Initialise the crypto module.
Definition: crypt_mod.h:51
crypt_pgp_void_passphrase
void crypt_pgp_void_passphrase(void)
Wrapper for CryptModuleSpecs::void_passphrase()
Definition: cryptglue.c:189
CryptModSmimeClassic
struct CryptModuleSpecs CryptModSmimeClassic
CLI SMIME - Implements CryptModuleSpecs.
Definition: crypt_mod_smime_classic.c:57
lib.h
find_keys
static char * find_keys(struct AddressList *addrlist, unsigned int app, bool oppenc_mode)
Find keys of the recipients of the message.
Definition: crypt_gpgme.c:3798
CryptModPgpClassic
struct CryptModuleSpecs CryptModPgpClassic
CLI PGP - Implements CryptModuleSpecs.
Definition: crypt_mod_pgp_classic.c:43
Email
The envelope/body of an email.
Definition: email.h:37
lib.h
mutt_message
#define mutt_message(...)
Definition: logging.h:83
pgp_gpgme_decrypt_mime
int pgp_gpgme_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Implements CryptModuleSpecs::decrypt_mime()
Definition: crypt_gpgme.c:2194
crypt_pgp_set_sender
void crypt_pgp_set_sender(const char *sender)
Wrapper for CryptModuleSpecs::set_sender()
Definition: cryptglue.c:405
crypt_pgp_invoke_getkeys
void crypt_pgp_invoke_getkeys(struct Address *addr)
Wrapper for CryptModuleSpecs::pgp_invoke_getkeys()
Definition: cryptglue.c:274
private.h
crypt_smime_verify_sender
int crypt_smime_verify_sender(struct Mailbox *m, struct Email *e)
Wrapper for CryptModuleSpecs::smime_verify_sender()
Definition: cryptglue.c:467
CryptModPgpGpgme
struct CryptModuleSpecs CryptModPgpGpgme
GPGME PGP - Implements CryptModuleSpecs.
Definition: crypt_mod_pgp_gpgme.c:59
SEC_AUTOCRYPT
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition: lib.h:94
Address
An email address.
Definition: address.h:34
cryptglue.h
crypt_pgp_send_menu
SecurityFlags crypt_pgp_send_menu(struct Email *e)
Wrapper for CryptModuleSpecs::send_menu()
Definition: cryptglue.c:385
crypt_invoke_message
void crypt_invoke_message(SecurityFlags type)
Display an informative message.
Definition: cryptglue.c:155
crypt_smime_application_handler
int crypt_smime_application_handler(struct Body *m, struct State *s)
Wrapper for CryptModuleSpecs::application_handler()
Definition: cryptglue.c:447
CRYPT_MOD_CALL_CHECK
#define CRYPT_MOD_CALL_CHECK(identifier, func)
Definition: cryptglue.c:81
sign_message
static struct Body * sign_message(struct Body *a, const struct AddressList *from, bool use_smime)
Sign a message.
Definition: crypt_gpgme.c:1245
CryptModuleSpecs::pgp_invoke_getkeys
void(* pgp_invoke_getkeys)(struct Address *addr)
Run a command to download a PGP key.
Definition: crypt_mod.h:190