NeoMutt  2023-05-17-16-g61469c
Teaching an old dog new tricks
DOXYGEN
pgp.h
Go to the documentation of this file.
1
26#ifndef MUTT_NCRYPT_PGP_H
27#define MUTT_NCRYPT_PGP_H
28
29#include <stdbool.h>
30#include <stdio.h>
31#include "lib.h"
32
33struct AddressList;
34struct Body;
35struct Email;
36struct PgpKeyInfo;
37struct State;
38
39char * pgp_fpr_or_lkeyid (struct PgpKeyInfo *k);
40char * pgp_keyid (struct PgpKeyInfo *k);
41char * pgp_long_keyid (struct PgpKeyInfo *k);
42char * pgp_short_keyid (struct PgpKeyInfo *k);
43char * pgp_this_keyid (struct PgpKeyInfo *k);
44bool pgp_use_gpg_agent (void);
45
46int pgp_class_application_handler (struct Body *m, struct State *state);
47bool pgp_class_check_traditional (FILE *fp, struct Body *b, bool just_one);
48int pgp_class_decrypt_mime (FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur);
49int pgp_class_encrypted_handler (struct Body *a, struct State *state);
50struct Body * pgp_class_encrypt_message (struct Body *a, char *keylist, bool sign, const struct AddressList *from);
51void pgp_class_extract_key_from_attachment(FILE *fp, struct Body *top);
52char * pgp_class_find_keys (const struct AddressList *addrlist, bool oppenc_mode);
54struct Body * pgp_class_sign_message (struct Body *a, const struct AddressList *from);
55struct Body * pgp_class_traditional_encryptsign (struct Body *a, SecurityFlags flags, char *keylist);
57int pgp_class_verify_one (struct Body *sigbdy, struct State *state, const char *tempfile);
59
60#endif /* MUTT_NCRYPT_PGP_H */
int pgp_class_application_handler(struct Body *m, struct State *state)
Implements CryptModuleSpecs::application_handler() -.
Definition: pgp.c:473
int pgp_class_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Implements CryptModuleSpecs::decrypt_mime() -.
Definition: pgp.c:1164
int pgp_class_encrypted_handler(struct Body *a, struct State *state)
Implements CryptModuleSpecs::encrypted_handler() -.
Definition: pgp.c:1249
char * pgp_class_find_keys(const struct AddressList *addrlist, bool oppenc_mode)
Implements CryptModuleSpecs::find_keys() -.
Definition: pgp.c:1468
bool pgp_class_check_traditional(FILE *fp, struct Body *b, bool just_one)
Implements CryptModuleSpecs::pgp_check_traditional() -.
Definition: pgp.c:871
struct Body * pgp_class_encrypt_message(struct Body *a, char *keylist, bool sign, const struct AddressList *from)
Implements CryptModuleSpecs::pgp_encrypt_message() -.
Definition: pgp.c:1591
void pgp_class_extract_key_from_attachment(FILE *fp, struct Body *top)
Implements CryptModuleSpecs::pgp_extract_key_from_attachment() -.
Definition: pgp.c:1005
struct Body * pgp_class_traditional_encryptsign(struct Body *a, SecurityFlags flags, char *keylist)
Implements CryptModuleSpecs::pgp_traditional_encryptsign() -.
Definition: pgp.c:1725
SecurityFlags pgp_class_send_menu(struct Email *e)
Implements CryptModuleSpecs::send_menu() -.
Definition: pgp.c:1897
struct Body * pgp_class_sign_message(struct Body *a, const struct AddressList *from)
Implements CryptModuleSpecs::sign_message() -.
Definition: pgp.c:1337
bool pgp_class_valid_passphrase(void)
Implements CryptModuleSpecs::valid_passphrase() -.
Definition: pgp.c:85
int pgp_class_verify_one(struct Body *sigbdy, struct State *state, const char *tempfile)
Implements CryptModuleSpecs::verify_one() -.
Definition: pgp.c:900
void pgp_class_void_passphrase(void)
Implements CryptModuleSpecs::void_passphrase() -.
Definition: pgp.c:76
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:76
char * pgp_long_keyid(struct PgpKeyInfo *k)
Get a key's long id.
Definition: pgp.c:166
char * pgp_this_keyid(struct PgpKeyInfo *k)
Get the ID of this key.
Definition: pgp.c:192
char * pgp_keyid(struct PgpKeyInfo *k)
Get the ID of the main (parent) key.
Definition: pgp.c:205
char * pgp_fpr_or_lkeyid(struct PgpKeyInfo *k)
Get the fingerprint or long keyid.
Definition: pgp.c:235
char * pgp_short_keyid(struct PgpKeyInfo *k)
Get a key's short id.
Definition: pgp.c:178
bool pgp_use_gpg_agent(void)
Does the user want to use the gpg agent?
Definition: pgp.c:128
Key value store.
The body of an email.
Definition: body.h:36
The envelope/body of an email.
Definition: email.h:37
Information about a PGP key.
Definition: pgplib.h:47
Keep track when processing files.
Definition: state.h:47
FILE * fp_out
File to write to.
Definition: state.h:49
FILE * fp_in
File to read from.
Definition: state.h:48