NeoMutt  2022-04-29-178-g3b62e6
Teaching an old dog new tricks
DOXYGEN
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 "options.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. More...
 
void crypt_cleanup (void)
 Clean up backend. More...
 
void crypt_invoke_message (SecurityFlags type)
 Display an informative message. More...
 
bool crypt_has_module_backend (SecurityFlags type)
 Is there a crypto backend for a given type? More...
 
void crypt_pgp_void_passphrase (void)
 Wrapper for CryptModuleSpecs::void_passphrase() More...
 
bool crypt_pgp_valid_passphrase (void)
 Wrapper for CryptModuleSpecs::valid_passphrase() More...
 
int crypt_pgp_decrypt_mime (FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
 Wrapper for CryptModuleSpecs::decrypt_mime() More...
 
int crypt_pgp_application_handler (struct Body *b, struct State *s)
 Wrapper for CryptModuleSpecs::application_handler() - Implements handler_t -. More...
 
int crypt_pgp_encrypted_handler (struct Body *b, struct State *s)
 Wrapper for CryptModuleSpecs::encrypted_handler() - Implements handler_t -. More...
 
void crypt_pgp_invoke_getkeys (struct Address *addr)
 Wrapper for CryptModuleSpecs::pgp_invoke_getkeys() More...
 
bool crypt_pgp_check_traditional (FILE *fp, struct Body *b, bool just_one)
 Wrapper for CryptModuleSpecs::pgp_check_traditional() More...
 
struct Bodycrypt_pgp_traditional_encryptsign (struct Body *a, SecurityFlags flags, char *keylist)
 Wrapper for CryptModuleSpecs::pgp_traditional_encryptsign() More...
 
struct Bodycrypt_pgp_make_key_attachment (void)
 Wrapper for CryptModuleSpecs::pgp_make_key_attachment() More...
 
char * crypt_pgp_find_keys (struct AddressList *addrlist, bool oppenc_mode)
 Wrapper for CryptModuleSpecs::find_keys() More...
 
struct Bodycrypt_pgp_sign_message (struct Body *a, const struct AddressList *from)
 Wrapper for CryptModuleSpecs::sign_message() More...
 
struct Bodycrypt_pgp_encrypt_message (struct Email *e, struct Body *a, char *keylist, int sign, const struct AddressList *from)
 Wrapper for CryptModuleSpecs::pgp_encrypt_message() More...
 
void crypt_pgp_invoke_import (const char *fname)
 Wrapper for CryptModuleSpecs::pgp_invoke_import() More...
 
int crypt_pgp_verify_one (struct Body *sigbdy, struct State *s, const char *tempf)
 Wrapper for CryptModuleSpecs::verify_one() More...
 
SecurityFlags crypt_pgp_send_menu (struct Email *e)
 Wrapper for CryptModuleSpecs::send_menu() More...
 
void crypt_pgp_extract_key_from_attachment (FILE *fp, struct Body *top)
 Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment() More...
 
void crypt_pgp_set_sender (const char *sender)
 Wrapper for CryptModuleSpecs::set_sender() More...
 
void crypt_smime_void_passphrase (void)
 Wrapper for CryptModuleSpecs::void_passphrase() More...
 
bool crypt_smime_valid_passphrase (void)
 Wrapper for CryptModuleSpecs::valid_passphrase() More...
 
int crypt_smime_decrypt_mime (FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
 Wrapper for CryptModuleSpecs::decrypt_mime() More...
 
int crypt_smime_application_handler (struct Body *b, struct State *s)
 Wrapper for CryptModuleSpecs::application_handler() - Implements handler_t -. More...
 
void crypt_smime_getkeys (struct Envelope *env)
 Wrapper for CryptModuleSpecs::smime_getkeys() More...
 
int crypt_smime_verify_sender (struct Email *e, struct Message *msg)
 Wrapper for CryptModuleSpecs::smime_verify_sender() More...
 
char * crypt_smime_find_keys (struct AddressList *addrlist, bool oppenc_mode)
 Wrapper for CryptModuleSpecs::find_keys() More...
 
struct Bodycrypt_smime_sign_message (struct Body *a, const struct AddressList *from)
 Wrapper for CryptModuleSpecs::sign_message() More...
 
struct Bodycrypt_smime_build_smime_entity (struct Body *a, char *certlist)
 Wrapper for CryptModuleSpecs::smime_build_smime_entity() More...
 
void crypt_smime_invoke_import (const char *infile, const char *mailbox)
 Wrapper for CryptModuleSpecs::smime_invoke_import() More...
 
int crypt_smime_verify_one (struct Body *sigbdy, struct State *s, const char *tempf)
 Wrapper for CryptModuleSpecs::verify_one() More...
 
SecurityFlags crypt_smime_send_menu (struct Email *e)
 Wrapper for CryptModuleSpecs::send_menu() More...
 
void crypt_smime_set_sender (const char *sender)
 Wrapper for CryptModuleSpecs::set_sender() More...
 

Variables

struct CryptModuleSpecs CryptModPgpClassic
 CLI PGP - Implements CryptModuleSpecs. More...
 
struct CryptModuleSpecs CryptModSmimeClassic
 CLI SMIME - Implements CryptModuleSpecs. More...
 
struct CryptModuleSpecs CryptModPgpGpgme
 GPGME PGP - Implements CryptModuleSpecs. More...
 
struct CryptModuleSpecs CryptModSmimeGpgme
 GPGME SMIME - Implements CryptModuleSpecs. More...
 

Detailed Description

Wrapper around crypto functions.

Authors
  • Werner Koch
  • g10 Code GmbH
  • 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)
struct CryptModuleSpecs * crypto_module_lookup(int identifier)
Lookup a crypto module by name.
Definition: crypt_mod.c:65

Definition at line 80 of file cryptglue.c.

◆ CRYPT_MOD_CALL

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

Definition at line 86 of file cryptglue.c.

Function Documentation

◆ crypt_init()

void crypt_init ( void  )

Initialise the crypto backends.

This calls CryptModuleSpecs::init()

Definition at line 94 of file cryptglue.c.

95{
96#ifdef CRYPT_BACKEND_GPGME
97 const bool c_crypt_use_gpgme = cs_subset_bool(NeoMutt->sub, "crypt_use_gpgme");
98#endif
99#ifdef CRYPT_BACKEND_CLASSIC_PGP
100 if (
101#ifdef CRYPT_BACKEND_GPGME
102 (!c_crypt_use_gpgme)
103#else
104 1
105#endif
106 )
108#endif
109
110#ifdef CRYPT_BACKEND_CLASSIC_SMIME
111 if (
112#ifdef CRYPT_BACKEND_GPGME
113 (!c_crypt_use_gpgme)
114#else
115 1
116#endif
117 )
119#endif
120
121#ifdef CRYPT_BACKEND_GPGME
122 if (c_crypt_use_gpgme)
123 {
126 }
127#endif
128
129#if defined(CRYPT_BACKEND_CLASSIC_PGP) || \
130 defined(CRYPT_BACKEND_CLASSIC_SMIME) || defined(CRYPT_BACKEND_GPGME)
131 if (CRYPT_MOD_CALL_CHECK(PGP, init))
132 CRYPT_MOD_CALL(PGP, init)();
133
134 if (CRYPT_MOD_CALL_CHECK(SMIME, init))
135 CRYPT_MOD_CALL(SMIME, init)();
136#endif
137}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:73
void crypto_module_register(struct CryptModuleSpecs *specs)
Register a new crypto module.
Definition: crypt_mod.c:51
struct CryptModuleSpecs CryptModPgpGpgme
GPGME PGP - Implements CryptModuleSpecs.
struct CryptModuleSpecs CryptModPgpClassic
CLI PGP - Implements CryptModuleSpecs.
#define CRYPT_MOD_CALL_CHECK(identifier, func)
Definition: cryptglue.c:80
struct CryptModuleSpecs CryptModSmimeGpgme
GPGME SMIME - Implements CryptModuleSpecs.
#define CRYPT_MOD_CALL(identifier, func)
Definition: cryptglue.c:86
struct CryptModuleSpecs CryptModSmimeClassic
CLI SMIME - Implements CryptModuleSpecs.
Container for Accounts, Notifications.
Definition: neomutt.h:37
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
+ 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 142 of file cryptglue.c.

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

158{
159 if (((WithCrypto & APPLICATION_PGP) != 0) && (type & APPLICATION_PGP))
160 mutt_message(_("Invoking PGP..."));
161 else if (((WithCrypto & APPLICATION_SMIME) != 0) && (type & APPLICATION_SMIME))
162 mutt_message(_("Invoking S/MIME..."));
163}
#define mutt_message(...)
Definition: logging.h:86
#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 171 of file cryptglue.c.

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

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

201{
202 if (CRYPT_MOD_CALL_CHECK(PGP, valid_passphrase))
203 return CRYPT_MOD_CALL(PGP, valid_passphrase)();
204
205 return false;
206}
+ 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 **  cur 
)

Wrapper for CryptModuleSpecs::decrypt_mime()

Definition at line 211 of file cryptglue.c.

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

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

284{
285 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_check_traditional))
286 return CRYPT_MOD_CALL(PGP, pgp_check_traditional)(fp, b, just_one);
287
288 return false;
289}
+ Here is the caller graph for this function:

◆ crypt_pgp_traditional_encryptsign()

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

Wrapper for CryptModuleSpecs::pgp_traditional_encryptsign()

Definition at line 294 of file cryptglue.c.

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}
+ 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 305 of file cryptglue.c.

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}
+ 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 316 of file cryptglue.c.

317{
319 return CRYPT_MOD_CALL(PGP, find_keys)(addrlist, oppenc_mode);
320
321 return NULL;
322}
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:3818
+ 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 a,
const struct AddressList *  from 
)

Wrapper for CryptModuleSpecs::sign_message()

Definition at line 327 of file cryptglue.c.

328{
330 return CRYPT_MOD_CALL(PGP, sign_message)(a, from);
331
332 return NULL;
333}
static struct Body * sign_message(struct Body *a, const struct AddressList *from, bool use_smime)
Sign a message.
Definition: crypt_gpgme.c:1263
+ 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 a,
char *  keylist,
int  sign,
const struct AddressList *  from 
)

Wrapper for CryptModuleSpecs::pgp_encrypt_message()

Definition at line 338 of file cryptglue.c.

340{
341#ifdef USE_AUTOCRYPT
342 if (e->security & SEC_AUTOCRYPT)
343 {
345 return NULL;
346
347 OptAutocryptGpgme = true;
348 struct Body *result = pgp_gpgme_encrypt_message(a, keylist, sign, from);
349 OptAutocryptGpgme = false;
350
351 return result;
352 }
353#endif
354
355 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_encrypt_message))
356 return CRYPT_MOD_CALL(PGP, pgp_encrypt_message)(a, keylist, sign, from);
357
358 return NULL;
359}
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:702
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:1400
#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:41
+ 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 364 of file cryptglue.c.

365{
366 if (CRYPT_MOD_CALL_CHECK(PGP, pgp_invoke_import))
367 CRYPT_MOD_CALL(PGP, pgp_invoke_import)(fname);
368}
+ Here is the caller graph for this function:

◆ crypt_pgp_verify_one()

int crypt_pgp_verify_one ( struct Body sigbdy,
struct State s,
const char *  tempf 
)

Wrapper for CryptModuleSpecs::verify_one()

Definition at line 373 of file cryptglue.c.

374{
376 return CRYPT_MOD_CALL(PGP, verify_one)(sigbdy, s, tempf);
377
378 return -1;
379}
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:1902
+ 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 384 of file cryptglue.c.

385{
386 if (CRYPT_MOD_CALL_CHECK(PGP, send_menu))
387 return CRYPT_MOD_CALL(PGP, send_menu)(e);
388
389 return 0;
390}
+ 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 top 
)

Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment()

Definition at line 395 of file cryptglue.c.

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

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

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

423{
424 if (CRYPT_MOD_CALL_CHECK(SMIME, valid_passphrase))
425 return CRYPT_MOD_CALL(SMIME, valid_passphrase)();
426
427 return false;
428}
+ 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 **  cur 
)

Wrapper for CryptModuleSpecs::decrypt_mime()

Definition at line 433 of file cryptglue.c.

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

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

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

476{
478 return CRYPT_MOD_CALL(SMIME, find_keys)(addrlist, oppenc_mode);
479
480 return NULL;
481}
+ 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 a,
const struct AddressList *  from 
)

Wrapper for CryptModuleSpecs::sign_message()

Definition at line 486 of file cryptglue.c.

487{
489 return CRYPT_MOD_CALL(SMIME, sign_message)(a, from);
490
491 return NULL;
492}
+ 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 a,
char *  certlist 
)

Wrapper for CryptModuleSpecs::smime_build_smime_entity()

Definition at line 497 of file cryptglue.c.

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

509{
510 if (CRYPT_MOD_CALL_CHECK(SMIME, smime_invoke_import))
511 CRYPT_MOD_CALL(SMIME, smime_invoke_import)(infile, mailbox);
512}
+ Here is the caller graph for this function:

◆ crypt_smime_verify_one()

int crypt_smime_verify_one ( struct Body sigbdy,
struct State s,
const char *  tempf 
)

Wrapper for CryptModuleSpecs::verify_one()

Definition at line 517 of file cryptglue.c.

518{
520 return CRYPT_MOD_CALL(SMIME, verify_one)(sigbdy, s, tempf);
521
522 return -1;
523}
+ 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 528 of file cryptglue.c.

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

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

Variable Documentation

◆ CryptModPgpClassic

struct CryptModuleSpecs CryptModPgpClassic
extern

CLI PGP - Implements CryptModuleSpecs.

Definition at line 42 of file crypt_mod_pgp_classic.c.

◆ CryptModSmimeClassic

struct CryptModuleSpecs CryptModSmimeClassic
extern

CLI SMIME - Implements CryptModuleSpecs.

Definition at line 56 of file crypt_mod_smime_classic.c.

◆ CryptModPgpGpgme

struct CryptModuleSpecs CryptModPgpGpgme
extern

GPGME PGP - Implements CryptModuleSpecs.

Definition at line 58 of file crypt_mod_pgp_gpgme.c.

◆ CryptModSmimeGpgme

struct CryptModuleSpecs CryptModSmimeGpgme
extern

GPGME SMIME - Implements CryptModuleSpecs.

Definition at line 58 of file crypt_mod_smime_gpgme.c.