summaryrefslogtreecommitdiffstats
path: root/pgp.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2015-03-30 15:45:52 -0700
committerKevin McCarthy <kevin@8t8.us>2015-03-30 15:45:52 -0700
commit0fd24e8b59b1ae12b6244151463f5c296fb70d20 (patch)
tree8b78525400aed39a8d17d3e6014f2a7b41254441 /pgp.h
parentdedb0a6f370b413b74594c251ea83e88b6609679 (diff)
Implement oppenc_mode in the find_keys methods.
oppenc_mode is used by crypt_opportunistic_encrypt to determine whether there are valid keys for all recipients of a message, without prompting the user. The patch wraps around prompts, and makes getkeybyaddr methods return a valid address-matching key without prompting. The patch also fixes a small problem with gpgme's getkeybyaddr. When determining if there were multiple strong matches, it was comparing the crypt_key_t instead of its kobj member (gpgme_key_t). The patch also enables a call to crypt_is_numerical_keyid() in find_keys(), so that crypt-hooks can actually be checked without prompting when gpgme is enabled. (The addition was patterned off of the pgp_findKeys() function).
Diffstat (limited to 'pgp.h')
-rw-r--r--pgp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/pgp.h b/pgp.h
index ab874045..46a54846 100644
--- a/pgp.h
+++ b/pgp.h
@@ -48,7 +48,7 @@ int pgp_decrypt_mime (FILE *, FILE **, BODY *, BODY **);
/* pgp_key_t gpg_get_candidates (struct pgp_vinfo *, pgp_ring_t, LIST *); */
pgp_key_t pgp_ask_for_key (char *, char *, short, pgp_ring_t);
pgp_key_t pgp_get_candidates (pgp_ring_t, LIST *);
-pgp_key_t pgp_getkeybyaddr (ADDRESS *, short, pgp_ring_t);
+pgp_key_t pgp_getkeybyaddr (ADDRESS *, short, pgp_ring_t, int);
pgp_key_t pgp_getkeybystr (char *, short, pgp_ring_t);
char *pgp_findKeys (ADDRESS *adrlist, int oppenc_mode);