[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.22-17-gefecbb7

by Werner Koch cvs at cvs.gnupg.org
Wed Apr 16 14:56:57 CEST 2014


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  efecbb7a3f0c32ea40db3a050c89f288550b05c2 (commit)
      from  dc941bdaec29d2fc60e2bddf85e11568367f531c (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 efecbb7a3f0c32ea40db3a050c89f288550b05c2
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Apr 15 16:40:48 2014 +0200

    gpg: Fix use of deprecated RSA_E and RSA_E with newer libgcrypts.
    
    * g10/misc.c (pubkey_get_npkey): Map RSA_E and RSA_S to RSA.
    (pubkey_get_nskey): Ditto.
    (pubkey_get_nsig): Ditto.
    (pubkey_get_nenc): Ditto.
    (pubkey_nbits): Take care of RSA_E and RSA_S.
    --
    
    The problem was that parse_key did not know about RSA_S and thus used
    an opaque MPI which later crashed Libgcrypt. It is possible to fix
    that also in Libgcrypt but we better do it here as well.
    
    A test key using RSA_S is 0x98EEB6F7D87171CF.
    
    Reported-by: Hanno Böck

diff --git a/g10/misc.c b/g10/misc.c
index 9b7c8ab..82a13aa 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -1359,6 +1359,9 @@ pubkey_get_npkey( int algo )
 
   if (algo == GCRY_PK_ELG_E)
     algo = GCRY_PK_ELG;
+  else if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+    algo = GCRY_PK_RSA;
+
   if (gcry_pk_algo_info (map_pk_openpgp_to_gcry (algo),
                          GCRYCTL_GET_ALGO_NPKEY, NULL, &n))
     n = 0;
@@ -1379,6 +1382,9 @@ pubkey_get_nskey( int algo )
 
   if (algo == GCRY_PK_ELG_E)
     algo = GCRY_PK_ELG;
+  else if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+    algo = GCRY_PK_RSA;
+
   if (gcry_pk_algo_info (map_pk_openpgp_to_gcry (algo),
                          GCRYCTL_GET_ALGO_NSKEY, NULL, &n ))
     n = 0;
@@ -1399,6 +1405,9 @@ pubkey_get_nsig( int algo )
 
   if (algo == GCRY_PK_ELG_E)
     algo = GCRY_PK_ELG;
+  else if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+    algo = GCRY_PK_RSA;
+
   if (gcry_pk_algo_info (map_pk_openpgp_to_gcry (algo),
                          GCRYCTL_GET_ALGO_NSIGN, NULL, &n))
     n = 0;
@@ -1419,6 +1428,9 @@ pubkey_get_nenc( int algo )
 
   if (algo == GCRY_PK_ELG_E)
     algo = GCRY_PK_ELG;
+  else if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+    algo = GCRY_PK_RSA;
+
   if (gcry_pk_algo_info (map_pk_openpgp_to_gcry (algo),
                          GCRYCTL_GET_ALGO_NENCR, NULL, &n ))
     n = 0;
@@ -1443,7 +1455,9 @@ pubkey_nbits( int algo, gcry_mpi_t *key )
 			      "(public-key(elg(p%m)(g%m)(y%m)))",
 				  key[0], key[1], key[2] );
     }
-    else if( algo == GCRY_PK_RSA ) {
+    else if (algo == GCRY_PK_RSA
+             || algo == GCRY_PK_RSA_S
+             || algo == GCRY_PK_RSA_E ) {
 	rc = gcry_sexp_build ( &sexp, NULL,
 			      "(public-key(rsa(n%m)(e%m)))",
 				  key[0], key[1] );

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

Summary of changes:
 g10/misc.c |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)


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




More information about the Gnupg-commits mailing list