[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.12-1-g509fe4c

by David Shaw cvs at cvs.gnupg.org
Wed Feb 1 04:59:55 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-1-4 has been updated
       via  509fe4ce5d50089776b072c33c199798d3defe8c (commit)
      from  75b347a2a191ad479123a57f935e27b78e079188 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 509fe4ce5d50089776b072c33c199798d3defe8c
Author: David Shaw <dshaw at jabberwocky.com>
Date:   Tue Jan 31 21:30:05 2012 -0500

    Honor --cert-digest-algo when recreating a cert.
    
    * g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when
      recreating a cert.
    
    This is used by various things in --edit-key like setpref, primary,
    etc.  Suggested by Christian Aistleitner.

diff --git a/g10/sign.c b/g10/sign.c
index 5003e9e..462392d 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1,6 +1,6 @@
 /* sign.c - sign data
  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- *               2007, 2010 Free Software Foundation, Inc.
+ *               2007, 2010, 2012 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -1489,7 +1489,7 @@ update_keysig_packet( PKT_signature **ret_sig,
                       void *opaque )
 {
     PKT_signature *sig;
-    int rc=0;
+    int rc=0, digest_algo;
     MD_HANDLE md;
 
     if ((!orig_sig || !pk || !sk)
@@ -1497,7 +1497,12 @@ update_keysig_packet( PKT_signature **ret_sig,
 	|| (orig_sig->sig_class == 0x18 && !subpk))
       return G10ERR_GENERAL;
 
-    md = md_open( orig_sig->digest_algo, 0 );
+    if ( opt.cert_digest_algo )
+      digest_algo = opt.cert_digest_algo;
+    else
+      digest_algo = orig_sig->digest_algo;
+
+    md = md_open( digest_algo, 0 );
 
     /* hash the public key certificate and the user id */
     hash_public_key( md, pk );

-----------------------------------------------------------------------

Summary of changes:
 g10/sign.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list