NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
autocrypt.h
Go to the documentation of this file.
1 
37 #ifndef MUTT_AUTOCRYPT_AUTOCRYPT_H
38 #define MUTT_AUTOCRYPT_AUTOCRYPT_H
39 
40 #include <sqlite3.h>
41 #include <stdbool.h>
42 #include <stdio.h>
43 
44 struct Email;
45 struct Envelope;
46 
51 {
52  char *email_addr;
53  char *keyid;
54  char *keydata;
55  bool prefer_encrypt; /* false = nopref, true = mutual */
56  bool enabled;
57 };
58 
63 {
64  char *email_addr;
65  sqlite3_int64 last_seen;
66  sqlite3_int64 autocrypt_timestamp;
67  char *keyid;
68  char *keydata;
69  bool prefer_encrypt; /* false = nopref, true = mutual */
70  sqlite3_int64 gossip_timestamp;
71  char *gossip_keyid;
73 };
74 
79 {
81  char *email_msgid;
82  sqlite3_int64 timestamp;
83  char *keydata;
84 };
85 
90 {
93  char *email_msgid;
94  sqlite3_int64 timestamp;
96 };
97 
102 {
108 };
109 
110 void mutt_autocrypt_account_menu (void);
111 void mutt_autocrypt_cleanup (void);
113 int mutt_autocrypt_init (bool can_create);
114 int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env);
115 int mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers);
117 enum AutocryptRec mutt_autocrypt_ui_recommendation (struct Email *e, char **keylist);
118 int mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp);
119 int mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp);
120 
121 #endif /* MUTT_AUTOCRYPT_AUTOCRYPT_H */
The envelope/body of an email.
Definition: email.h:39
int mutt_autocrypt_process_gossip_header(struct Email *e, struct Envelope *prot_headers)
Parse an Autocrypt email gossip header.
Definition: autocrypt.c:407
char * keydata
Definition: autocrypt.h:68
sqlite3_int64 timestamp
Definition: autocrypt.h:82
int mutt_autocrypt_write_autocrypt_header(struct Envelope *env, FILE *fp)
Write the Autocrypt header to a file.
Definition: autocrypt.c:740
void mutt_autocrypt_account_menu(void)
Display the Autocrypt account Menu.
char * email_addr
Definition: autocrypt.h:52
Autocrypt is available.
Definition: autocrypt.h:106
AutocryptRec
Recommendation.
Definition: autocrypt.h:101
int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env)
Parse an Autocrypt email header.
Definition: autocrypt.c:259
char * gossip_keydata
Definition: autocrypt.h:72
sqlite3_int64 gossip_timestamp
Definition: autocrypt.h:70
void mutt_autocrypt_cleanup(void)
Shutdown Autocrypt.
Definition: autocrypt.c:128
sqlite3_int64 autocrypt_timestamp
Definition: autocrypt.h:66
Autocrypt peer.
Definition: autocrypt.h:62
No recommendations.
Definition: autocrypt.h:103
char * email_addr
Definition: autocrypt.h:64
bool prefer_encrypt
Definition: autocrypt.h:55
Prefer not to use Autocrypt.
Definition: autocrypt.h:105
Autocrypt gossip history.
Definition: autocrypt.h:89
sqlite3_int64 last_seen
Definition: autocrypt.h:65
Autocrypt should be used.
Definition: autocrypt.h:107
char * gossip_keyid
Definition: autocrypt.h:71
Do no use Autocrypt.
Definition: autocrypt.h:104
Autocrypt peer history.
Definition: autocrypt.h:78
bool prefer_encrypt
Definition: autocrypt.h:69
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:675
Autocrypt account.
Definition: autocrypt.h:50
int mutt_autocrypt_init(bool can_create)
Initialise Autocrypt.
Definition: autocrypt.c:95
char * keydata
Definition: autocrypt.h:54
enum AutocryptRec mutt_autocrypt_ui_recommendation(struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:562
char * keyid
Definition: autocrypt.h:67
sqlite3_int64 timestamp
Definition: autocrypt.h:94
char * peer_email_addr
Definition: autocrypt.h:80
int mutt_autocrypt_write_gossip_headers(struct Envelope *env, FILE *fp)
Write the Autocrypt gossip headers to a file.
Definition: autocrypt.c:777
The header of an Email.
Definition: envelope.h:54
int mutt_autocrypt_generate_gossip_list(struct Email *e)
Create the gossip list headers.
Definition: autocrypt.c:798