aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2012-12-19 10:47:23 +0000
committerWerner Koch <[email protected]>2012-12-19 11:40:21 +0000
commitd61f7402f2b0f6dd288e403ed9408fd65e617f85 (patch)
tree4205ea68628cb7e9f9c208ea25bf43d1e3715879
parentgpg: Suppress "public key already present" in quiet mode. (diff)
downloadgnupg-d61f7402f2b0f6dd288e403ed9408fd65e617f85.tar.gz
gnupg-d61f7402f2b0f6dd288e403ed9408fd65e617f85.zip
gpg: Make commit 2b3cb2ee actually work
* g10/sign.c (update_keysig_packet): Use digest_algo. (cherry-picked from commit d23ec86095714d388acac14b515445fe69f019e9)
-rw-r--r--g10/sign.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/sign.c b/g10/sign.c
index 6238ce877..6ff7df6a9 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1576,7 +1576,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 || !pksk)
@@ -1589,7 +1590,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. */