diff options
author | David Shaw <[email protected]> | 2002-06-14 18:39:07 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-06-14 18:39:07 +0000 |
commit | 08d65bc8ca8759b6a4a04d9cf602e0ab817af467 (patch) | |
tree | 348e24cbde63127fbf806ca3616a740ab0f6b506 | |
parent | * pkclist.c (expand_groups): Maintain the strlist flags while expanding. (diff) | |
download | gnupg-08d65bc8ca8759b6a4a04d9cf602e0ab817af467.tar.gz gnupg-08d65bc8ca8759b6a4a04d9cf602e0ab817af467.zip |
* keyedit.c (show_key_with_all_names): Display warning if a user tries to
show prefs on a v3 key with a v3 selfsig.
* kbnode.c (dump_kbnode): Show if a uid is expired.
* import.c (merge_blocks, import_revoke_cert): Show user ID receiving a
revocation certificate.
* free-packet.c (cmp_user_ids): Properly compare attribute ids.
-rw-r--r-- | g10/ChangeLog | 10 | ||||
-rw-r--r-- | g10/free-packet.c | 21 | ||||
-rw-r--r-- | g10/import.c | 15 | ||||
-rw-r--r-- | g10/kbnode.c | 4 | ||||
-rw-r--r-- | g10/keyedit.c | 10 |
5 files changed, 45 insertions, 15 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index c4e1ba8a9..70d3392dc 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,15 @@ 2002-06-14 David Shaw <[email protected]> + * keyedit.c (show_key_with_all_names): Display warning if a user + tries to show prefs on a v3 key with a v3 selfsig. + + * kbnode.c (dump_kbnode): Show if a uid is expired. + + * import.c (merge_blocks, import_revoke_cert): Show user ID + receiving a revocation certificate. + + * free-packet.c (cmp_user_ids): Properly compare attribute ids. + * pkclist.c (expand_groups): Maintain the strlist flags while expanding. Members of an expansion inherit their flags from the expansion key. diff --git a/g10/free-packet.c b/g10/free-packet.c index 010c67057..f13882d3e 100644 --- a/g10/free-packet.c +++ b/g10/free-packet.c @@ -513,21 +513,30 @@ cmp_signatures( PKT_signature *a, PKT_signature *b ) } - /**************** * Returns: true if the user ids do not match */ int cmp_user_ids( PKT_user_id *a, PKT_user_id *b ) { - int res; + int res=1; - if ( a == b ) + if( a == b ) return 0; - res = a->len - b->len; - if( !res ) - res = memcmp( a->name, b->name, a->len ); + if( a->attrib_data && b->attrib_data ) + { + res = a->attrib_len - b->attrib_len; + if( !res ) + res = memcmp( a->attrib_data, b->attrib_data, a->attrib_len ); + } + else if( !a->attrib_data && !b->attrib_data ) + { + res = a->len - b->len; + if( !res ) + res = memcmp( a->name, b->name, a->len ); + } + return res; } diff --git a/g10/import.c b/g10/import.c index f987a62a2..5e5a28c02 100644 --- a/g10/import.c +++ b/g10/import.c @@ -795,9 +795,12 @@ import_revoke_cert( const char *fname, KBNODE node, struct stats_s *stats ) keydb_get_resource_name (hd), g10_errstr(rc) ); keydb_release (hd); hd = NULL; /* we are ready */ - if( !opt.quiet ) - log_info( _("key %08lX: revocation certificate imported\n"), - (ulong)keyid[1]); + if( !opt.quiet ) { + char *p=get_user_id_native(keyid); + log_info( _("key %08lX: \"%s\" revocation certificate imported\n"), + (ulong)keyid[1],p); + m_free(p); + } stats->n_revoc++; revalidation_mark (); @@ -1202,12 +1205,14 @@ merge_blocks( const char *fname, KBNODE keyblock_orig, KBNODE keyblock, } } if( !found ) { + char *p=get_user_id_native(keyid); KBNODE n2 = clone_kbnode(node); insert_kbnode( keyblock_orig, n2, 0 ); n2->flag |= 1; ++*n_sigs; - log_info( _("key %08lX: revocation certificate added\n"), - (ulong)keyid[1]); + log_info(_("key %08lX: \"%s\" revocation certificate added\n"), + (ulong)keyid[1],p); + m_free(p); } } } diff --git a/g10/kbnode.c b/g10/kbnode.c index 6a5543f67..06d28f844 100644 --- a/g10/kbnode.c +++ b/g10/kbnode.c @@ -365,8 +365,8 @@ dump_kbnode( KBNODE node ) PKT_user_id *uid = node->pkt->pkt.user_id; fputs(" \"", stderr); print_string( stderr, uid->name, uid->len, 0 ); - fprintf (stderr, "\" .%c%c%c\n", - /* we don't have a expired flag */ + fprintf (stderr, "\" %c%c%c%c\n", + uid->is_expired? 'e':'.', uid->is_revoked? 'r':'.', uid->created? 'v':'.', uid->is_primary? 'p':'.' ); diff --git a/g10/keyedit.c b/g10/keyedit.c index 9a38b97bf..ffbb7d03c 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -1821,8 +1821,14 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, tty_printf ("[revoked] "); tty_print_utf8_string( uid->name, uid->len ); tty_printf("\n"); - if( with_prefs && (pk_version>3 || uid->selfsigversion>3)) - show_prefs (uid, with_prefs == 2); + if( with_prefs ) + { + if(pk_version>3 || uid->selfsigversion>3) + show_prefs (uid, with_prefs == 2); + else + tty_printf(_("There are no preferences on a " + "PGP 2.x-style key.\n")); + } } } } |