[git] GnuPG - branch, master, updated. gnupg-2.2-base-19-g45d5f58

by Werner Koch cvs at cvs.gnupg.org
Sun Aug 27 16:53:53 CEST 2017


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, master has been updated
       via  45d5f5800afe6613f338a26f361cb5e03e861129 (commit)
      from  13821e15fb9bdddfce79d88731c0f151724b2371 (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 45d5f5800afe6613f338a26f361cb5e03e861129
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Aug 27 16:42:52 2017 +0200

    scd: Convey the correct length for Le
    
    * scd/app-openpgp.c (determine_rsa_response): Round bits up.
    --
    
    Co-authored-by: Arnaud Fontaine <arnaud.fontaine at ssi.gouv.fr>
    
    Arnaud wrote:
    
      Actually, when the incorrect expected response length (i.e. Le
      field) is transmitted to the card, the card's answer is missing a
      byte (i.e. ...  6101) so an additional command has to be sent to the
      card to retrieve the last byte. Using the correct length avoids to
      send the additional command to retrieve the missing byte, when the
      computed length is wrong.
    
    Note that an value of 65537 for E is pretty standard and thus we can
    avoid the 6101 return code inmost cases.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 365f246..f9d07ac 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -943,8 +943,8 @@ determine_rsa_response (app_t app, int keyno)
   int size;
 
   size = 2 + 3 /* header */
-    + 4 /* tag+len */ + app->app_local->keyattr[keyno].rsa.n_bits/8
-    + 2 /* tag+len */ + app->app_local->keyattr[keyno].rsa.e_bits/8;
+    + 4 /* tag+len */ + (app->app_local->keyattr[keyno].rsa.n_bits+7)/8
+    + 2 /* tag+len */ + (app->app_local->keyattr[keyno].rsa.e_bits+7)/8;
 
   return size;
 }

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

Summary of changes:
 scd/app-openpgp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list