[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.27-16-g43429c7

by NIIBE Yutaka cvs at cvs.gnupg.org
Thu Apr 30 10:24:17 CEST 2015


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-2-0 has been updated
       via  43429c7869152f301157e4b24790b3801dce0f0a (commit)
      from  c8c88bdd98e56d08b1965c620173731d3c6ffd03 (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 43429c7869152f301157e4b24790b3801dce0f0a
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Thu Apr 30 17:02:42 2015 +0900

    g10: fix cmp_public_key and cmp_secret_keys.
    
    * g10/free-packet.c (cmp_public_keys, cmp_secret_keys): Compare opaque
    data at the first entry of the array when it's unknown algo.
    * configure.ac (NEED_LIBGCRYPT_VERSION): Require 1.5.0.
    
    --
    
    GnuPG-bug-id: 1962

diff --git a/NEWS b/NEWS
index fe58b12..7b87ca9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 Noteworthy changes in version 2.0.28 (unreleased)
 -------------------------------------------------
 
+ * Libgcrypt 1.5 is now required.
+
 
 Noteworthy changes in version 2.0.27 (2015-02-18)
 -------------------------------------------------
diff --git a/configure.ac b/configure.ac
index abd9518..c93e762 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +47,7 @@ AC_INIT([gnupg],[mym4_full_version], [http://bugs.gnupg.org])
 NEED_GPG_ERROR_VERSION=1.11
 
 NEED_LIBGCRYPT_API=1
-NEED_LIBGCRYPT_VERSION=1.4.0
+NEED_LIBGCRYPT_VERSION=1.5.0
 
 NEED_LIBASSUAN_API=2
 NEED_LIBASSUAN_VERSION=2.0.0
diff --git a/g10/free-packet.c b/g10/free-packet.c
index 85f23ce..9b42cfd 100644
--- a/g10/free-packet.c
+++ b/g10/free-packet.c
@@ -452,11 +452,14 @@ cmp_public_keys( PKT_public_key *a, PKT_public_key *b )
 	return -1;
 
     n = pubkey_get_npkey( b->pubkey_algo );
-    if( !n )
-	return -1; /* can't compare due to unknown algorithm */
-    for(i=0; i < n; i++ ) {
-	if( mpi_cmp( a->pkey[i], b->pkey[i] ) )
-	    return -1;
+    if( !n ) { /* unknown algorithm, rest is in opaque MPI */
+	if( mpi_cmp( a->pkey[0], b->pkey[0] ) )
+	    return -1; /* can't compare due to unknown algorithm */
+    } else {
+	for(i=0; i < n; i++ ) {
+	    if( mpi_cmp( a->pkey[i], b->pkey[i] ) )
+		return -1;
+	}
     }
 
     return 0;
@@ -479,11 +482,14 @@ cmp_secret_keys( PKT_secret_key *a, PKT_secret_key *b )
 	return -1;
 
     n = pubkey_get_npkey( b->pubkey_algo );
-    if( !n )
-	return -1; /* can't compare due to unknown algorithm */
-    for(i=0; i < n; i++ ) {
-	if( mpi_cmp( a->skey[i], b->skey[i] ) )
+    if( !n ) { /* unknown algorithm, rest is in opaque MPI */
+	if( mpi_cmp( a->skey[0], b->skey[0] ) )
 	    return -1;
+    } else {
+	for(i=0; i < n; i++ ) {
+	    if( mpi_cmp( a->skey[i], b->skey[i] ) )
+		return -1;
+	}
     }
 
     return 0;

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

Summary of changes:
 NEWS              |  2 ++
 configure.ac      |  2 +-
 g10/free-packet.c | 24 +++++++++++++++---------
 3 files changed, 18 insertions(+), 10 deletions(-)


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




More information about the Gnupg-commits mailing list