NeoMutt  2023-11-03-85-g512e01
Teaching an old dog new tricks
No Matches
Go to the documentation of this file.
29#include <stdbool.h>
30#include <stdio.h>
31#include "lib.h"
33struct AddressList;
34struct Body;
35struct Email;
36struct PgpKeyInfo;
37struct State;
47 const char *fname;
48 const char *sig_fname;
49 const char *signas;
50 const char *ids;
53char * pgp_fpr_or_lkeyid (struct PgpKeyInfo *k);
54char * pgp_keyid (struct PgpKeyInfo *k);
55char * pgp_long_keyid (struct PgpKeyInfo *k);
56char * pgp_short_keyid (struct PgpKeyInfo *k);
57char * pgp_this_keyid (struct PgpKeyInfo *k);
58bool pgp_use_gpg_agent (void);
60int pgp_class_application_handler (struct Body *b, struct State *state);
61bool pgp_class_check_traditional (FILE *fp, struct Body *b, bool just_one);
62int pgp_class_decrypt_mime (FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec);
63int pgp_class_encrypted_handler (struct Body *b, struct State *state);
64struct Body * pgp_class_encrypt_message (struct Body *b, char *keylist, bool sign, const struct AddressList *from);
65void pgp_class_extract_key_from_attachment(FILE *fp, struct Body *b);
66char * pgp_class_find_keys (const struct AddressList *addrlist, bool oppenc_mode);
68struct Body * pgp_class_sign_message (struct Body *b, const struct AddressList *from);
69struct Body * pgp_class_traditional_encryptsign (struct Body *b, SecurityFlags flags, char *keylist);
71int pgp_class_verify_one (struct Body *b, struct State *state, const char *tempfile);
74#endif /* MUTT_NCRYPT_PGP_H */
int pgp_class_application_handler(struct Body *b, struct State *state)
Manage the MIME type "application/pgp" or "application/smime" - Implements CryptModuleSpecs::applicat...
Definition: pgp.c:473
int pgp_class_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
Decrypt an encrypted MIME part - Implements CryptModuleSpecs::decrypt_mime() -.
Definition: pgp.c:1164
int pgp_class_encrypted_handler(struct Body *b, struct State *state)
Manage a PGP or S/MIME encrypted MIME part - Implements CryptModuleSpecs::encrypted_handler() -.
Definition: pgp.c:1249
char * pgp_class_find_keys(const struct AddressList *addrlist, bool oppenc_mode)
Find the keyids of the recipients of a message - Implements CryptModuleSpecs::find_keys() -.
Definition: pgp.c:1468
bool pgp_class_check_traditional(FILE *fp, struct Body *b, bool just_one)
Look for inline (non-MIME) PGP content - Implements CryptModuleSpecs::pgp_check_traditional() -.
Definition: pgp.c:871
struct Body * pgp_class_encrypt_message(struct Body *b, char *keylist, bool sign, const struct AddressList *from)
PGP encrypt an email - Implements CryptModuleSpecs::pgp_encrypt_message() -.
Definition: pgp.c:1592
void pgp_class_extract_key_from_attachment(FILE *fp, struct Body *b)
Extract PGP key from an attachment - Implements CryptModuleSpecs::pgp_extract_key_from_attachment() -...
Definition: pgp.c:1005
struct Body * pgp_class_traditional_encryptsign(struct Body *b, SecurityFlags flags, char *keylist)
Create an inline PGP encrypted, signed email - Implements CryptModuleSpecs::pgp_traditional_encryptsi...
Definition: pgp.c:1726
SecurityFlags pgp_class_send_menu(struct Email *e)
Ask the user whether to sign and/or encrypt the email - Implements CryptModuleSpecs::send_menu() -.
Definition: pgp.c:1898
struct Body * pgp_class_sign_message(struct Body *b, const struct AddressList *from)
Cryptographically sign the Body of a message - Implements CryptModuleSpecs::sign_message() -.
Definition: pgp.c:1337
bool pgp_class_valid_passphrase(void)
Ensure we have a valid passphrase - Implements CryptModuleSpecs::valid_passphrase() -.
Definition: pgp.c:86
int pgp_class_verify_one(struct Body *b, struct State *state, const char *tempfile)
Check a signed MIME part against a signature - Implements CryptModuleSpecs::verify_one() -.
Definition: pgp.c:900
void pgp_class_void_passphrase(void)
Forget the cached passphrase - Implements CryptModuleSpecs::void_passphrase() -.
Definition: pgp.c:77
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:77
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
Data for a PGP command.
Definition: pgp.h:45
bool need_passphrase
Definition: pgp.h:46
const char * signas
Definition: pgp.h:49
const char * fname
Definition: pgp.h:47
const char * ids
Definition: pgp.h:50
const char * sig_fname
Definition: pgp.h:48
Information about a PGP key.
Definition: pgplib.h:47
Keep track when processing files.
Definition: state.h:47