From 60c58766aeb847b769372fa981f79abac6014500 Mon Sep 17 00:00:00 2001 From: Christian Aistleitner Date: Sun, 14 Oct 2012 20:30:20 +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 6ff7df6a9..501f1ff25 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -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();