summaryrefslogtreecommitdiffstats
path: root/pgp.h
diff options
context:
space:
mode:
authorEike Rathke <erack@erack.de>2015-01-18 17:45:41 +0100
committerEike Rathke <erack@erack.de>2015-01-18 17:45:41 +0100
commitc9384a1b5ae7b1313d31c5910c35802089ac43e0 (patch)
tree9c59f150b31c55f66a6f9438d6fbcf6382c895ba /pgp.h
parentb42d4356e6aa19673167e7f426fa5519e3f7e042 (diff)
Allow short and long key ID user input in pgp_getkeybystr()
The following did not work, e.g. when leaving a key list, and at the "Sign as" or "Encrypt to" prompt attempting to enter a key ID: * set pgp_long_ids=no * enter a long key ID, with or without leading 0x * set pgp_long_ids=yes * enter a short key ID without leading 0x Specifically entering a long key ID should always be possible as evil32.com has shown. This also cleans up the logic used to determine the matching condition, which was quite convoluted.. it even slightly speeds up the loop as less string operations are involved in the inner condition. This only changes how the result obtained from the pgp_* command line interface is filtered.
Diffstat (limited to 'pgp.h')
-rw-r--r--pgp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/pgp.h b/pgp.h
index 2d98e14e..7b60e1b3 100644
--- a/pgp.h
+++ b/pgp.h
@@ -35,6 +35,8 @@ const char *pgp_micalg (const char *fname);
char *_pgp_keyid (pgp_key_t);
char *pgp_keyid (pgp_key_t);
+char *pgp_short_keyid (pgp_key_t);
+char *pgp_long_keyid (pgp_key_t);
int mutt_check_pgp (HEADER * h);