gpg: Fix honoring --cert-digest-algo when recreating a cert

* g10/sign.c (update_keysig_packet): Override original signature's
digest algo in hashed data and for hash computation.
This commit is contained in:
Christian Aistleitner 2012-10-14 20:30:20 +02:00 committed by Werner Koch
parent 7a638c094f
commit 60c58766ae
1 changed files with 2 additions and 0 deletions

View File

@ -1604,6 +1604,8 @@ update_keysig_packet( PKT_signature **ret_sig,
/* create a new signature packet */
sig = copy_signature (NULL, orig_sig);
sig->digest_algo=digest_algo;
/* We need to create a new timestamp so that new sig expiration
calculations are done correctly... */
sig->timestamp=make_timestamp();