NeoMutt  2019-12-07-168-gc45f47
Teaching an old dog new tricks
Go to the documentation of this file.
27 #include <stdbool.h>
28 #include <stdio.h>
29 #include "lib.h"
31 struct Address;
32 struct AddressList;
33 struct Body;
34 struct Email;
35 struct Envelope;
36 struct Mailbox;
37 struct State;
45 {
46  int identifier;
51  void (*init)(void);
55  void (*void_passphrase)(void);
64  bool (*valid_passphrase)(void);
74  int (*decrypt_mime)(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur);
82  int (*application_handler)(struct Body *m, struct State *s);
90  int (*encrypted_handler)(struct Body *m, struct State *s);
101  char * (*find_keys)(struct AddressList *addrlist, bool oppenc_mode);
109  struct Body *(*sign_message)(struct Body *a, const struct AddressList *from);
118  int (*verify_one)(struct Body *sigbdy, struct State *s, const char *tempf);
124  int (*send_menu)(struct Email *e);
129  void (*set_sender)(const char *sender);
142  struct Body *(*pgp_encrypt_message)(struct Body *a, char *keylist, bool sign,
143  const struct AddressList *from);
149  struct Body *(*pgp_make_key_attachment)(void);
158  int (*pgp_check_traditional)(FILE *fp, struct Body *b, bool just_one);
167  struct Body *(*pgp_traditional_encryptsign)(struct Body *a, SecurityFlags flags, char *keylist);
172  void (*pgp_invoke_getkeys)(struct Address *addr);
177  void (*pgp_invoke_import)(const char *fname);
183  void (*pgp_extract_key_from_attachment)(FILE *fp, struct Body *top);
189  void (*smime_getkeys)(struct Envelope *env);
197  int (*smime_verify_sender)(struct Mailbox *m, struct Email *e);
205  struct Body *(*smime_build_smime_entity)(struct Body *a, char *certlist);
211  void (*smime_invoke_import)(const char *infile, const char *mailbox);
212 };
214 /* High Level crypto module interface */
215 void crypto_module_register(struct CryptModuleSpecs *specs);
218 #endif /* MUTT_NCRYPT_CRYPT_MOD_H */
int(* send_menu)(struct Email *e)
Ask the user whether to sign and/or encrypt the email.
Definition: crypt_mod.h:124
The envelope/body of an email.
Definition: email.h:37
int(* encrypted_handler)(struct Body *m, struct State *s)
Manage a PGP or S/MIME encrypted MIME part.
Definition: crypt_mod.h:90
int(* verify_one)(struct Body *sigbdy, struct State *s, const char *tempf)
Check a signed MIME part against a signature.
Definition: crypt_mod.h:118
int(* application_handler)(struct Body *m, struct State *s)
Manage the MIME type "application/pgp" or "application/smime".
Definition: crypt_mod.h:82
void(* pgp_extract_key_from_attachment)(FILE *fp, struct Body *top)
Extract PGP key from an attachment.
Definition: crypt_mod.h:183
void(* void_passphrase)(void)
Forget the cached passphrase.
Definition: crypt_mod.h:55
int(* pgp_check_traditional)(FILE *fp, struct Body *b, bool just_one)
Look for inline (non-MIME) PGP content.
Definition: crypt_mod.h:158
An email address.
Definition: address.h:34
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:121
The body of an email.
Definition: body.h:34
void(* smime_invoke_import)(const char *infile, const char *mailbox)
Add a certificate and update index file (externally)
Definition: crypt_mod.h:211
int(* decrypt_mime)(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Decrypt an encrypted MIME part.
Definition: crypt_mod.h:74
void crypto_module_register(struct CryptModuleSpecs *specs)
Register a new crypto module.
Definition: crypt_mod.c:51
A mailbox.
Definition: mailbox.h:80
Crypto API.
Definition: crypt_mod.h:44
void(* set_sender)(const char *sender)
Set the sender of the email.
Definition: crypt_mod.h:129
int(* smime_verify_sender)(struct Mailbox *m, struct Email *e)
Does the sender match the certificate?
Definition: crypt_mod.h:197
API for encryption/signing of emails.
void(* pgp_invoke_import)(const char *fname)
Import a key from a message into the user&#39;s public key ring.
Definition: crypt_mod.h:177
bool(* valid_passphrase)(void)
Ensure we have a valid passphrase.
Definition: crypt_mod.h:64
int identifier
Identifying bit.
Definition: crypt_mod.h:46
Keep track when processing files.
Definition: state.h:44
struct CryptModuleSpecs * crypto_module_lookup(int identifier)
Lookup a crypto module by name.
Definition: crypt_mod.c:65
void(* smime_getkeys)(struct Envelope *env)
Get the S/MIME keys required to encrypt this email.
Definition: crypt_mod.h:189
void(* pgp_invoke_getkeys)(struct Address *addr)
Run a command to download a PGP key.
Definition: crypt_mod.h:172
void(* init)(void)
Initialise the crypto module.
Definition: crypt_mod.h:51
The header of an Email.
Definition: envelope.h:54