aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-12-01 20:59:04 +0000
committerDavid Shaw <[email protected]>2002-12-01 20:59:04 +0000
commitdb9195c10b611e4f79a93ebe7139b4d24c4dd510 (patch)
treeb6ae0374ee13aaedb22a55b9863ca4108faf424f /g10/keyedit.c
parent* NEWS: Add notes about notation names and '@', the --trust-model option, (diff)
downloadgnupg-db9195c10b611e4f79a93ebe7139b4d24c4dd510.tar.gz
gnupg-db9195c10b611e4f79a93ebe7139b4d24c4dd510.zip
* keyedit.c (menu_expire): Don't lose key flags when changing the
expiration date of a subkey. This is not the most optimal solution, but it is minimal change on the stable branch. * main.h, keygen.c (do_copy_key_flags): New function to copy key flags, if any, from one sig to another. (do_add_key_expire): New function to add key expiration to a sig. (keygen_copy_flags_add_expire): New version of keygen_add_key_expire that also copies key flags. (keygen_add_key_flags_and_expire): Use do_add_key_expire. * import.c (fix_hkp_corruption): Comment.
Diffstat (limited to 'g10/keyedit.c')
-rw-r--r--g10/keyedit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c
index b52d8f4d1..f06c91886 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -2699,9 +2699,14 @@ menu_expire( KBNODE pub_keyblock, KBNODE sec_keyblock )
sk, 0x13, 0, 0, 0, 0,
keygen_add_std_prefs, main_pk );
else
+ {
+ struct flags_expire fe;
+ fe.pk=sub_pk;
+ fe.sig=sig;
rc = make_keysig_packet( &newsig, main_pk, NULL, sub_pk,
sk, 0x18, 0, 0, 0, 0,
- keygen_add_key_expire, sub_pk );
+ keygen_copy_flags_add_expire,&fe);
+ }
if( rc ) {
log_error("make_keysig_packet failed: %s\n",
g10_errstr(rc));