[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-244-gfc31d73

by Werner Koch cvs at cvs.gnupg.org
Fri Aug 30 09:57:23 CEST 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  fc31d730d8506b069de1d3529ed26660856bf07f (commit)
      from  95a3bffeaf07e8bf9487d4b165c336d166236fc1 (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 fc31d730d8506b069de1d3529ed26660856bf07f
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Aug 30 09:28:17 2013 +0200

    scd: Use vendor and product id macros also in apdu.c
    
    * scd/ccid-driver.c: Move vendor and product ids to ...
    * scd/ccid-driver.h: here.
    * scd/apdu.c (CCID_DRIVER_INCLUDE_USB_IDS): Define to include ids.
    (pcsc_vendor_specific_init): Use vendor and product id macros.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/scd/apdu.c b/scd/apdu.c
index d02a42e..2e09552 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -62,6 +62,7 @@
 
 #include "iso7816.h"
 #include "apdu.h"
+#define CCID_DRIVER_INCLUDE_USB_IDS 1
 #include "ccid-driver.h"
 
 /* Due to conflicting use of threading libraries we usually can't link
@@ -1797,7 +1798,7 @@ pcsc_vendor_specific_init (int slot)
       p += l;
     }
 
-  if (vendor == 0x0982 && product == 0x0008) /* Vega Alpha */
+  if (vendor == VENDOR_VEGA && product == VEGA_ALPHA)
     {
       /*
        * Please read the comment of ccid_vendor_specific_init in
@@ -1809,7 +1810,7 @@ pcsc_vendor_specific_init (int slot)
       if (sw)
         return SW_NOT_SUPPORTED;
     }
-  else if (vendor == 0x04e6 && product == 0xe003) /* SCM SPR532 */
+  else if (vendor == VENDOR_SCM && product == SCM_SPR532) /* SCM SPR532 */
     {
       reader_table[slot].is_spr532 = 1;
       reader_table[slot].pinpad_varlen_supported = 1;
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 478d8c6..0ac5aaf 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -91,6 +91,7 @@
 
 #include "scdaemon.h"
 #include "iso7816.h"
+#define CCID_DRIVER_INCLUDE_USB_IDS 1
 #include "ccid-driver.h"
 
 #define DRVNAME "ccid-driver: "
@@ -203,29 +204,6 @@ enum {
 #define CCID_ERROR_CODE(buf)     (((unsigned char *)(buf))[8])
 
 
-/* We need to know the vendor to do some hacks. */
-enum {
-  VENDOR_CHERRY = 0x046a,
-  VENDOR_SCM    = 0x04e6,
-  VENDOR_OMNIKEY= 0x076b,
-  VENDOR_GEMPC  = 0x08e6,
-  VENDOR_VEGA   = 0x0982,
-  VENDOR_KAAN   = 0x0d46,
-  VENDOR_FSIJ   = 0x234b,
-  VENDOR_VASCO  = 0x1a44
-};
-
-/* Some product ids.  */
-#define SCM_SCR331      0xe001
-#define SCM_SCR331DI    0x5111
-#define SCM_SCR335      0x5115
-#define SCM_SCR3320     0x5117
-#define SCM_SPR532      0xe003
-#define CHERRY_ST2000   0x003e
-#define VASCO_920       0x0920
-#define GEMPC_PINPAD    0x3478
-#define VEGA_ALPHA      0x0008
-
 /* A list and a table with special transport descriptions. */
 enum {
   TRANSPORT_USB    = 0, /* Standard USB transport. */
diff --git a/scd/ccid-driver.h b/scd/ccid-driver.h
index 1fd7ffa..a2a6e16 100644
--- a/scd/ccid-driver.h
+++ b/scd/ccid-driver.h
@@ -56,6 +56,35 @@
 #ifndef CCID_DRIVER_H
 #define CCID_DRIVER_H
 
+
+#ifdef CCID_DRIVER_INCLUDE_USB_IDS
+/* We need to know the vendor to do some hacks. */
+enum {
+  VENDOR_CHERRY = 0x046a,
+  VENDOR_SCM    = 0x04e6,
+  VENDOR_OMNIKEY= 0x076b,
+  VENDOR_GEMPC  = 0x08e6,
+  VENDOR_VEGA   = 0x0982,
+  VENDOR_KAAN   = 0x0d46,
+  VENDOR_FSIJ   = 0x234b,
+  VENDOR_VASCO  = 0x1a44
+};
+
+
+/* Some product ids.  */
+#define SCM_SCR331      0xe001
+#define SCM_SCR331DI    0x5111
+#define SCM_SCR335      0x5115
+#define SCM_SCR3320     0x5117
+#define SCM_SPR532      0xe003    /* Also used succeeding model SPR332. */
+#define CHERRY_ST2000   0x003e
+#define VASCO_920       0x0920
+#define GEMPC_PINPAD    0x3478
+#define VEGA_ALPHA      0x0008
+
+#endif /*CCID_DRIVER_INCLUDE_USB_IDS*/
+
+
 /* The CID driver returns the same error codes as the status words
    used by GnuPG's apdu.h.  For ease of maintenance they should always
    match.  */

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

Summary of changes:
 scd/apdu.c        |    5 +++--
 scd/ccid-driver.c |   24 +-----------------------
 scd/ccid-driver.h |   29 +++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 25 deletions(-)


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




More information about the Gnupg-commits mailing list