summaryrefslogtreecommitdiffstats
path: root/pgp.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-07-28 14:24:36 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-07-28 14:24:36 +0000
commitd521c03a25a159e5316edf9ed5bf1918b61a0815 (patch)
tree62011d2ae16ebb645fa4a44379ff9aa502e0e596 /pgp.c
parent78697029c8e433299ba2177d973a4f154bfbfba7 (diff)
Add a hook which enables us to fetch PGP keys from servers on
demand. Look out for pkspxy. :-)
Diffstat (limited to 'pgp.c')
-rw-r--r--pgp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/pgp.c b/pgp.c
index dfd7e3c5..9d84eb20 100644
--- a/pgp.c
+++ b/pgp.c
@@ -1133,6 +1133,8 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
int i;
pgp_key_t *k_info, *key;
+ const char *fqdn = mutt_fqdn (1);
+
for (i = 0; i < 3; i++)
{
switch (i)
@@ -1148,8 +1150,9 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
last = &((*last)->next);
}
+ rfc822_qualify (tmp, fqdn);
tmp = mutt_remove_duplicates (tmp);
-
+
for (p = tmp; p ; p = p->next)
{
char buf[LONG_STRING];
@@ -1159,9 +1162,15 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
{
snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
if (mutt_yesorno (buf, M_YES) == M_YES)
+ {
+ pgp_invoke_getkeys (p);
k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING);
+ }
}
+ if (k_info == NULL)
+ pgp_invoke_getkeys (p);
+
if (k_info == NULL && (k_info = pgp_getkeybyaddr (p, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
{
snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), p->mailbox);