More 1.0.6b comments
David Shaw
dshaw@jabberwocky.com
Thu Oct 25 17:43:01 2001
--/NkBOFFp2J2Af1nK
Content-Type: multipart/mixed; boundary="qMm9M+Fa2AknHoGS"
Content-Disposition: inline
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Here's a few more comments:
12) If you set a key to ultimate trust, and it's the only ultimately
trusted key, gpg gets confused if you unset its ultimate trust.
The key will still be shown as "u", but --check-trustdb warns "no
ultimately trusted keys found" and schedules the next update for
"????-??-??".
13) Once --update-trustdb starts, there is no way to exit it ("q" just
skips to the next key).
14) Little bug: in 1.0.6, if you changed trust via the --edit menu, gpg
would display the new trust after you changed it. 1.0.6b does not
do this.
Attached is a fix for #13 and #14. It also adds a "s" for skip, which
skips to the next key since "q" now actually quits. The existing "s"
(for the not yet implemented more information) is now "i".
David
--=20
David Shaw | dshaw@jabberwocky.com | WWW http://www.jabberwocky.com/
+--------------------------------------------------------------------------=
-+
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anderson
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch.gnupg-1.0.6b.dms.trustupdate.1"
Content-Transfer-Encoding: quoted-printable
Index: pkclist.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/gnupg/gnupg/g10/pkclist.c,v
retrieving revision 1.58.2.24
diff -u -r1.58.2.24 pkclist.c
--- pkclist.c 2001/10/23 08:03:45 1.58.2.24
+++ pkclist.c 2001/10/25 03:40:23
@@ -241,7 +241,7 @@
keyid_from_pk (pk, keyid);
for(;;) {
/* a string with valid answers */
- const char *ans =3D _("sSmMqQ");
+ const char *ans =3D _("iImMqQsS");
=20
if( !did_help )=20
{
@@ -268,15 +268,18 @@
tty_printf (_(" %d =3D I trust fully\n"), 4);
if (mode)
tty_printf (_(" %d =3D I trust ultimately\n"), 5);
- tty_printf (_(" s =3D please show me more information\n") );
+ tty_printf (_(" i =3D please show me more information\n") );
if( mode )
tty_printf(_(" m =3D back to the main menu\n"));
else
- tty_printf(_(" q =3D quit\n"));
+ {
+ tty_printf(_(" s =3D skip this key\n"));
+ tty_printf(_(" q =3D quit\n"));
+ }
tty_printf("\n");
did_help =3D 1;
}
- if( strlen(ans) !=3D 6 )
+ if( strlen(ans) !=3D 8 )
BUG();
p =3D cpr_get("edit_ownertrust.value",_("Your decision? "));
trim_spaces(p);
@@ -319,6 +322,10 @@
{
break ; /* back to the menu */
}
+ else if( !mode && (*p =3D=3D ans[6] || *p =3D=3D ans[7] ) )
+ {
+ break; /* skip */
+ }
else if( !mode && (*p =3D=3D ans[4] || *p =3D=3D ans[5] ) )
{
quit =3D 1;
@@ -346,7 +353,7 @@
switch ( do_edit_ownertrust (pk, mode, &trust, no_help ) )
{
case -1: /* quit */
- return 0;
+ return -1;
case -2: /* show info */
show_paths(pk, 1);
no_help =3D 1;
@@ -355,7 +362,7 @@
trust &=3D ~TRUST_FLAG_DISABLED;
trust |=3D get_ownertrust (pk) & TRUST_FLAG_DISABLED;
update_ownertrust (pk, trust );
- return 0;
+ return 1;
default:
return 0;
}
Index: trustdb.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/gnupg/gnupg/g10/trustdb.c,v
retrieving revision 1.81.2.25
diff -u -r1.81.2.25 trustdb.c
--- trustdb.c 2001/09/28 16:59:47 1.81.2.25
+++ trustdb.c 2001/10/25 03:40:27
@@ -846,12 +846,12 @@
*********** NEW NEW NEW ****************
****************************************/
=20
-static unsigned int
+static int
ask_ownertrust (u32 *kid)
{
PKT_public_key *pk;
int rc;
- unsigned int ot;
+ int ot;
=20
pk =3D m_alloc_clear (sizeof *pk);
rc =3D get_pubkey (pk, kid);
@@ -862,10 +862,13 @@
return TRUST_UNKNOWN;
}
=20
- if (edit_ownertrust (pk, 0))
+ ot=3Dedit_ownertrust(pk,0);
+ if(ot>0)
ot =3D get_ownertrust (pk);
- else
+ else if(ot=3D=3D0)
ot =3D TRUST_UNDEFINED;
+ else
+ ot =3D -1; /* quit */
free_public_key( pk );
return ot;
}
@@ -1303,6 +1306,7 @@
validate_keys (int interactive)
{
int rc =3D 0;
+ int quit=3D0;
struct key_item *klist =3D NULL;
struct key_item *k;
struct key_array *keys =3D NULL;
@@ -1377,7 +1381,12 @@
{
if (interactive && k->ownertrust =3D=3D TRUST_UNKNOWN)
k->ownertrust =3D ask_ownertrust (k->kid);
- if (k->ownertrust =3D=3D TRUST_UNKNOWN)
+ if (k->ownertrust =3D=3D -1)
+ {
+ quit=3D1;
+ goto leave;
+ }
+ else if (k->ownertrust =3D=3D TRUST_UNKNOWN)
ot_unknown++;
else if (k->ownertrust =3D=3D TRUST_UNDEFINED)
ot_undefined++;
@@ -1448,7 +1457,7 @@
release_key_array (keys);
release_key_items (klist);
release_key_hash_table (visited);
- if (!rc) /* mark trustDB as checked */
+ if (!rc && !quit) /* mark trustDB as checked */
{
if (next_expire =3D=3D 0xffffffff)
tdbio_write_nextcheck (0);=20
--qMm9M+Fa2AknHoGS--
--/NkBOFFp2J2Af1nK
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6b (GNU/Linux)
iQEVAwUBO9gye4ccwqs8s7QVAQFYewf+NQUjzjA68VOfESBVMyTG9N1FNlo+MO4R
BwF9CczWutXUzC0zE1QxBI1U6gq5nkR8rqf9liFLgH0rzegNaP2ab9FkXoPW3jWE
rJGdpZP4G01+87vcN1wBo8LMcVE1HCh/1a1HGHR0XAuLWWJ44Cgd6sWQDlekLGW0
BUPUsxBAF1VPBXsBjdNYdynxiYDoPLd+srfXc44N3yyJPNOuNFIU7JRZo6zDLhQR
o61pq7ueSpmsjkSpbgsk1+Av56bBPj2ovwCBwZdNhHpnidVZhZveFkZTy7uK6WUU
yfpQhOE5os4oNcr9Lsj287r0GzcM8EfGx6m+DQBZWKA+25EUXQR54w==
=OL52
-----END PGP SIGNATURE-----
--/NkBOFFp2J2Af1nK--