[git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-25-g682da55

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Mar 2 17:22:36 CET 2011


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  682da55aa985afcbae3b16686ad96bb77ad87adf (commit)
      from  1c09def22d97de3738a2bec4970504bfc155680b (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 682da55aa985afcbae3b16686ad96bb77ad87adf
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Thu Jan 13 16:38:31 2011 +0900

    fix wLangId in ccid-driver.c
    
    This is not a part of pin pad support series of mine.
    
    As I found the bug while I am preparing the patches, I report this.
    
    As CCID protocol is little endian, wLangId of US English = 0x0409
    is represented as two bytes of 0x09 then 0x04.
    
    It is really confusing that the code like following is floating
    around:
    	pin_verify -> wLangId = HOST_TO_CCID_16(0x0904);
    
    But, it is 0x0409 (not 0x0904).  It is defined in the documentation:
    
        http://www.usb.org/developers/docs/USB_LANGIDs.pdf
    
    and origin of this table is Microsoft.  We can see it at:
    
        http://msdn.microsoft.com/en-us/library/bb165625%28VS.80%29.aspx
    
    Yes, it would be better not to hard-code 0x0409.  It would be better
    to try current locale of the user, or to use the first entry of string
    descriptor.  I don't have time to implement such a thing...

diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 2abb6b5..eb19625 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -3136,8 +3136,8 @@ ccid_transceive_secure (ccid_driver_t handle,
   if (pinlen_min && pinlen_max && pinlen_min == pinlen_max)
     msg[17] |= 0x01; /* Max size reached.  */
   msg[18] = 0xff; /* bNumberMessage: Default. */
-  msg[19] = 0x04; /* wLangId-High. */
-  msg[20] = 0x09; /* wLangId-Low:  English FIXME: use the first entry. */
+  msg[19] = 0x09; /* wLangId-Low:  English FIXME: use the first entry. */
+  msg[20] = 0x04; /* wLangId-High. */
   msg[21] = 0;    /* bMsgIndex. */
   /* bTeoProlog follows: */
   msg[22] = handle->nonnull_nad? ((1 << 4) | 0): 0;

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

Summary of changes:
 scd/ccid-driver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list