NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
crypt_mod.h
Go to the documentation of this file.
1
24#ifndef MUTT_NCRYPT_CRYPT_MOD_H
25#define MUTT_NCRYPT_CRYPT_MOD_H
26
27#include <stdbool.h>
28#include <stdio.h>
29#include "lib.h"
30
31struct Address;
32struct AddressList;
33struct Body;
34struct Email;
35struct Envelope;
36struct Message;
37struct State;
38
47{
49
56 void (*init)(void);
57
64 void(*cleanup)(void);
65
72 void (*void_passphrase)(void);
73
85 bool (*valid_passphrase)(void);
86
99 int (*decrypt_mime)(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec);
100
111 int (*application_handler)(struct Body *b, struct State *state);
112
123 int (*encrypted_handler)(struct Body *b, struct State *state);
124
138 char *(*find_keys)(const struct AddressList *addrlist, bool oppenc_mode);
139
150 struct Body *(*sign_message)(struct Body *b, const struct AddressList *from);
151
163 int (*verify_one)(struct Body *b, struct State *state, const char *tempf);
164
174
182 void (*set_sender)(const char *sender);
183
198 struct Body *(*pgp_encrypt_message)(struct Body *b, char *keylist, bool sign, const struct AddressList *from);
199
208 struct Body *(*pgp_make_key_attachment)(void);
209
221 bool (*pgp_check_traditional)(FILE *fp, struct Body *b, bool just_one);
222
234 struct Body *(*pgp_traditional_encryptsign)(struct Body *b, SecurityFlags flags, char *keylist);
235
243 void (*pgp_invoke_getkeys)(struct Address *addr);
244
252 void (*pgp_invoke_import)(const char *fname);
253
262 void (*pgp_extract_key_from_attachment)(FILE *fp, struct Body *b);
263
271 void (*smime_getkeys)(struct Envelope *env);
272
283 int (*smime_verify_sender)(struct Email *e, struct Message *msg);
284
295 struct Body *(*smime_build_smime_entity)(struct Body *b, char *certlist);
296
305 void (*smime_invoke_import)(const char *infile, const char *mailbox);
306};
307
308/* High Level crypto module interface */
309void crypto_module_register(const struct CryptModuleSpecs *specs);
311
312#endif /* MUTT_NCRYPT_CRYPT_MOD_H */
const struct CryptModuleSpecs * crypto_module_lookup(int identifier)
Lookup a crypto module by name.
Definition: crypt_mod.c:68
void crypto_module_register(const struct CryptModuleSpecs *specs)
Register a new crypto module.
Definition: crypt_mod.c:54
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:82
Key value store.
An email address.
Definition: address.h:36
The body of an email.
Definition: body.h:36
int(* encrypted_handler)(struct Body *b, struct State *state)
Definition: crypt_mod.h:123
void(* pgp_invoke_import)(const char *fname)
Definition: crypt_mod.h:252
int(* decrypt_mime)(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
Definition: crypt_mod.h:99
void(* smime_getkeys)(struct Envelope *env)
Definition: crypt_mod.h:271
void(* set_sender)(const char *sender)
Definition: crypt_mod.h:182
void(* pgp_extract_key_from_attachment)(FILE *fp, struct Body *b)
Definition: crypt_mod.h:262
void(* init)(void)
Definition: crypt_mod.h:56
int identifier
Identifying bit.
Definition: crypt_mod.h:48
bool(* valid_passphrase)(void)
Definition: crypt_mod.h:85
void(* cleanup)(void)
Definition: crypt_mod.h:64
int(* application_handler)(struct Body *b, struct State *state)
Definition: crypt_mod.h:111
SecurityFlags(* send_menu)(struct Email *e)
Definition: crypt_mod.h:173
int(* smime_verify_sender)(struct Email *e, struct Message *msg)
Definition: crypt_mod.h:283
bool(* pgp_check_traditional)(FILE *fp, struct Body *b, bool just_one)
Definition: crypt_mod.h:221
int(* verify_one)(struct Body *b, struct State *state, const char *tempf)
Definition: crypt_mod.h:163
void(* void_passphrase)(void)
Definition: crypt_mod.h:72
void(* pgp_invoke_getkeys)(struct Address *addr)
Definition: crypt_mod.h:243
void(* smime_invoke_import)(const char *infile, const char *mailbox)
Definition: crypt_mod.h:305
The envelope/body of an email.
Definition: email.h:39
The header of an Email.
Definition: envelope.h:57
A local copy of an email.
Definition: message.h:34
Keep track when processing files.
Definition: state.h:48