[PATCH STABLE-BRANCH-1-4] Fix honoring --cert-digest-algo when recreating a cert

Christian Aistleitner christian at quelltextlich.at
Sun Oct 14 20:33:00 CEST 2012


* g10/sign.c (update_keysig_packet): Override original signature's
    digest algo in hashed data.
--
---
 g10/sign.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/g10/sign.c b/g10/sign.c
index 462392d..05b90e8 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1515,6 +1515,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();
-- 
1.7.8.6

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: </pipermail/attachments/20121014/25dd6eff/attachment.pgp>


More information about the Gnupg-devel mailing list