From d23ec86095714d388acac14b515445fe69f019e9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 19 Dec 2012 11:47:23 +0100 Subject: [PATCH] gpg: Make commit 258192d4 actually work * g10/sign.c (update_keysig_packet): Use digest_algo. --- g10/sign.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/g10/sign.c b/g10/sign.c index a464bb6e9..6cccfed66 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -1504,7 +1504,8 @@ update_keysig_packet( PKT_signature **ret_sig, void *opaque ) { PKT_signature *sig; - int rc=0, digest_algo; + int rc = 0; + int digest_algo; gcry_md_hd_t md; if ((!orig_sig || !pk || !sk) @@ -1517,7 +1518,7 @@ update_keysig_packet( PKT_signature **ret_sig, else digest_algo = orig_sig->digest_algo; - if ( gcry_md_open (&md, orig_sig->digest_algo, 0 ) ) + if ( gcry_md_open (&md, digest_algo, 0 ) ) BUG (); /* Hash the public key certificate and the user id. */