[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-260-gabd922e

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Nov 13 08:48:00 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, master has been updated
       via  abd922e79b2ff63a5a763a30d4a06a91f93d0b12 (commit)
      from  037dea9dd5eac7a74df0e12cb437e71fb0732afa (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 abd922e79b2ff63a5a763a30d4a06a91f93d0b12
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.
    
    --
    
    GnuPG-bug-id: 1549

diff --git a/scd/apdu.c b/scd/apdu.c
index 961c419..dd45e99 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -2183,6 +2183,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))
@@ -2219,11 +2224,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;
@@ -2301,11 +2301,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