summaryrefslogtreecommitdiffstats
path: root/pgpkey.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-01-30 17:07:30 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-01-30 17:07:30 +0000
commit2a976c1aa47318aa8d55baabce9f36658b9accb0 (patch)
tree51a85ff30d90e94c45be7c06f62d3e4c65e544c9 /pgpkey.c
parentf69b145be27f04e34c076158b105c325017a4178 (diff)
really fix the weak associations problem. it was worse than i
thought.
Diffstat (limited to 'pgpkey.c')
-rw-r--r--pgpkey.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/pgpkey.c b/pgpkey.c
index b5f9dc80..992e7110 100644
--- a/pgpkey.c
+++ b/pgpkey.c
@@ -625,8 +625,8 @@ pgp_key_t *pgp_getkeybyaddr (struct pgp_vinfo * pgp,
continue;
}
- pkey = pgp_principal_key (k);
- kflags = k->flags | pkey->flags;
+ pk = pgp_principal_key (k);
+ kflags = k->flags | pk->flags;
q = k->address;
weak_association = 1;
@@ -647,15 +647,20 @@ pgp_key_t *pgp_getkeybyaddr (struct pgp_vinfo * pgp,
match = 1;
if (((q->trust & 0x03) == 3) &&
- !(kflags & KEYFLAG_CANTUSE) &&
+ (!(kflags & KEYFLAG_CANTUSE)) &&
(p->mailbox && a->mailbox &&
!mutt_strcasecmp (p->mailbox, a->mailbox)))
+ {
weak_association = 0;
+ }
}
}
rfc822_free_address (&r);
}
+ if (match && weak_association)
+ weak = 1;
+
if (match)
{
pgp_key_t *_p, *_k;