gpg: Fix honoring --cert-digest-algo when recreating a cert
authorChristian Aistleitner <christian@quelltextlich.at>
Sun, 14 Oct 2012 18:31:41 +0000 (20:31 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 11 Jan 2013 12:51:18 +0000 (13:51 +0100)
* g10/sign.c (update_keysig_packet): Override original signature's
digest algo in hashed data and for hash computation.

g10/sign.c

index 6cccfed..91f7f84 100644 (file)
@@ -1532,6 +1532,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();