NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
94#ifndef MUTT_AUTOCRYPT_LIB_H
95#define MUTT_AUTOCRYPT_LIB_H
96
97#include <sqlite3.h>
98#include <stdbool.h>
99#include <stdio.h>
100
101struct Email;
102struct Envelope;
103
108{
110 char *keyid;
111 char *keydata;
113 bool enabled;
114};
115ARRAY_HEAD(AutocryptAccountArray, struct AutocryptAccount *);
116
121{
123 sqlite3_int64 last_seen;
124 sqlite3_int64 autocrypt_timestamp;
125 char *keyid;
126 char *keydata;
128 sqlite3_int64 gossip_timestamp;
131};
132
137{
140 sqlite3_int64 timestamp;
141 char *keydata;
142};
143
148{
152 sqlite3_int64 timestamp;
154};
155
160{
166};
167
168extern char *AutocryptSignAs;
169extern char *AutocryptDefaultKey;
170
171void dlg_autocrypt (void);
172void mutt_autocrypt_cleanup (void);
174int mutt_autocrypt_init (bool can_create);
175int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env);
176int mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers);
178enum AutocryptRec mutt_autocrypt_ui_recommendation (const struct Email *e, char **keylist);
179int mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp);
180int mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp);
181
182#endif /* MUTT_AUTOCRYPT_LIB_H */
#define ARRAY_HEAD(name, type)
Define a named struct for arrays of elements of a certain type.
Definition: array.h:47
int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env)
Parse an Autocrypt email header.
Definition: autocrypt.c:256
char * AutocryptSignAs
Autocrypt Key id to sign as.
Definition: config.c:37
int mutt_autocrypt_generate_gossip_list(struct Email *e)
Create the gossip list headers.
Definition: autocrypt.c:823
void mutt_autocrypt_cleanup(void)
Shutdown Autocrypt.
Definition: autocrypt.c:129
int mutt_autocrypt_write_gossip_headers(struct Envelope *env, FILE *fp)
Write the Autocrypt gossip headers to a file.
Definition: autocrypt.c:801
enum AutocryptRec mutt_autocrypt_ui_recommendation(const struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:558
char * AutocryptDefaultKey
Autocrypt default key id (used for postponing messages)
Definition: config.c:38
int mutt_autocrypt_init(bool can_create)
Initialise Autocrypt.
Definition: autocrypt.c:99
int mutt_autocrypt_write_autocrypt_header(struct Envelope *env, FILE *fp)
Write the Autocrypt header to a file.
Definition: autocrypt.c:763
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:697
AutocryptRec
Recommendation.
Definition: lib.h:160
@ AUTOCRYPT_REC_DISCOURAGE
Prefer not to use Autocrypt.
Definition: lib.h:163
@ AUTOCRYPT_REC_NO
Do no use Autocrypt.
Definition: lib.h:162
@ AUTOCRYPT_REC_OFF
No recommendations.
Definition: lib.h:161
@ AUTOCRYPT_REC_AVAILABLE
Autocrypt is available.
Definition: lib.h:164
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition: lib.h:165
int mutt_autocrypt_process_gossip_header(struct Email *e, struct Envelope *prot_headers)
Parse an Autocrypt email gossip header.
Definition: autocrypt.c:404
void dlg_autocrypt(void)
Display the Autocrypt account Menu -.
Autocrypt account.
Definition: lib.h:108
char * email_addr
Email address.
Definition: lib.h:109
char * keydata
PGP Key data.
Definition: lib.h:111
char * keyid
PGP Key id.
Definition: lib.h:110
bool enabled
Is this account enabled.
Definition: lib.h:113
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:112
Autocrypt gossip history.
Definition: lib.h:148
char * peer_email_addr
Email addressof the peer.
Definition: lib.h:149
char * email_msgid
Sender's email's message id.
Definition: lib.h:151
char * sender_email_addr
Sender's email address.
Definition: lib.h:150
char * gossip_keydata
Gossip Key data.
Definition: lib.h:153
sqlite3_int64 timestamp
Timestamp of sender's email.
Definition: lib.h:152
Autocrypt peer history.
Definition: lib.h:137
char * peer_email_addr
Email address of the peer.
Definition: lib.h:138
char * email_msgid
Message id of the email.
Definition: lib.h:139
char * keydata
PGP Key data.
Definition: lib.h:141
sqlite3_int64 timestamp
Timestamp of email.
Definition: lib.h:140
Autocrypt peer.
Definition: lib.h:121
sqlite3_int64 autocrypt_timestamp
When the email was sent.
Definition: lib.h:124
char * gossip_keydata
Gossip Key data.
Definition: lib.h:130
char * keyid
PGP Key id.
Definition: lib.h:125
char * gossip_keyid
Gossip Key id.
Definition: lib.h:129
char * keydata
PGP Key data.
Definition: lib.h:126
char * email_addr
Email address.
Definition: lib.h:122
sqlite3_int64 last_seen
When was the peer last seen.
Definition: lib.h:123
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:127
sqlite3_int64 gossip_timestamp
Timestamp of Gossip header.
Definition: lib.h:128
The envelope/body of an email.
Definition: email.h:39
The header of an Email.
Definition: envelope.h:57