NeoMutt  2025-12-11-911-gd8d604
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
cryptglue.c File Reference

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 "module_data.h"
#include "config/lib.h"
#include "crypt_gpgme.h"
#include "pgpkey.h"
#include "email/lib.h"
#include "autocrypt/lib.h"
#include "globals.h"
+ Include dependency graph for cryptglue.c:

Go to the source code of this file.

Macros

#define CRYPT_MOD_CALL_CHECK(mod_data, identifier, func)
 
#define CRYPT_MOD_CALL(mod_data, identifier, func)
 

Functions

void crypt_init (void)
 Initialise the crypto backends.
 
void crypt_cleanup (struct NcryptModuleData *mod_data)
 Clean up backend.
 
void crypt_invoke_message (SecurityFlags type)
 Display an informative message.
 
bool crypt_has_module_backend (SecurityFlags type)
 Is there a crypto backend for a given type?
 
void crypt_pgp_void_passphrase (void)
 Wrapper for CryptModuleSpecs::void_passphrase()
 
bool crypt_pgp_valid_passphrase (void)
 Wrapper for CryptModuleSpecs::valid_passphrase()
 
int crypt_pgp_decrypt_mime (FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
 Wrapper for CryptModuleSpecs::decrypt_mime()
 
int crypt_pgp_application_handler (struct Body *b_email, struct State *state)
 Wrapper for CryptModuleSpecs::application_handler() - Implements handler_t -.
 
int crypt_pgp_encrypted_handler (struct Body *b_email, struct State *state)
 Wrapper for CryptModuleSpecs::encrypted_handler() - Implements handler_t -.
 
void crypt_pgp_invoke_getkeys (struct Address *addr)
 Wrapper for CryptModuleSpecs::pgp_invoke_getkeys()
 
bool crypt_pgp_check_traditional (FILE *fp, struct Body *b, bool just_one)
 Wrapper for CryptModuleSpecs::pgp_check_traditional()
 
struct Bodycrypt_pgp_traditional_encryptsign (struct Body *b, SecurityFlags flags, char *keylist)
 Wrapper for CryptModuleSpecs::pgp_traditional_encryptsign()
 
struct Bodycrypt_pgp_make_key_attachment (void)
 Wrapper for CryptModuleSpecs::pgp_make_key_attachment()
 
char * crypt_pgp_find_keys (struct AddressList *addrlist, bool oppenc_mode)
 Wrapper for CryptModuleSpecs::find_keys()
 
struct Bodycrypt_pgp_sign_message (struct Body *b, const struct AddressList *from)
 Wrapper for CryptModuleSpecs::sign_message()
 
struct Bodycrypt_pgp_encrypt_message (struct Email *e, struct Body *b, char *keylist, int sign, const struct AddressList *from)
 Wrapper for CryptModuleSpecs::pgp_encrypt_message()
 
void crypt_pgp_invoke_import (const char *fname)
 Wrapper for CryptModuleSpecs::pgp_invoke_import()
 
int crypt_pgp_verify_one (struct Body *b, struct State *state, const char *tempf)
 Wrapper for CryptModuleSpecs::verify_one()
 
SecurityFlags crypt_pgp_send_menu (struct Email *e)
 Wrapper for CryptModuleSpecs::send_menu()
 
void crypt_pgp_extract_key_from_attachment (FILE *fp, struct Body *b)
 Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment()
 
void crypt_pgp_set_sender (const char *sender)
 Wrapper for CryptModuleSpecs::set_sender()
 
void crypt_smime_void_passphrase (void)
 Wrapper for CryptModuleSpecs::void_passphrase()
 
bool crypt_smime_valid_passphrase (void)
 Wrapper for CryptModuleSpecs::valid_passphrase()
 
int crypt_smime_decrypt_mime (FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
 Wrapper for CryptModuleSpecs::decrypt_mime()
 
int crypt_smime_application_handler (struct Body *b_email, struct State *state)
 Wrapper for CryptModuleSpecs::application_handler() - Implements handler_t -.
 
void crypt_smime_getkeys (struct Envelope *env)
 Wrapper for CryptModuleSpecs::smime_getkeys()
 
int crypt_smime_verify_sender (struct Email *e, struct Message *msg)
 Wrapper for CryptModuleSpecs::smime_verify_sender()
 
char * crypt_smime_find_keys (struct AddressList *addrlist, bool oppenc_mode)
 Wrapper for CryptModuleSpecs::find_keys()
 
struct Bodycrypt_smime_sign_message (struct Body *b, const struct AddressList *from)
 Wrapper for CryptModuleSpecs::sign_message()
 
struct Bodycrypt_smime_build_smime_entity (struct Body *b, char *certlist)
 Wrapper for CryptModuleSpecs::smime_build_smime_entity()
 
void crypt_smime_invoke_import (const char *infile, const char *mailbox)
 Wrapper for CryptModuleSpecs::smime_invoke_import()
 
int crypt_smime_verify_one (struct Body *b, struct State *state, const char *tempf)
 Wrapper for CryptModuleSpecs::verify_one()
 
SecurityFlags crypt_smime_send_menu (struct Email *e)
 Wrapper for CryptModuleSpecs::send_menu()
 
void crypt_smime_set_sender (const char *sender)
 Wrapper for CryptModuleSpecs::set_sender()
 

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 -.
 

Detailed Description

Wrapper around crypto functions.

Authors
  • Richard Russon
  • Pietro Cerutti

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.

Macro Definition Documentation

◆ CRYPT_MOD_CALL_CHECK

#define CRYPT_MOD_CALL_CHECK ( mod_data,
identifier,
func )
Value:
(crypto_module_lookup(mod_data, APPLICATION_##identifier) && \
(crypto_module_lookup(mod_data, APPLICATION_##identifier))->func)
const struct CryptModuleSpecs * crypto_module_lookup(struct NcryptModuleData *mod_data, int identifier)
Lookup a crypto module by name.
Definition crypt_mod.c:57

Definition at line 85 of file cryptglue.c.

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)

◆ CRYPT_MOD_CALL

#define CRYPT_MOD_CALL ( mod_data,
identifier,
func )
Value:
(*(crypto_module_lookup(mod_data, APPLICATION_##identifier))->func)

Definition at line 91 of file cryptglue.c.

91#define CRYPT_MOD_CALL(mod_data, identifier, func) \
92 (*(crypto_module_lookup(mod_data, APPLICATION_##identifier))->func)

Function Documentation

◆ crypt_init()

void crypt_init ( void )

Initialise the crypto backends.

This calls CryptModuleSpecs::init()

Definition at line 99 of file cryptglue.c.

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}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition helpers.c:47
void crypto_module_register(const struct CryptModuleSpecs *specs)
Register a new crypto module.
Definition crypt_mod.c:41
#define CRYPT_MOD_CALL(mod_data, identifier, func)
Definition cryptglue.c:91
#define CRYPT_MOD_CALL_CHECK(mod_data, identifier, func)
Definition cryptglue.c:85
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 -.
@ MODULE_ID_NCRYPT
ModuleNcrypt, Ncrypt
Definition module_api.h:80
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:663
#define ASSERT(COND)
Definition signal2.h:59
Ncrypt private Module data.
Definition module_data.h:38
Container for Accounts, Notifications.
Definition neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_cleanup()

void crypt_cleanup ( struct NcryptModuleData * mod_data)

Clean up backend.

Parameters
mod_dataNcrypt module data

Definition at line 151 of file cryptglue.c.

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}
void gpgme_id_defaults_cleanup(struct NcryptModuleData *mod_data)
Free the GPGME IdDefaults cache.
void pgp_id_defaults_cleanup(struct PgpCache **pgp_id_defaults)
Free the PGP IdDefaults cache.
Definition pgpkey.c:617
struct PgpCache * pgp_id_defaults
PGP IdDefaults cache.
Definition module_data.h:52
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_invoke_message()

void crypt_invoke_message ( SecurityFlags type)

Display an informative message.

Parameters
typeCrypto type, see SecurityFlags

Show a message that a backend will be invoked.

Definition at line 174 of file cryptglue.c.

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}
#define mutt_message(...)
Definition logging2.h:93
#define _(a)
Definition message.h:28
#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
+ Here is the caller graph for this function:

◆ crypt_has_module_backend()

bool crypt_has_module_backend ( SecurityFlags type)

Is there a crypto backend for a given type?

Parameters
typeCrypto type, see SecurityFlags
Return values
trueBackend is present
falseBackend is not present

Definition at line 188 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_void_passphrase()

void crypt_pgp_void_passphrase ( void )

Wrapper for CryptModuleSpecs::void_passphrase()

Definition at line 211 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_valid_passphrase()

bool crypt_pgp_valid_passphrase ( void )

Wrapper for CryptModuleSpecs::valid_passphrase()

Definition at line 223 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_decrypt_mime()

int crypt_pgp_decrypt_mime ( FILE * fp_in,
FILE ** fp_out,
struct Body * b,
struct Body ** b_dec )

Wrapper for CryptModuleSpecs::decrypt_mime()

Definition at line 237 of file cryptglue.c.

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}
bool OptAutocryptGpgme
(pseudo) use Autocrypt context inside ncrypt/crypt_gpgme.c
Definition globals.c:44
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() -.
bool is_autocrypt
Flag autocrypt-decrypted messages for replying.
Definition body.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_invoke_getkeys()

void crypt_pgp_invoke_getkeys ( struct Address * addr)

Wrapper for CryptModuleSpecs::pgp_invoke_getkeys()

Definition at line 309 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_check_traditional()

bool crypt_pgp_check_traditional ( FILE * fp,
struct Body * b,
bool just_one )

Wrapper for CryptModuleSpecs::pgp_check_traditional()

Definition at line 321 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_traditional_encryptsign()

struct Body * crypt_pgp_traditional_encryptsign ( struct Body * b,
SecurityFlags flags,
char * keylist )

Wrapper for CryptModuleSpecs::pgp_traditional_encryptsign()

Definition at line 335 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_make_key_attachment()

struct Body * crypt_pgp_make_key_attachment ( void )

Wrapper for CryptModuleSpecs::pgp_make_key_attachment()

Definition at line 349 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_find_keys()

char * crypt_pgp_find_keys ( struct AddressList * addrlist,
bool oppenc_mode )

Wrapper for CryptModuleSpecs::find_keys()

Definition at line 363 of file cryptglue.c.

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}
static char * find_keys(const struct AddressList *addrlist, unsigned int app, bool oppenc_mode)
Find keys of the recipients of the message.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_sign_message()

struct Body * crypt_pgp_sign_message ( struct Body * b,
const struct AddressList * from )

Wrapper for CryptModuleSpecs::sign_message()

Definition at line 377 of file cryptglue.c.

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}
static struct Body * sign_message(struct Body *b, const struct AddressList *from, bool use_smime)
Sign a message.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_encrypt_message()

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 at line 391 of file cryptglue.c.

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}
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition autocrypt.c:717
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() -.
@ SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition lib.h:101
The body of an email.
Definition body.h:36
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition email.h:43
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_invoke_import()

void crypt_pgp_invoke_import ( const char * fname)

Wrapper for CryptModuleSpecs::pgp_invoke_import()

Definition at line 420 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_verify_one()

int crypt_pgp_verify_one ( struct Body * b,
struct State * state,
const char * tempf )

Wrapper for CryptModuleSpecs::verify_one()

Definition at line 432 of file cryptglue.c.

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}
static int verify_one(struct Body *b, struct State *state, const char *tempfile, bool is_smime)
Do the actual verification step.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_send_menu()

SecurityFlags crypt_pgp_send_menu ( struct Email * e)

Wrapper for CryptModuleSpecs::send_menu()

Definition at line 446 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_extract_key_from_attachment()

void crypt_pgp_extract_key_from_attachment ( FILE * fp,
struct Body * b )

Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment()

Definition at line 460 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_pgp_set_sender()

void crypt_pgp_set_sender ( const char * sender)

Wrapper for CryptModuleSpecs::set_sender()

Definition at line 472 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_void_passphrase()

void crypt_smime_void_passphrase ( void )

Wrapper for CryptModuleSpecs::void_passphrase()

Definition at line 484 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_valid_passphrase()

bool crypt_smime_valid_passphrase ( void )

Wrapper for CryptModuleSpecs::valid_passphrase()

Definition at line 496 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_decrypt_mime()

int crypt_smime_decrypt_mime ( FILE * fp_in,
FILE ** fp_out,
struct Body * b,
struct Body ** b_dec )

Wrapper for CryptModuleSpecs::decrypt_mime()

Definition at line 510 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_getkeys()

void crypt_smime_getkeys ( struct Envelope * env)

Wrapper for CryptModuleSpecs::smime_getkeys()

Definition at line 538 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_verify_sender()

int crypt_smime_verify_sender ( struct Email * e,
struct Message * msg )

Wrapper for CryptModuleSpecs::smime_verify_sender()

Definition at line 550 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_find_keys()

char * crypt_smime_find_keys ( struct AddressList * addrlist,
bool oppenc_mode )

Wrapper for CryptModuleSpecs::find_keys()

Definition at line 564 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_sign_message()

struct Body * crypt_smime_sign_message ( struct Body * b,
const struct AddressList * from )

Wrapper for CryptModuleSpecs::sign_message()

Definition at line 578 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_build_smime_entity()

struct Body * crypt_smime_build_smime_entity ( struct Body * b,
char * certlist )

Wrapper for CryptModuleSpecs::smime_build_smime_entity()

Definition at line 592 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_invoke_import()

void crypt_smime_invoke_import ( const char * infile,
const char * mailbox )

Wrapper for CryptModuleSpecs::smime_invoke_import()

Definition at line 606 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_verify_one()

int crypt_smime_verify_one ( struct Body * b,
struct State * state,
const char * tempf )

Wrapper for CryptModuleSpecs::verify_one()

Definition at line 618 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_send_menu()

SecurityFlags crypt_smime_send_menu ( struct Email * e)

Wrapper for CryptModuleSpecs::send_menu()

Definition at line 632 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_smime_set_sender()

void crypt_smime_set_sender ( const char * sender)

Wrapper for CryptModuleSpecs::set_sender()

Definition at line 646 of file cryptglue.c.

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}
+ Here is the call graph for this function:
+ Here is the caller graph for this function: