NeoMutt  2024-03-23-142-g2b2e76
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
93#ifndef MUTT_AUTOCRYPT_LIB_H
94#define MUTT_AUTOCRYPT_LIB_H
95
96#include <sqlite3.h>
97#include <stdbool.h>
98#include <stdio.h>
99
100struct Email;
101struct Envelope;
102
107{
109 char *keyid;
110 char *keydata;
112 bool enabled;
113};
114
119{
121 sqlite3_int64 last_seen;
122 sqlite3_int64 autocrypt_timestamp;
123 char *keyid;
124 char *keydata;
126 sqlite3_int64 gossip_timestamp;
129};
130
135{
138 sqlite3_int64 timestamp;
139 char *keydata;
140};
141
146{
150 sqlite3_int64 timestamp;
152};
153
158{
164};
165
166extern char *AutocryptSignAs;
167extern char *AutocryptDefaultKey;
168
169void dlg_autocrypt (void);
170void mutt_autocrypt_cleanup (void);
172int mutt_autocrypt_init (bool can_create);
173int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env);
174int mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers);
176enum AutocryptRec mutt_autocrypt_ui_recommendation (const struct Email *e, char **keylist);
177int mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp);
178int mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp);
179
180#endif /* MUTT_AUTOCRYPT_LIB_H */
int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env)
Parse an Autocrypt email header.
Definition: autocrypt.c:258
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:825
void mutt_autocrypt_cleanup(void)
Shutdown Autocrypt.
Definition: autocrypt.c:131
int mutt_autocrypt_write_gossip_headers(struct Envelope *env, FILE *fp)
Write the Autocrypt gossip headers to a file.
Definition: autocrypt.c:803
enum AutocryptRec mutt_autocrypt_ui_recommendation(const struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:560
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:765
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:699
AutocryptRec
Recommendation.
Definition: lib.h:158
@ AUTOCRYPT_REC_DISCOURAGE
Prefer not to use Autocrypt.
Definition: lib.h:161
@ AUTOCRYPT_REC_NO
Do no use Autocrypt.
Definition: lib.h:160
@ AUTOCRYPT_REC_OFF
No recommendations.
Definition: lib.h:159
@ AUTOCRYPT_REC_AVAILABLE
Autocrypt is available.
Definition: lib.h:162
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition: lib.h:163
int mutt_autocrypt_process_gossip_header(struct Email *e, struct Envelope *prot_headers)
Parse an Autocrypt email gossip header.
Definition: autocrypt.c:406
void dlg_autocrypt(void)
Display the Autocrypt account Menu -.
Autocrypt account.
Definition: lib.h:107
char * email_addr
Email address.
Definition: lib.h:108
char * keydata
PGP Key data.
Definition: lib.h:110
char * keyid
PGP Key id.
Definition: lib.h:109
bool enabled
Is this account enabled.
Definition: lib.h:112
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:111
Autocrypt gossip history.
Definition: lib.h:146
char * peer_email_addr
Email addressof the peer.
Definition: lib.h:147
char * email_msgid
Sender's email's message id.
Definition: lib.h:149
char * sender_email_addr
Sender's email address.
Definition: lib.h:148
char * gossip_keydata
Gossip Key data.
Definition: lib.h:151
sqlite3_int64 timestamp
Timestamp of sender's email.
Definition: lib.h:150
Autocrypt peer history.
Definition: lib.h:135
char * peer_email_addr
Email address of the peer.
Definition: lib.h:136
char * email_msgid
Message id of the email.
Definition: lib.h:137
char * keydata
PGP Key data.
Definition: lib.h:139
sqlite3_int64 timestamp
Timestamp of email.
Definition: lib.h:138
Autocrypt peer.
Definition: lib.h:119
sqlite3_int64 autocrypt_timestamp
When the email was sent.
Definition: lib.h:122
char * gossip_keydata
Gossip Key data.
Definition: lib.h:128
char * keyid
PGP Key id.
Definition: lib.h:123
char * gossip_keyid
Gossip Key id.
Definition: lib.h:127
char * keydata
PGP Key data.
Definition: lib.h:124
char * email_addr
Email address.
Definition: lib.h:120
sqlite3_int64 last_seen
When was the peer last seen.
Definition: lib.h:121
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:125
sqlite3_int64 gossip_timestamp
Timestamp of Gossip header.
Definition: lib.h:126
The envelope/body of an email.
Definition: email.h:39
The header of an Email.
Definition: envelope.h:57