From 3cfe527fa57167d0477c0f6250ca28e8f4dd1b0e Mon Sep 17 00:00:00 2001 From: Christian Aistleitner Date: Sun, 14 Oct 2012 20:31:41 +0200 Subject: [PATCH] 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. --- g10/sign.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/g10/sign.c b/g10/sign.c index 6cccfed66..91f7f8424 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -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();