NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
95#ifndef MUTT_AUTOCRYPT_LIB_H
96#define MUTT_AUTOCRYPT_LIB_H
97
98#include <sqlite3.h>
99#include <stdbool.h>
100#include <stdio.h>
101#include "mutt/lib.h"
102
103struct Email;
104struct Envelope;
105
110{
112 char *keyid;
113 char *keydata;
115 bool enabled;
116};
117ARRAY_HEAD(AutocryptAccountArray, struct AutocryptAccount *);
118
123{
125 sqlite3_int64 last_seen;
126 sqlite3_int64 autocrypt_timestamp;
127 char *keyid;
128 char *keydata;
130 sqlite3_int64 gossip_timestamp;
133};
134
139{
142 sqlite3_int64 timestamp;
143 char *keydata;
144};
145
150{
154 sqlite3_int64 timestamp;
156};
157
162{
168};
169
170extern char *AutocryptSignAs;
171extern char *AutocryptDefaultKey;
172
173void dlg_autocrypt (void);
174void mutt_autocrypt_cleanup (void);
176int mutt_autocrypt_init (bool can_create);
177int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env);
178int mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers);
180enum AutocryptRec mutt_autocrypt_ui_recommendation (const struct Email *e, char **keylist);
181int mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp);
182int mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp);
183
184#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:162
@ AUTOCRYPT_REC_DISCOURAGE
Prefer not to use Autocrypt.
Definition: lib.h:165
@ AUTOCRYPT_REC_NO
Do no use Autocrypt.
Definition: lib.h:164
@ AUTOCRYPT_REC_OFF
No recommendations.
Definition: lib.h:163
@ AUTOCRYPT_REC_AVAILABLE
Autocrypt is available.
Definition: lib.h:166
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition: lib.h:167
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 -.
Convenience wrapper for the library headers.
Autocrypt account.
Definition: lib.h:110
char * email_addr
Email address.
Definition: lib.h:111
char * keydata
PGP Key data.
Definition: lib.h:113
char * keyid
PGP Key id.
Definition: lib.h:112
bool enabled
Is this account enabled.
Definition: lib.h:115
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:114
Autocrypt gossip history.
Definition: lib.h:150
char * peer_email_addr
Email addressof the peer.
Definition: lib.h:151
char * email_msgid
Sender's email's message id.
Definition: lib.h:153
char * sender_email_addr
Sender's email address.
Definition: lib.h:152
char * gossip_keydata
Gossip Key data.
Definition: lib.h:155
sqlite3_int64 timestamp
Timestamp of sender's email.
Definition: lib.h:154
Autocrypt peer history.
Definition: lib.h:139
char * peer_email_addr
Email address of the peer.
Definition: lib.h:140
char * email_msgid
Message id of the email.
Definition: lib.h:141
char * keydata
PGP Key data.
Definition: lib.h:143
sqlite3_int64 timestamp
Timestamp of email.
Definition: lib.h:142
Autocrypt peer.
Definition: lib.h:123
sqlite3_int64 autocrypt_timestamp
When the email was sent.
Definition: lib.h:126
char * gossip_keydata
Gossip Key data.
Definition: lib.h:132
char * keyid
PGP Key id.
Definition: lib.h:127
char * gossip_keyid
Gossip Key id.
Definition: lib.h:131
char * keydata
PGP Key data.
Definition: lib.h:128
char * email_addr
Email address.
Definition: lib.h:124
sqlite3_int64 last_seen
When was the peer last seen.
Definition: lib.h:125
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:129
sqlite3_int64 gossip_timestamp
Timestamp of Gossip header.
Definition: lib.h:130
The envelope/body of an email.
Definition: email.h:39
The header of an Email.
Definition: envelope.h:57