mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
Fix from 1.4:
* keyedit.c (keyedit_menu): If we modify the keyblock (via fix_keyblock() or collapse_uids()) make sure we reprocess the keyblock so the flags are correct. Noted by Robin H. Johnson. * getkey.c (fixup_uidnode): Properly clear flags that don't apply to us (revoked, expired) so that we can reprocess a uid.
This commit is contained in:
parent
634b4c31d2
commit
c54ef0383c
@ -1,3 +1,12 @@
|
|||||||
|
2007-03-08 David Shaw <dshaw@jabberwocky.com> (wk)
|
||||||
|
|
||||||
|
* keyedit.c (keyedit_menu): If we modify the keyblock (via
|
||||||
|
fix_keyblock() or collapse_uids()) make sure we reprocess the
|
||||||
|
keyblock so the flags are correct. Noted by Robin H. Johnson.
|
||||||
|
|
||||||
|
* getkey.c (fixup_uidnode): Properly clear flags that don't apply
|
||||||
|
to us (revoked, expired) so that we can reprocess a uid.
|
||||||
|
|
||||||
2007-03-05 Werner Koch <wk@g10code.com>
|
2007-03-05 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
Converted this file to UTF-8.
|
Converted this file to UTF-8.
|
||||||
|
13
g10/getkey.c
13
g10/getkey.c
@ -1,6 +1,6 @@
|
|||||||
/* getkey.c - Get a key from the database
|
/* getkey.c - Get a key from the database
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||||
* 2006 Free Software Foundation, Inc.
|
* 2006, 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -1490,18 +1490,23 @@ fixup_uidnode ( KBNODE uidnode, KBNODE signode, u32 keycreated )
|
|||||||
|
|
||||||
sig->flags.chosen_selfsig = 1; /* we chose this one */
|
sig->flags.chosen_selfsig = 1; /* we chose this one */
|
||||||
uid->created = 0; /* not created == invalid */
|
uid->created = 0; /* not created == invalid */
|
||||||
if ( IS_UID_REV ( sig ) ) {
|
if ( IS_UID_REV ( sig ) )
|
||||||
|
{
|
||||||
uid->is_revoked = 1;
|
uid->is_revoked = 1;
|
||||||
return; /* has been revoked */
|
return; /* has been revoked */
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
uid->is_revoked = 0;
|
||||||
|
|
||||||
uid->expiredate = sig->expiredate;
|
uid->expiredate = sig->expiredate;
|
||||||
|
|
||||||
if(sig->flags.expired)
|
if (sig->flags.expired)
|
||||||
{
|
{
|
||||||
uid->is_expired = 1;
|
uid->is_expired = 1;
|
||||||
return; /* has expired */
|
return; /* has expired */
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
uid->is_expired = 0;
|
||||||
|
|
||||||
uid->created = sig->timestamp; /* this one is okay */
|
uid->created = sig->timestamp; /* this one is okay */
|
||||||
uid->selfsigversion = sig->version;
|
uid->selfsigversion = sig->version;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* keyedit.c - keyedit stuff
|
/* keyedit.c - keyedit stuff
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||||
* 2006 Free Software Foundation, Inc.
|
* 2006, 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -1554,6 +1554,10 @@ keyedit_menu( const char *username, strlist_t locusr,
|
|||||||
if( collapse_uids( &keyblock ) )
|
if( collapse_uids( &keyblock ) )
|
||||||
modified++;
|
modified++;
|
||||||
reorder_keyblock(keyblock);
|
reorder_keyblock(keyblock);
|
||||||
|
/* We modified the keyblock, so let's make sure the flags are
|
||||||
|
right. */
|
||||||
|
if (modified)
|
||||||
|
merge_keys_and_selfsig (keyblock);
|
||||||
|
|
||||||
if(seckey_check)
|
if(seckey_check)
|
||||||
{/* see whether we have a matching secret key */
|
{/* see whether we have a matching secret key */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user