NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
Go to the documentation of this file.
28 #include "config.h"
29 #include <stdbool.h>
30 #include <stdio.h>
31 #include "lib.h"
33 struct AddressList;
34 struct Body;
35 struct Email;
36 struct Envelope;
37 struct Mailbox;
38 struct Message;
39 struct State;
44 struct SmimeKey
45 {
46  char *email;
47  char *hash;
48  char *label;
49  char *issuer;
50  char trust;
52  struct SmimeKey *next;
53 };
55 void smime_init(void);
56 void smime_cleanup(void);
58 int smime_class_application_handler(struct Body *m, struct State *s);
59 struct Body *smime_class_build_smime_entity(struct Body *a, char *certlist);
60 int smime_class_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur);
61 char * smime_class_find_keys(struct AddressList *addrlist, bool oppenc_mode);
62 void smime_class_getkeys(struct Envelope *env);
63 void smime_class_invoke_import(const char *infile, const char *mailbox);
64 SecurityFlags smime_class_send_menu(struct Mailbox *m, struct Email *e);
65 struct Body *smime_class_sign_message(struct Body *a, const struct AddressList *from);
67 int smime_class_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile);
68 int smime_class_verify_sender(struct Mailbox *m, struct Email *e, struct Message *msg);
71 #endif /* MUTT_NCRYPT_SMIME_H */
The envelope/body of an email.
Definition: email.h:37
int smime_class_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Implements CryptModuleSpecs::decrypt_mime() -.
Definition: smime.c:2084
KeyFlags flags
Definition: smime.h:51
int smime_class_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
Implements CryptModuleSpecs::verify_one() -.
Definition: smime.c:1740
char trust
i=Invalid r=revoked e=expired u=unverified v=verified t=trusted
Definition: smime.h:50
An SIME key.
Definition: smime.h:44
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:71
The body of an email.
Definition: body.h:34
struct Body * smime_class_sign_message(struct Body *a, const struct AddressList *from)
Implements CryptModuleSpecs::sign_message() -.
Definition: smime.c:1524
void smime_class_invoke_import(const char *infile, const char *mailbox)
Implements CryptModuleSpecs::smime_invoke_import() -.
Definition: smime.c:1155
char * smime_class_find_keys(struct AddressList *addrlist, bool oppenc_mode)
Implements CryptModuleSpecs::find_keys() -.
Definition: smime.c:826
A local copy of an email.
Definition: mxapi.h:41
A mailbox.
Definition: mailbox.h:81
uint16_t KeyFlags
Flags describing PGP/SMIME keys, e.g. KEYFLAG_CANSIGN.
Definition: lib.h:122
void smime_cleanup(void)
Clean up smime globals.
Definition: smime.c:97
struct SmimeKey * next
Definition: smime.h:52
void smime_class_void_passphrase(void)
Implements CryptModuleSpecs::void_passphrase() -.
Definition: smime.c:158
API for encryption/signing of emails.
int smime_class_verify_sender(struct Mailbox *m, struct Email *e, struct Message *msg)
Implements CryptModuleSpecs::smime_verify_sender() -.
Definition: smime.c:1232
bool smime_class_valid_passphrase(void)
Implements CryptModuleSpecs::valid_passphrase() -.
Definition: smime.c:167
char * email
Definition: smime.h:46
char * label
Definition: smime.h:48
void smime_class_getkeys(struct Envelope *env)
Implements CryptModuleSpecs::smime_getkeys() -.
Definition: smime.c:782
SecurityFlags smime_class_send_menu(struct Mailbox *m, struct Email *e)
Implements CryptModuleSpecs::send_menu() -.
Definition: smime.c:2165
char * hash
Definition: smime.h:47
int smime_class_application_handler(struct Body *m, struct State *s)
Implements CryptModuleSpecs::application_handler() -.
Definition: smime.c:2146
Keep track when processing files.
Definition: state.h:44
char * issuer
Definition: smime.h:49
struct Body * smime_class_build_smime_entity(struct Body *a, char *certlist)
Implements CryptModuleSpecs::smime_build_smime_entity() -.
Definition: smime.c:1357
void smime_init(void)
Initialise smime globals.
Definition: smime.c:87
The header of an Email.
Definition: envelope.h:54