PGP sign, encrypt, check routines. More...
Go to the source code of this file.
Data Structures | |
struct | PgpCommandContext |
Data for a PGP command. More... | |
Enumerations | |
enum | ExpandoDataPgpCmd { ED_PGC_FILE_MESSAGE = 1 , ED_PGC_FILE_SIGNATURE , ED_PGC_KEY_IDS , ED_PGC_NEED_PASS , ED_PGC_SIGN_AS } |
Expando UIDs for PGP Commands. More... | |
Functions | |
char * | pgp_fpr_or_lkeyid (struct PgpKeyInfo *k) |
Get the fingerprint or long keyid. | |
char * | pgp_keyid (struct PgpKeyInfo *k) |
Get the ID of the main (parent) key. | |
char * | pgp_long_keyid (struct PgpKeyInfo *k) |
Get a key's long id. | |
char * | pgp_short_keyid (struct PgpKeyInfo *k) |
Get a key's short id. | |
char * | pgp_this_keyid (struct PgpKeyInfo *k) |
Get the ID of this key. | |
bool | pgp_use_gpg_agent (void) |
Does the user want to use the gpg agent? | |
int | pgp_class_application_handler (struct Body *b, struct State *state) |
Manage the MIME type "application/pgp" or "application/smime" - Implements CryptModuleSpecs::application_handler() -. | |
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() -. | |
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() -. | |
int | pgp_class_encrypted_handler (struct Body *b, struct State *state) |
Manage a PGP or S/MIME encrypted MIME part - Implements CryptModuleSpecs::encrypted_handler() -. | |
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() -. | |
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() -. | |
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() -. | |
SecurityFlags | pgp_class_send_menu (struct Email *e) |
Ask the user whether to sign and/or encrypt the email - Implements CryptModuleSpecs::send_menu() -. | |
struct Body * | pgp_class_sign_message (struct Body *b, const struct AddressList *from) |
Cryptographically sign the Body of a message - Implements CryptModuleSpecs::sign_message() -. | |
struct Body * | pgp_class_traditional_encryptsign (struct Body *b, SecurityFlags flags, char *keylist) |
Create an inline PGP encrypted, signed email - Implements CryptModuleSpecs::pgp_traditional_encryptsign() -. | |
bool | pgp_class_valid_passphrase (void) |
Ensure we have a valid passphrase - Implements CryptModuleSpecs::valid_passphrase() -. | |
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() -. | |
void | pgp_class_void_passphrase (void) |
Forget the cached passphrase - Implements CryptModuleSpecs::void_passphrase() -. | |
PGP sign, encrypt, check routines.
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 pgp.h.
enum ExpandoDataPgpCmd |
Expando UIDs for PGP Commands.
Enumerator | |
---|---|
ED_PGC_FILE_MESSAGE | |
ED_PGC_FILE_SIGNATURE | |
ED_PGC_KEY_IDS | |
ED_PGC_NEED_PASS | |
ED_PGC_SIGN_AS |
char * pgp_fpr_or_lkeyid | ( | struct PgpKeyInfo * | k | ) |
Get the fingerprint or long keyid.
k | PGP key |
ptr | String fingerprint or long keyid |
Grab the longest key identifier available: fingerprint or else the long keyid.
The longest available should be used for internally identifying the key and for invoking pgp commands.
Definition at line 234 of file pgp.c.
char * pgp_keyid | ( | struct PgpKeyInfo * | k | ) |
Get the ID of the main (parent) key.
k | PGP key |
ptr | Long/Short key id string |
Definition at line 204 of file pgp.c.
char * pgp_long_keyid | ( | struct PgpKeyInfo * | k | ) |
Get a key's long id.
k | PGP key |
ptr | Long key id string |
Definition at line 165 of file pgp.c.
char * pgp_short_keyid | ( | struct PgpKeyInfo * | k | ) |
char * pgp_this_keyid | ( | struct PgpKeyInfo * | k | ) |
Get the ID of this key.
k | PGP key |
ptr | Long/Short key id string |
$pgp_long_ids
Definition at line 191 of file pgp.c.
bool pgp_use_gpg_agent | ( | void | ) |
Does the user want to use the gpg agent?
true | The user wants to use the gpg agent |
$GPG_TTY
Definition at line 127 of file pgp.c.