NeoMutt  2024-04-16-36-g75b6fb
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 "config/lib.h"
#include "email/lib.h"
#include "autocrypt/lib.h"
#include "crypt_gpgme.h"
#include "globals.h"
+ Include dependency graph for cryptglue.c:

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)
 

Functions

void crypt_init (void)
 Initialise the crypto backends.
 
void crypt_cleanup (void)
 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 (   identifier,
  func 
)
Value:
(crypto_module_lookup(APPLICATION_##identifier) && \
(crypto_module_lookup(APPLICATION_##identifier))->func)
const struct CryptModuleSpecs * crypto_module_lookup(int identifier)
Lookup a crypto module by name.
Definition: crypt_mod.c:68

Definition at line 79 of file cryptglue.c.

◆ CRYPT_MOD_CALL

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

Definition at line 85 of file cryptglue.c.

Function Documentation

◆ crypt_init()

void crypt_init ( void  )

Initialise the crypto backends.

This calls CryptModuleSpecs::init()

Definition at line 93 of file cryptglue.c.

94{
95#ifdef CRYPT_BACKEND_GPGME
96 const bool c_crypt_use_gpgme = cs_subset_bool(NeoMutt->sub, "crypt_use_gpgme");
97#endif
98#ifdef CRYPT_BACKEND_CLASSIC_PGP
99 if (
100#ifdef CRYPT_BACKEND_GPGME
101 (!c_crypt_use_gpgme)
102#else
103 1
104#endif
105 )
107#endif
108
109#ifdef CRYPT_BACKEND_CLASSIC_SMIME
110 if (
111#ifdef CRYPT_BACKEND_GPGME
112 (!c_crypt_use_gpgme)
113#else
114 1
115#endif
116 )
118#endif
119
120#ifdef CRYPT_BACKEND_GPGME
121 if (c_crypt_use_gpgme)
122 {
125 }
126#endif
127
128#if defined(CRYPT_BACKEND_CLASSIC_PGP) || \
129 defined(CRYPT_BACKEND_CLASSIC_SMIME) || defined(CRYPT_BACKEND_GPGME)
130 if (CRYPT_MOD_CALL_CHECK(PGP, init))
131 CRYPT_MOD_CALL(PGP, init)();
132
133 if (CRYPT_MOD_CALL_CHECK(SMIME, init))
134 CRYPT_MOD_CALL(SMIME, init)();
135#endif
136}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:48
void crypto_module_register(const struct CryptModuleSpecs *specs)
Register a new crypto module.
Definition: crypt_mod.c:54
#define CRYPT_MOD_CALL_CHECK(identifier, func)
Definition: cryptglue.c:79
#define CRYPT_MOD_CALL(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 -.
Container for Accounts, Notifications.
Definition: neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:45
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_cleanup()

void crypt_cleanup ( void  )

Clean up backend.

Definition at line 141 of file cryptglue.c.

142{
143 if (CRYPT_MOD_CALL_CHECK(PGP, cleanup))
144 (CRYPT_MOD_CALL(PGP, cleanup))();
145
146 if (CRYPT_MOD_CALL_CHECK(SMIME, cleanup))
147 (CRYPT_MOD_CALL(SMIME, cleanup))();
148}
+ 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 156 of file cryptglue.c.

157{
158 if (((WithCrypto & APPLICATION_PGP) != 0) && (type & APPLICATION_PGP))
159 mutt_message(_("Invoking PGP..."));
160 else if (((WithCrypto & APPLICATION_SMIME) != 0) && (type & APPLICATION_SMIME))
161 mutt_message(_("Invoking S/MIME..."));
162}
#define mutt_message(...)
Definition: logging2.h:91
#define _(a)
Definition: message.h:28
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:90
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:91
#define WithCrypto
Definition: lib.h:116
+ 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 170 of file cryptglue.c.

171{
172 if (((WithCrypto & APPLICATION_PGP) != 0) && (type & APPLICATION_PGP) &&
174 {
175 return true;
176 }
177
178 if (((WithCrypto & APPLICATION_SMIME) != 0) && (type & APPLICATION_SMIME) &&
180 {
181 return true;
182 }
183
184 return false;
185}
+ 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 190 of file cryptglue.c.

191{
192 if (CRYPT_MOD_CALL_CHECK(PGP, void_passphrase))
193 CRYPT_MOD_CALL(PGP, void_passphrase)();
194}
+ 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 199 of file cryptglue.c.

200{
201 if (CRYPT_MOD_CALL_CHECK(PGP, valid_passphrase))
202 return CRYPT_MOD_CALL(PGP, valid_passphrase)();
203
204 return false;
205}
+ 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 210 of file cryptglue.c.

211{
212#ifdef USE_AUTOCRYPT
213 const bool c_autocrypt = cs_subset_bool(NeoMutt->sub, "autocrypt");
214 if (c_autocrypt)
215 {
216 OptAutocryptGpgme = true;
217 int result = pgp_gpgme_decrypt_mime(fp_in, fp_out, b, b_dec);
218 OptAutocryptGpgme = false;
219 if (result == 0)
220 {
221 b->is_autocrypt = true;
222 return result;
223 }
224 }
225#endif
226
227 if (CRYPT_MOD_CALL_CHECK(PGP, decrypt_mime))
228 return CRYPT_MOD_CALL(PGP, decrypt_mime)(fp_in, fp_out, b, b_dec);
229
230 return -1;
231}
bool OptAutocryptGpgme
(pseudo) use Autocrypt context inside ncrypt/crypt_gpgme.c
Definition: globals.c:62
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() -.
Definition: crypt_gpgme.c:1857
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 273 of file cryptglue.c.

274{
275 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_invoke_getkeys))
276 CRYPT_MOD_CALL(PGP, pgp_invoke_getkeys)(addr);
277}
+ 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 282 of file cryptglue.c.

283{
284 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_check_traditional))
285 return CRYPT_MOD_CALL(PGP, pgp_check_traditional)(fp, b, just_one);
286
287 return false;
288}
+ 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 293 of file cryptglue.c.

294{
295 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_traditional_encryptsign))
296 return CRYPT_MOD_CALL(PGP, pgp_traditional_encryptsign)(b, flags, keylist);
297
298 return NULL;
299}
+ 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 304 of file cryptglue.c.

305{
306 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_make_key_attachment))
307 return CRYPT_MOD_CALL(PGP, pgp_make_key_attachment)();
308
309 return NULL;
310}
+ 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 315 of file cryptglue.c.

316{
318 return CRYPT_MOD_CALL(PGP, find_keys)(addrlist, oppenc_mode);
319
320 return NULL;
321}
static char * find_keys(const struct AddressList *addrlist, unsigned int app, bool oppenc_mode)
Find keys of the recipients of the message.
Definition: crypt_gpgme.c:3492
+ 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 326 of file cryptglue.c.

327{
329 return CRYPT_MOD_CALL(PGP, sign_message)(b, from);
330
331 return NULL;
332}
static struct Body * sign_message(struct Body *b, const struct AddressList *from, bool use_smime)
Sign a message.
Definition: crypt_gpgme.c:906
+ 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 337 of file cryptglue.c.

339{
340#ifdef USE_AUTOCRYPT
341 if (e->security & SEC_AUTOCRYPT)
342 {
344 return NULL;
345
346 OptAutocryptGpgme = true;
347 struct Body *result = pgp_gpgme_encrypt_message(b, keylist, sign, from);
348 OptAutocryptGpgme = false;
349
350 return result;
351 }
352#endif
353
354 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_encrypt_message))
355 return CRYPT_MOD_CALL(PGP, pgp_encrypt_message)(b, keylist, sign, from);
356
357 return NULL;
358}
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:699
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() -.
Definition: crypt_gpgme.c:1043
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition: lib.h:87
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 363 of file cryptglue.c.

364{
365 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_invoke_import))
366 CRYPT_MOD_CALL(PGP, pgp_invoke_import)(fname);
367}
+ 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 372 of file cryptglue.c.

373{
375 return CRYPT_MOD_CALL(PGP, verify_one)(b, state, tempf);
376
377 return -1;
378}
static int verify_one(struct Body *b, struct State *state, const char *tempfile, bool is_smime)
Do the actual verification step.
Definition: crypt_gpgme.c:1547
+ 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 383 of file cryptglue.c.

384{
385 if (CRYPT_MOD_CALL_CHECK(PGP, send_menu))
386 return CRYPT_MOD_CALL(PGP, send_menu)(e);
387
388 return 0;
389}
+ 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 394 of file cryptglue.c.

395{
396 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_extract_key_from_attachment))
397 CRYPT_MOD_CALL(PGP, pgp_extract_key_from_attachment)(fp, b);
398}
+ 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 403 of file cryptglue.c.

404{
405 if (CRYPT_MOD_CALL_CHECK(PGP, set_sender))
406 CRYPT_MOD_CALL(PGP, set_sender)(sender);
407}
+ 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 412 of file cryptglue.c.

413{
414 if (CRYPT_MOD_CALL_CHECK(SMIME, void_passphrase))
415 CRYPT_MOD_CALL(SMIME, void_passphrase)();
416}
+ 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 421 of file cryptglue.c.

422{
423 if (CRYPT_MOD_CALL_CHECK(SMIME, valid_passphrase))
424 return CRYPT_MOD_CALL(SMIME, valid_passphrase)();
425
426 return false;
427}
+ 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 432 of file cryptglue.c.

433{
434 if (CRYPT_MOD_CALL_CHECK(SMIME, decrypt_mime))
435 return CRYPT_MOD_CALL(SMIME, decrypt_mime)(fp_in, fp_out, b, b_dec);
436
437 return -1;
438}
+ 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 454 of file cryptglue.c.

455{
456 if (CRYPT_MOD_CALL_CHECK(SMIME, smime_getkeys))
457 CRYPT_MOD_CALL(SMIME, smime_getkeys)(env);
458}
+ 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 463 of file cryptglue.c.

464{
465 if (CRYPT_MOD_CALL_CHECK(SMIME, smime_verify_sender))
466 return CRYPT_MOD_CALL(SMIME, smime_verify_sender)(e, msg);
467
468 return 1;
469}
+ 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 474 of file cryptglue.c.

475{
477 return CRYPT_MOD_CALL(SMIME, find_keys)(addrlist, oppenc_mode);
478
479 return NULL;
480}
+ 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 485 of file cryptglue.c.

486{
488 return CRYPT_MOD_CALL(SMIME, sign_message)(b, from);
489
490 return NULL;
491}
+ 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 496 of file cryptglue.c.

497{
498 if (CRYPT_MOD_CALL_CHECK(SMIME, smime_build_smime_entity))
499 return CRYPT_MOD_CALL(SMIME, smime_build_smime_entity)(b, certlist);
500
501 return NULL;
502}
+ 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 507 of file cryptglue.c.

508{
509 if (CRYPT_MOD_CALL_CHECK(SMIME, smime_invoke_import))
510 CRYPT_MOD_CALL(SMIME, smime_invoke_import)(infile, mailbox);
511}
+ 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 516 of file cryptglue.c.

517{
519 return CRYPT_MOD_CALL(SMIME, verify_one)(b, state, tempf);
520
521 return -1;
522}
+ 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 527 of file cryptglue.c.

528{
529 if (CRYPT_MOD_CALL_CHECK(SMIME, send_menu))
530 return CRYPT_MOD_CALL(SMIME, send_menu)(e);
531
532 return 0;
533}
+ 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 538 of file cryptglue.c.

539{
540 if (CRYPT_MOD_CALL_CHECK(SMIME, set_sender))
541 CRYPT_MOD_CALL(SMIME, set_sender)(sender);
542}
+ Here is the caller graph for this function: