mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* 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.
This commit is contained in:
parent
ecc02567a6
commit
08d65bc8ca
@ -1,5 +1,15 @@
|
||||
2002-06-14 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* 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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
15
g10/import.c
15
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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':'.' );
|
||||
|
@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user