Autocrypt end-to-end encryption. More...
#include "config.h"#include <errno.h>#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include <sys/stat.h>#include "private.h"#include "mutt/lib.h"#include "address/lib.h"#include "config/lib.h"#include "email/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "lib.h"#include "browser/lib.h"#include "index/lib.h"#include "ncrypt/lib.h"#include "question/lib.h"#include "send/lib.h"#include "muttlib.h"#include "mx.h"
Include dependency graph for autocrypt.c:Go to the source code of this file.
Functions | |
| static int | autocrypt_dir_init (bool can_create) |
| Initialise an Autocrypt directory. | |
| int | mutt_autocrypt_init (bool can_create) |
| Initialise Autocrypt. | |
| void | mutt_autocrypt_cleanup (void) |
| Shutdown Autocrypt. | |
| int | mutt_autocrypt_account_init (bool prompt) |
| Create a new Autocrypt account. | |
| int | mutt_autocrypt_process_autocrypt_header (struct Email *e, struct Envelope *env) |
| Parse an Autocrypt email header. | |
| int | mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers) |
| Parse an Autocrypt email gossip header. | |
| enum AutocryptRec | mutt_autocrypt_ui_recommendation (const struct Email *e, char **keylist) |
| Get the recommended action for an Email. | |
| int | mutt_autocrypt_set_sign_as_default_key (struct Email *e) |
| Set the Autocrypt default key for signing. | |
| static void | write_autocrypt_header_line (FILE *fp, const char *addr, bool prefer_encrypt, const char *keydata) |
| Write an Autocrypt header to a file. | |
| int | mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp) |
| Write the Autocrypt header to a file. | |
| int | mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp) |
| Write the Autocrypt gossip headers to a file. | |
| int | mutt_autocrypt_generate_gossip_list (struct Email *e) |
| Create the gossip list headers. | |
| void | mutt_autocrypt_scan_mailboxes (void) |
| Scan mailboxes for Autocrypt headers. | |
Autocrypt end-to-end encryption.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file autocrypt.c.
|
static |
Initialise an Autocrypt directory.
| can_create | If true, the directory may be created |
| 0 | Success |
| -1 | Error |
Definition at line 61 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_autocrypt_init | ( | bool | can_create | ) |
Initialise Autocrypt.
| can_create | If true, directories may be created |
| 0 | Success |
| -1 | Error |
Definition at line 99 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_autocrypt_cleanup | ( | void | ) |
Shutdown Autocrypt.
Definition at line 129 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_autocrypt_account_init | ( | bool | prompt | ) |
Create a new Autocrypt account.
| prompt | Prompt the user |
| 0 | Success |
| -1 | Error |
This is used the first time autocrypt is initialized, and in the account menu.
Definition at line 143 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:Parse an Autocrypt email header.
| 0 | Success |
| -1 | Error |
Definition at line 256 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:Parse an Autocrypt email gossip header.
| 0 | Success |
| -1 | Error |
Definition at line 404 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum AutocryptRec mutt_autocrypt_ui_recommendation | ( | const struct Email * | e, |
| char ** | keylist ) |
Get the recommended action for an Email.
| [in] | e | |
| [out] | keylist | List of Autocrypt key ids |
| enum | AutocryptRec Recommendation, e.g. AUTOCRYPT_REC_AVAILABLE |
If the recommendataion is > NO and keylist is not NULL, keylist will be populated with the autocrypt keyids.
Definition at line 558 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_autocrypt_set_sign_as_default_key | ( | struct Email * | e | ) |
Set the Autocrypt default key for signing.
| e |
| 0 | Success |
| -1 | Error |
Definition at line 697 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Write an Autocrypt header to a file.
| fp | File to write to |
| addr | Email address |
| prefer_encrypt | Whether encryption is preferred |
| keydata | Raw Autocrypt data |
Definition at line 734 of file autocrypt.c.
Here is the caller graph for this function:| int mutt_autocrypt_write_autocrypt_header | ( | struct Envelope * | env, |
| FILE * | fp ) |
Write the Autocrypt header to a file.
| env | Envelope |
| fp | File to write to |
| 0 | Success |
| -1 | Error |
Definition at line 763 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_autocrypt_write_gossip_headers | ( | struct Envelope * | env, |
| FILE * | fp ) |
Write the Autocrypt gossip headers to a file.
| env | Envelope |
| fp | File to write to |
| 0 | Success |
| -1 | Error |
Definition at line 801 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_autocrypt_generate_gossip_list | ( | struct Email * | e | ) |
Create the gossip list headers.
| e |
| 0 | Success |
| -1 | Error |
Definition at line 823 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_autocrypt_scan_mailboxes | ( | void | ) |
Scan mailboxes for Autocrypt headers.
This is invoked during the first autocrypt initialization, to scan one or more mailboxes for autocrypt headers.
Due to the implementation, header-cached headers are not scanned, so this routine just opens up the mailboxes with $header_cache temporarily disabled.
Definition at line 914 of file autocrypt.c.
Here is the call graph for this function:
Here is the caller graph for this function: