[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.19-36-g80a34c0
by NIIBE Yutaka
cvs at cvs.gnupg.org
Wed Oct 31 04:28:55 CET 2012
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 80a34c0b5008c59979561dcee40536d7e25246f6 (commit)
from 51a4df9d4a16c9e3a7b9dedffda6f9628edc8b27 (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 80a34c0b5008c59979561dcee40536d7e25246f6
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Wed Oct 31 11:02:58 2012 +0900
SCD: Upon error, open_pcsc_reader_wrapped does same as _direct.
* scd/apdu.c (PCSC_E_NO_SERVICE): New.
(open_pcsc_reader_direct): Use PCSC_E_NO_SERVICE.
(open_pcsc_reader_wrapped): Set pcsc_no_service.
diff --git a/scd/apdu.c b/scd/apdu.c
index 0ce1c51..b369a26 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -221,6 +221,7 @@ static char (* DLSTDCALL CT_close) (unsigned short ctn);
#define PCSC_E_SYSTEM_CANCELLED 0x80100012
#define PCSC_E_NOT_TRANSACTED 0x80100016
#define PCSC_E_READER_UNAVAILABLE 0x80100017
+#define PCSC_E_NO_SERVICE 0x8010001D
#define PCSC_W_REMOVED_CARD 0x80100069
#define CM_IOCTL_GET_FEATURE_REQUEST (0x42000000 + 3400)
@@ -1711,7 +1712,7 @@ open_pcsc_reader_direct (const char *portstr)
pcsc_error_string (err), err);
reader_table[slot].used = 0;
unlock_slot (slot);
- if (err == 0x8010001d)
+ if (err == PCSC_E_NO_SERVICE)
pcsc_no_service = 1;
return -1;
}
@@ -1819,6 +1820,7 @@ open_pcsc_reader_wrapped (const char *portstr)
{
log_error ("can't run PC/SC access module `%s': %s\n",
wrapperpgm, strerror (errno));
+ pcsc_no_service = 1;
return -1;
}
@@ -1918,6 +1920,8 @@ open_pcsc_reader_wrapped (const char *portstr)
;
#undef WAIT
+ pcsc_no_service = 1;
+
/* Now send the open request. */
msgbuf[0] = 0x01; /* OPEN command. */
len = portstr? strlen (portstr):0;
@@ -1950,10 +1954,15 @@ open_pcsc_reader_wrapped (const char *portstr)
{
log_error ("PC/SC returned a too large ATR (len=%lx)\n",
(unsigned long)len);
+ pcsc_no_service = 0;
goto command_failed;
}
err = PCSC_ERR_MASK ((msgbuf[5] << 24) | (msgbuf[6] << 16)
| (msgbuf[7] << 8 ) | msgbuf[8]);
+
+ if (err != PCSC_E_NO_SERVICE)
+ pcsc_no_service = 0;
+
if (err)
{
log_error ("PC/SC OPEN failed: %s (0x%08x)\n",
-----------------------------------------------------------------------
Summary of changes:
scd/apdu.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list