1 --- crypt-autoselectkey/PATCHES Dec 2002 17:44:54 -0000 3.6
2 +++ crypt-autoselectkey/PATCHES Feb 2004 13:19:46 -0000
4 +patch-1.5.6.dw.crypt-autoselectkey.1
5 --- crypt-autoselectkey/init.h Feb 2004 17:10:43 -0000 3.43
6 +++ crypt-autoselectkey/init.h Feb 2004 13:19:46 -0000
7 @@ -1205,2 +1205,12 @@ struct option_t MuttVars[] = {
11 + { "pgp_autoselectkey", DT_SYN, R_NONE, UL "crypt_autoselectkey", 0 },
12 + { "crypt_autoselectkey", DT_BOOL, R_NONE, OPTCRYPTAUTOSELECT, 0 },
15 + ** If set, then a list of keys is not presented for selection when only
16 + ** one matching key is available. This may be useful in conjunction with
17 + ** the \fIcrypt-hook\fP command.
19 { "pgp_autosign", DT_SYN, R_NONE, UL "crypt_autosign", 0 },
20 --- crypt-autoselectkey/mutt.h Feb 2004 17:10:43 -0000 3.23
21 +++ crypt-autoselectkey/mutt.h Feb 2004 13:19:46 -0000
22 @@ -431,2 +431,3 @@ enum
26 --- crypt-autoselectkey/pgpkey.c Oct 2003 19:55:39 -0000 3.8
27 +++ crypt-autoselectkey/pgpkey.c Feb 2004 13:19:46 -0000
28 @@ -437,4 +437,9 @@ static int pgp_id_matches_addr (ADDRESS
31 +#define pgp_trusted_id(uid) (!option(OPTPGPCHECKTRUST) \
32 + || (pgp_id_is_valid((uid)) \
33 + && pgp_id_is_strong((uid))))
35 static pgp_key_t pgp_select_key (pgp_key_t keys,
36 - ADDRESS * p, const char *s)
37 + ADDRESS * p, const char *s)
39 @@ -452,2 +457,3 @@ static pgp_key_t pgp_select_key (pgp_key
41 + int keymatch = 0; /* count matching keys */
43 @@ -481,2 +487,3 @@ static pgp_key_t pgp_select_key (pgp_key
47 @@ -489,2 +496,17 @@ static pgp_key_t pgp_select_key (pgp_key
49 + else if (keymatch == 1 && option(OPTCRYPTAUTOSELECT))
52 + * Only one matching key...see if there's an id with enough trust to auto-select
54 + kp = KeyTable[0]->parent;
55 + for (a = kp->address; a; a = a->next)
57 + if (pgp_trusted_id(a))
59 + safe_free ((void **) &KeyTable);
65 @@ -599,5 +621,3 @@ static pgp_key_t pgp_select_key (pgp_key
67 - if (option (OPTPGPCHECKTRUST) &&
68 - (!pgp_id_is_valid (KeyTable[menu->current])
69 - || !pgp_id_is_strong (KeyTable[menu->current])))
70 + if (!pgp_trusted_id(KeyTable[menu->current]))