[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.22-10-gf72d9a5

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Nov 13 08:47:58 CET 2013


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  f72d9a5cf69c3e719979547a5f7a37efe49bd642 (commit)
      from  07d7015e4dcb8a2439ed781928495632ec0b4fa3 (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 f72d9a5cf69c3e719979547a5f7a37efe49bd642
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Nov 13 16:43:26 2013 +0900

    scd: more pinpad input fix for PC/SC.
    
    * scd/apdu.c (check_pcsc_pinpad): Set default values here.
    (pcsc_pinpad_verify, pcsc_pinpad_modify): Remove setting default
    values, as it's too late.
    
    --
    
    cherry picked from master.

diff --git a/scd/apdu.c b/scd/apdu.c
index 49ece0b..67671b2 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -2212,6 +2212,11 @@ check_pcsc_pinpad (int slot, int command, pininfo_t *pininfo)
   if (reader_table[slot].pcsc.pinmax >= 0)
     pininfo->maxlen = reader_table[slot].pcsc.pinmax;
 
+  if (!pininfo->minlen)
+    pininfo->minlen = 1;
+  if (!pininfo->maxlen)
+    pininfo->maxlen = 15;
+
   if ((command == ISO7816_VERIFY && reader_table[slot].pcsc.verify_ioctl != 0)
       || (command == ISO7816_CHANGE_REFERENCE_DATA
           && reader_table[slot].pcsc.modify_ioctl != 0))
@@ -2248,11 +2253,6 @@ pcsc_pinpad_verify (int slot, int class, int ins, int p0, int p1,
   if (pininfo->fixedlen < 0 || pininfo->fixedlen >= 16)
     return SW_NOT_SUPPORTED;
 
-  if (!pininfo->minlen)
-    pininfo->minlen = 1;
-  if (!pininfo->maxlen)
-    pininfo->maxlen = 15;
-
   pin_verify = xtrymalloc (len);
   if (!pin_verify)
     return SW_HOST_OUT_OF_CORE;
@@ -2328,11 +2328,6 @@ pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
   if (pininfo->fixedlen < 0 || pininfo->fixedlen >= 16)
     return SW_NOT_SUPPORTED;
 
-  if (!pininfo->minlen)
-    pininfo->minlen = 1;
-  if (!pininfo->maxlen)
-    pininfo->maxlen = 15;
-
   pin_modify = xtrymalloc (len);
   if (!pin_modify)
     return SW_HOST_OUT_OF_CORE;

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

Summary of changes:
 scd/apdu.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)


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




More information about the Gnupg-commits mailing list