From ebb0ed57c743e383db488e7936f287be0abbb6ec Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sun, 18 Apr 1999 18:53:34 +0000 Subject: [PATCH] See ChangeLog: Sun Apr 18 20:48:15 CEST 1999 Werner Koch --- TODO | 3 ++- g10/ChangeLog | 7 +++++++ g10/keylist.c | 5 ++++- g10/pkclist.c | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 441cfe14e..2285a49ce 100644 --- a/TODO +++ b/TODO @@ -26,7 +26,8 @@ * cvs -d :pserver:anoncvs@anoncvs.gnu.org:/gd/gnu/anoncvsroot co common - + * find a way to allow the import of non-self-signed keys. This is needed + for the IN ENCR/SIGN hack. Nice to have ------------ diff --git a/g10/ChangeLog b/g10/ChangeLog index 5fc0e45ca..90f7f9209 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +Sun Apr 18 20:48:15 CEST 1999 Werner Koch + + * pkclist.c (select_algo_from_prefs): Fixed the case that one key + has no preferences (Remi Guyomarch). + + keylist.c (list_keyblock): ulti_hack to propagate trust to all uids. + Sun Apr 18 10:11:28 CEST 1999 Werner Koch diff --git a/g10/keylist.c b/g10/keylist.c index 25b8196bd..a2f9e7b5b 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -164,6 +164,7 @@ list_keyblock( KBNODE keyblock, int secret ) u32 keyid[2]; int any=0; int trustletter = 0; + int ulti_hack = 0; /* get the keyid from the keyblock */ node = find_kbnode( keyblock, secret? PKT_SECRET_KEY : PKT_PUBLIC_KEY ); @@ -197,6 +198,8 @@ list_keyblock( KBNODE keyblock, int secret ) keyid_from_pk( pk, keyid ); if( opt.with_colons ) { trustletter = query_trust_info( pk, NULL ); + if( trustletter == 'u' ) + ulti_hack = 1; printf("pub:%c:%u:%d:%08lX%08lX:%s:%s:", trustletter, nbits_from_pk( pk ), @@ -225,7 +228,7 @@ list_keyblock( KBNODE keyblock, int secret ) if( opt.with_colons ) { byte namehash[20]; - if( pk ) { + if( pk && !ulti_hack ) { rmd160_hash_buffer( namehash, node->pkt->pkt.user_id->name, node->pkt->pkt.user_id->len ); diff --git a/g10/pkclist.c b/g10/pkclist.c index 57c36cee2..73e8f3889 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -756,9 +756,9 @@ select_algo_from_prefs( PK_LIST pk_list, int preftype ) if( pref ) { for(j=0; j+1 < npref; j+=2 ) { if( pref[j] == preftype ) { - any = 1; if( (bits[pref[j+1]/32] & (1<<(pref[j+1]%32))) ) { if( algo_available( preftype, pref[j+1] ) ) { + any = 1; i = pref[j+1]; break; }