1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-02 22:38:02 +02:00

* sign.c (update_keysig_packet): Policies and notations should be stripped

out when remaking a self-signature.  Noted by Atom Smasher.
This commit is contained in:
David Shaw 2004-05-19 02:22:05 +00:00
parent 9953adb5e7
commit 44aa6f9d4d
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2004-05-18 David Shaw <dshaw@jabberwocky.com>
* sign.c (update_keysig_packet): Policies and notations should be
stripped out when remaking a self-signature. Noted by Atom
Smasher.
2004-05-11 Werner Koch <wk@gnupg.org>
* keygen.c (do_generate_keypair, read_parameter_file): Really

View File

@ -1300,6 +1300,18 @@ update_keysig_packet( PKT_signature **ret_sig,
/* create a new signature packet */
sig = copy_signature (NULL, orig_sig);
/* We've copied the signature, subpackets and all, but we don't
want any old policies or notations coming over: the signature
is being remade, so these need to be restated as well. Note
that other subpackets like backsigs come over as well, but we
want to keep those. We don't delete policies or notations from
the unhashed area - since we don't put them there, this is a
case of not messing about with things that we are not
responsible for. */
delete_sig_subpkt(sig->hashed,SIGSUBPKT_POLICY);
delete_sig_subpkt(sig->hashed,SIGSUBPKT_NOTATION);
/* We need to create a new timestamp so that new sig expiration
calculations are done correctly... */
sig->timestamp=make_timestamp();