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

g10/sign.c

index 6788f74..6587a60 100644 (file)
@@ -1514,6 +1514,7 @@ 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... */