[git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-142-g239659d
by Werner Koch
cvs at cvs.gnupg.org
Fri Dec 2 19:06:25 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 239659d3a0b8c0c378734ca3d1e9210a02e24da7 (commit)
via 96dc146fa17a7853277dbf3dc771c585a815c247 (commit)
from bf37c32367ba149559385ee90b6435cef8bd6412 (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 239659d3a0b8c0c378734ca3d1e9210a02e24da7
Author: Werner Koch <wk at gnupg.org>
Date: Fri Dec 2 18:09:58 2011 +0100
Support the Cherry ST-2000 card reader.
* scd/ccid-driver.c (SCM_SCR331, SCM_SCR331DI, SCM_SCR335)
(SCM_SCR3320, SCM_SPR532, CHERRY_ST2000): New constants.
(parse_ccid_descriptor): Use them.
(scan_or_find_usb_device, ccid_transceive_secure): Handle Cherry
ST-2000. Suggested by Matthias-Christian Ott.
diff --git a/THANKS b/THANKS
index b5281f5..5bde9f3 100644
--- a/THANKS
+++ b/THANKS
@@ -166,6 +166,7 @@ Martin Schulte schulte at thp.uni-koeln.de
Matt Kraai kraai at alumni.carnegiemellon.edu
Matthew Skala mskala at ansuz.sooke.bc.ca
Matthew Wilcox matthew at wil.cx
+Matthias-Christian Ott ott at mirix.org
Matthias Urlichs smurf at noris.de
Max Valianskiy maxcom at maxcom.ml.org
Michael Engels michael.engels at uni-duesseldorf.de
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index eb19625..7338ccc 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -213,6 +213,15 @@ enum {
VENDOR_FSIJ = 0x234B
};
+/* 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
+
+
/* A list and a table with special transport descriptions. */
enum {
TRANSPORT_USB = 0, /* Standard USB transport. */
@@ -954,11 +963,11 @@ parse_ccid_descriptor (ccid_driver_t handle,
*/
if (handle->id_vendor == VENDOR_SCM
&& handle->max_ifsd > 48
- && ( (handle->id_product == 0xe001 && handle->bcd_device < 0x0516)
- ||(handle->id_product == 0x5111 && handle->bcd_device < 0x0620)
- ||(handle->id_product == 0x5115 && handle->bcd_device < 0x0514)
- ||(handle->id_product == 0xe003 && handle->bcd_device < 0x0504)
- ||(handle->id_product == 0x5117 && handle->bcd_device < 0x0522)
+ && ( (handle->id_product == SCM_SCR331 && handle->bcd_device < 0x0516)
+ ||(handle->id_product == SCM_SCR331DI && handle->bcd_device < 0x0620)
+ ||(handle->id_product == SCM_SCR335 && handle->bcd_device < 0x0514)
+ ||(handle->id_product == SCM_SPR532 && handle->bcd_device < 0x0504)
+ ||(handle->id_product == SCM_SCR3320 && handle->bcd_device < 0x0522)
))
{
DEBUGOUT ("enabling workaround for buggy SCM readers\n");
@@ -1138,16 +1147,20 @@ scan_or_find_usb_device (int scan_mode,
{
ifcdesc = (interface->altsetting + set_no);
/* The second condition is for older SCM SPR 532 who did
- not know about the assigned CCID class. Instead of
- trying to interpret the strings we simply check the
- product ID. */
+ not know about the assigned CCID class. The third
+ condition does the same for a Cherry SmartTerminal
+ ST-2000. Instead of trying to interpret the strings
+ we simply check the product ID. */
if (ifcdesc && ifcdesc->extra
&& ((ifcdesc->bInterfaceClass == 11
&& ifcdesc->bInterfaceSubClass == 0
&& ifcdesc->bInterfaceProtocol == 0)
|| (ifcdesc->bInterfaceClass == 255
&& dev->descriptor.idVendor == VENDOR_SCM
- && dev->descriptor.idProduct == 0xe003)))
+ && dev->descriptor.idProduct == SCM_SPR532)
+ || (ifcdesc->bInterfaceClass == 255
+ && dev->descriptor.idVendor == VENDOR_CHERRY
+ && dev->descriptor.idProduct == CHERRY_ST2000)))
{
idev = usb_open (dev);
if (!idev)
@@ -3083,7 +3096,8 @@ ccid_transceive_secure (ccid_driver_t handle,
Lc byte to the APDU. It seems that it will be replaced with
the actual length instead of being appended before the APDU
is send to the card. */
- cherry_mode = 1;
+ if (handle->id_product != CHERRY_ST2000)
+ cherry_mode = 1;
break;
default:
return CCID_DRIVER_ERR_NOT_SUPPORTED;
commit 96dc146fa17a7853277dbf3dc771c585a815c247
Author: Werner Koch <wk at gnupg.org>
Date: Fri Dec 2 17:04:58 2011 +0100
Avoid possible double free in export.c.
* g10/export.c (transfer_format_to_openpgp): Avoid possible double
free of LIST. Reported by NIIBE Yutaka.
diff --git a/g10/export.c b/g10/export.c
index 7deee6b..9a34852 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -507,7 +507,7 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk)
}
skey[skeyidx++] = NULL;
- gcry_sexp_release (list);
+ gcry_sexp_release (list); list = NULL;
/* We have no need for the CSUM valuel thus we don't parse it. */
/* list = gcry_sexp_find_token (top_list, "csum", 0); */
-----------------------------------------------------------------------
Summary of changes:
THANKS | 1 +
g10/export.c | 2 +-
scd/ccid-driver.c | 34 ++++++++++++++++++++++++----------
3 files changed, 26 insertions(+), 11 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list