summaryrefslogtreecommitdiffstats
path: root/mutt_crypt.h
diff options
context:
space:
mode:
authorEike Rathke <erack@erack.de>2015-02-11 21:38:37 +0100
committerEike Rathke <erack@erack.de>2015-02-11 21:38:37 +0100
commitccd098b83ebbb6546152d53361c99f3f778396cf (patch)
tree1a7c3f60c9401061539a850ac04597ba99bc6423 /mutt_crypt.h
parentbe71d820d27234d7badc27ae7aecfd881f2b5953 (diff)
Allow fingerprint user input for key selection. (see #3695)
Accept and check input of a fingerprint and find the matching key. Note that for both to work, match against and display of fingerprint, the pgp_list_pubring_command and pgp_list_secring_command need to contain the --with-fingerprint option, or have with-fingerprint in ~/.gnupg/gpg.conf.
Diffstat (limited to 'mutt_crypt.h')
-rw-r--r--mutt_crypt.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/mutt_crypt.h b/mutt_crypt.h
index c9fcd893..49345606 100644
--- a/mutt_crypt.h
+++ b/mutt_crypt.h
@@ -153,6 +153,20 @@ int crypt_valid_passphrase (int);
TEMPFILE. */
int crypt_write_signed(BODY *a, STATE *s, const char *tempf);
+/* Obtain pointers to fingerprint or short or long key ID, if any.
+
+ Upon return, at most one of return, *ppl and *pps pointers is non-NULL,
+ indicating the longest fingerprint or ID found, if any.
+
+ Return: Copy of fingerprint, if any, stripped of all spaces, else NULL.
+ Must be FREE'd by caller.
+ *pphint Start of string to be passed to pgp_add_string_to_hints() or
+ crypt_add_string_to_hints().
+ *ppl Start of long key ID if detected, else NULL.
+ *pps Start of short key ID if detected, else NULL. */
+const char* crypt_get_fingerprint_or_id (char *p, const char **pphint,
+ const char **ppl, const char **pps);
+
/*-- cryptglue.c --*/