You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11986 lines
462 KiB

  1. 2014-11-07 Ludovic Rousseau
  2. * [r7036] ChangeLog, configure.ac: Release 1.8.13
  3. * [r7035] src/auth.c: Fix compiler warnings
  4. auth.c: In function ‘IsClientAuthorized’: auth.c:151:33: warning:
  5. unused parameter ‘socket’ [-Wunused-parameter] unsigned
  6. IsClientAuthorized(int socket, const char* action, const char*
  7. reader) ^ auth.c:151:53: warning: unused parameter ‘action’
  8. [-Wunused-parameter] unsigned IsClientAuthorized(int socket,
  9. const char* action, const char* reader) ^ auth.c:151:73: warning:
  10. unused parameter ‘reader’ [-Wunused-parameter] unsigned
  11. IsClientAuthorized(int socket, const char* action, const char*
  12. reader)
  13. * [r7034] src/Makefile.am, src/auth.c: Fix compiler warning
  14. auth.c:150:10: warning: no previous prototype for
  15. ‘IsClientAuthorized’ [-Wmissing-prototypes] unsigned
  16. IsClientAuthorized(int socket, const char* action, const char*
  17. reader) ^
  18. * [r7033] src/hotplug_libudev.c: Fix again libudev hotplug
  19. The change in revision 7028 broke the fix introduced in revision
  20. 6951.
  21. Thanks again to Stefani Seibold for the new fix
  22. http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20141103/000226.html
  23. 2014-11-06 Ludovic Rousseau
  24. * [r7029] src/hotplug_libusb.c: Do not access pipefd[] after use
  25. It is NOT safe to pass to a thread a pointer to a locally
  26. allocated array. When the caller exits the scope of the array
  27. then the memory is reused. So any reference to the array becomes
  28. illegal memory access.
  29. Thanks to Maximilian Stein for the patch
  30. http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20141103/000218.html
  31. * [r7028] src/hotplug_libudev.c: Scan the USB bus at least once
  32. before accepting client connections
  33. The bug was introduced in pcsc-lite version 1.8.12 with revision
  34. 6951.
  35. Closes Alioth bug [#314869] pcscd: Socket activation not working
  36. on first try
  37. https://alioth.debian.org/tracker/index.php?func=detail&aid=314869&group_id=30105&atid=410085
  38. * [r7027] src/spy/install_spy.sh, src/spy/uninstall_spy.sh: Use
  39. ldconfig(8) to find the directory containing libpcsclite.so.1
  40. On a Debian system (using multiarch) the directory is no more
  41. /usr/lib but /usr/lib/x86_64-linux-gnu on a 64-bits Intel system.
  42. * [r7026] src/pcscdaemon.c: Do not log an error when pcscd is
  43. started by systemd
  44. If pcscd is started by systemd then /var/run/pcscd/pcscd.comm
  45. exists but /var/run/pcscd/pcscd.pid do not exists yet. So an
  46. error was logged: pcscd[2536]: 00000000 utils.c:87:GetDaemonPid()
  47. Can't open /var/run/pcscd/pcscd.pid: No such file or directory
  48. Now /var/run/pcscd/pcscd.pid is used only if pcscd is NOT started
  49. by systemd.
  50. Close Alioth bug [#314862] Should not log an error Can't open
  51. /var/run/pcscd/pcscd.pid when started by systemd
  52. https://alioth.debian.org/tracker/index.php?func=detail&aid=314862&group_id=30105&atid=410085
  53. 2014-10-22 Ludovic Rousseau
  54. * [r7016] doc/pcscd.8.in: Use \- for -
  55. * [r7015] doc/pcscd.8.in: Add documentation for
  56. --reader-name-no-interface
  57. * [r7014] doc/pcscd.8.in: dd documentation for
  58. --reader-name-no-serial
  59. * [r7013] doc/pcscd.8.in: Add documentation for --auto-exit
  60. 2014-10-02 Ludovic Rousseau
  61. * [r7007] COPYING: Add licenses for files from other projects
  62. src/auth.c and src/auth.h are from Red Hat src/sd-daemon.c and
  63. src/sd-daemon.h are from systemd src/simclist.c and
  64. src/simclist.h are from SimCList src/strlcpy.3, src/strlcat.c and
  65. src/strlcpy.c are from OpenBSD
  66. * [r7006] src/pcscd.h.in: Add missing 3-clause BSD license
  67. * [r7005] COPYING: Add GNU GPL v3 license header
  68. * [r7004] COPYING, UnitaryTests/SCardBlockingBehaviourTest.py,
  69. UnitaryTests/SCardExclusiveBehaviour.py, src/PCSC/debuglog.h,
  70. src/PCSC/ifdhandler.h, src/PCSC/pcsclite.h.in, src/PCSC/reader.h,
  71. src/PCSC/winscard.h, src/PCSC/wintypes.h, src/atrhandler.c,
  72. src/atrhandler.h, src/configfile.h, src/configfile.l,
  73. src/debug.c, src/debuglog.c, src/dyn_generic.h, src/dyn_hpux.c,
  74. src/dyn_macosx.c, src/dyn_unix.c, src/error.c,
  75. src/eventhandler.c, src/eventhandler.h, src/hotplug.h,
  76. src/hotplug_generic.c, src/hotplug_libudev.c,
  77. src/hotplug_libusb.c, src/hotplug_linux.c, src/hotplug_macosx.c,
  78. src/ifdwrapper.c, src/ifdwrapper.h, src/lassert.h, src/misc.h,
  79. src/parser.h, src/pcsc-wirecheck-gen.c, src/pcscdaemon.c,
  80. src/powermgt_generic.c, src/powermgt_generic.h,
  81. src/prothandler.c, src/prothandler.h, src/readerfactory.c,
  82. src/readerfactory.h, src/strlcpycat.h, src/sys_generic.h,
  83. src/sys_unix.c, src/testpcsc.c, src/tokenparser.l, src/utils.c,
  84. src/utils.h, src/utils/formaticc.c, src/utils/installifd.c,
  85. src/winscard.c, src/winscard_clnt.c, src/winscard_msg.c,
  86. src/winscard_msg.h, src/winscard_msg_srv.c, src/winscard_svc.c,
  87. src/winscard_svc.h: Make the license more 3-clause BSD like
  88. The line "Changes to this license can be made only by the
  89. copyright author with explicit written consent." was present in
  90. the pcsc-lite license from the origin of the project (at least
  91. since the initial version of COPYING in the VCS in March 2002).
  92. This line is not present in the 3-clause BSD license
  93. http://en.wikipedia.org/wiki/BSD_licenses
  94. The change has been approved by David Corcoran, initial author of
  95. pcsc-lite.
  96. The change was requested by Oracle about the headers files
  97. winscard.h and pcsclite.h " To include in OpenJDK, Oracle needs
  98. the right to relicense under other terms."
  99. 2014-09-24 Ludovic Rousseau
  100. * [r7001] Makefile.am, doc/example/Makefile.am: The GPL license has
  101. been moved to the root directory
  102. And version is now 3.0 instead of 2.
  103. * [r6999] ChangeLog, configure.ac: Release 1.8.12
  104. 2014-09-19 Ludovic Rousseau
  105. * [r6997] UnitaryTests/SCardConnect_DIRECT2.py: Fix pyflakes
  106. warning
  107. SCardConnect_DIRECT2.py:36: 'sys' imported but unused
  108. * [r6996] UnitaryTests/SCardGetAttrib.py: Fix pyflakes warning
  109. SCardGetAttrib.py:25: 'sys' imported but unused
  110. * [r6995] UnitaryTests/SCardBlockingBehaviourTest.py: Fix pyflakes
  111. warning
  112. SCardBlockingBehaviourTest.py:234: local variable 'hresult' is
  113. assigned to but never used
  114. * [r6994] UnitaryTests/SCardBlockingBehaviourTest.py: Fix pyflakes
  115. warning
  116. SCardBlockingBehaviourTest.py:249: local variable 'hresult' is
  117. assigned to but never useX
  118. * [r6993] UnitaryTests/control_get_firmware.py: Fix stupid bug
  119. 2014-09-17 Ludovic Rousseau
  120. * [r6991] doc/doxygen.conf.in: Do not use FreeSans.ttf anymore
  121. Warning: doxygen no longer ships with the FreeSans font. You may
  122. want to clear or change DOT_FONTNAME.
  123. * [r6990] doc/doxygen.conf.in: Update from Doxygen 1.8.1.1 to 1.8.7
  124. Used "doxygen -u"
  125. * [r6989] src/winscard_clnt.c: Fix Doxygen for
  126. SCardGetStatusChange()
  127. A value of 0 for dwTimeout is not equivalent of INFINITE but of 0
  128. ms.
  129. Thanks to helpcrypto for the bug report.
  130. http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20140915/000141.html
  131. * [r6987] doc/pcscd.8.in: Update driver web page
  132. http://www.musclecard.com/drivers.html is no more available. A
  133. copy is available at
  134. http://pcsclite.alioth.debian.org/musclecard.com/drivers.html
  135. 2014-09-15 Ludovic Rousseau
  136. * [r6986] src/strlcpy.c, src/tokenparser.l: Use <config.h> instead
  137. of "config.h"
  138. https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Configuration-Headers.html
  139. With the appropriate -I option, you can use #include <config.h>.
  140. Actually, it's a good habit to use it, because in the rare case
  141. when the source directory contains another config.h, the build
  142. directory should be searched first.
  143. * [r6985] src/spy/pcsc-spy: Fix error reported by flake8
  144. pcsc-spy:795:20: E711 comparison to None should be 'if cond is
  145. None:'
  146. 2014-09-09 Ludovic Rousseau
  147. * [r6979] UnitaryTests/Makefile, UnitaryTests/exec.c: Unitary Test
  148. for change in revision 6978
  149. * [r6978] src/winscard_msg.c: Create the libpcsclite/pcscd socket
  150. with the SOCK_CLOEXEC flag
  151. The communication socket between libpcsclite and pcscd is created
  152. with the SOCK_CLOEXEC flag added so the socket is automatically
  153. closed when the process (or its childs) calls exec().
  154. The problem happens when an application does exec() without
  155. cleaning its use of libpcsclite using SCardReleaseContext(). I
  156. could not reproduce a real problem but it has been reported on
  157. the field with a closed source application.
  158. Thanks to Stefani Seibold for the bug report and patch.
  159. 2014-09-01 Ludovic Rousseau
  160. * [r6965] src/PCSC/debuglog.h, src/PCSC/ifdhandler.h,
  161. src/PCSC/pcsclite.h.in, src/auth.h: Remove extra spaces at end of
  162. lines
  163. 2014-08-07 Ludovic Rousseau
  164. * [r6953] src/hotplug_libudev.c: Udev is a global variable
  165. Rename udev as Udev to make it more explicit it is a global
  166. variable.
  167. * [r6952] src/hotplug_libudev.c: Add a missing break;
  168. I removed the line when testing the code. This bug is mine, not
  169. Stefani's
  170. * [r6951] src/hotplug_libudev.c: Revamp libudev hotplug
  171. " Hi,
  172. this is a complete revamp of src/hotplug_libudev.c hotplug
  173. handling. This patch fix a lot of race conditions and make the
  174. code a bit cleaner.
  175. The following benefits will be achieved:
  176. - udev events will be handled seperatly, a "add" event will only
  177. add a device and a "remove" will now only remove the device. So
  178. the whole bookkeeping is now done by the udev daemon, there is no
  179. more need to track the state of the device. Also it fix a race
  180. where udev had yet not finished the plug event and the device is
  181. not full accessible.
  182. - fix the race gap between the coldplug scan and the activating
  183. of the monitoring hotplug events. Now the monitoring will be
  184. first activated and the the coldplug scan will be done. So there
  185. is a small change that a device will be added during the coldplug
  186. scan. For this the HPAddDevice() function needs to check for
  187. duplicate adds of a device. But that is common design of libudev
  188. usage.
  189. - No more mutex needed since there is no more concurrency,
  190. because the coldplug scan will be no done inside the thread. - Do
  191. not start the thread detached since there is no way to do a
  192. synchronized stop of the thread. The HPStopHotPluggables() will
  193. now wait until the thread is gone. So it is save to free memory
  194. of structures since no one is access them.
  195. - Remove the cooperative thread cancellation by AraKiriHotPlug.
  196. Despite the non political correctness it will not work as
  197. expected, because the select() system call will block infinitly.
  198. Using the pthread_cancel() mechanism will do a better and safer
  199. job.
  200. - Add signal safety to the select() system call. A EINTR should
  201. not lead in a termination of the thread.
  202. - Fix a typo: pluggble > plugable
  203. - Make less error prone for unexpected libudev return values.
  204. Check all return values of udev_...() functions against NULL.
  205. - Fix resource leak in hotplug thread. The udev_device_unref()
  206. was never called on event "remove".
  207. - Cleanup HPStopHotPluggables() function, which release now all
  208. allocated resources, including udev. It also will not crash when
  209. in HPRegisterForHotplugEvents() was not able to acquire
  210. resources.
  211. - Replace the prehistoric select() by poll(), which is faster and
  212. consumes less memory.
  213. Changlog:
  214. V1 4-Aug-2014 first release V2 5-Aug-2014 Fix coding style.
  215. Optimize HPRemoveDevice() Cleanup HPStopHotPluggables() Fix a
  216. resource leak not calling udev_device_unref() in case of "add" or
  217. "remove" event. V3 5-Aug-2014 Fix resource leak in
  218. HPStopHotPluggables(), release udev Fix error handling in
  219. HPRegisterForHotplugEvents() and HPStopHotPluggables() Revert
  220. unneeded RFRemoveReader() in HPRegisterForHotplugEvents()
  221. - Stefani
  222. Signed-off-by: Stefani Seibold <stefani at seibold.net> "
  223. Thanks to Stefani Seibold for the patch
  224. http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20140804/000093.html
  225. 2014-08-06 Ludovic Rousseau
  226. * [r6950] src/utils.c: Adjust the thread stack size
  227. The size of 4 MB is not needed and too big (see revision 6948).
  228. By default the thread stack size is: - 8 MB on Debian GNU/Linux -
  229. 256 KB on Mac OS X 10.9 - 80 KB on musl, but it is not enough for
  230. pcsc-lite
  231. 256 KB (like on Mac OS X 10.9) is enough for musl.
  232. * [r6949] src/utils.c: Factorize error code
  233. * [r6948] src/utils.c: Increase the thread stack size to at least 4
  234. MB
  235. " Recently I tried to run it on a non-glibc system using musl
  236. instead. Turns out musl has a default stacksize of 80KB instead
  237. of the multi-megabyte we are used to in glibc. This leads to
  238. segfaults when pcscd tries to allocate buffers on the stack. To
  239. fix this i applied the following patch:
  240. https://github.com/stef/aports/blob/master/main/pcsc-lite/musl-stacksize.patch
  241. I would be very thankful if you would incorporate this "upstream"
  242. so that other musl users can happily enjoy pcsc and friends. "
  243. Thanks to Stefan Marsiske for the patch
  244. 2014-07-29 Ludovic Rousseau
  245. * [r6944] src/configfile.l: Add ReiserFS support (and maybe some
  246. other strange file systems)
  247. "the attached patch fixes incorrect use of the dirent::d_type
  248. field. As documented in readdir(3) d_type may be set to
  249. DT_UNKNOWN, which applications must handle properly.
  250. The effect of the bug is that config files are skipped in case
  251. the config directory is located on a file system that doesn't
  252. support d_type (e.g. ReiserFS)."
  253. Thanks to Ingo Weinhold for the patch
  254. 2014-06-13 Ludovic Rousseau
  255. * [r6918] src/auth.c: Change return value of IsClientAuthorized()
  256. The version of IsClientAuthorized() when PolicyKit is not used
  257. was not similar to the other version.
  258. Fixes Debian bug #751517
  259. 2014-06-05 Ludovic Rousseau
  260. * [r6911] src/hotplug_libudev.c: Check udev functions for errors
  261. Prevent the crash reported at:
  262. https://bugzilla.redhat.com/show_bug.cgi?id=1071243
  263. Thanks to Nikos Mavrogiannopoulos for the patch
  264. http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20140602/000039.html
  265. 2014-04-18 Ludovic Rousseau
  266. * [r6888] GPL-3.0.txt, doc/example/GPL-3.0.txt: Move the GNU GPL v3
  267. license in the project root directory
  268. * [r6887] COPYING: Some files are under GNU GPL v3+ license
  269. * [r6886] doc/example/GPL-2, doc/example/GPL-3.0.txt: Replase GNU
  270. GPL v2 by GPL v3 license text
  271. Since revision 6003 (2011-10-05) pcsc_demo.c moved from GNU GPL
  272. v2+ to GNU GPL v3+
  273. 2014-02-26 Ludovic Rousseau
  274. * [r6861] NEWS: Remove reference about "new MuscleCard" applet
  275. 2014-02-20 Ludovic Rousseau
  276. * [r6859] configure.ac: Make --disable-polkit
  277. Thanks to Diego Elio Pettenò for the bug report
  278. 2014-02-14 Ludovic Rousseau
  279. * [r6853] ChangeLog, configure.ac: Release 1.8.11
  280. * [r6852] HELP: Replace old linuxnet.com domaine name
  281. Mailing list moved from sclinux@linuxnet.com to
  282. muscle@lists.musclecard.com
  283. * [r6851] AUTHORS, COPYING, DRIVERS, README,
  284. UnitaryTests/BufferOverflow.c, doc/example/pcsc_demo.c,
  285. src/PCSC/debuglog.h, src/PCSC/ifdhandler.h,
  286. src/PCSC/pcsclite.h.in, src/PCSC/reader.h, src/PCSC/winscard.h,
  287. src/PCSC/wintypes.h, src/atrhandler.c, src/atrhandler.h,
  288. src/auth.c, src/auth.h, src/configfile.h, src/configfile.l,
  289. src/debug.c, src/debuglog.c, src/dyn_generic.h, src/dyn_hpux.c,
  290. src/dyn_macosx.c, src/dyn_unix.c, src/error.c,
  291. src/eventhandler.c, src/eventhandler.h, src/hotplug.h,
  292. src/hotplug_generic.c, src/hotplug_libudev.c,
  293. src/hotplug_libusb.c, src/hotplug_linux.c, src/hotplug_macosx.c,
  294. src/ifdwrapper.c, src/ifdwrapper.h, src/misc.h, src/parser.h,
  295. src/pcscd.h.in, src/pcscdaemon.c, src/powermgt_generic.c,
  296. src/powermgt_generic.h, src/prothandler.c, src/prothandler.h,
  297. src/readerfactory.c, src/readerfactory.h, src/strlcpycat.h,
  298. src/sys_generic.h, src/sys_unix.c, src/testpcsc.c,
  299. src/tokenparser.l, src/utils.c, src/utils.h, src/utils/README,
  300. src/utils/formaticc.c, src/utils/installifd.c, src/winscard.c,
  301. src/winscard_clnt.c, src/winscard_msg.c, src/winscard_msg.h,
  302. src/winscard_msg_srv.c, src/winscard_svc.c, src/winscard_svc.h:
  303. Replace old linuxnet.com domaine name
  304. web site moved from http://www.linuxnet.com to
  305. http://pcsclite.alioth.debian.org/pcsclite.html
  306. David email moved tom corcoran@linuxnet.com to
  307. David Corcoran@musclecard.com
  308. * [r6850] src/auth.c, src/auth.h: Fix Muscle URL
  309. 2014-02-11 Ludovic Rousseau
  310. * [r6842] configure.ac, doc/Makefile.am, doc/README.polkit,
  311. doc/org.debian.pcsc-lite.policy, src/Makefile.am, src/auth.c,
  312. src/auth.h, src/winscard_svc.c: Add polkit support
  313. See doc/README.polkit
  314. Thanks to Nikos Mavrogiannopoulos for the patch
  315. http://archives.neohapsis.com/archives/dev/muscle/2013-q4/0097.html
  316. * [r6841] src/winscard_svc.c: SCARD_CONNECT: force a NUL byte to
  317. terminate the reader name
  318. The client part may send us anything. So we must enfore the
  319. reader name is a NUL-byte terminated C-string.
  320. Thanks to Nikos Mavrogiannopoulos for the patch
  321. 2014-02-08 Ludovic Rousseau
  322. * [r6838] src/spy/pcsc-spy.pod: Reformat for a better HTML output
  323. 2014-01-13 Ludovic Rousseau
  324. * [r6822] src/PCSC/debuglog.h, src/PCSC/ifdhandler.h,
  325. src/PCSC/pcsclite.h.in, src/PCSC/reader.h, src/PCSC/winscard.h,
  326. src/PCSC/wintypes.h, src/atrhandler.c, src/atrhandler.h,
  327. src/configfile.h, src/configfile.l, src/debug.c, src/debuglog.c,
  328. src/dyn_generic.h, src/dyn_hpux.c, src/dyn_macosx.c,
  329. src/dyn_unix.c, src/error.c, src/eventhandler.c,
  330. src/eventhandler.h, src/hotplug.h, src/hotplug_generic.c,
  331. src/hotplug_libudev.c, src/hotplug_libusb.c, src/hotplug_linux.c,
  332. src/hotplug_macosx.c, src/ifdwrapper.c, src/ifdwrapper.h,
  333. src/lassert.h, src/misc.h, src/parser.h,
  334. src/pcsc-wirecheck-gen.c, src/pcscdaemon.c,
  335. src/powermgt_generic.c, src/powermgt_generic.h,
  336. src/prothandler.c, src/prothandler.h, src/readerfactory.c,
  337. src/readerfactory.h, src/strlcpycat.h, src/sys_generic.h,
  338. src/sys_unix.c, src/testpcsc.c, src/tokenparser.l, src/utils.c,
  339. src/utils.h, src/utils/formaticc.c, src/utils/installifd.c,
  340. src/winscard.c, src/winscard_clnt.c, src/winscard_msg.c,
  341. src/winscard_msg.h, src/winscard_msg_srv.c, src/winscard_svc.c,
  342. src/winscard_svc.h: Include the COPYING file in header of file
  343. It will be easier to know the licence used by a file when used
  344. outside of pcsc-lite.
  345. 2013-12-20 Ludovic Rousseau
  346. * [r6810] src/winscard_clnt.c: SCardListReaders(): fix a memory
  347. leak in case of error
  348. Check mszReaders is valid before allocating memory.
  349. Thanks to Ignacio Casal for the bug report
  350. http://archives.neohapsis.com/archives/dev/muscle/2013-q4/0084.html
  351. 2013-12-03 Ludovic Rousseau
  352. * [r6804] splint.sh: Add header directory for sys/types.h
  353. * [r6803] make-dirs: Remove very old files used to build on Solaris
  354. " Adding make-dirs plus Makefiles for certain configurations when
  355. people don't want to try and fix autoconf "
  356. 2013-12-02 Ludovic Rousseau
  357. * [r6802] src/dyn_generic.h, src/dyn_hpux.c, src/dyn_macosx.c,
  358. src/dyn_unix.c, src/readerfactory.c: Do not log a critical error
  359. if symbol IFDHCreateChannelByName is not found in a driver.
  360. Drivers using API v2 of IFDHandler (like openct-ifd.bundle) do
  361. not provide a IFDHCreateChannelByName symbol. A critical error
  362. should not be logged since it is a normal behavior.
  363. DYN_GetAddress() has a new parameter: mayfail, to indicate if
  364. dlsym(3) may fail or not.
  365. 2013-10-24 Ludovic Rousseau
  366. * [r6785] src/configfile.l: CHANNELID and DEVICENAME are both
  367. optional but not at the same time
  368. If the driver uses DEVICENAME you can ignore/unset CHANNELID. If
  369. the driver uses CHANNELID you can ignore/unset DEVICENAME. But
  370. you shall configure at least one of the two parameters.
  371. 2013-10-19 Ludovic Rousseau
  372. * [r6779] ChangeLog, configure.ac: Release 1.8.10
  373. * [r6778] src/pcscdaemon.c: Fix typo in log message
  374. 2013-10-18 Ludovic Rousseau
  375. * [r6775]
  376. UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py:
  377. Display the reader name, Pid and Vid
  378. * [r6773]
  379. UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py: Update
  380. the error message if FEATURE_CCID_ESC_COMMAND is not available
  381. * [r6772]
  382. UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py: Add
  383. more feature parsing
  384. 2013-10-17 Ludovic Rousseau
  385. * [r6771] src/debug.c: Do not export log_msg() symbol
  386. PCSC_API must be undefined so that log_msg() declaration in
  387. PCSC/debuglog.h is not external but internal.
  388. Fix alioth bug [#314494] log_msg should NOT be exported by
  389. libpscslite.so.1
  390. https://alioth.debian.org/tracker/index.php?func=detail&aid=314494&group_id=30105&atid=410085
  391. 2013-10-16 Ludovic Rousseau
  392. * [r6769] ChangeLog, configure.ac: Release 1.8.9
  393. 2013-10-01 Ludovic Rousseau
  394. * [r6759] src/debug.c, src/debuglog.c, src/hotplug_linux.c: Use the
  395. COUNT_OF macro
  396. * [r6758] src/misc.h: Add COUNT_OF macro
  397. This macro returns the number of elements in an array.
  398. See http://stackoverflow.com/questions/1598773
  399. 2013-09-12 Ludovic Rousseau
  400. * [r6750] src/hotplug_libudev.c, src/hotplug_libusb.c,
  401. src/pcscdaemon.c: Add support of --reader-name-no-serial and
  402. --reader-name-no-interface
  403. It is now possible to NOT add the USB serial number of the reader
  404. using --reader-name-no-serial
  405. It is now possible to NOT add the CCID interface name of the
  406. reader using --reader-name-no-interface
  407. See also "What is in a PC/SC reader name?"
  408. http://ludovicrousseau.blogspot.fr/2010/05/what-is-in-pcsc-reader-name.html
  409. Closes Alioth bug [#314338] Add an option to remove serial number
  410. and interface name from the PC/CS reader name
  411. https://alioth.debian.org/tracker/index.php?func=detail&aid=314338&group_id=30105&atid=410088
  412. 2013-09-10 Ludovic Rousseau
  413. * [r6749] UnitaryTests/SCardEndTransaction_extra_call.py: Unitary
  414. test for the correction in revision 6748
  415. SCardEndTransaction() should return SCARD_E_NOT_TRANSACTED if
  416. called more times than SCardBeginTransaction()
  417. * [r6748] src/readerfactory.c, src/winscard.c: Return an error if
  418. SCardEndTransaction() is called with no corresponding
  419. SCardBeginTransaction()
  420. This is done in two steps: - RFUnlockSharing() returns an error
  421. if a reader is unlocked when it was not (or no more) previously
  422. locked - SCardEndTransaction() checks the value returned by
  423. RFUnlockSharing() and returns an error if RFUnlockSharing()
  424. failed
  425. Thanks to Markus Heintel for the initial patch
  426. 2013-08-26 Ludovic Rousseau
  427. * [r6744] doc/pcscd.8.in: Document --max-thread,
  428. --max-card-handle-per-thread and --max-card-handle-per-reader
  429. Closes bug [#314308] "Document --max-thread,
  430. --max-card-handle-per-thread and --max-card-handle-per-reader in
  431. pcscd(8)"
  432. * [r6743] doc/pcscd.8.in: Document --force-reader-polling
  433. * [r6742] doc/pcscd.8.in: Document short options -e, --error and
  434. -C, --critical
  435. * [r6741] doc/pcscd.8.in: Add documentation for -T, --color
  436. 2013-08-23 Ludovic Rousseau
  437. * [r6734] src/winscard_clnt.c: Fix a memory leak in case of error
  438. When SCARD_AUTOALLOCATE is used we check the parameter is valid
  439. and return in case it is not _before_ calling malloc.
  440. Detected by "clang --analyze" winscard_clnt.c:1566:9: warning:
  441. Potential leak of memory pointed to by 'bufReader' rv =
  442. SCARD_E_INVALID_PARAMETER; ^~~~~~~~~~~~~~~~~~~~~~~~~
  443. winscard_clnt.c:1594:9: warning: Potential leak of memory pointed
  444. to by 'bufAtr' rv = SCARD_E_INVALID_PARAMETER;
  445. ^~~~~~~~~~~~~~~~~~~~~~~~~
  446. winscard_clnt.c:3141:9: warning: Potential leak of memory pointed
  447. to by 'buf' rv = SCARD_E_INVALID_PARAMETER;
  448. ^~~~~~~~~~~~~~~~~~~~~~~~~
  449. 2013-08-12 Ludovic Rousseau
  450. * [r6727] src/utils/formaticc.c: Display SCardTransmit() error code
  451. (if any)
  452. * [r6726] src/utils/formaticc.c: Allow comments starting with #
  453. * [r6725] src/utils/formaticc.c: Display APDU sent and data
  454. received
  455. * [r6724] src/utils/formaticc.c: Add more error code management
  456. * [r6723] src/utils/formaticc.c: Mac OS X port
  457. 2013-08-07 Ludovic Rousseau
  458. * [r6719] src/configfile.l: Fix compiler warning
  459. configfile.l: In function ‘evaluatetoken’: configfile.l:186:
  460. warning: initialization discards qualifiers from pointer target
  461. type
  462. 2013-08-05 Ludovic Rousseau
  463. * [r6712] src/configfile.l, src/tokenparser.l: Fix memory leak
  464. Call yylex_destroy() after the lexer is used.
  465. Thanks to Alan Kozlay for the patch
  466. * [r6711] src/eventhandler.c, src/eventhandler.h, src/pcscdaemon.c:
  467. Create and use EHDeinitializeEventStructures(): fix memory leak
  468. The structures allocated in EHInitializeEventStructures() were
  469. never released.
  470. Thanks to Alan Kozlay for the patch
  471. * [r6710] src/pcscdaemon.c: SVCServiceRunLoop(): be able to quit
  472. earlier
  473. The daemon is now able to quit (test the arakiri flag) even
  474. before SVCServiceRunLoop() has been called.
  475. Thanks to Alan Kozlay for the patch
  476. * [r6709] src/winscard_svc.c: ContextsDeinitialize(): fix a memory
  477. leak
  478. Thanks to Alan Kozlay for the patch
  479. * [r6708] src/readerfactory.c: RFCleanupReaders(): fix a memory
  480. leak
  481. Free the ConfigFile C-string if needed
  482. Thanks to Alan Kozlay for the patch
  483. * [r6707] src/readerfactory.c: RFCleanupReaders(): fix a memory
  484. leak
  485. The sReadersContexts[i] structure allocated in
  486. RFAllocateReaderSpace() was never released on exit.
  487. This is not really a problem unless you embedd pcscd in another
  488. process and do init/deinit pcscd without exiting the process (as
  489. maybe used on Android or iOS).
  490. Thanks to Alan Kozlay for the patch
  491. 2013-08-01 Ludovic Rousseau
  492. * [r6703] src/configfile.l: Fix memory leaks
  493. Free the malloc-ed strings.
  494. The strings are only allocated _once_ when the config files in
  495. /etc/reader.conf.d/ are parsed. This is not really a problem
  496. unless you embedd pcscd in another process and do init/deinit
  497. pcscd without exiting the process (as maybe used on Android or
  498. iOS).
  499. Thanks to Alan Kozlay for the patch
  500. 2013-07-31 Ludovic Rousseau
  501. * [r6702] src/pcscdaemon.c: Fix compiler warnings
  502. pcscdaemon.c: In function ‘main’: pcscdaemon.c:547:12: attention
  503. : declaration of ‘r’ shadows a previous local [-Wshadow]
  504. pcscdaemon.c:152:6: attention : shadowed declaration is here
  505. [-Wshadow] pcscdaemon.c:637:11: attention : declaration of ‘r’
  506. shadows a previous local [-Wshadow] pcscdaemon.c:152:6: attention
  507. : shadowed declaration is here [-Wshadow]
  508. 2013-07-30 Ludovic Rousseau
  509. * [r6701] src/atrhandler.c: Fix compiler warning
  510. atrhandler.c: In function ‘ATRDecodeAtr’: atrhandler.c:88:19:
  511. warning: variable ‘TCi’ set but not used
  512. [-Wunused-but-set-variable] atrhandler.c:88:14: warning: variable
  513. ‘TBi’ set but not used [-Wunused-but-set-variable]
  514. We don't use TBi and TCi but we must calculate them because of
  515. the p++ in the formulae.
  516. See revision 5808 to know why these values are important.
  517. * [r6700] src/testpcsc.c: Check returned value of fgets(3)
  518. Fix compiler warning: testpcsc.c: In function ‘main’:
  519. testpcsc.c:190:4: warning: ignoring return value of ‘fgets’,
  520. declared with attribute warn_unused_result [-Wunused-result]
  521. * [r6699] src/pcscdaemon.c: Check returned value of write(2) on
  522. synchronization socket
  523. Fix compiler warnings: pcscdaemon.c: In function ‘main’:
  524. pcscdaemon.c:639:3: warning: ignoring return value of ‘write’,
  525. declared with attribute warn_unused_result [-Wunused-result]
  526. pcscdaemon.c: In function ‘at_exit’: pcscdaemon.c:661:3: warning:
  527. ignoring return value of ‘write’, declared with attribute
  528. warn_unused_result [-Wunused-result]
  529. * [r6698] src/pcscdaemon.c: Check returned value from chdir(2)
  530. Fix compiler warning: pcscdaemon.c: In function ‘main’:
  531. pcscdaemon.c:401:2: warning: ignoring return value of ‘chdir’,
  532. declared with attribute warn_unused_result [-Wunused-result]
  533. * [r6697] src/pcscdaemon.c: Add the terminating \0 in pcscd.pid
  534. file
  535. * [r6696] src/pcscdaemon.c, src/utils.c: Check read(2) and write(2)
  536. returned value for pcscd.pid file
  537. Fix compiler warnings: utils.c: In function `GetDaemonPid':
  538. utils.c:45:3: warning: ignoring return value of `read', declared
  539. with attribute warn_unused_result [-Wunused-result] pcscdaemon.c:
  540. In function ‘main’: pcscdaemon.c:543:4: warning: ignoring return
  541. value of ‘write’, declared with attribute warn_unused_result
  542. [-Wunused-result]
  543. * [r6695] src/spy/libpcscspy.c: Ignore the write(2) returned value
  544. Using (void)write(...) is not enough to fool the compiler. I
  545. still get: libpcscspy.c: In function `spy_line':
  546. libpcscspy.c:200:2: warning: ignoring return value of `write',
  547. declared with attribute warn_unused_result [-Wunused-result]
  548. libpcscspy.c:201:2: warning: ignoring return value of `write',
  549. declared with attribute warn_unused_result [-Wunused-result]
  550. libpcscspy.c:202:2: warning: ignoring return value of `write',
  551. declared with attribute warn_unused_result [-Wunused-result]
  552. libpcscspy.c: In function `spy_line_direct': libpcscspy.c:173:2:
  553. warning: ignoring return value of `write', declared with
  554. attribute warn_unused_result [-Wunused-result]
  555. libpcscspy.c:174:2: warning: ignoring return value of `write',
  556. declared with attribute warn_unused_result [-Wunused-result]
  557. libpcscspy.c:175:2: warning: ignoring return value of `write',
  558. declared with attribute warn_unused_result [-Wunused-result]
  559. The new code now uses: ssize_t r; r = write(...) (void)r;
  560. * [r6694] src/spy/libpcscspy.c: Update Copyright date
  561. 2013-07-01 Ludovic Rousseau
  562. * [r6680] src/winscard_clnt.c: Do not use pthread_atfork() any more
  563. pthread_atfork() was used to invalidate all the handles after a
  564. fork. The problem is that the handler function was still called
  565. after the libpcsclite library was unloaded on FreeBSD. This
  566. caused a crash of the application.
  567. The invalidation of the handles is not mandatory. After a fork
  568. the application may still use the PC/SC handles and may get a
  569. SCARD_F_COMM_ERROR error if the handle has been closed and in the
  570. pcscd logs: winscard_svc.c:908:MSGCheckHandleAssociation() Client
  571. failed to authenticate
  572. Closes Alioth bug [#314078] Do not use pthread_atfork() in a
  573. library
  574. https://alioth.debian.org/tracker/index.php?func=detail&aid=314078&group_id=30105&atid=410085
  575. 2013-06-27 Ludovic Rousseau
  576. * [r6671] src/hotplug_macosx.c: Fix compiler warning
  577. hotplug_macosx.c:298: warning: format ‘%s’ expects type ‘char *’,
  578. but argument 6 has type ‘struct HPDriver *’ hotplug_macosx.c:298:
  579. warning: too many arguments for format
  580. * [r6670] src/hotplug_macosx.c: List found USB devices (when in
  581. debug mode)
  582. 2013-06-25 Ludovic Rousseau
  583. * [r6669] UnitaryTests/SCard_fork.py: Fix copy-paster in log
  584. message
  585. * [r6668] src/readerfactory.c: RFAddReader(): correctly manage
  586. thread safe multi-slot readers
  587. If the driver declares it is TAG_IFD_SLOT_THREAD_SAFE then pcscd
  588. can access each slots simultanously.
  589. In this case some data must be duplicated at RFAddReader() step
  590. since they will be destroyed at the removeReader() step.
  591. Thanks to Frank Morgner for the bug report Closes Alioth bug
  592. [#314315] "double free corruption when unloading serial driver
  593. with multiple slots"
  594. 2013-06-18 Ludovic Rousseau
  595. * [r6663] configure.ac, src/libpcsclite.pc.in: Add support of
  596. serialconfdir pkg-config variable
  597. It is now possible to use pkg-config to get the directory used by
  598. pcscd to fetch serial drivers configurations.
  599. $ pkg-config libpcsclite --variable=serialconfdir
  600. /etc/reader.conf.d
  601. Closes alioth bug [#314300] Add pkg-config confdir option Thanks
  602. to Frank Morgner for the idea
  603. 2013-06-10 Ludovic Rousseau
  604. * [r6654] src/winscard.c: SCardGetAttrib(): Add support of
  605. SCARD_ATTR_DEVICE_SYSTEM_NAME
  606. Thanks to Rafael Ugalde Beriain
  607. * [r6653] src/winscard.c: SCardGetAttrib(): Fix bug in
  608. SCARD_ATTR_DEVICE_FRIENDLY_NAME
  609. Affect the real length _after_ checking the buffer is large
  610. enough.
  611. Thanks to Rafael Ugalde Beriain for the bug report.
  612. 2013-06-06 Ludovic Rousseau
  613. * [r6649] src/spy/pcsc-spy: Fix PEP8 warnings
  614. E128 continuation line under-indented for visual indent
  615. * [r6648] src/spy/pcsc-spy: Fix PEP8 warning
  616. pcsc-spy:34:13: E128 continuation line under-indented for visual
  617. indent
  618. * [r6647] src/spy/pcsc-spy: Add SCARD_ATTR_DEVICE_SYSTEM_NAME
  619. Add _A and _W versions
  620. 2013-05-30 Ludovic Rousseau
  621. * [r6639] src/winscard_clnt.c: Unlock the mutex if hCard has been
  622. invalidated by SCardDisconnect()
  623. SCardBeginTransaction() was not correctly releasing a mutex when
  624. the hCard handle was invalidated. The problem is that hCard can
  625. be invalidated by: - SCardReleaseContext and all the context is
  626. invalid - SCardDisconnect and only the hCard is invalid, not the
  627. mutex
  628. The problem was that SCardGetStatusChange() was blocked because
  629. SCardBeginTransaction() had not released the context mutex.
  630. Thanks to Fredrik Axelsson for the bug report
  631. https://bugzilla.redhat.com/show_bug.cgi?id=956530
  632. 2013-05-28 Ludovic Rousseau
  633. * [r6638] src/PCSC/reader.h: Use C99 flexible array member
  634. The structures PIN_MODIFY_STRUCTURE and PIN_VERIFY_STRUCTURE now
  635. use a C99 flexible array member when available for abData field.
  636. uint8_t abData[];
  637. 2013-05-27 Ludovic Rousseau
  638. * [r6637] src/winscard_clnt.c: mMutex is now directly inside the
  639. _psContextMap structure and no more a pointer
  640. The mutex was dynamically allocated at runtime using malloc(3)
  641. and referenced using a pointer. This was introduced in revision
  642. 572 (Dec 2003) by Damien Sauveron.
  643. Using a direct pthread_mutex_t structure will save memory (one
  644. pointer removed per context), improve performances (one
  645. malloc/free removed) and make the code safer (one malloc failure
  646. removed).
  647. 2013-05-08 Ludovic Rousseau
  648. * [r6625] src/pcscdaemon.c: Explicitely ignore write() return value
  649. pcscdaemon.c:626:3: warning: ignoring return value of function
  650. declared with warn_unused_result attribute [-Wunused-result]
  651. write(pipefd[1], &buf, 1); ^~~~~ ~~~~~~~~~~~~~~~~~~
  652. pcscdaemon.c:648:3: warning: ignoring return value of function
  653. declared with warn_unused_result attribute [-Wunused-result]
  654. write(pipefd[1], &buf, 1); ^~~~~ ~~~~~~~~~~~~~~~~~~ 2 warnings
  655. generated.
  656. We don't have much to do if write() on the interprocess pipe
  657. fails.
  658. 2013-05-05 Ludovic Rousseau
  659. * [r6621] src/hotplug_libudev.c: Fix a memory leak in case of error
  660. Coverity: leaked_storage: Variable "hpDir" going out of scope
  661. leaks the storage it points to.
  662. 2013-03-29 Ludovic Rousseau
  663. * [r6582] src/spy/pcsc-spy: Try to display the thread in the order
  664. they appear in the log
  665. The idea is to schedule another thread when a thread change is
  666. detected in the log. Then the other threads should have time to
  667. empty their queues and display what they have to display. The
  668. order is then respected between the logs recorded and the logs
  669. displayed.
  670. * [r6581] src/spy/pcsc-spy: Check the first line format
  671. This could happen if the trace file first lines are removed.
  672. * [r6580] src/Makefile.am: Do not explicitly include the .in files
  673. in Makefile.am
  674. These files are automatically included.
  675. Thanks to Anthony Foiani for the patch
  676. http://sourceforge.net/mailarchive/message.php?msg_id=30653233
  677. * [r6579] src/spy/Makefile.am: Use $(srcdir) to locate pcsc-spy.pod
  678. Without the patch it is not possible to build pcsc-lite out of
  679. the source tree like:
  680. mkdir build cd build ../configure make
  681. Thanks to Anthony Foiani for the bug report
  682. http://sourceforge.net/mailarchive/message.php?msg_id=30653233
  683. 2013-03-16 Ludovic Rousseau
  684. * [r6574] src/spy/Makefile.am: $^ not supported on FreeBSD make
  685. * [r6573] src/spy/Makefile.am: Do not use GNU make extension
  686. src/spy/Makefile.am:11: `%'-style pattern rules are a GNU make
  687. extension
  688. Thanks to Martin Paljak for the patch
  689. http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20130311/000016.html
  690. * [r6572] configure.ac, src/Makefile.am, src/spy/Makefile.am: Fix
  691. OpenBSD 5.2 compilation regarding dlopen
  692. 1) dlopen search in configure.ac, as guided in [1]. Removes this
  693. warning: * Warning: linker path does not have real file for
  694. library -ldl. * I have the capability to make that library
  695. automatically link in when * you link to this library. But I can
  696. only do this if you have a * shared version of the library, which
  697. you do not appear to have * because I did check the linker path
  698. looking for a file starting * with libdl but no candidates were
  699. found. (...for regex pattern test) * The inter-library
  700. dependencies that have been dropped here will be * automatically
  701. added whenever a program is linked with this library * or is
  702. declared to -dlopen it.
  703. [1]
  704. http://www.flameeyes.eu/autotools-mythbuster/autoconf/finding.html
  705. Thanks to Martin Paljak for the patch
  706. http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20130311/000016.html
  707. 2013-03-06 Ludovic Rousseau
  708. * [r6558] src/ifdwrapper.c: cppcheck: Variable 'rv' is reassigned a
  709. value before the old one has been used.
  710. This is a (minor) performance issue. I guess the compiler can
  711. optimize the code as needed.
  712. * [r6557] src/hotplug_libusb.c: cppcheck: The scope of the variable
  713. 'fullname' can be reduced.
  714. * [r6556] src/hotplug_libusb.c: cppcheck: The scope of the variable
  715. 'serialNumber' can be reduced.
  716. * [r6555] src/winscard_svc.c: cppcheck: The scope of the variable
  717. 'lrv' can be reduced.
  718. * [r6554] src/utils/formaticc.c: cppcheck: Resource leak: fp
  719. Same problem with FILE descriptor fo
  720. * [r6553] src/eventhandler.c: cppcheck: Variable 'readerState' is
  721. assigned a value that is never used.
  722. * [r6552] src/eventhandler.c: cppcheck: Unused variable: dwAtrLen
  723. dwAtrLen is used only if DISABLE_AUTO_POWER_ON is not set
  724. (default case)
  725. * [r6551] src/debug.c, src/debuglog.c: cppcheck: The scope of the
  726. variable 'terms' can be reduced.
  727. * [r6550] UnitaryTests/BufferOverflow.c: cppcheck: The scope of the
  728. variable 'i' can be reduced.
  729. 2013-03-04 Ludovic Rousseau
  730. * [r6549] src/winscard_msg.h: Update PROTOCOL_VERSION_MINOR from 2
  731. to 3
  732. We broke the API between version 1.8.3 and 1.8.4 by changing the
  733. value of MAX_READERNAME.
  734. This change should have been made before releasing version 1.8.4
  735. to make mix of versions clearly non working instead of failing
  736. with strange errors.
  737. This may be the source of the bug reported at
  738. http://archives.neohapsis.com/archives/dev/muscle/2012-q3/0065.html
  739. 2013-02-19 Ludovic Rousseau
  740. * [r6536] src/winscard.c: Remove duplicated line found by
  741. scan-build(1)
  742. Assigned value is always the same as the existing value
  743. The same line is also present in the case (rv == SCARD_S_SUCCESS)
  744. * [r6535] src/winscard_svc.c: Fix a bug reported by scan-build(1)
  745. Value stored to 'retval' is never read
  746. An else statement was missing
  747. * [r6534] src/testpcsc.c: Initialize iList[] to fix a error
  748. reported by scan-build(1)
  749. scan-build(1) from clang reported a problem that iList[iReader]
  750. migth be used uninitialized.
  751. 2013-02-13 Ludovic Rousseau
  752. * [r6527] UnitaryTests/SCard_fork.py: Add some debug logs
  753. 2013-01-28 Ludovic Rousseau
  754. * [r6519] src/hotplug_libudev.c: Check the Info.plist file is (a
  755. minimum) correct
  756. The number of products, manufacturers and reader names should be
  757. the same. Otherwise the Info.plist file is corrupted and bad
  758. things may happen, like a crash of pcscd.
  759. Thanks to Nikita Bige for the bug report
  760. https://bugzilla.redhat.com/show_bug.cgi?id=904932
  761. 2013-01-21 Ludovic Rousseau
  762. * [r6511] src/spy/libpcscspy.c: Explicitly ignore the result of
  763. write(2)
  764. Even if write(2) fails the show must go on. The spy log may get
  765. corrupted but we can't do much better.
  766. 2013-01-16 Ludovic Rousseau
  767. * [r6505] ChangeLog, configure.ac: Release 1.8.8
  768. * [r6504] src/tokenparser.l: Convert all the &amp; in &, not just
  769. the first occurence
  770. Reader names may use more than one "&" character.
  771. * [r6503] src/tokenparser.l: Correctly terminate reader names
  772. containing a & sign
  773. The & is a &amp; in the Info.plist XML file and converted back to
  774. & by the Lexer. Unfortunately the string was not correctly
  775. terminated and the 4 last characters of the reader name were
  776. duplicated.
  777. Thanks to Philippe Teuwen for the bug report.
  778. 2013-01-15 Ludovic Rousseau
  779. * [r6502] src/tokenparser.l: Fix a typo in comment
  780. * [r6501] src/configfile.l: Correctly calculate the FRIENDLYNAME
  781. field string size
  782. If the FRIENDLYNAME field is NOT delimited by " then the string
  783. length was wrong and a buffer overflow occured.
  784. Thanks to Alan Kozlay for the bug report and patch
  785. * [r6500] src/configfile.l: Move the variable declaration near
  786. there use site
  787. Also - change the type from int to size_t for strlen() results -
  788. initialize the values in the for() loop
  789. 2012-11-28 Ludovic Rousseau
  790. * [r6490] ChangeLog, configure.ac: Release 1.8.7
  791. * [r6489] ChangeLog: Fix typos
  792. 2012-10-22 Ludovic Rousseau
  793. * [r6477] .: Ignore some new files
  794. svn propedit svn:ignore .
  795. * [r6476] etc, m4, src/spy: Ignore some new files
  796. svn propedit svn:ignore .
  797. 2012-10-04 Ludovic Rousseau
  798. * [r6468] configure.ac, configure.in: Rename configure.in in
  799. configure.ac
  800. aclocal: warning: autoconf input should be named 'configure.ac',
  801. not 'configure.in'
  802. 2012-09-13 Ludovic Rousseau
  803. * [r6463] src/readerfactory.c: FCreateReaderHandle(): unref a
  804. reader when needed
  805. We should call UNREF_READER() only if RFReaderInfoById() returned
  806. with success. Fix a bug introduced in revision 6459.
  807. * [r6462] src/winscard_svc.c: MSGRemoveContext(): Unref the reader
  808. RFReaderInfoById() is called and implicitely increase the reader
  809. reference count. So we shall call UNREF_READER() before exiting.
  810. * [r6461] src/readerfactory.c: RFCreateReaderHandle(): reorganize
  811. code
  812. Move a variable declaration to the inner block using the
  813. variable.
  814. * [r6460] src/readerfactory.c: Remove extra ;
  815. UNREF_READER() is a { } block in a macro
  816. * [r6459] src/readerfactory.c: RFCreateReaderHandle(): Unref the
  817. reader is the handle is already used
  818. The function RFCreateReaderHandle() checks if a handle is already
  819. used by calling RFReaderInfoById() to find the associated reader.
  820. So if RFReaderInfoById() returns with success then the handle is
  821. valid and can't be used. A new random handle must be generated.
  822. But since RFReaderInfoById() called REF_READER() internally we
  823. must call UNREF_READER() to decrement the reference counter.
  824. * [r6458] src/readerfactory.h: Make hLockId field volatile
  825. The ReaderContext structure is accessed from different pcscd
  826. threads. To prevent the compiler to optimise read access to the
  827. hLockId field we make it volatile.
  828. That may be the source of a problem when a reader is removed but
  829. pcscd do not behave correctly.
  830. Thanks to Torsten Hilbrich for the idea.
  831. http://archives.neohapsis.com/archives/dev/muscle/2012-q3/0086.html
  832. 2012-08-30 Ludovic Rousseau
  833. * [r6451] Makefile.am, configure.in, m4/acx_pthread.m4,
  834. m4/ax_pthread.m4: USe ax_pthread.m4 instead of acx_pthread.m4
  835. Fix "autoreconf -vis -Wall" warnings: configure.in:75: warning:
  836. The macro `AC_LANG_SAVE' is obsolete. configure.in:75: You should
  837. run autoupdate. ../../lib/autoconf/lang.m4:128: AC_LANG_SAVE is
  838. expanded from... m4/acx_pthread.m4:275: ACX_PTHREAD is expanded
  839. from... configure.in:75: the top level configure.in:75: warning:
  840. The macro `AC_LANG_C' is obsolete. configure.in:75: You should
  841. run autoupdate. ../../lib/autoconf/c.m4:72: AC_LANG_C is expanded
  842. from... m4/acx_pthread.m4:275: ACX_PTHREAD is expanded from...
  843. * [r6450] ChangeLog, configure.in: Release 1.8.6
  844. 2012-08-24 Ludovic Rousseau
  845. * [r6447] src/readerfactory.c: RFCreateReaderHandle(): fix compiler
  846. warning
  847. readerfactory.c: In function ‘RFCreateReaderHandle’:
  848. readerfactory.c:1054: warning: unused parameter ‘rContext’
  849. Maybe the rContext will be used one day.
  850. * [r6446] src/pcscdaemon.c: Fix redirection of stdin, stdout and
  851. stderr to /dev/null
  852. The file descriptors for stdin, stdout and stderr were closed so
  853. any library (like libusb) sending debug log to stderr was
  854. confusing pcscd since file descriptor 2 (ex stderr) was re-used
  855. for something else.
  856. Now the file descriptor 3 is really redirected to /dev/null
  857. * [r6445] src/debuglog.c: Increase DEBUG_BUF_SIZE to avoid log
  858. lines truncations
  859. Increase the value from 160 to 2048. Some "long" log lines where
  860. truncated.
  861. Example: Aug 24 10:22:39 neo pcscd:
  862. readerfactory.c:978:RFInitializeReader() Attempting startup of
  863. Gemalto PC Twin Reader (70D7E2EE) 00 00 using
  864. /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Lin
  865. * [r6444] src/readerfactory.c, src/winscard_clnt.c,
  866. src/winscard_svc.c: Remove useless parenthesis
  867. Replace the constructions &(structure->field) by
  868. &structure->field since that is equivalent.
  869. * [r6443] src/winscard_svc.c: MSGAddHandle(): Add mutex lock/unlock
  870. around cardsList list
  871. A lock/unlock pair of mutex was missing.
  872. Thanks to Dmitry Torokhov <dtor@vmware.com> for the patch
  873. * [r6442] src/winscard_svc.c: CreateContextThread(): Use only one
  874. lock/unlock pair
  875. It is quite often useless to lock a resource, perform
  876. calculation, unlock the resource and then act conditionally upon
  877. the result of the calculation, because as soon as shared resource
  878. is unlocked the condition may change and the previous calculation
  879. will become obsolete.
  880. Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
  881. * [r6441] src/winscard_msg.c: ClientSetupSession(): use fcntl() to
  882. make the socket non blocking
  883. ioctl(fd, FIONBIO. ...) is not the standard way of marking
  884. sockets and other objects nonblocking, fcntl(fd, F_SETFL, flags |
  885. O_NONBLOCK) is.
  886. Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
  887. 2012-08-23 Ludovic Rousseau
  888. * [r6440] Makefile.am, configure.in, m4/Makefile.am: Integrate
  889. m4/Makefile.am into Makefile.am
  890. The idea is to remove a Makefile files to speed up compilation.
  891. Thanks to Diego Elio Pettenò for the idea.
  892. * [r6439] Makefile.am: Reformat
  893. 2012-08-13 Ludovic Rousseau
  894. * [r6434] src/spy/pcsc-spy.pod: opensc-tool is not a good example
  895. opensc-tool is no more linked to libpcsclite.so.1. Use pcsc_scan
  896. as an example instead.
  897. 2012-08-12 Ludovic Rousseau
  898. * [r6430] doc/update.sh: Script to uppload the Doxygen doc on the
  899. web server
  900. 2012-08-08 Ludovic Rousseau
  901. * [r6419] src/spy/Makefile.am: Add -I$(top_builddir)/src/PCSC to
  902. find the generated pcsclite.h
  903. Thanks to Dmitry Torokhov for the bug report and patch.
  904. * [r6414] src/winscard_clnt.c: Doxygen: fix warning: missing title
  905. after \defgroup API
  906. * [r6413] src/PCSC/ifdhandler.h: Doxygen: fix warning: missing
  907. title after \defgroup IFDHandler
  908. * [r6412] doc/doxygen.conf.in: Make doxygen quiet to only have
  909. warnings and errors
  910. 2012-08-05 Ludovic Rousseau
  911. * [r6402] src/pcscdaemon.c: Exit if no hotplug (USB) drivers are
  912. found _and_ serial drivers are not in use
  913. If only a serial driver is used and not drivers are present in
  914. PCSCLITE_HP_DROPDIR then pcscd exited after logging:
  915. hotplug_libudev.c:96:HPReadBundleValues() Cannot open PC/SC
  916. drivers directory: /usr/lib64/readers/usb
  917. pcscd will now exit only if USE_SERIAL is not defined.
  918. Thanks to Oliver Schinagl for the bug report.
  919. 2012-08-04 Ludovic Rousseau
  920. * [r6401] ChangeLog, configure.in: Release 1.8.5
  921. * [r6400] src/winscard_clnt.c: Doxygen: Fix dwControlCode code
  922. Thanks to Marcin Cieslak for the bug report
  923. 2012-08-02 Ludovic Rousseau
  924. * [r6397] src/readerfactory.c, src/readerfactory.h: Merge
  925. RFReaderInfoNamePort() into RFRemoveReader() since that is the
  926. only user. Also improve RFRemoveReader() to remove all the slots
  927. of a reader.
  928. Closes [#313708] Multi-slot support is broken
  929. https://alioth.debian.org/tracker/index.php?func=detail&aid=313708&group_id=30105&atid=410085
  930. 2012-07-26 Ludovic Rousseau
  931. * [r6391] src/eventhandler.c, src/winscard.c: Fix typo in log
  932. message
  933. 2012-07-05 Ludovic Rousseau
  934. * [r6389] src/readerfactory.h: REF_READER/UNREF_READER: Change log
  935. level from CRITICAL to DEBUG
  936. No need to use the PCSC_LOG_CRITICAL level on a production
  937. system.
  938. * [r6388] src/readerfactory.c, src/readerfactory.h, src/winscard.c:
  939. Add a reader reference count to be used as a Garbage Collector
  940. A reader should be removed only when no one is using it, not just
  941. when the reader is unplugged.
  942. An application may be in the middle of using the reader when the
  943. reader is unplugged. If the reader is removed right when
  944. unplugged then pcscd may use a no more existing reader structure
  945. and crash.
  946. Thanks to Martin Vogt for the bug report.
  947. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0041.html
  948. 2012-07-03 Ludovic Rousseau
  949. * [r6386] src/readerfactory.c: RFRemoveReader(): only remove one
  950. reader
  951. We should not need to loop over every matching reader and remove
  952. them all. Or I am missing something.
  953. This code is present since the first version of RFRemoveReader()
  954. back in 2002.
  955. 2012-07-01 Ludovic Rousseau
  956. * [r6385] src/winscard_clnt.c: SCardBeginTransaction(): remove an
  957. extra line
  958. The loop could be an infinite loop in case rv ==
  959. SCARD_E_SHARING_VIOLATION but we get out of the for (;;) loop
  960. exactly when rv != SCARD_E_SHARING_VIOLATION
  961. The bug was introduced in revision 6358.
  962. * [r6384] src/readerfactory.c: RFAddReader(): fix a off-by-one bug
  963. strlen() returnd the number of characters without the final NUL
  964. byte.
  965. The bugs was introduced in revision 6354.
  966. * [r6383] src/pcscdaemon.c: Fix a TOCTOU problem
  967. Do not check for PCSCLITE_IPC_DIR presence before creating it.
  968. Just create it and manage the case it already existed.
  969. Coverity: Time of check time of use (TOCTOU)
  970. * [r6382] src/spy/libpcscspy.c: spy_line(): move the call to
  971. va_end(args); earlier
  972. In case the buffer is too small we exit the function without
  973. calling va_end().
  974. Coverity: Missing varargs init or cleanup (VARARGS)
  975. 2012-06-29 Ludovic Rousseau
  976. * [r6380] src/hotplug_libudev.c: HPAddDevice(): check
  977. udev_device_get_sysattr_value() is not NULL
  978. The value returned by udev_device_get_sysattr_value(dev,
  979. "bInterfaceNumber") may be NULL (maybe the reader has been
  980. removed just after been inserted). And atoi() do not like to work
  981. on NULL.
  982. * [r6379] src/readerfactory.h: Fix comment
  983. * [r6378] src/winscard.c: SCardTransmit(): use an exit block
  984. goto exit; instead of a direct return rv;
  985. This will allow to factorize exit code.
  986. * [r6377] src/winscard.c: SCardSetAttrib(): use an exit block
  987. goto exit; instead of a direct return rv;
  988. This will allow to factorize exit code.
  989. * [r6376] src/winscard.c: SCardGetAttrib(): use an exit block
  990. goto exit; instead of a direct return.
  991. This will allow to factorize exit code.
  992. * [r6375] src/winscard.c: SCardControl(): use an exit block
  993. goto exit; instead of a direct return.
  994. This will allow to factorize exit code.
  995. * [r6374] src/winscard.c: SCardStatus(): use an exit block
  996. goto exit; instead of a direct return rv;
  997. This will allow to factorize exit code.
  998. * [r6373] src/winscard.c: SCardEndTransaction(): use an exit block
  999. goto exit; instead of a direct return rv;
  1000. This will allow to factorize exit code.
  1001. * [r6372] src/winscard.c: SCardBeginTransaction(): use an exit
  1002. block
  1003. goto exit; instead of a direct return SCARD_E_*;
  1004. This will allow to factorize exit code.
  1005. * [r6371] src/winscard.c: SCardDisconnect(): use an exit block
  1006. goto exit; instead of a direct return SCARD_E_*;
  1007. This will allow to factorize exit code.
  1008. * [r6370] src/winscard.c: SCardReconnect(): code reformat
  1009. * [r6369] src/winscard.c: SCardReconnect(): use an exit block
  1010. goto exit; instead of a direct return SCARD_E_*;
  1011. This will allow to factorize exit code.
  1012. * [r6368] src/winscard.c: SCardConnect(): use an exit bloc
  1013. goto exit; instead of a direct return SCARD_E_*;
  1014. This will allow to factorize exit code.
  1015. * [r6367] src/winscard.c: SCardDisconnect(): check the parameters
  1016. before anything
  1017. Do not lose time finding the rContext if the dwDisposition
  1018. parameter is wrong. Exit early.
  1019. 2012-06-26 Ludovic Rousseau
  1020. * [r6366] doc/doxygen.conf.in: Update to Doxygen 1.8.1.1
  1021. * [r6364] ChangeLog, configure.in: Release 1.8.4
  1022. * [r6363] UnitaryTests/SCardBeginTransaction_deadlock.py: Unitary
  1023. test for locking in SCardBeginTransaction, SCardTransmit,
  1024. SCardStatus and SCardReconnect
  1025. * [r6362] src/winscard_clnt.c: With changes in revisions 6358 to
  1026. 6361 it is now possible to use the same SCARDCONTEXT in different
  1027. threads (same as on Windows)
  1028. With one context per thread the locking was controlled by the
  1029. daemon. With the same context for 2 threads the locking is
  1030. controlled (first) on the client side since the 2 threads uses
  1031. the same mutex.
  1032. * [r6361] src/winscard_clnt.c: Similar patch as in revision 6358
  1033. but for SCardReconnect()
  1034. Thanks to Aleksey Samsonov for the patch
  1035. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
  1036. * [r6360] src/winscard_clnt.c: Similar patch as in revision 6358
  1037. but for SCardBeginTransaction()
  1038. Thanks to Aleksey Samsonov for the patch
  1039. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
  1040. * [r6359] src/winscard_clnt.c: SCardStatus(): Similar patch as in
  1041. revision 6358 but for SCardStatus()
  1042. Thanks to Aleksey Samsonov for the patch
  1043. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
  1044. * [r6358] src/winscard_clnt.c: SCardTransmit(): do not hold the
  1045. mutex when waiting in a SCARD_E_SHARING_VIOLATION loop
  1046. If SCardTransmit() is waiting because the reader is used by
  1047. another thread/process then we release the
  1048. currentContextMap->mMutex, sleep, and try to acquire the mutex
  1049. again. This will allow another thread using the same hContext to
  1050. call SCardEndTransaction() otherwise the mutex is already held by
  1051. SCardTransmit() and SCardEndTransaction() can't get it to finish
  1052. the transaction => dead lock
  1053. Thanks to Aleksey Samsonov for the patch
  1054. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
  1055. 2012-06-25 Ludovic Rousseau
  1056. * [r6357] src/PCSC/ifdhandler.h: Update Doxygen: document
  1057. "libusb-1.0" scheme
  1058. the "libusb" (for libusb-0.1) scheme has been updated to a
  1059. "libusb-1.0" scheme (for libusb-1.0). The device name now
  1060. contains the interface number. The bus and device are now
  1061. integers instead of paths.
  1062. The change has been done in revision 5044 (June 2010) but the API
  1063. was not updated at the same time.
  1064. * [r6356] src/readerfactory.c: RFReaderInfoNamePort(): Compare only
  1065. the significant part of the reader name
  1066. Since revision 6354 the reader name may be truncated. Only the
  1067. part in readerState->readerName (managed by RFAddReader()) is
  1068. truntacted. The reader name stored the hotplug_*.c
  1069. readerTracker[] structures is NOT truncated. So we must use a
  1070. truncated compare function to find the reader name.
  1071. * [r6355] src/PCSC/pcsclite.h.in: Increase MAX_READERNAME from 100
  1072. to 128
  1073. It is not a perfect solution but it should limit the truncations
  1074. of reader names as introduced in revision 6354.
  1075. * [r6354] src/readerfactory.c: RFAddReader(): truncates the reader
  1076. name if too long
  1077. The reader name size is limited to a total of MAX_READERNAME
  1078. characters (100 by default). But some reader names are very long
  1079. like: "SCM Microsystems Inc. SCR3340 - ExpressCard54 Smart Card
  1080. Reader" and also provide a serial number and an interface name.
  1081. So the name constructed by hotplug_libudev.c can be very long and
  1082. longer than the 100 caracters.
  1083. Closes: [#313684] "Reader name too long" error
  1084. https://alioth.debian.org/tracker/?func=detail&atid=410085&aid=313684&group_id=30105
  1085. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0113.html
  1086. * [r6353] src/hotplug_libudev.c: HPRescanUsbBus(): Display the full
  1087. name of the removed reader
  1088. 2012-06-06 Ludovic Rousseau
  1089. * [r6325] src/tokenparser.l: Add [ and ] in the list of accepted
  1090. characters for a reader name
  1091. Readers with these characters caused a crash in libccid without
  1092. any error message. This is because the reader entry was skiped
  1093. and a reader name was then missing in the list. NULL is not a
  1094. valid reader name :-)
  1095. Thanks to Philippe Teuwen for the bug report.
  1096. 2012-06-05 Ludovic Rousseau
  1097. * [r6323] src/pcscd.h.in: Remove now useless PCSCLITE_SVC_IDENTITY
  1098. PCSCLITE_SVC_IDENTITY is no more used since revision 6322.
  1099. * [r6322] src/winscard.c: SCardEstablishContext(): Use a full
  1100. 32-bits random value
  1101. Use a full int range (32-bits) value instead of a 16-bits value.
  1102. Note: this value is (still) not used/checked on the server side.
  1103. * [r6321] src/readerfactory.c, src/readerfactory.h: remove
  1104. dwIdentity field from ReaderContext structure
  1105. Since revision 6320 dwIdentity is no more used. So we can remove
  1106. it.
  1107. * [r6320] src/readerfactory.c: RFCreateReaderHandle(): generates a
  1108. 32-bits random for hCard
  1109. Since the change in revision 6316 dwIdentity is no more used to
  1110. identify a hCard -> reader relation. So we can just generate a
  1111. hCard as a full 32-bits random.
  1112. The security should be improved with a change from 16-bits random
  1113. to a 32-bits random. It will be more difficult for a rogue client
  1114. to guess a valid hCard value.
  1115. * [r6319] src/sys_unix.c: SYS_RandomInt(): extend range if fEnd ==
  1116. -1
  1117. If fEnd parameter is set to -1 then the result of rand() is not
  1118. truncated. This is usefull to get 32-bits of random with no
  1119. constraint on the values.
  1120. * [r6318] src/readerfactory.c, src/readerfactory.h: Remove now
  1121. unused function RFFindReaderHandle()
  1122. Since revision 6317 this function is no more used.
  1123. * [r6317] src/winscard.c: Calls to RFFindReaderHandle() are now
  1124. useless
  1125. RFFindReaderHandle() was used to check the hCard is valid. Since
  1126. revision 6316 the algorithm used in RFFindReaderHandle() is
  1127. already used in RFReaderInfoById().
  1128. So calling RFFindReaderHandle() after RFReaderInfoById() (as it
  1129. was done) is now useless.
  1130. * [r6316] src/readerfactory.c, src/readerfactory.h: Use handlesList
  1131. to find a hCard -> reader link
  1132. hCard handles are stored in the handlesList list of readers. The
  1133. use of dwIdentity just duplicate the information and is no more
  1134. needed.
  1135. The algorithm is the same as in RFFindReaderHandle()
  1136. 2012-06-02 Ludovic Rousseau
  1137. * [r6315] src/ifdwrapper.c: Fix compiler failure for static driver
  1138. CFLAGS="-DPCSCLITE_STATIC_DRIVER -DIFDHANDLERv3" ./configure make
  1139. [...] ifdwrapper.c: In function ‘IFDOpenIFD’:
  1140. ifdwrapper.c:125:15: error: ‘READER_CONTEXT’ has no member named
  1141. ‘lpcDevice’ ifdwrapper.c:126:57: error: ‘READER_CONTEXT’ has no
  1142. member named ‘lpcDevice’
  1143. 2012-05-28 Ludovic Rousseau
  1144. * [r6312] src/ifdwrapper.c: IFDPowerICC(): check the value returned
  1145. by IFDStatusICC()
  1146. The reader may be gone at this step. See
  1147. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0041.html
  1148. 2012-05-18 Ludovic Rousseau
  1149. * [r6302] src/PCSC/ifdhandler.h: Remove an extra '.' at the end of
  1150. the URL
  1151. Thanks to "helpcrypto" for the bug report
  1152. http://archives.neohapsis.com/archives/dev/muscle/2012-q2/0036.html
  1153. * [r6299] configure.in: warning: 'libpcsclite.la': linking libtool
  1154. libraries using a non-POSIX archiver requires 'AM_PROG_AR' in
  1155. 'configure.in'
  1156. * [r6298] configure.in: autoupdated using autoupdate (GNU Autoconf)
  1157. 2.69
  1158. 2012-04-05 Ludovic Rousseau
  1159. * [r6261] UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py: Unitary test
  1160. for FEATURE_GET_TLV_PROPERTIES
  1161. 2012-04-04 Ludovic Rousseau
  1162. * [r6256]
  1163. UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py: Catch
  1164. control() exception
  1165. If the driver is not configured with
  1166. DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED then the control() will
  1167. fail with a SmartcardException() exception.
  1168. 2012-03-30 Ludovic Rousseau
  1169. * [r6253] ChangeLog, configure.in: Release 1.8.3
  1170. 2012-03-25 Ludovic Rousseau
  1171. * [r6249] UnitaryTests/FEATURE_CCID_ESC_COMMAND.py: This file is
  1172. now more or less a duplicate of
  1173. FEATURE_CCID_ESC_COMMAND_Xiring.py
  1174. So remove it.
  1175. * [r6248] UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py: Add
  1176. GET_SN command and some documentation
  1177. 2012-03-24 Ludovic Rousseau
  1178. * [r6247] UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py: Unitary
  1179. test for FEATURE_CCID_ESC_COMMAND and Xiring Leo readers
  1180. * [r6246] UnitaryTests/FEATURE_CCID_ESC_COMMAND2.py,
  1181. UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py: Rename
  1182. FEATURE_CCID_ESC_COMMAND2.py in
  1183. FEATURE_CCID_ESC_COMMAND_Gemalto_features.p
  1184. 2012-03-23 Ludovic Rousseau
  1185. * [r6244] UnitaryTests/control_get_firmware.py: Use
  1186. getTlvProperties() and PCSCv2_PART10_PROPERTY_wIdVendor
  1187. We now check the reader is a Gemalto one before sending an escape
  1188. code
  1189. 2012-03-20 Ludovic Rousseau
  1190. * [r6241] src/PCSC/reader.h: Add new properties for
  1191. FEATURE_GET_TLV_PROPERTIES
  1192. dwMaxAPDUDataSize, wIdVendor and wIdProduct are/will be defined
  1193. in PCSC v2 part 10 release 2.02.09
  1194. 2012-02-28 Ludovic Rousseau
  1195. * [r6236] src/spy/pcsc-spy: _SCardControl(): parse the received
  1196. buffer only on success
  1197. The received buffer (answer) is valid only if the command
  1198. execution succeeded.
  1199. * [r6235] src/spy/pcsc-spy: Add support of SCardControl132 for OS X
  1200. * [r6234] src/spy/libpcscspy.c: Fix compiler warning on OS X
  1201. libpcscspy.c:580: warning: no previous prototype for
  1202. 'SCardControl132'
  1203. 2012-02-21 Ludovic Rousseau
  1204. * [r6229] src/debuglog.c: log_xxd(): do not log with negative
  1205. length
  1206. Thanks to Godfrey Chung for the bug report
  1207. http://archives.neohapsis.com/archives/dev/muscle/2012-q1/0043.html
  1208. 2012-02-04 Ludovic Rousseau
  1209. * [r6215] src/configfile.l: Skip non regular or "hidden" config
  1210. files
  1211. Closes Debian bug #658322 "pcscd: fails to start if config
  1212. directory contains subdirectories"
  1213. 2012-01-24 Ludovic Rousseau
  1214. * [r6201] src/spy/pcsc-spy.pod: Document usage on Mac OS X
  1215. * [r6200] src/spy/libpcscspy.c: Mac OS X uses SCardControl132
  1216. instead of SCardControl
  1217. On Mac OS X SCardControl() is used for the old version of the API
  1218. (without the dwControlCode) and SCardControl132() for the new
  1219. API.
  1220. From /System/Library/Frameworks/PCSC.framework/Headers/winscard.h
  1221. /* To support the newer version of SCardControl, we define it as
  1222. follows. The old version number was 1.1.2, the new call appears
  1223. in 1.3.2 of pcsc-lite (or perhaps earlier). */
  1224. #if !defined(USE_SCARD_CONTROL_112) #define SCardControl
  1225. SCardControl132 #endif /* USE_SCARD_CONTROL_112 */
  1226. * [r6199] src/spy/Makefile.am: Generate a Mac OS X PCSC.framework
  1227. hierarchy
  1228. Mac OS X uses a framework and not just a library. The hiearchy is
  1229. simple: PCSC.framework PCSC.framework/PCSC ->
  1230. Versions/Current/PCS PCSC.framework/Versions
  1231. PCSC.framework/Versions/A PCSC.framework/Versions/A/PCSC
  1232. PCSC.framework/Versions/Current -> A
  1233. * [r6198] src/spy/libpcscspy.c: Add Mac OS X support
  1234. * [r6197] src/spy/libpcscspy.c: Use ULONG * instead of unsigned
  1235. long *
  1236. See comment in revision 6195
  1237. * [r6196] src/spy/libpcscspy.c: Reformat
  1238. * [r6195] src/spy/libpcscspy.c: Use LONG/ULONG instead of
  1239. long/unsigned long
  1240. The problem is that PCSC on Mac OS X do not use long but
  1241. uint32_t. So a (LONG * or LPDWORD *) parameter (like pcchReaders
  1242. in SCardListReaders) is not the same on Linux and Mac OS X for
  1243. 64-bits CPUs.
  1244. LONG is correctly defined on both Linux and Mac OS X so we use it
  1245. instead.
  1246. * [r6194] src/spy/libpcscspy.c: load_lib(): check dlsym() return
  1247. correct values
  1248. If the pointer returned by dlsym("SCardEstablishContext") is our
  1249. own SCardEstablishContext() function then we will finish in a
  1250. endless recursion. Something went wrong and we stop immediatly
  1251. instead of crashing when the call stack is full.
  1252. * [r6193] src/spy/libpcscspy.c: Use an internal
  1253. pcsc_stringify_error() by default
  1254. If the loading of the PCSC library fails all the functions are
  1255. set to use internal_error(). The only expection is now
  1256. pcsc_stringify_error() because the return value is not a LONG
  1257. error code but a C-string.
  1258. This change fixes a crash when the application called printf() to
  1259. display the "string" returned by pcsc_stringify_error() if
  1260. SCardEstablishContext() failed in the spying library.
  1261. 2012-01-18 Ludovic Rousseau
  1262. * [r6185] ChangeLog, configure.in: Release 1.8.2
  1263. * [r6184] src/spy/pcsc-spy, src/spy/pcsc-spy.pod: Add support of
  1264. --version to pcsc-spy
  1265. * [r6183] src/spy/Makefile.am, src/spy/pcsc-spy.1,
  1266. src/spy/pcsc-spy.pod: Use POD format for pcsc-spy manpage
  1267. Writting nroff manpage directly is not easy. The Perl POD (plain
  1268. old documentation) is much more friendly to read/write and
  1269. pod2man is your friend.
  1270. * [r6182] src/spy/pcsc-spy: print_usage(): display command name
  1271. * [r6181] src/spy/pcsc-spy: Document [-h|--help] argument
  1272. 2012-01-15 Ludovic Rousseau
  1273. * [r6178] src/spy/Makefile.am: Use dist_man_MANS to distribute the
  1274. manpage
  1275. The pcsc-spy.1 manpage is now included in the .tar.bz2 archive
  1276. * [r6177] src/spy/Makefile.am, src/spy/libpcscspy.c,
  1277. src/spy/pcsc-spy.c: Rename pcsc-spy.c to libpcscspy.c
  1278. We have a pcsc-spy Python binary so pcsc-spy.c is not a correct
  1279. filename for a different library. Make is trying to generate
  1280. pcsc-spy from pcsc-spy.c and that fails.
  1281. * [r6176] src/spy/Makefile.am: Remove pcsc-spy.py from EXTRA_DIST
  1282. The command is now named pcsc-spy and is distributed by default
  1283. * [r6175] src/spy/Makefile.am, src/spy/README.txt,
  1284. src/spy/pcsc-spy.1: Convert README.txt into pcsc-spy.1
  1285. Since we now provide the pcsc-spy binary we must also provide a
  1286. manpage for the command.
  1287. * [r6174] src/spy/pcsc-spy: Update copyright date
  1288. * [r6173] src/spy/pcsc-spy: Change Shebang to /usr/bin/python
  1289. Comply with Debian Python Policy 3.1 Programs using the default
  1290. python
  1291. http://www.debian.org/doc/packaging-manuals/python-policy/ch-programs.html
  1292. * [r6172] src/spy/Makefile.am: Install pcsc-spy as a normal binary
  1293. By default the command is installed in $(prefix)/bin/pcsc-spy
  1294. * [r6171] src/spy/pcsc-spy, src/spy/pcsc-spy.py: Rename the
  1295. pcsc-spy command without the .py extension
  1296. Comply to Debian Policy 10.4 Scripts
  1297. http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
  1298. 2012-01-01 Ludovic Rousseau
  1299. * [r6156] src/PCSC/ifdhandler.h: Add Doxygen documentation for
  1300. TAG_IFD_SLOTNUM, TAG_IFD_STOP_POLLING_THREAD and
  1301. TAG_IFD_POLLING_THREAD_WITH_TIMEOUT
  1302. 2011-12-15 Ludovic Rousseau
  1303. * [r6139] src/spy/pcsc-spy.c: spy_line(): use return instead of
  1304. exit().
  1305. A library should not use exit() but return an error code instead.
  1306. Reported by Debian lintian.
  1307. 2011-12-05 Ludovic Rousseau
  1308. * [r6132] src/tokenparser.l: bundleRelease(): fix a memory leak
  1309. We must also free the key of the element.
  1310. * [r6131] src/tokenparser.l: eval_value(): avoid a buffer read
  1311. overflow in &amp; management
  1312. We shall stop the loop when we find a \0 in the source, not in
  1313. the destination (4 characters later)
  1314. * [r6130] src/hotplug_libudev.c: HPReadBundleValues(): remove extra
  1315. free()
  1316. Do not free memory allocated for CFBundleName since we use this
  1317. value directly in driverTracker[listCount].CFBundleName =
  1318. CFBundleName; (line 180) instead of using a strdup(), because the
  1319. string is the same for many entries
  1320. * [r6129] src/readerfactory.c: RFRemoveReader(): add 2 missing
  1321. pthread_mutex_destroy()
  1322. Mutexes for powerState_lock and handlesList_lock were never
  1323. destroyed.
  1324. It was not a real problem since from manpage
  1325. pthread_mutex_destroy(3): In the LinuxThreads implementation, no
  1326. resources are associated with mutex objects, thus
  1327. pthread_mutex_destroy actually does nothing except checking that
  1328. the mutex is unlocked.
  1329. * [r6128] src/readerfactory.c: RFRemoveReader(): fix a bug with a
  1330. multi-slot reader
  1331. The value sContext->mMutex must be reset to NULL only for the
  1332. last slot.
  1333. 2011-11-26 Ludovic Rousseau
  1334. * [r6120] etc/pcscd.service.in: StandardOutput=syslog is now the
  1335. default since at least systemd 37
  1336. 2011-11-25 Ludovic Rousseau
  1337. * [r6118] ChangeLog, configure.in: Release 1.8.1
  1338. * [r6117] src/spy/Makefile.am: Also distribute pcsc-spy.py
  1339. install_spy.sh uninstall_spy.sh README.txt
  1340. 2011-11-19 Ludovic Rousseau
  1341. * [r6111] ChangeLog, configure.in: Release 1.8.0
  1342. * [r6110] src/PCSC/reader.h: Add FEATURE_EXECUTE_PACE from PCSC v2
  1343. Part 10 Amendment 1 2011-06-03
  1344. 2011-11-18 Ludovic Rousseau
  1345. * [r6109] UnitaryTests/FEATURE_CCID_ESC_COMMAND2.py: Proprietary
  1346. commands for Gemalto readers This is implemented by the Gemalto
  1347. Pinpad v2 and C200 readers
  1348. * [r6108] src/spy/pcsc-spy.py: Terminate the process with Ctrl-C
  1349. Thanks to Martin Paljak for the patch
  1350. * [r6107] src/spy/README.txt: Typo
  1351. 2011-11-14 Ludovic Rousseau
  1352. * [r6105] configure.in, src/pcscdaemon.c, src/winscard_clnt.c:
  1353. Remove pcscd autostart feature
  1354. The auto start feature (launch pcscd from the library if not
  1355. already running) was a fragile code with some issues. This
  1356. service is far better implemented by systemd.
  1357. Thanks to Kalev Lember for pushing the systemd patches.
  1358. 2011-11-11 Ludovic Rousseau
  1359. * [r6104] src/winscard_clnt.c: Do not try to autostart if the
  1360. system was booted using systemd
  1361. The --disable-autostart configure option should now be useless on
  1362. systems using systemd.
  1363. 2011-11-10 Ludovic Rousseau
  1364. * [r6102] src/pcscdaemon.c: Revert revision 6045
  1365. We must fork+exit in autoexit and foreground mode or the
  1366. application will not continue its execution and will wait for the
  1367. end of pcscd
  1368. 2011-10-31 Ludovic Rousseau
  1369. * [r6095] src/spy/pcsc-spy.py: Add support of -d|--diffable to
  1370. generate logs without too much variable parts so 2 logs can be
  1371. compared using diff(1)
  1372. Variable parts are replaced by "????". They are: - execution time
  1373. - hCard - hContext
  1374. * [r6094] src/spy/pcsc-spy.py: Fix cut-n-paste error
  1375. * [r6093] src/spy/pcsc-spy.py: Add support of --nocolor command
  1376. line argument
  1377. * [r6092] src/spy/install_spy.sh: Make the script idempotent
  1378. The symbolic links are repared if needed. They were broken after
  1379. the sequence: $ spy/install_spy.sh $ make install
  1380. * [r6091] src/spy/pcsc-spy.py: Exit in exception if the application
  1381. exited in the middle of SCardGetStatusChange() like it is the
  1382. case for pcsc_scan
  1383. 2011-10-30 Ludovic Rousseau
  1384. * [r6090] src/tokenparser.l: Convert the firt &amp; into & in a
  1385. Allow to use names like Giesecke &amp; Devrient
  1386. * [r6089] src/tokenparser.l: Add ';' in the list of valid caracters
  1387. Allow to use "&amp;" for "&" like in "Giesecke &amp; Devrient"
  1388. See revision 6088
  1389. 2011-10-25 Ludovic Rousseau
  1390. * [r6083] UnitaryTests/ThreadSafe.py: Start loops at 0 instead of 1
  1391. to have the correct count
  1392. * [r6082] src/spy/pcsc-spy.py: Give statistics per thread
  1393. * [r6081] .gitignore: Update for spy/ directory
  1394. * [r6080] src/spy/pcsc-spy.py: Use a 4 spaces indentation for each
  1395. thread
  1396. * [r6079] src/spy/pcsc-spy.py: Display statistics sorted by
  1397. total_time
  1398. 2011-10-24 Ludovic Rousseau
  1399. * [r6078] src/spy/pcsc-spy.py: Parse FEATURE_VERIFY_PIN_DIRECT
  1400. structure
  1401. * [r6077] src/spy/pcsc-spy.py: The byte buffer do not contain the
  1402. ASCII dump any more. So no need to remove it.
  1403. * [r6076] src/spy/pcsc-spy.py: Parse FEATURE_IFD_PIN_PROPERTIES
  1404. * [r6073] src/spy/pcsc-spy.py: Remove debug line
  1405. * [r6072] src/pcscdaemon.c: main(): do not fail if pcscd.comm is
  1406. already present but pcscd.pid is not present.
  1407. This is the case if pcscd has been configured in systemd but has
  1408. been stoped. When launched by hand (for a debug session for
  1409. example) the pcscd.comm file is still present but not used
  1410. anymore.
  1411. The pcscd.comm file will be removed when pcscd manually started
  1412. will exit but the file will be recreated by "systemctl start
  1413. pcscd.service"
  1414. * [r6071] src/pcscd.h.in: Update copyright date
  1415. * [r6070] src/pcscd.h.in: propset svn:keywords "Id"
  1416. * [r6069] src/pcscd.h.in: MAX_BUFFER_SIZE and
  1417. MAX_BUFFER_SIZE_EXTENDED are already defined in
  1418. PCSC/pcsclite.h.in
  1419. 2011-10-22 Ludovic Rousseau
  1420. * [r6063] src/PCSC/pcsclite.h.in: Update MAX_BUFFER_SIZE_EXTENDED
  1421. by adding 2 bytes for the status word
  1422. * [r6062] etc/pcscd.service.in: Remove WantedBy=multi-user.target
  1423. The purpose of using systemd is to start pcscd on demand. So no
  1424. need to always start it at boot.
  1425. * [r6061] etc/pcscd.service.in: Start pcscd in autoexit mode to: -
  1426. free RAM and CPU ressources - enable the USB selective suspend
  1427. http://ludovicrousseau.blogspot.com/2011/04/libccid-and-usb-selective-suspend.html
  1428. * [r6060] etc/pcscd.service.in: Remove now useless
  1429. After=syslog.target line for recent systemd
  1430. 2011-10-21 Ludovic Rousseau
  1431. * [r6059] src/spy/pcsc-spy.py: support -n | --nocolor command line
  1432. argument to remove colorization
  1433. * [r6058] src/spy/pcsc-spy.py: Remove debug line
  1434. * [r6057] src/simclist.c, src/simclist.h: Upgrade from simclist 1.5
  1435. to 1.6
  1436. 2011-10-20 Ludovic Rousseau
  1437. * [r6056] src/winscard_clnt.c: Remove DO_CHECK_SAME_PROCESS code
  1438. since we now use pthread_atfork() since revision 6055
  1439. * [r6055] src/winscard_clnt.c: SCardEstablishContext(): Invalidate
  1440. all the handles in the son after a fork
  1441. The Unitary Test UnitaryTests/SCard_fork.py now works
  1442. We now use pthread_atfork() instead of the DO_CHECK_SAME_PROCESS
  1443. hack (disabled by default)
  1444. * [r6054] src/spy/pcsc-spy.py: log_out_n_str(): add special case
  1445. for a null string length
  1446. * [r6053] src/spy/README.txt: Documentation file
  1447. * [r6052] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Add support of
  1448. SCardCancel() and multi-threaded applications
  1449. The pcsc-spy.py client is now a demultiplexer with one thread and
  1450. data queue per applicatin thread. Each log line contains the
  1451. application threadID.
  1452. * [r6051] src/spy/install_spy.sh, src/spy/uninstall_spy.sh: Use set
  1453. -e to exit on first error
  1454. * [r6050] src/spy/install_spy.sh: Fail if libpcsclite_nospy.so.1
  1455. already exists
  1456. 2011-10-15 Ludovic Rousseau
  1457. * [r6045] src/pcscdaemon.c: main(): do not fork+exit if we are in
  1458. autoexit mode and also in foreground mode
  1459. * [r6044] src/pcscdaemon.c: signal_trap(): if we exit after a
  1460. SIGALRM then exit with EXIT_SUCCESS
  1461. systemd should be happier with a process exiting normally
  1462. * [r6043] src/winscard_msg_srv.c: InitializeSocket(): use a union
  1463. for sockaddr structsas suggested by systemd sample code at
  1464. http://0pointer.de/blog/projects/socket-activation.html
  1465. * [r6042] src/spy/pcsc-spy.c: Use a global symbol for the library
  1466. handle
  1467. Make coverity more happy leaked_storage: Variable "handle" going
  1468. out of scope leaks the storage it points to. noescape: Variable
  1469. "handle" is not freed or pointed-to in function "dlsym".
  1470. 2011-10-11 Ludovic Rousseau
  1471. * [r6029] src/pcscdaemon.c: main(): do not fork+exit if started in
  1472. --auto-exit mode by systemd
  1473. systemd should restart the daemon again if needed
  1474. * [r6028] src/debuglog.c: log_line(): flush stdout after each line
  1475. so that debug messages are immediately available for systemd
  1476. * [r6027] src/pcscdaemon.c: main(): store the pid _after_ any fork
  1477. Revision 6019 moved the AutoExit fork+exit later in the code. We
  1478. now must move the pcscd.pid file creation after the fork+exit.
  1479. * [r6026] src/pcscdaemon.c: main(): log a message when pcscd is
  1480. started by systemd
  1481. 2011-10-07 Ludovic Rousseau
  1482. * [r6019] src/pcscdaemon.c: main(): move AutoExit fork+exit later
  1483. in the code
  1484. We should be able to return with an error code if something went
  1485. wrong in the pcscd initialization so that the client get the
  1486. error code and do not wait for 5 seconds.
  1487. See Red Hat Bug 653903 - elinks takes 10 seconds to start
  1488. * [r6018] src/winscard_clnt.c: SCardEstablishContext(): check the
  1489. return value of pcscd
  1490. In auto-start mode the client check the value returned by pcscd.
  1491. If pcscd failed to start then we just return SCARD_E_NO_SERVICE
  1492. without waiting for 5 seconds.
  1493. See Red Hat Bug 653903 - elinks takes 10 seconds to start
  1494. * [r6017] src/pcscdaemon.c: print_usage(): reformat output
  1495. * [r6016] src/winscard_clnt.c: SCardEstablishContext(): If the
  1496. daemon is not present then just fail without waiting.
  1497. See Red Hat Bug 653903 - elinks takes 10 seconds to start
  1498. https://bugzilla.redhat.com/show_bug.cgi?id=653903
  1499. * [r6015] src/spy/pcsc-spy.py: log_buffer(): display NULL if the
  1500. buffer is a NULL pointer
  1501. This is used to differentiate a NULL buffer from an empty buffer.
  1502. * [r6014] src/spy/pcsc-spy.py: log_buffer(): use upper case for
  1503. hexadecimal dump
  1504. * [r6013] src/spy/pcsc-spy.py: log_buffer(): use '.' also for
  1505. values >= 127
  1506. * [r6012] src/spy/pcsc-spy.py: log_buffer(): check for an empty
  1507. buffer
  1508. * [r6011] src/spy/pcsc-spy.py: If the field to log starts with a
  1509. "0x" we also log the decimal value
  1510. * [r6010] src/spy/pcsc-spy.c: spy_buffer(): use spy_line_direct()
  1511. to log a line without formatting and size limit
  1512. * [r6009] src/spy/pcsc-spy.c: spy_line(): Emergency exit if the
  1513. buffer is too small
  1514. The line is limited to 256 characters. Dumping a buffer of more
  1515. than 256/3 = 85 bytes wil overflow the line buffer.
  1516. * [r6008] src/spy/install_spy.sh, src/spy/pcsc-spy.c,
  1517. src/spy/uninstall_spy.sh: Allow to replace the real library by
  1518. the spy one
  1519. This is isefull for interpreted languages like Python and Perl
  1520. with the PC/SC wrapper.
  1521. The scripts install_spy.sh and uninstall_spy.sh do the files
  1522. changes in /usr/lib
  1523. * [r6007] src/spy/pcsc-spy.py: Remove trailing space
  1524. * [r6006] src/spy/pcsc-spy.py: Use a text instead of numerical
  1525. constant to specify the direction
  1526. * [r6005] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Dump bytes
  1527. buffer in a formatted ASCII + Hex dump
  1528. 2011-10-05 Ludovic Rousseau
  1529. * [r6003] doc/example/pcsc_demo.c: Move from GNU GPL v2+ to v3+
  1530. * [r6002] UnitaryTests/MCT_ReaderDirect.py,
  1531. UnitaryTests/SCardBeginTransaction_Disconnect.py,
  1532. UnitaryTests/SCardBeginTransaction_ExclusiceMode.py,
  1533. UnitaryTests/SCardCancel.py, UnitaryTests/SCardCancel2.py,
  1534. UnitaryTests/SCardConnect_DIRECT.py,
  1535. UnitaryTests/SCardConnect_DIRECT2.py,
  1536. UnitaryTests/SCardGetAttrib.py,
  1537. UnitaryTests/SCardGetStatusChange.py,
  1538. UnitaryTests/SCardGetStatusChange2.py,
  1539. UnitaryTests/SCardReconnect.py, UnitaryTests/SCardStatus.py,
  1540. UnitaryTests/SCard_fork.py, UnitaryTests/ThreadSafe.py,
  1541. UnitaryTests/ThreadSafeConnect.py,
  1542. UnitaryTests/control_get_firmware.py,
  1543. UnitaryTests/control_switch_interface.py,
  1544. UnitaryTests/getAttrib.py, UnitaryTests/reset_card.py,
  1545. UnitaryTests/stress_apdu.py, UnitaryTests/stress_get_firmware.py,
  1546. UnitaryTests/transmit_loop.py: Move from GPL v2+ to GPL v3+
  1547. * [r6001] UnitaryTests/FEATURE_CCID_ESC_COMMAND.py: Unitary test
  1548. for FEATURE_CCID_ESC_COMMAND
  1549. 2011-10-04 Ludovic Rousseau
  1550. * [r5999] src/spy/Makefile.am: The winscard.h is in the srcdir not
  1551. builddir
  1552. Fix compiler warning (when using make distcheck):
  1553. ../../../src/spy/pcsc-spy.c:32:22: fatal error: winscard.h: No
  1554. such file or directory
  1555. * [r5997] src/spy/pcsc-spy.py: Use the command line argument (if
  1556. any) as the log file
  1557. If a command argument is passed we use it instead of the default
  1558. ~/pcsc-spy FIFO file. It is then possible to record an execution
  1559. log and use pcsc-spy.py multiple times on the same log.
  1560. To create the log file just do: $ mkfifo ~/pcsc-spy $ cat
  1561. ~/pcsc-spy > logfile and run your PC/SC application
  1562. * [r5996] src/spy/pcsc-spy.py: Make pep8 happy
  1563. * [r5995] src/spy/pcsc-spy.py: Parse FEATURE_GET_TLV_PROPERTIES
  1564. results
  1565. * [r5994] src/spy/pcsc-spy.py: Parse tge
  1566. CM_IOCTL_GET_FEATURE_REQUEST results
  1567. The parsing will also learn the values associate to tags for
  1568. future calls.
  1569. * [r5993] src/hotplug_linux.c: Use %zd instead of %ld for a size_t
  1570. integer
  1571. Fix a warning when compiling on a 32-bits system:
  1572. hotplug_linux.c: In function 'HPReadBundleValues':
  1573. hotplug_linux.c:188: warning: format '%ld' expects type 'long
  1574. int', but argument 6 has type 'unsigned int'
  1575. 2011-10-02 Ludovic Rousseau
  1576. * [r5992] src/readerfactory.c: Use %zd instead of %ld for a size_t
  1577. integer
  1578. Fix 2 compiler warnings: readerfactory.c: In function
  1579. `RFAddReader': readerfactory.c:124:3: warning: format `%ld'
  1580. expects argument of type `long int', but argument 6 has type
  1581. `size_t' [-Wformat] readerfactory.c:124:3: warning: format `%ld'
  1582. expects argument of type `long int', but argument 7 has type
  1583. `unsigned int' [-Wformat]
  1584. 2011-09-29 Ludovic Rousseau
  1585. * [r5988] src/spy/pcsc-spy.py: Log SCardControl() dwControlCode in
  1586. a human form
  1587. * [r5987] src/spy/pcsc-spy.py: Remove duplicate 0x00090303 key
  1588. * [r5986] src/spy/pcsc-spy.py: Fix some pylint warnings
  1589. * [r5985] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Convert return
  1590. value from hexa to text
  1591. SCARD_E_NOT_TRANSACTED is more human friendly than 0x80100016
  1592. * [r5984] src/spy/pcsc-spy.py: log_in2() & log_out2(): return the
  1593. data line read by the method
  1594. This will allow to do some data processing on the debug data in
  1595. the caller method.
  1596. 2011-09-27 Ludovic Rousseau
  1597. * [r5983] src/spy/pcsc-spy.c: Fix compiler warning
  1598. pcsc-spy.c: In function 'SCardGetAttrib': pcsc-spy.c:635:6:
  1599. warning: pointer targets in assignment differ in signedness
  1600. [-Wpointer-sign]
  1601. * [r5982] src/spy/pcsc-spy.c: Display the ASCII equivalent of a
  1602. "binary" buffer
  1603. * [r5981] src/spy/pcsc-spy.c: SCardGetAttrib(): manage
  1604. SCARD_AUTOALLOCATE case
  1605. * [r5980] src/spy/pcsc-spy.py: Display dwCurrentState &
  1606. dwEventState parameter in human form
  1607. * [r5979] src/spy/pcsc-spy.py: log_out_dwActiveProtocol():
  1608. correctly display UNKNOWN protocol
  1609. * [r5978] src/spy/pcsc-spy.py: Display dwActiveProtocol parameter
  1610. in human form
  1611. * [r5977] src/spy/pcsc-spy.py: Display dwPreferredProtocols
  1612. parameter in human form
  1613. * [r5976] src/spy/pcsc-spy.py: Fix 2 pep8 issues
  1614. * [r5975] src/spy/pcsc-spy.py: Display dwShareMode parameter in
  1615. human form
  1616. * [r5974] src/spy/pcsc-spy.py: Display dwAttrId parameter in human
  1617. form
  1618. * [r5973] src/spy/pcsc-spy.py: Display dwDisposition parameter in
  1619. human form
  1620. * [r5972] src/spy/pcsc-spy.c, src/spy/pcsc-spy.py: Add support of
  1621. SCardBeginTransaction() and SCardEndTransaction()
  1622. * [r5971] src/spy/pcsc-spy.py: Add a missing space for a correct
  1623. formatting
  1624. * [r5970] src/spy/pcsc-spy.c: spy_quit(): rv is a LONG not int
  1625. The problem occurs on 64-bits systems with sign extension from
  1626. 0x80100016 to 0xFFFFFFFF80100016
  1627. * [r5969] src/spy/pcsc-spy.c: Add support of pcsc_stringify_error()
  1628. * [r5968] src/spy/pcsc-spy.c: load_lib(): handle dlsym() errors
  1629. log an error and return SCARD_F_INTERNAL_ERROR if dlopen() or
  1630. dlsym() fails.
  1631. * [r5967] src/spy/pcsc-spy.c: load_lib(): do not call dlclose()
  1632. Stupuid bug. We still need to access the symbols after the
  1633. library is loaded. dlclose() should be closed only when the
  1634. library is not used anymore (i.e. we don't know when).
  1635. 2011-09-24 Ludovic Rousseau
  1636. * [r5965] doc/doxygen.conf.in: Update for Doxygen 1.7.4
  1637. * [r5964] src/error.c, src/winscard_clnt.c: Doxygen: fixes and
  1638. English improvement
  1639. * [r5963] src/winscard_clnt.c: Doxygen: remove a note about
  1640. SCardControl() API change
  1641. Between pcsc-lite 1.2.0 (Oct 2003) and 1.2.9-beta1 (May 2004) the
  1642. API changed and the new parameter dwControlCode was added.
  1643. * [r5962] src/PCSC/winscard.h, src/atrhandler.c, src/atrhandler.h,
  1644. src/winscard.c, src/winscard_clnt.c: fix typo: smartcard -> smart
  1645. card
  1646. * [r5961] src/error.c: Doxygen: fix a bug in the doc
  1647. 2011-09-13 Ludovic Rousseau
  1648. * [r5955] configure.in: Generate src/spy/Makefile
  1649. * [r5954] src/Makefile.am, src/pcsc-spy.c, src/pcsc-spy.py,
  1650. src/spy, src/spy/Makefile.am, src/spy/pcsc-spy.c,
  1651. src/spy/pcsc-spy.py: Move spy tools into the spy/ directory
  1652. * [r5953] src/pcsc-spy.py: Remove debug line
  1653. * [r5951] src/pcsc-spy.c, src/pcsc-spy.py: Add Timing information
  1654. 2011-09-09 Ludovic Rousseau
  1655. * [r5949] src/pcsc-spy.c: Fix compiler warning
  1656. pcsc-spy.c:243:28: warning: comparison between signed and
  1657. unsigned integer expressions [-Wsign-compare]
  1658. * [r5948] src/pcsc-spy.c, src/pcsc-spy.py: Fix issues caused by
  1659. changes of spy_buffer() in the previous commit
  1660. * [r5947] src/pcsc-spy.c, src/pcsc-spy.py: Log
  1661. SCardGetStatusChange() reader array
  1662. * [r5946] src/pcsc-spy.py: Use a PCSCspy class
  1663. * [r5945] src/pcsc-spy.py: Make pylint happier
  1664. * [r5944] src/pcsc-spy.py: Make pep8 happy
  1665. 2011-09-06 Ludovic Rousseau
  1666. * [r5943] src/pcsc-spy.c, src/pcsc-spy.py: Add support of multi
  1667. entries text output
  1668. This is used for SCardListReaders() and SCardListReaderGroups()
  1669. * [r5942] src/pcsc-spy.c: load_lib(): Do not use an absolut
  1670. pathname
  1671. Use "libpcsclite.so.1" instead of "/usr/lib/libpcsclite.so.1" to
  1672. let the dynamic linker ld.so search for the lib.
  1673. * [r5941] src/pcsc-spy.c, src/pcsc-spy.py: Set $Id$ keyword
  1674. 2011-09-04 Ludovic Rousseau
  1675. * [r5940] configure.in: check for mq_getattr() in -lrt
  1676. In old versions of libudev the -lrt link flags is not added. This
  1677. library is required for mq_getattr() used by sd-daemon.c
  1678. On Ubuntu 10.04: $ pkg-config --libs libudev -ludev $ dpkg -l
  1679. libudev-dev ii libudev-dev 151-12.3 udev library (development
  1680. files)
  1681. On Debian wheery: $ pkg-config --libs libudev -ludev -lrt $ dpkg
  1682. -l libudev-dev ii libudev-dev 172-1 libudev development files
  1683. * [r5939] UnitaryTests/getAttrib.py: Add
  1684. SCARD_ATTR_VENDOR_IFD_VERSION and SCARD_ATTR_VENDOR_IFD_SERIAL_NO
  1685. 2011-09-03 Ludovic Rousseau
  1686. * [r5938] src/hotplug_libusb.c, src/pcscdaemon.c,
  1687. src/winscard_clnt.c: Remove extra spaces characters
  1688. * [r5937] src/pcscdaemon.c: print_usage(): fix typo in argument
  1689. documentation
  1690. The correct option is --auto-exit
  1691. * [r5936] .gitignore: Add new files to .gitignore
  1692. * [r5935] etc/pcscd.service.in: Use long arguments to pcscd command
  1693. --foreground and --hotplug are easier to understand than -f and
  1694. -H
  1695. * [r5934] configure.in: Add --with-systemdsystemunitdir=DIR comment
  1696. * [r5933] Makefile.am, configure.in, etc, etc/Makefile.am,
  1697. etc/pcscd.service.in, etc/pcscd.socket.in: Install systemd
  1698. service files
  1699. Thanks to Kalev Lember for the patch
  1700. http://archives.neohapsis.com/archives/dev/muscle/2011-q2/0139.html
  1701. * [r5932] src/winscard_clnt.c: Fix compiler warning when autostart
  1702. is not used
  1703. winscard_clnt.c: In function `SCardEstablishContext':
  1704. winscard_clnt.c:455:1: warning: label `again' defined but not
  1705. used [-Wunused-label]
  1706. * [r5931] configure.in, src/winscard_clnt.c: Add
  1707. --disable-autostart option
  1708. This option disables pcscd autostarting code in the libpcsclite
  1709. library.
  1710. With systemd socket activation in place, pcscd can be started
  1711. automatically by systemd when a request arrives on the IPC
  1712. socket. That makes starting the service as a fork from user
  1713. library unnecessary.
  1714. Thanks to Kalev Lember for the patch
  1715. http://archives.neohapsis.com/archives/dev/muscle/2011-q2/0137.html
  1716. * [r5930] src/Makefile.am: Use curl -O instead of a redirection
  1717. This avoids a name duplication (less error-prone)
  1718. * [r5929] src/Makefile.am, src/pcscdaemon.c, src/sd-daemon.c,
  1719. src/sd-daemon.h, src/winscard_msg.h, src/winscard_msg_srv.c:
  1720. Support systemd socket activation
  1721. Add systemd socket-based activation support to pcscd as an
  1722. alternative to the existing autostart code which used forking
  1723. from the user space library. Systemd socket activation makes it
  1724. possible to start pcscd on demand by systemd when a request is
  1725. sent on the IPC socket.
  1726. The implementation uses the $LISTEN_FDS/$LISTEN_PID env var
  1727. parsing code from systemd's sd-daemon.[ch] copy library.
  1728. Thanks to Kalev Lember for the patch
  1729. http://archives.neohapsis.com/archives/dev/muscle/2011-q2/0140.html
  1730. * [r5928] UnitaryTests/getAttrib.py: Unitary test for
  1731. SCardGetAttrib()
  1732. 2011-09-02 Ludovic Rousseau
  1733. * [r5927] .gitignore: Create .gitignore files
  1734. 2011-08-28 Ludovic Rousseau
  1735. * [r5919] src/debuglog.c: DebugLogSetLogType(): xterm-256color is
  1736. also a color terminal
  1737. xterm-256color is used by the Terminal application on Mac OS X
  1738. (Lion)
  1739. 2011-08-25 Ludovic Rousseau
  1740. * [r5910] src/Makefile.am, src/pcsc-spy.c, src/pcsc-spy.py: PC/SC
  1741. function spy layer
  1742. 2011-08-21 Ludovic Rousseau
  1743. * [r5901] src/debuglog.c: log_xxd_always(): Use a variable-length
  1744. array
  1745. The debug message buffer is no more with a fixed size (around 600
  1746. bytes of buffer to log) but uses a variable-length array.
  1747. It is now possible to log extended APDU of 64kB.
  1748. The variable-length array feature is available in GCC in C90 mode
  1749. and is mandatory in C99 standard.
  1750. * [r5900] src/readerfactory.c, src/readerfactory.h:
  1751. RFSetReaderName(): remove useless parameter slot
  1752. RFSetReaderName() is only called in one place with slot set to 0.
  1753. This parameter is then useless and can be removed.
  1754. * [r5899] src/debuglog.c: Use sizeof instead of a hard coded value
  1755. * [r5898] src/debug.c: Remove log_xxd() implementation
  1756. debug.c is use to log from the client side (libpcsclite).
  1757. log_xxd() is not used in the client library so is just dead code.
  1758. * [r5896] src/debuglog.c: log_line(): correctly calculate delta
  1759. time when no color is used
  1760. The update of last_time was only done in case of colorization
  1761. (LogDoColor). So on unsupported consoles the time was wrong.
  1762. 2011-08-09 Ludovic Rousseau
  1763. * [r5887] src/hotplug_libudev.c: HPReadBundleValues(): use strtol()
  1764. instead of the unsafe sscanf()
  1765. * [r5886] src/hotplug_linux.c: HPEstablishUSBNotifications(): use
  1766. atoi() instead of the unsafe sscanf()
  1767. * [r5885] src/testpcsc.c: Use atoi() instead of the unsafe sscanf()
  1768. 2011-08-08 Ludovic Rousseau
  1769. * [r5882] UnitaryTests/SCardGetStatusChange2.py: Check the return
  1770. value of SCardGetStatusChange() for unknown readers
  1771. * [r5881] src/winscard_clnt.c: SCardGetStatusChange(): check all
  1772. the readers are already known and return SCARD_E_UNKNOWN_READER
  1773. if a reader name is not present.
  1774. Windows XP has this behavior.
  1775. 2011-07-19 Ludovic Rousseau
  1776. * [r5875] src/hotplug_linux.c: Use safer snprintf() instead of
  1777. sprintf()
  1778. coverity: Event secure_coding: [VERY RISKY]. Using "sprintf" can
  1779. cause a buffer overflow when done incorrectly. Because sprintf()
  1780. assumes an arbitrarily long string, callers must be careful not
  1781. to overflow the actual space of the destination. Use snprintf()
  1782. instead, or correct precision specifiers.
  1783. * [r5874] src/hotplug_linux.c: Fix compiler warning
  1784. hotplug_linux.c: In function 'HPReadBundleValues':
  1785. hotplug_linux.c:188: warning: format '%d' expects type 'int', but
  1786. argument 6 has type 'long unsigned int'
  1787. 2011-07-18 Ludovic Rousseau
  1788. * [r5873] UnitaryTests/SCardGetStatusChange.py: Unitary test for
  1789. SCardGetStatusChange()
  1790. 2011-07-09 Ludovic Rousseau
  1791. * [r5869] src/PCSC/wintypes.h: Define PUCHAR using UCHAR instead of
  1792. "unsigned char". Same for PDWORD and PULONG.
  1793. We now have less lines to change to redefine types.
  1794. * [r5868] src/hotplug_macosx.c: Fix compiler warnings
  1795. hotplug_macosx.c: In function 'HPDriversGetFromDirectory':
  1796. hotplug_macosx.c:245: warning: format '%d' expects type 'int',
  1797. but argument 7 has type 'CFIndex' hotplug_macosx.c:253: warning:
  1798. format '%d' expects type 'int', but argument 7 has type 'CFIndex'
  1799. * [r5867] src/winscard_msg.c, src/winscard_msg.h:
  1800. MessageReceiveTimeout(): change timeOut parameter type to fix a
  1801. compiler warning
  1802. winscard_msg.c: In function `MessageReceiveTimeout':
  1803. winscard_msg.c:186:13: warning: comparison between signed and
  1804. unsigned integer expressions [-Wsign-compare]
  1805. * [r5866] src/tokenparser.l: Silence compiler warnings
  1806. tokenparser.l: In function `eval_key': tokenparser.l:62:6:
  1807. warning: variable `r' set but not used
  1808. [-Wunused-but-set-variable]
  1809. tokenparser.l: In function `eval_value': tokenparser.l:92:6:
  1810. warning: variable `r' set but not used
  1811. [-Wunused-but-set-variable]
  1812. tokenparser.l: In function `bundleParse': tokenparser.l:162:6:
  1813. warning: variable `r' set but not used
  1814. [-Wunused-but-set-variable]
  1815. * [r5865] src/tokenparser.l: bundleParse(): fix a compilation error
  1816. if NDEBUG is not definef (i.e. DEBUG is ON)
  1817. * [r5864] src/winscard_svc.c: Fix compiler warnings
  1818. winscard_svc.c: In function `contextsListhContext_seeker':
  1819. winscard_svc.c:86:3: warning: format `%X' expects argument of
  1820. type `unsigned int', but argument 6 has type `const void *'
  1821. [-Wformat] winscard_svc.c:86:3: warning: format `%X' expects
  1822. argument of type `unsigned int', but argument 7 has type `const
  1823. void *' [-Wformat]
  1824. winscard_svc.c: In function `ContextThread':
  1825. winscard_svc.c:296:2: warning: format `%X' expects argument of
  1826. type `unsigned int', but argument 7 has type `struct SCONTEXT *'
  1827. [-Wformat]
  1828. winscard_svc.c: In function `MSGAddHandle': winscard_svc.c:836:4:
  1829. warning: format `%X' expects argument of type `unsigned int', but
  1830. argument 6 has type `struct SCONTEXT *' [-Wformat]
  1831. winscard_svc.c: In function `MSGCleanupClient':
  1832. winscard_svc.c:916:2: warning: format `%X' expects argument of
  1833. type `unsigned int', but argument 7 has type `struct SCONTEXT *'
  1834. [-Wformat] winscard_svc.c:924:2: warning: format `%X' expects
  1835. argument of type `unsigned int', but argument 6 has type `struct
  1836. SCONTEXT *' [-Wformat]
  1837. * [r5863] src/winscard.c: Fix compiler warnings
  1838. winscard.c: In function `SCardEstablishContext':
  1839. winscard.c:193:2: warning: format `%X' expects argument of type
  1840. `unsigned int', but argument 6 has type `SCARDCONTEXT' [-Wformat]
  1841. winscard.c: In function `SCardReleaseContext': winscard.c:204:2:
  1842. warning: format `%X' expects argument of type `unsigned int', but
  1843. argument 6 has type `SCARDCONTEXT' [-Wformat]
  1844. winscard.c: In function `SCardConnect': winscard.c:234:2:
  1845. warning: format `%d' expects argument of type `int', but argument
  1846. 7 has type `DWORD' [-Wformat] winscard.c:315:5: warning: format
  1847. `%d' expects argument of type `int', but argument 6 has type
  1848. `LONG' [-Wformat] winscard.c:315:5: warning: format `%X' expects
  1849. argument of type `unsigned int', but argument 7 has type `LONG'
  1850. [-Wformat] winscard.c:410:5: warning: format `%d' expects
  1851. argument of type `int', but argument 6 has type `DWORD'
  1852. [-Wformat] winscard.c:422:2: warning: format `%x' expects
  1853. argument of type `unsigned int', but argument 6 has type
  1854. `SCARDHANDLE' [-Wformat]
  1855. winscard.c: In function `SCardReconnect': winscard.c:693:5:
  1856. warning: format `%d' expects argument of type `int', but argument
  1857. 6 has type `DWORD' [-Wformat]
  1858. winscard.c: In function `SCardDisconnect': winscard.c:821:2:
  1859. warning: format `%d' expects argument of type `int', but argument
  1860. 6 has type `DWORD' [-Wformat]
  1861. winscard.c: In function `SCardBeginTransaction':
  1862. winscard.c:1051:2: warning: format `%X' expects argument of type
  1863. `unsigned int', but argument 6 has type `LONG' [-Wformat]
  1864. winscard.c: In function `SCardEndTransaction': winscard.c:1188:2:
  1865. warning: format `%X' expects argument of type `unsigned int', but
  1866. argument 6 has type `LONG' [-Wformat]
  1867. winscard.c: In function `SCardTransmit': winscard.c:1539:2:
  1868. warning: format `%d' expects argument of type `int', but argument
  1869. 6 has type `DWORD' [-Wformat]
  1870. * [r5862] src/readerfactory.c: Fix compiler warnings
  1871. readerfactory.c: In function `RFInitializeReader':
  1872. readerfactory.c:941:3: warning: format `%X' expects argument of
  1873. type `unsigned int', but argument 6 has type `LONG' [-Wformat]
  1874. readerfactory.c:950:3: warning: format `%X' expects argument of
  1875. type `unsigned int', but argument 6 has type `LONG' [-Wformat]
  1876. readerfactory.c: In function `RFRemoveReaderHandle':
  1877. readerfactory.c:1135:3: warning: format `%X' expects argument of
  1878. type `unsigned int', but argument 6 has type `SCARDHANDLE'
  1879. [-Wformat] readerfactory.c: In function
  1880. `RFCheckReaderEventState': readerfactory.c:1198:3: warning:
  1881. format `%X' expects argument of type `unsigned int', but argument
  1882. 6 has type `SCARDHANDLE' [-Wformat] readerfactory.c: In function
  1883. `RFCleanupReaders': readerfactory.c:1274:5: warning: format `%X'
  1884. expects argument of type `unsigned int', but argument 6 has type
  1885. `LONG' [-Wformat]
  1886. * [r5861] src/prothandler.c: Fix compiler warning
  1887. prothandler.c: In function `PHSetProtocol': prothandler.c:102:5:
  1888. warning: format `%d' expects argument of type `int', but argument
  1889. 6 has type `LONG' [-Wformat]
  1890. * [r5860] src/ifdwrapper.c: Fix compiler warning
  1891. ifdwrapper.c: In function `IFDControl': ifdwrapper.c:455:3:
  1892. warning: format `%LX' expects argument of type `long long
  1893. unsigned int', but argument 6 has type `DWORD' [-Wformat]
  1894. * [r5859] src/eventhandler.c: Fix compiler warning
  1895. eventhandler.c: In function `EHStatusHandlerThread':
  1896. eventhandler.c:272:4: warning: format `%d' expects argument of
  1897. type `int', but argument 6 has type `LONG' [-Wformat]
  1898. eventhandler.c:272:4: warning: format `%X' expects argument of
  1899. type `unsigned int', but argument 7 has type `LONG' [-Wformat]
  1900. * [r5858] src/winscard_clnt.c: Fix compiler warnings
  1901. winscard_clnt.c: In function 'CHANNEL_MAP_seeker':
  1902. winscard_clnt.c:282: warning: format '%X' expects type 'unsigned
  1903. int', but argument 6 has type 'const void *' winscard_clnt.c:282:
  1904. warning: format '%X' expects type 'unsigned int', but argument 7
  1905. has type 'const void *' winscard_clnt.c: In function
  1906. 'SCONTEXTMAP_seeker': winscard_clnt.c:317: warning: format '%X'
  1907. expects type 'unsigned int', but argument 6 has type 'const void
  1908. *' winscard_clnt.c:317: warning: format '%X' expects type
  1909. 'unsigned int', but argument 7 has type 'const void *'
  1910. winscard_clnt.c: In function 'SCardAddContext':
  1911. winscard_clnt.c:3385: warning: format '%X' expects type 'unsigned
  1912. int', but argument 6 has type 'struct SCONTEXTMAP *'
  1913. winscard_clnt.c:3393: warning: format '%X' expects type 'unsigned
  1914. int', but argument 6 has type 'struct SCONTEXTMAP *'
  1915. * [r5857] src/readerfactory.c: Fix compiler warnings
  1916. readerfactory.c: In function 'RDR_CLIHANDLES_seeker':
  1917. readerfactory.c:68: warning: format '%X' expects type 'unsigned
  1918. int', but argument 6 has type 'const void *' readerfactory.c:68:
  1919. warning: format '%X' expects type 'unsigned int', but argument 7
  1920. has type 'const void *'
  1921. * [r5856] src/readerfactory.c: Fix compiler warnings
  1922. readerfactory.c: In function 'RFAddReader': readerfactory.c:124:
  1923. warning: format '%d' expects type 'int', but argument 6 has type
  1924. 'size_t' readerfactory.c:124: warning: format '%d' expects type
  1925. 'int', but argument 7 has type 'long unsigned int'
  1926. * [r5855] src/readerfactory.c: Fix a bug detected thanks to
  1927. revision 5854 and a compiler warning
  1928. readerfactory.c: In function 'RFSetReaderEventState':
  1929. readerfactory.c:1167: warning: format '%s' expects type 'char *',
  1930. but argument 6 has type 'int'
  1931. * [r5854] src/PCSC/debuglog.h: log_msg(): use
  1932. __attribute__((format(printf, ..))) to check the parameters
  1933. passed corresponds to the format string
  1934. 2011-07-08 Ludovic Rousseau
  1935. * [r5853] src/hotplug_libusb.c: HPRegisterForHotplugEvents(): add a
  1936. log call for info
  1937. * [r5852] src/hotplug_libusb.c: HPRescanUsbBus(): check
  1938. libusb_init() return value
  1939. Thanks to Dwi Sasongko Supriyadi for the patch
  1940. http://archives.neohapsis.com/archives/dev/muscle/2011-q3/0014.html
  1941. 2011-07-06 Ludovic Rousseau
  1942. * [r5850] src/debug.c: log_xxd(): use safer snprintf() instead of
  1943. sprintf()
  1944. Event secure_coding: [VERY RISKY]. Using "sprintf" can cause a
  1945. buffer overflow when done incorrectly. Because sprintf() assumes
  1946. an arbitrarily long string, callers must be careful not to
  1947. overflow the actual space of the destination. Use snprintf()
  1948. instead, or correct precision specifiers.
  1949. * [r5849] src/debuglog.c: log_xxd_always(): use safer snprintf()
  1950. instead of sprintf()
  1951. coverity: Event secure_coding: [VERY RISKY]. Using "sprintf" can
  1952. cause a buffer overflow when done incorrectly. Because sprintf()
  1953. assumes an arbitrarily long string, callers must be careful not
  1954. to overflow the actual space of the destination. Use snprintf()
  1955. instead, or correct precision specifiers.
  1956. * [r5848] src/readerfactory.c: RFAddReader(): use safer snprintf()
  1957. instead of sprintf()
  1958. coverity: Event secure_coding: [VERY RISKY]. Using "sprintf" can
  1959. cause a buffer overflow when done incorrectly. Because sprintf()
  1960. assumes an arbitrarily long string, callers must be careful not
  1961. to overflow the actual space of the destination. Use snprintf()
  1962. instead, or correct precision specifiers.
  1963. * [r5847] src/hotplug_libudev.c: HPReadBundleValues(): fix a memory
  1964. leak
  1965. coverity: Event leaked_storage: Variable "hpDir" going out of
  1966. scope leaks the storage it points to.
  1967. * [r5846] src/hotplug_libudev.c: HPRescanUsbBus(): Move the
  1968. lock/unlock _around_ the loop so that the values are constant
  1969. between check and use.
  1970. coverity: Event use: Using an unreliable value of
  1971. "readerTracker[i].fullName" inside the second locked section. If
  1972. the data that "readerTracker[i].fullName" depends on was changed
  1973. by another thread, this use might be incorrect.
  1974. * [r5845] src/winscard_clnt.c: SCardConnect(): use safer strlcpy()
  1975. instead of strncpy()
  1976. coverity: Event buffer_size_warning: Calling strncpy with a
  1977. maximum size argument of 100 bytes on destination array
  1978. "scConnectStruct.szReader" of size 100 bytes might leave the
  1979. destination string unterminated.
  1980. * [r5844] src/winscard_clnt.c: SCardConnect(): use sizeof instead
  1981. of a hardcoded value
  1982. * [r5843] src/winscard.c: SCardStatus(): remove dead code
  1983. coverity: Event dead_error_condition: On this path, the condition
  1984. "rv != 0L" cannot be true.
  1985. * [r5842] src/winscard_clnt.c: Reformat 4 spaces with 1 tab
  1986. * [r5841] src/hotplug_libudev.c: Fix a memory leak
  1987. coverity: Event leaked_storage: Variable "CFBundleName" going out
  1988. of scope leaks the storage it points to.
  1989. * [r5840] src/hotplug_libudev.c, src/hotplug_libusb.c: Fix a memory
  1990. leak
  1991. coverity: Event leaked_storage: Variable "hpDir" going out of
  1992. scope leaks the storage it points to.
  1993. 2011-07-05 Ludovic Rousseau
  1994. * [r5831] src/testpcsc.c: Fix compiler warnings
  1995. testpcsc.c: In function 'main': testpcsc.c:222: warning:
  1996. assignment discards qualifiers from pointer target type
  1997. testpcsc.c:225: warning: assignment discards qualifiers from
  1998. pointer target type testpcsc.c:228: warning: assignment discards
  1999. qualifiers from pointer target type
  2000. * [r5830] src/testpcsc.c: pioRecvPci really need to be allocated by
  2001. the caller since it is filled by SCardTransmit() as a return
  2002. parameter.
  2003. * [r5826] src/readerfactory.c: Fix a REVERSE_INULL coverity error
  2004. sContext->pFeeds is checked for NULL _after_ being dereferenced
  2005. in RFUnloadReader() called by RFUnInitializeReader(). We now
  2006. check before dereferencing.
  2007. * [r5825] src/testpcsc.c: Initialize pioRecvPci
  2008. Make coverity scan happy
  2009. * [r5824] src/testpcsc.c: Use pointers for pioRecvPci and
  2010. pioSendPci to better match with the variable names
  2011. 2011-07-04 Ludovic Rousseau
  2012. * [r5822] src/pcscdaemon.c: print_usage(): update arguments
  2013. documentation
  2014. * [r5821] src/pcscdaemon.c: main(): do not use atexit() since our
  2015. at_exit() function will be called upon signal receipt from our
  2016. signal_trap() function.
  2017. The problem was that at_exit() was called a second time on the
  2018. process exit and gerenarted error messages: 00000006
  2019. pcscdaemon.c:634:at_exit() cleaning /var/run/pcscd 00001328
  2020. pcscdaemon.c:634:at_exit() cleaning /var/run/pcscd 00000033
  2021. pcscdaemon.c:658:clean_temp_files() Cannot remove
  2022. /var/run/pcscd/pcscd.comm: No such file or directory 00000013
  2023. pcscdaemon.c:663:clean_temp_files() Cannot remove
  2024. /var/run/pcscd/pcscd.pid: No such file or directory
  2025. 2011-07-01 Ludovic Rousseau
  2026. * [r5818] UnitaryTests/SCardReconnect.py: Improve comments
  2027. 2011-06-29 Ludovic Rousseau
  2028. * [r5814] configure.in: Enable silent build by default
  2029. 2011-06-28 Ludovic Rousseau
  2030. * [r5813] src/prothandler.c, src/prothandler.h: Remove now unused
  2031. PHGetDefaultProtocol() and PHGetAvailableProtocols()
  2032. * [r5812] src/winscard.c: SCardConnect(), SCardReconnect(): use
  2033. ATRDecodeAtr() directly instead of PHGetDefaultProtocol() and
  2034. PHGetAvailableProtocols()
  2035. * [r5811] src/atrhandler.c, src/atrhandler.h, src/prothandler.c:
  2036. ATRDecodeAtr(): use only two out parameters availableProtocols
  2037. and currentProtocol instead of struct SMARTCARD_EXTENSION
  2038. Remove some unused code from ATRDecodeAtr().
  2039. 2011-06-23 Ludovic Rousseau
  2040. * [r5809] ChangeLog, configure.in: release 1.7.4
  2041. * [r5808] src/atrhandler.c: ATRDecodeAtr(): revert revision 5804
  2042. T=1 cards were no more recognized. Brown paper bag bug.
  2043. 2011-06-22 Ludovic Rousseau
  2044. * [r5806] ChangeLog, configure.in: release 1.7.3
  2045. * [r5805] src/ifdwrapper.c: IFDSetPTS() and IFDPowerICC(): remove
  2046. useless variable ucValue[]
  2047. ifdwrapper.c: In function `IFDSetPTS': ifdwrapper.c:50:8:
  2048. warning: variable `ucValue' set but not used
  2049. [-Wunused-but-set-variable] ifdwrapper.c: In function
  2050. `IFDPowerICC': ifdwrapper.c:252:8: warning: variable `ucValue'
  2051. set but not used [-Wunused-but-set-variable]
  2052. * [r5804] src/atrhandler.c: ATRDecodeAtr(): only use TBi and TCi in
  2053. ATR_DEBUG mode
  2054. atrhandler.c: In function `ATRDecodeAtr': atrhandler.c:106:19:
  2055. warning: variable `TCi' set but not used
  2056. [-Wunused-but-set-variable] atrhandler.c:106:14: warning:
  2057. variable `TBi' set but not used [-Wunused-but-set-variable]
  2058. * [r5803] src/atrhandler.c: Remove unused variable
  2059. atrhandler.c: In function `ATRDecodeAtr': atrhandler.c:48:11:
  2060. warning: variable `TCK' set but not used
  2061. [-Wunused-but-set-variable]
  2062. * [r5802] doc/example/pcsc_demo.c: SCARD_PCI_T0 and SCARD_PCI_T1
  2063. and now const values
  2064. Fix compiler warnings: pcsc_demo.c: In function `main':
  2065. pcsc_demo.c:161:24: warning: assignment discards `const'
  2066. qualifier from pointer target type [enabled by default]
  2067. pcsc_demo.c:164:24: warning: assignment discards `const'
  2068. qualifier from pointer target type [enabled by default]
  2069. 2011-06-21 Ludovic Rousseau
  2070. * [r5801] src/PCSC/reader.h: Remove the deprecated
  2071. FEATURE_MCT_READERDIRECT
  2072. 2011-06-16 Ludovic Rousseau
  2073. * [r5797] src/winscard_clnt.c: SCardGetStatusChange(): add a cast
  2074. to fix a compiler warning
  2075. winscard_clnt.c:1890: warning: comparison between signed and
  2076. unsigned integer expressions
  2077. * [r5796] src/winscard_msg.c, src/winscard_msg.h:
  2078. MessageReceiveTimeout(): change timeOut type from int32_t to
  2079. unsigned long to avoid overflows with a timeout of 1000000000.
  2080. The bug was that MessageReceiveTimeout() timeouts immediatly when
  2081. it should not. So a _lot_ of exchanges with pcscd occurs.
  2082. Tested on 64-bits CPU only.
  2083. * [r5795] src/winscard_clnt.c: SCardGetStatusChange(): catch
  2084. possible sign extension problems from 32 to 64-bits integers
  2085. Storing INFINITE (0xFFFFFFFF) into an int parameter and then
  2086. passing it to SCardGetStatusChange() will expand the int into a
  2087. DWORD (unsigned long). On 64-bits architecture it will become
  2088. 0xFFFFFFFFFFFFFFFF (-1).
  2089. See OpenSC bug at
  2090. http://www.opensc-project.org/pipermail/opensc-devel/2011-June/016848.html
  2091. 2011-06-15 Ludovic Rousseau
  2092. * [r5793] src/hotplug_libudev.c: HPEstablishUSBNotifications():
  2093. wait for a udev event before calling
  2094. udev_monitor_receive_device()
  2095. Fix Alioth bug [#313165] "libudev-support broken with udev-171:
  2096. udev_monitor_receive_device() error"
  2097. 2011-06-14 Ludovic Rousseau
  2098. * [r5790] src/winscard_clnt.c: API_TRACE_IN: use %ld instead of %d
  2099. for DWORD and LONG types.
  2100. The timeout in SCardGetStatusChange() is now correctly displayed
  2101. 4294967295 instead of -1 on 64-bits systems.
  2102. 2011-06-11 Ludovic Rousseau
  2103. * [r5786] src/hotplug_macosx.c: Remove useless cast for calloc()
  2104. (we are not in C++)
  2105. * [r5780] COPYING: Add my name as copyright holder
  2106. 2011-05-30 Ludovic Rousseau
  2107. * [r5769] src/eventhandler.c: EHStatusHandlerThread(): always sleep
  2108. if the driver card event function returns an error (and not just
  2109. in the case of IFD_NO_SUCH_DEVICE)
  2110. This avoids to loop too fast in case of a problem. This happens
  2111. after activating a smart card reader in vmware workstation for
  2112. example.
  2113. See
  2114. https://bugs.launchpad.net/ubuntu/+source/pcsc-lite/+bug/787451
  2115. "pcscd spams to syslog and kern.log after enabling smartcard
  2116. reader in VMWare Workstation"
  2117. 2011-05-25 Ludovic Rousseau
  2118. * [r5766] src/winscard.c: SCardConnect(): log at level
  2119. PCSC_LOG_DEBUG instead of PCSC_LOG_ERROR if no card is inserted
  2120. Thanks to Kalev Lember for the patch
  2121. https://bugzilla.redhat.com/show_bug.cgi?id=707412#c2
  2122. 2011-05-22 Ludovic Rousseau
  2123. * [r5765] src/winscard_svc.c: WRITE_BODY_WITH_COMMAND(): always log
  2124. with level PCSC_LOG_DEBUG even in case of error to avoid filling
  2125. the system log file.
  2126. Thanks to Kalev Lember for the patch. See
  2127. https://bugzilla.redhat.com/show_bug.cgi?id=657658
  2128. 2011-05-18 Ludovic Rousseau
  2129. * [r5764] src/pcscdaemon.c: print_usage(): document -x,
  2130. --auto-exits
  2131. * [r5763] configure.in: Use AC_LANG_SOURCE as requested by autoconf
  2132. 2.68
  2133. 2011-05-17 Ludovic Rousseau
  2134. * [r5759] doc/doxygen.conf.in: Do not generate call and include
  2135. graphs
  2136. 2011-05-12 Ludovic Rousseau
  2137. * [r5736] src/PCSC/pcsclite.h.in, src/winscard_clnt.c: Define
  2138. g_rgSCardT?Pci as const structures to be more Windows like
  2139. I do not expect a regression or compilation problem in WinSCard
  2140. API users but how knows...
  2141. * [r5735] configure.in: No need to define host_to_ccid_16 and
  2142. host_to_ccid_32 any more since they were removed in revision 5255
  2143. from src/PCSC/reader.h
  2144. * [r5734] configure.in: Do not check for libusb or libudev is USB
  2145. support is disabled.
  2146. See Debian bug #626201: pcsc-lite: FTBFS on hurd-i386
  2147. 2011-05-11 Ludovic Rousseau
  2148. * [r5732] src/winscard_svc.c: ContextThread(): in
  2149. CMD_GET_READERS_STATE call RFWaitForReaderInit only if USE_USB is
  2150. defined.
  2151. Fix a link failure if --disable-usb is used.
  2152. See Debian bug #626201: pcsc-lite: FTBFS on hurd-i386
  2153. 2011-05-05 Ludovic Rousseau
  2154. * [r5714] src/PCSC/debuglog.h, src/PCSC/ifdhandler.h,
  2155. src/PCSC/pcsclite.h.in, src/PCSC/wintypes.h: Update copyright
  2156. date
  2157. * [r5713] src/PCSC/debuglog.h, src/debuglog.c, src/pcscdaemon.c:
  2158. Add command line option -T, --color: force use of colored logs
  2159. The idea is to have colored logs even if they are redirected to a
  2160. file or a pipe.
  2161. * [r5712] src/debuglog.c: log_line(): display the delta time
  2162. between two log lines even if stdout is not a tty (redirected to
  2163. a file)
  2164. The information may be usefull to detect problems from a log file
  2165. with this time information.
  2166. * [r5711] src/atrhandler.c, src/debuglog.c, src/eventhandler.c,
  2167. src/hotplug_generic.c, src/hotplug_libusb.c, src/hotplug_linux.c,
  2168. src/hotplug_macosx.c, src/ifdwrapper.c, src/pcscdaemon.c,
  2169. src/prothandler.c, src/readerfactory.c, src/readerfactory.h,
  2170. src/utils.c, src/winscard.c, src/winscard_clnt.c,
  2171. src/winscard_svc.c: Update copyright date
  2172. * [r5710] src/PCSC/debuglog.h, src/debuglog.c, src/pcscdaemon.c:
  2173. Send logs to stdout instead of stderr
  2174. It is now possible to use tee(1) to redirect logs in a file
  2175. without first redirecting stderr to stdout
  2176. * [r5709] src/pcscdaemon.c: at_exit(): use exit() instead of
  2177. _exit() to properly close stderr and stdout and other libC
  2178. cleanup
  2179. 2011-05-04 Ludovic Rousseau
  2180. * [r5708] src/PCSC/debuglog.h, src/debuglog.c: Remove support of
  2181. DebugLogSuppress()
  2182. This function is not used anywhere in pcsc-lite.
  2183. 2011-05-03 Ludovic Rousseau
  2184. * [r5707] src/hotplug_libusb.c: HPRescanUsbBus(): fix a memory leak
  2185. Call libusb_free_config_descriptor() to free the memory allocated
  2186. by libusb_get_active_config_descriptor()
  2187. Thanks to Roland Troka for the patch Closes Alioth bug: [313036]
  2188. alto uso della ram da pcscd versione 1.6.7 e 1.7.0
  2189. 2011-04-22 Ludovic Rousseau
  2190. * [r5705] TODO: Fix: "start pcscd only when a reader is connected"
  2191. and "do not open the reader USB device if no client is using the
  2192. reader"
  2193. Now that pcscd is auto started it will be started only if an
  2194. appication is using the PC/SC API. This is the case since release
  2195. 1.6.0: - SCardEstablishContext(): try to start the pcscd daemon
  2196. if not already running. . pcscd will suicide itself after 60
  2197. seconds of inactivity if it is started using --auto-exit. This is
  2198. the default behavior when pcscd is started by libpcsclite . Set
  2199. PCSCLITE_PCSCD_ARGS with the argument you want to pass to pcscd
  2200. in autostart Only one argument is passed. The space character is
  2201. not a separator. example: export PCSCLITE_PCSCD_ARGS=-dfa
  2202. * [r5704] TODO: Fix: "start pcscd as an normal user daemon (as id
  2203. smartcard?) instead as root"
  2204. This is the case since release 1.6.5: - Install pcscd as sgid
  2205. pcscd instead of suid root See
  2206. http://ludovicrousseau.blogspot.com/2010/09/pcscd-auto-start.html
  2207. * [r5703] TODO: Fix: "use static driver instead of reader polling
  2208. and dynamic driver loading"
  2209. This is the case since release 1.6.0: - Better handling of
  2210. PCSCLITE_STATIC_DRIVER as can be used on platforms using
  2211. <B5>Clinux (without dynamic loader). This is used to statically
  2212. link the reader driver to pcscd. Since the link is static you
  2213. must define the IFDHandler API version at compilation time.
  2214. Either define IFDHANDLERv1, IFDHANDLERv2 or IFDHANDLERv3
  2215. 2011-04-05 Ludovic Rousseau
  2216. * [r5692] src/pcscdaemon.c: signal_trap(): exit immediatly in case
  2217. of SIGTERM
  2218. Closes Debian bug #620305 "pcscd slows down sutdown/restart"
  2219. 2011-03-31 Ludovic Rousseau
  2220. * [r5684] ChangeLog, configure.in: release 1.7.2
  2221. * [r5683] src/hotplug_libudev.c: HPAddDevice(): avoids a crash if a
  2222. specific driver fails to work and no class driver is available
  2223. Fix Debian bug #620232: pcscd fails to work with REINER SCT
  2224. cyberJack
  2225. 2011-03-30 Ludovic Rousseau
  2226. * [r5679] ChangeLog, configure.in: release 1.7.1
  2227. 2011-03-27 Ludovic Rousseau
  2228. * [r5676] src/hotplug_libudev.c: Log an error if
  2229. udev_device_get_devnode() fails
  2230. 2011-03-26 Ludovic Rousseau
  2231. * [r5675] src/hotplug_libudev.c: Try to use a (CCID) class driver
  2232. if a specific driver fails to use the reader.
  2233. This may happen if openct ifd-handler and libccid are both
  2234. installed.
  2235. * [r5674] src/utils.c: CheckForOpenCT(): Log openct control file
  2236. found
  2237. * [r5673] src/hotplug_libudev.c: Check the
  2238. udev_device_get_devnode() return value (and avoids a crash)
  2239. Fix Debian bug #619241
  2240. 2011-03-16 Ludovic Rousseau
  2241. * [r5659] src/winscard_clnt.c: CardControl(): initialize all the
  2242. fields of the struct control_struct to avoid valgrind warning:
  2243. ==14600== Syscall param socketcall.sendto(msg) points to
  2244. uninitialised byte(s) ==14600== at 0x5042532: send (send.c:28)
  2245. ==14600== by 0x4E2FDF9: MessageSend (winscard_msg.c:355)
  2246. ==14600== by 0x4E2FEE2: MessageSendWithHeader
  2247. (winscard_msg.c:294) ==14600== by 0x4E2C05C: SCardControl
  2248. (winscard_clnt.c:2375) ==14600== by 0x4008D4: main
  2249. (scontrol.c:49) ==14600== Address 0x7fefffc60 is on thread 1's
  2250. stack
  2251. Thanks to Martin Vogt for the bug report
  2252. http://archives.neohapsis.com/archives/dev/muscle/2011-q1/0088.html
  2253. 2011-03-13 Ludovic Rousseau
  2254. * [r5655] configure.in: Use libudev only for Linux by default
  2255. * [r5653] configure.in: PCSC_ARCH: convert / in _ to have
  2256. GNU_kFreeBSD instead of GNU/kFreeBSD
  2257. 2011-03-09 Ludovic Rousseau
  2258. * [r5650] ChangeLog: Typo caused by autocompletion without check
  2259. * [r5649] ChangeLog, configure.in: release 1.7.0
  2260. 2011-02-25 Ludovic Rousseau
  2261. * [r5638] configure.in, src/Makefile.am, src/PCSC/ifdhandler.h,
  2262. src/hotplug_generic.c, src/hotplug_libhal.c,
  2263. src/hotplug_libudev.c, src/hotplug_linux.c: Use libudev instead
  2264. of (deprecated) libhal for the USB hotplug mechanism.
  2265. 2011-02-24 Ludovic Rousseau
  2266. * [r5636] src/hotplug_libusb.c: Remove debug printf()
  2267. 2011-02-22 Ludovic Rousseau
  2268. * [r5628] ChangeLog, configure.in: release 1.6.7
  2269. 2011-02-21 Ludovic Rousseau
  2270. * [r5621] src/hotplug_libusb.c: If a device has more than one CCID
  2271. interface the "libhal:" naming scheme (with the interface number
  2272. included) is used instead of "libusb:".
  2273. The new mechanism allows to use multi-interfaces devices like the
  2274. Gemalto ProxDU also with hotplug_libusb. libhal is deprecated and
  2275. may not be available everywhere.
  2276. Thanks to Diego Elio Pettenò for the patch (for Gentoo)
  2277. 2011-02-10 Ludovic Rousseau
  2278. * [r5589] src/winscard_clnt.c: Move the definition of DO_TRACE,
  2279. DO_PROFILE, and DO_CHECK_SAME_PROCESS at the top of the file, and
  2280. add documentation.
  2281. 2011-02-09 Ludovic Rousseau
  2282. * [r5587] src/Makefile.am: Do not create empty directories
  2283. .../pcsc/drivers and .../pcsc/services any more. The needed
  2284. directory is created by the driver instead.
  2285. 2011-02-04 Ludovic Rousseau
  2286. * [r5584] UnitaryTests/ThreadSafe.py, UnitaryTests/stress_apdu.py:
  2287. Fix PEP8 warnings
  2288. * [r5583] UnitaryTests/ThreadSafe.py: Display the thread id and
  2289. iterations
  2290. * [r5582] UnitaryTests/SCard_fork.py: Better documentation and
  2291. debug
  2292. * [r5581] src/winscard_clnt.c: Add a missing variable declaration
  2293. used if DO_CHECK_SAME_PROCESS is defined
  2294. * [r5580] UnitaryTests/SCardConnect_DIRECT.py: Test the behavior as
  2295. documented in revision 5579
  2296. * [r5579] src/winscard_clnt.c: Doxygen: CardConnect() &
  2297. SCardReconnect() pdwActiveProtocol is not set to
  2298. SCARD_PROTOCOL_UNDEFINED if SCARD_SHARE_DIRECT is used but the
  2299. card has already negociated its protocol
  2300. 2011-02-01 Ludovic Rousseau
  2301. * [r5575] UnitaryTests/SCardBeginTransaction_ExclusiceMode.py:
  2302. Unitary test for Alioth bug [#312960] SCardDisconnect when other
  2303. context has transaction
  2304. * [r5574] src/winscard.c: SCardDisconnect(): RFUnlockAllSharing()
  2305. may fail with SCARD_E_SHARING_VIOLATION if a transaction is on
  2306. going on another card context and dwDisposition ==
  2307. SCARD_LEAVE_CARD. We should not stop and continue disconnecting
  2308. the card.
  2309. Fixes Alioth bug [#312960] SCardDisconnect when other context has
  2310. transaction
  2311. * [r5573] UnitaryTests/SCardConnect_DIRECT2.py: Use the protocol
  2312. negociated by SCardConnect() instead of hard coding SCARD_PCI_T1
  2313. * [r5572] src/winscard_clnt.c: SCardDisconnect(): remove the card
  2314. handle only if SCARD_DISCONNECT command succeeded on the server
  2315. Related to alioth bug [#312960] SCardDisconnect when other
  2316. context has transaction If a first SCardDisconnect() fails with
  2317. SCARD_E_SHARING_VIOLATION it is now possible to try again
  2318. SCardDisconnect(). Before the patch the second call to
  2319. SCardDisconnect() returned SCARD_E_INVALID_HANDLE but the
  2320. connection was still "in use".
  2321. 2011-01-29 Ludovic Rousseau
  2322. * [r5569] src/PCSC/ifdhandler.h, src/readerfactory.h: Revert
  2323. revision 5568 since it has side effect on driver compilation
  2324. (like libccid fails to build)
  2325. * [r5568] src/PCSC/ifdhandler.h, src/readerfactory.h: Move #include
  2326. "pcsclite.h" from PCSC/ifdhandler.h to readerfactory.h so that
  2327. ifdhandler.h can be used as-is on Mac OS X (for handler_test.c)
  2328. * [r5567] src/eventhandler.c, src/ifdwrapper.c, src/prothandler.c,
  2329. src/readerfactory.c: Remove useless #include "ifdhandler.h"
  2330. 2011-01-27 Ludovic Rousseau
  2331. * [r5560] src/winscard_clnt.c: SCardSetAttrib(): add profiling
  2332. calls
  2333. * [r5559] src/winscard_clnt.c: SCardGetSetAttrib(): remove a call
  2334. to PROFILE_END() since this is already done in SCardGetAttrib()
  2335. * [r5558] src/winscard_clnt.c: profiling: compare threads using
  2336. pthread_equal() instead of == to make the code more portable.
  2337. * [r5557] src/winscard_clnt.c: SCardGetAttrib(): Always exit from
  2338. the same point so that profiling does work even in case of error
  2339. * [r5556] src/winscard_clnt.c: profile_end(): add a missing \n in
  2340. the warning message
  2341. * [r5555] src/winscard_clnt.c: Send API traces do stderr instead of
  2342. stdout
  2343. 2011-01-25 Ludovic Rousseau
  2344. * [r5550] src/winscard_clnt.c: SCardReleaseContext(): Always exit
  2345. from the same point so that profiling does work even in case of
  2346. error
  2347. * [r5549] src/winscard_clnt.c: SCardCancel(): Always exit from the
  2348. same point so that profiling does work even in case of error
  2349. * [r5548] src/winscard_clnt.c: Profiling: allow to support up to
  2350. MAX_THREADS simultaneous calls
  2351. For example SCardCancel() is called from another thread when
  2352. SCardGetStatusChange() is running. This was not supported.
  2353. * [r5547] src/winscard_clnt.c: Use color names macros
  2354. * [r5546] src/winscard_clnt.c: Add API tracing with arguments
  2355. display
  2356. * [r5545] src/winscard_clnt.c: SCardGetStatusChange(): Always exit
  2357. from the same point so that profiling does work even in case of
  2358. error
  2359. * [r5544] src/winscard_clnt.c: SCardDisconnect(): Always exit from
  2360. the same point so that profiling does work even in case of error
  2361. 2011-01-21 Ludovic Rousseau
  2362. * [r5543] src/configfile.l: Display the correct line number if
  2363. garbage is found in the configuration file
  2364. 2011-01-20 Ludovic Rousseau
  2365. * [r5539] src/winscard_svc.c: contextsListhContext_seeker(): avoid
  2366. a potential crash if NULL values are used
  2367. src/winscard_svc.c:90:22: warning: Dereference of null pointer if
  2368. (currentContext->hContext == *(int32_t *)key) ^
  2369. src/winscard_svc.c:90:34: warning: Dereference of null pointer if
  2370. (currentContext->hContext == *(int32_t *)key) ^
  2371. * [r5538] src/winscard_clnt.c: SCardStatus(): initialize a dummy
  2372. variable to avoid warnings
  2373. src/winscard_clnt.c:1451:2: warning: Assigned value is garbage or
  2374. undefined dwReaderLen = *pcchReaderLen; ^ ~~~~~~~~~~~~~~
  2375. src/winscard_clnt.c:1452:2: warning: Assigned value is garbage or
  2376. undefined dwAtrLen = *pcbAtrLen; ^ ~~~~~~~~~~
  2377. * [r5537] src/winscard_clnt.c: Avoid a potential crash if NULL
  2378. values are used
  2379. src/winscard_clnt.c:226:27: warning: Dereference of null pointer
  2380. if (channelMap->hCard == *(SCARDHANDLE *)key) ^
  2381. src/winscard_clnt.c:226:18: warning: Dereference of null pointer
  2382. if (channelMap->hCard == *(SCARDHANDLE *)key) ^
  2383. src/winscard_clnt.c:260:18: warning: Dereference of null pointer
  2384. if (contextMap->hContext == *(SCARDCONTEXT *) key) ^
  2385. src/winscard_clnt.c:260:30: warning: Dereference of null pointer
  2386. if (contextMap->hContext == *(SCARDCONTEXT *) key) ^
  2387. * [r5536] src/winscard_clnt.c: SCardEstablishContext(): remove
  2388. useless affectation
  2389. src/winscard_clnt.c:439:5: warning: Value stored to 'ret' is
  2390. never read ...ret = execl(PCSCD_BINARY, "pcscd", "--auto-exit",
  2391. param, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2392. * [r5535] src/winscard_clnt.c: SCardEndTransaction(): remove
  2393. useless code
  2394. src/winscard_clnt.c:1269:2: warning: Value stored to 'randnum' is
  2395. never read randnum = 0; ^
  2396. * [r5534] src/winscard.c: remove unused affectations
  2397. src/winscard.c:565:4: warning: Value stored to 'rv' is never read
  2398. rv = IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL); ^
  2399. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2400. src/winscard.c:835:4: warning: Value stored to 'rv' is never read
  2401. rv = IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL); ^
  2402. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2403. src/winscard.c:1095:4: warning: Value stored to 'rv' is never
  2404. read rv = IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL); ^
  2405. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2406. * [r5533] clang-analyze.sh: Do not analyze tokenparser.c since it
  2407. is generated by flex
  2408. * [r5532] src/readerfactory.c: RDR_CLIHANDLES_seeker(): avoid a
  2409. potential crash if NULL values are used
  2410. src/readerfactory.c:72:30: warning: Dereference of null pointer
  2411. if (rdrCliHandles->hCard == *(SCARDHANDLE *)key) ^
  2412. src/readerfactory.c:72:21: warning: Dereference of null pointer
  2413. if (rdrCliHandles->hCard == *(SCARDHANDLE *)key) ^
  2414. * [r5531] src/readerfactory.c: RFAddReader(): remove unused
  2415. affectation
  2416. src/readerfactory.c:344:4: warning: Value stored to 'rv' is never
  2417. read rv = RFRemoveReader(readerName, port); ^
  2418. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2419. * [r5530] src/readerfactory.c: RFAddReaderHandle(): return the
  2420. error code if any
  2421. src/readerfactory.c:1116:3: warning: Value stored to 'rv' is
  2422. never read rv = SCARD_E_NO_MEMORY; ^ ~~~~~~~~~~~~~~~~~
  2423. src/readerfactory.c:1103:3: warning: Value stored to 'rv' is
  2424. never read rv = SCARD_E_NO_MEMORY; ^ ~~~~~~~~~~~~~~~~~
  2425. src/readerfactory.c:1095:3: warning: Value stored to 'rv' is
  2426. never read rv = SCARD_E_NO_MEMORY; ^ ~~~~~~~~~~~~~~~~~
  2427. 2011-01-18 Ludovic Rousseau
  2428. * [r5525] src/pcscdaemon.c: Remove useless code
  2429. src/pcscdaemon.c:85:2: warning: Value stored to 'rv' is never
  2430. read rv = 0; ^ ~ src/pcscdaemon.c:175:2: warning: Value stored to
  2431. 'rv' is never read rv = 0; ^ ~
  2432. * [r5524] src/ifdwrapper.c: IFDPowerICC(): remove useless code
  2433. src/ifdwrapper.c:294:2: warning: Value stored to 'ret' is never
  2434. read ret = ATRDecodeAtr(&sSmartCard, pucAtr, *pdwAtrLen); ^
  2435. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2436. src/ifdwrapper.c:268:2: warning: Value stored to 'rv' is never
  2437. read rv = IFD_SUCCESS; ^ ~~~~~~~~~~~
  2438. * [r5523] src/eventhandler.c: EHStatusHandlerThread(): check the
  2439. return value of IFDStatusICC()
  2440. Thanks to clang(1) for the warning src/eventhandler.c:235:2:
  2441. warning: Value stored to 'rv' is never read rv =
  2442. IFDStatusICC(rContext, &dwStatus); ^
  2443. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2444. * [r5522] src/eventhandler.c: EHStatusHandlerThread(): remove
  2445. unused code
  2446. src/eventhandler.c:233:2: warning: Value stored to
  2447. 'dwCurrentState' is never read dwCurrentState = 0; ^ ~
  2448. src/eventhandler.c:232:2: warning: Value stored to
  2449. 'readerSharing' is never read readerSharing = 0; ^ ~
  2450. * [r5521] src/atrhandler.c: ATRDecodeAtr(): remove unused code
  2451. src/atrhandler.c:55:2: warning: Value stored to 'p' is never read
  2452. p = K = TCK = Y1i = T = 0; ^ ~~~~~~~~~~~~~~~~~~~~~
  2453. src/atrhandler.c:55:6: warning: Although the value stored to 'K'
  2454. is used in the enclosing expression, the value is never actually
  2455. read from 'K' p = K = TCK = Y1i = T = 0; ^ ~~~~~~~~~~~~~~~~~
  2456. src/atrhandler.c:55:10: warning: Although the value stored to
  2457. 'TCK' is used in the enclosing expression, the value is never
  2458. actually read from 'TCK' p = K = TCK = Y1i = T = 0; ^ ~~~~~~~~~~~
  2459. src/atrhandler.c:55:16: warning: Although the value stored to
  2460. 'Y1i' is used in the enclosing expression, the value is never
  2461. actually read from 'Y1i' p = K = TCK = Y1i = T = 0; ^ ~~~~~
  2462. src/atrhandler.c:55:22: warning: Although the value stored to 'T'
  2463. is used in the enclosing expression, the value is never actually
  2464. read from 'T' p = K = TCK = Y1i = T = 0; ^ ~
  2465. * [r5520] clang-analyze.sh: script to call clang --analyze
  2466. * [r5519] splint.sh: No more scf files since revision 4486
  2467. * [r5518] src/winscard_clnt.c: SCardGetStatusChange(): avoids a
  2468. compiler warning
  2469. winscard_clnt.c:1875:33: warning: comparison of integers of
  2470. different signs: 'uint32_t' (aka 'unsigned int') and 'int'
  2471. [-Wsign-compare] ...if (rContext->eventCounter != currentCounter)
  2472. ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
  2473. * [r5517] src/readerfactory.c: Add an explicit cast to avoid a
  2474. compiler warning
  2475. readerfactory.c:1033:45: warning: comparison of integers of
  2476. different signs: 'unsigned long' and 'SCARDHANDLE' (aka 'long')
  2477. [-Wsign-compare] if ((rContext->dwIdentity + randHandle) ==
  2478. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  2479. 2011-01-14 Ludovic Rousseau
  2480. * [r5509]
  2481. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py:
  2482. Also initialize the state of the PnP special reader (For Mac OS
  2483. X)
  2484. * [r5508] src/hotplug_macosx.c: HPSearchHotPluggables(): use the
  2485. same naming convention as used by Apple PC/SC layer on Leopard
  2486. (and later). The reader friendly name is used instead of
  2487. "usb:%04x/%04x" as documented in IFDHandler v3 API at
  2488. http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#gabb9fe35a68fa080ce9397f0b830b1e7e
  2489. The same driver source code can be used by Apple PC/SC layer and
  2490. by this pcsc-lite.
  2491. * [r5507] src/hotplug_macosx.c: Fix compiler warning
  2492. hotplug_macosx.c: In function ‘HPDriversGetFromDirectory’:
  2493. hotplug_macosx.c:150: warning: comparison between signed and
  2494. unsigned
  2495. * [r5506] c.sh: Remove commented CFLAGS definition
  2496. * [r5505] src/PCSC/pcsclite.h.in, src/PCSC/wintypes.h: Mac OS X
  2497. "port" - Define Windows types as they are defined on Mac OS X in
  2498. /System/Library/Frameworks/PCSC.framework/Headers/wintypes.h -
  2499. Pack structures as they are packed on Mac OS X in
  2500. /System/Library/Frameworks/PCSC.framework/Headers/pcsclite.h
  2501. With these changes it is possible to build this pcsc-lite on Mac
  2502. OS X and use it with an application built using the PCSC
  2503. Framework headers provided by Apple.
  2504. One application is to temporarily replace the Apple PCSC layer by
  2505. a better/working one.
  2506. * [r5504] src/PCSC/pcsclite.h.in: Use LONG instead of long for
  2507. SCARDCONTEXT and SCARDHANDLE so that the exact type can be easily
  2508. changed by editing PCSC/wintypes.h
  2509. By default: typedef long LONG; so no change
  2510. 2011-01-13 Ludovic Rousseau
  2511. * [r5501] doc/pcscd.8.in: Remove references to a init.d/pcscd
  2512. script since pcscd is autostarted by default now.
  2513. * [r5500] doc/reader.conf.5.in: Use @confdir_exp@ instead of
  2514. (removed) @confdir@
  2515. 2011-01-12 Ludovic Rousseau
  2516. * [r5498] doc/pcscd.8.in: Use @confdir_exp@ instead of
  2517. @sysconfdir_exp@
  2518. Closes [#312929] @sysconfdir_exp@ not expanded in manual page
  2519. 2011-01-07 Ludovic Rousseau
  2520. * [r5496] src/readerfactory.c: RFAddReader(): correctly initialize
  2521. the pthCardEvent field for the other slots. The bug occured with
  2522. a multi slot reader and a driver with no
  2523. TAG_IFD_POLLING_THREAD_WITH_TIMEOUT function (as is the case with
  2524. my CCID driver since revision 5495)
  2525. 2011-01-06 Ludovic Rousseau
  2526. * [r5491] UnitaryTests/SCardConnect_DIRECT2.py: Add comments
  2527. * [r5490] src/winscard.c: SCardDisconnect(): Switch to
  2528. POWER_STATE_GRACE_PERIOD unless the card was not powered
  2529. In the previous implementation the state was changed to
  2530. POWER_STATE_GRACE_PERIOD only if the previous state was
  2531. POWER_STATE_INUSE. So if a SCARD_SHARE_DIRECT connection was used
  2532. the card state was not set POWER_STATE_INUSE and a power off
  2533. action was immediate at the SCardDisconnect(). Not nice if the
  2534. card is reused just after.
  2535. 2011-01-04 Ludovic Rousseau
  2536. * [r5478] src/winscard_svc.c: ContextThread(): in command
  2537. CMD_GET_READERS_STATE, wait until all the readers are ready (ATR
  2538. available) before sending the reader states.
  2539. The problem arrives when you connect two readers at the same time
  2540. (and one of them is slow to get the ATR). SCardGetStatusChange()
  2541. must not exit with one reader in state READER_NOT_INITIALIZED (as
  2542. implemented in revision 5217)
  2543. 2010-12-12 Ludovic Rousseau
  2544. * [r5442] ChangeLog, configure.in: release 1.6.6
  2545. * [r5441] src/simclist.c: Reapply change in revision 4986 since the
  2546. problem was not corrected in version 1.5 of simclist.
  2547. 2010-12-11 Ludovic Rousseau
  2548. * [r5440] src/winscard_msg.c: Use LONG instead of int to store
  2549. PC/SC return codes like SCARD_E_*
  2550. The problem comes from sign extenstion from int to LONG int rv =
  2551. SCARD_E_TIMEOUT; /* 0x8010000A */ is (sign) extended into a LONG
  2552. = 0xFFFFFFFF8010000A
  2553. So the line in winscard_clnt.c if (SCARD_E_TIMEOUT == rv) is
  2554. never true on a 64-bits system because rv has been extended from
  2555. int to LONG. The comparison is then between 0x8010000A and
  2556. 0xFFFFFFFF8010000A
  2557. 2010-12-08 Ludovic Rousseau
  2558. * [r5434] src/PCSC/debuglog.h, src/PCSC/ifdhandler.h,
  2559. src/atrhandler.h, src/dyn_generic.h, src/eventhandler.h,
  2560. src/hotplug.h, src/ifdwrapper.h, src/misc.h, src/parser.h,
  2561. src/powermgt_generic.h, src/prothandler.h, src/readerfactory.h,
  2562. src/sys_generic.h, src/winscard_msg.h, src/winscard_svc.h: Do not
  2563. use extern "C" since we are in C and not C++
  2564. Follow rule 13 of "On C Library Implementation" by Rusty Russell
  2565. http://rusty.ozlabs.org/?p=140
  2566. 2010-12-03 Ludovic Rousseau
  2567. * [r5429] src/configfile.l: Fix configfile.l: In function
  2568. 'evaluatetoken': configfile.l:205: warning: assignment discards
  2569. qualifiers from pointer target type
  2570. * [r5427] ChangeLog, configure.in: release 1.6.5
  2571. 2010-11-26 Ludovic Rousseau
  2572. * [r5420] src/simclist.c: From SimCList version 1.5
  2573. http://mij.oltrelinux.com/devel/simclist/
  2574. 2010-11-23 Ludovic Rousseau
  2575. * [r5415] src/eventhandler.c, src/readerfactory.c,
  2576. src/readerfactory.h, src/winscard.c: Add a mutex to make the test
  2577. and set of the powerState field atomic.
  2578. 2010-11-22 Ludovic Rousseau
  2579. * [r5414] src/eventhandler.c, src/winscard.c: Log the new
  2580. powerState value at DEBUG level
  2581. * [r5412] src/readerfactory.c: Remove dead code
  2582. 2010-11-16 Ludovic Rousseau
  2583. * [r5402] src/winscard.c: SCardDisconnect(): change powerState to
  2584. POWER_STATE_GRACE_PERIOD only if the previous state was
  2585. POWER_STATE_INUSE
  2586. If the powerState was POWER_STATE_UNPOWERED then do NOT change to
  2587. POWER_STATE_GRACE_PERIOD. POWER_STATE_GRACE_PERIOD indicates that
  2588. the card is powered on. That is the case if mode is
  2589. SCARD_SHARE_DIRECT at SCardConnect()
  2590. * [r5401] src/winscard.c: SCardConnect(): change the power state to
  2591. POWER_STATE_INUSE only if the card has been powered on. The card
  2592. is NOT powered on if mode is SCARD_SHARE_DIRECT
  2593. * [r5400] src/eventhandler.c, src/readerfactory.c: Move the zeroing
  2594. of the reader context from EHDestroyEventHandler() to
  2595. RFUnInitializeReader() where it is more appropriate.
  2596. The reader context shall be valid until the reader is
  2597. uninitialized in RFUnInitializeReader() and most importantly
  2598. after IFDCloseIFD() is called.
  2599. * [r5399] src/readerfactory.c: RFInitializeReader(): if
  2600. IFDOpenIFD() fails just mark the reader as "not correctly
  2601. started". This will present a call to IFDCloseIFD() in
  2602. RFUnInitializeReader() (revision 5393)
  2603. 2010-11-09 Ludovic Rousseau
  2604. * [r5393] src/readerfactory.c: RFUnInitializeReader(): Do not close
  2605. a reader if IFDOpenIFD() failed in RFInitializeReader()
  2606. * [r5392] src/readerfactory.c: RFRemoveReader(): destroy the event
  2607. handler only if it exists already
  2608. 2010-11-08 Ludovic Rousseau
  2609. * [r5391] src/winscard_msg_srv.c: ProcessCommonChannelRequest(): no
  2610. need to define serv_adr as static. Free a few bytes of memory.
  2611. * [r5390] src/winscard_msg.c, src/winscard_msg.h,
  2612. src/winscard_msg_srv.c: Remove CleanupSharedSegment() and do not
  2613. call it anymore
  2614. The function is not about shared segment any more The file
  2615. PCSCLITE_CSOCK_NAME will be removed in clean_temp_files() at exit
  2616. anyway
  2617. * [r5388] src/winscard_msg.c: MessageSend(): return
  2618. SCARD_E_NO_SERVICE instead of SCARD_F_COMM_ERROR if the daemon
  2619. died and we reveice a EPIPE error.
  2620. * [r5387] src/winscard_msg.c: MessageSendWithHeader(): do not send
  2621. a 0 length buffer.
  2622. Some commands only have a header and no data like
  2623. CMD_GET_READERS_STATE
  2624. * [r5386] src/winscard_clnt.c, src/winscard_msg.c,
  2625. src/winscard_msg.h, src/winscard_svc.c: MessageReceiveTimeout(),
  2626. MessageSendWithHeader(), MessageSend() and MessageReceive() now
  2627. returns a PC/SC error code instead of an internal value. So the
  2628. callers can just return the error code to the application with no
  2629. transcoding.
  2630. * [r5385] src/winscard_clnt.c: Move SCardInvalidateHandles() in the
  2631. same #ifdef DO_CHECK_SAME_PROCESS as SCardCheckSameProcess()
  2632. since it is only used in this case.
  2633. * [r5384] src/winscard_clnt.c: No need to check the server pid
  2634. anymore. If the server is restarted the socket communication will
  2635. fail and an "RPC transport error" SCARD_F_COMM_ERROR error will
  2636. be returned
  2637. This check was needed when the readers state was stored in
  2638. /var/run/pcscd/pcscd.pub. But that is no more the case. Every
  2639. command now uses the client/server Unix socket.
  2640. 2010-11-05 Ludovic Rousseau
  2641. * [r5379] src/winscard_msg.h: InitializeSocket() and
  2642. ProcessEventsServer() are used by the server side so must be
  2643. declared in the #ifdef PCSCD part of the header file
  2644. * [r5378] src/winscard_msg.h: Add missing getSocketName()
  2645. declaration used by winscard_clnt.c and winscard_msg.c
  2646. * [r5377] src/winscard_msg.h: Reorder the function definitions as
  2647. they are in winscard_msg.c in revision 5371
  2648. * [r5376] src/readerfactory.h: Remove definition of FctMap_V1 now
  2649. useless since revision 5321
  2650. * [r5375] src/atrhandler.c, src/atrhandler.h: Remove typedef of
  2651. PSMARTCARD_EXTENSION and use SMARTCARD_EXTENSION * instead
  2652. 2010-11-04 Ludovic Rousseau
  2653. * [r5373] src/winscard_clnt.c, src/winscard_msg.c: It is now
  2654. possible to configure the local socket name to use using the
  2655. environment variable PCSCLITE_CSOCK_NAME
  2656. This is used by Estobuntu LTSP to redirect the smart card reader
  2657. on the light terminal display to the application running on the
  2658. server. They use a patched SSH version to redirect
  2659. /var/run/pcscd/pcscd.comm on the client to ~/.pcscd.comm on the
  2660. server.
  2661. * [r5372] src/winscard_msg.c: MessageReceiveTimeout(): remove pcscd
  2662. specific code inside a function used only by libpcsclite
  2663. * [r5371] src/winscard_msg.c: reorganize the functions in 3
  2664. categories: - functions used by pcscd only:
  2665. CleanupSharedSegment() - functions used by libpcsclite only:
  2666. ClientSetupSession(), ClientCloseSession(),
  2667. MessageReceiveTimeout(), MessageSendWithHeader() - functions used
  2668. by pcscd and libpcsclite: MessageSend(), MessageReceive()
  2669. We gain on the code size: 1104 bytes for pcscd and 101 bytes for
  2670. libpcsclite
  2671. 2010-11-03 Ludovic Rousseau
  2672. * [r5370] src/atrhandler.c: ATRDecodeAtr(): avoids a buffer
  2673. overflow with badly formed ATR like 3B FF 11 22 33 F0 11 22 33 F0
  2674. 11 22 33 F0 11 22 33 F0 11 22 33 F0 11 22 33 F0 11 22 33 00 11 22
  2675. 33
  2676. Thanks to Rafael Dominguez Vega for the bug report
  2677. 2010-10-28 Ludovic Rousseau
  2678. * [r5368] src/winscard.c: Move declaration of dwAtrLen closer to
  2679. where it is used.
  2680. * [r5367] src/winscard.c: SCardConnect(): log the ATR in case of
  2681. auto power on
  2682. The ATR may be different from the previous one if the card has a
  2683. cold and a warm ATR.
  2684. 2010-10-26 Ludovic Rousseau
  2685. * [r5364] src/winscard.c: SCardDisconnect(): check for card removal
  2686. in case DISABLE_AUTO_POWER_ON
  2687. * [r5359] src/winscard.c: Doxygen documentation is done on the
  2688. client side (winscard_clnt.c) so remove documentation of
  2689. SCardEstablishContext()
  2690. * [r5358] src/winscard.c: SCardTransmit(): do not check for NULL
  2691. pointers since we are called from ContextThread() with correct
  2692. values
  2693. * [r5357] src/winscard.c: SCardReconnect(): do not check for
  2694. pdwActiveProtocol NULL pointer since we are called from
  2695. ContextThread() with a correct value
  2696. * [r5356] src/winscard.c: SCardConnect(): do not check for NULL
  2697. pointers since we are called from ContextThread() with correct
  2698. values
  2699. * [r5355] src/winscard.c: SCardEstablishContext(): do not check for
  2700. phContext NULL pointer since we are called from ContextThread()
  2701. with a correct value
  2702. 2010-10-25 Ludovic Rousseau
  2703. * [r5354] src/winscard.c: SCardConnect(): test for not
  2704. SCARD_POWERED instead of SCARD_SWALLOWED
  2705. * [r5351] src/hotplug_linux.c: Use the new bundle parser code
  2706. * [r5350] src/winscard.c: SCardConnect(): log an error if auto
  2707. power on failed
  2708. * [r5349] Makefile.am: Add a fix-rights rule at the top level to
  2709. call the fix-rights rule in src/
  2710. 2010-10-23 Ludovic Rousseau
  2711. * [r5348] src/winscard.c: SCardConnect(): check the returned value
  2712. of IFDPowerICC() to change the readerState if power up succeeded
  2713. * [r5347] src/winscard.c: SCardConnect(): power up the card before
  2714. checking for its SCARD_SWALLOWED state.
  2715. If a card fails to power up on card insertion a new power up will
  2716. be tried on SCardConnect().
  2717. 2010-10-22 Ludovic Rousseau
  2718. * [r5346] src/winscard_clnt.c: Remove the "This function " in the
  2719. Doxygen brief line
  2720. * [r5345] UnitaryTests/SCardCancel2.py: SCardCancel() should do
  2721. nothing if no cancellable call is ongoing bug fixed in revision
  2722. 5344
  2723. * [r5344] src/winscard_clnt.c: Only SCardGetStatusChange() can be
  2724. cancelled using SCardCancel()
  2725. Thanks to Jan Rochat for the bug report
  2726. https://bugs.launchpad.net/ubuntu/+source/pcsc-lite/+bug/647545
  2727. * [r5343] src/eventhandler.c, src/eventhandler.h,
  2728. src/hotplug_libhal.c, src/hotplug_macosx.c, src/ifdwrapper.c,
  2729. src/misc.h, src/pcscdaemon.c, src/winscard.c,
  2730. src/winscard_clnt.c, src/winscard_msg.c: Remove spaces and tabs
  2731. at end of line
  2732. * [r5342] src/winscard_svc.c: Reformat
  2733. * [r5341] src/PCSC/winscard.h, src/winscard.c, src/winscard_clnt.c,
  2734. src/winscard_msg.h, src/winscard_svc.c: SCardCancelTransaction()
  2735. is no more provided. This function is not provided by Microsoft
  2736. and is deprecated since 2005 in pcsc-lite.
  2737. * [r5340] src/winscard.c: Reindent
  2738. * [r5339] src/winscard_clnt.c: Reformat
  2739. * [r5338] src/PCSC/winscard.h, src/winscard_clnt.c:
  2740. SCardSetTimeout() is no more provided. This function is not
  2741. provided by Microsoft and is deprecated since 2004 in pcsc-lite.
  2742. * [r5337] src/winscard.c: SCardSetTimeout() is implemented (and
  2743. deprecated) on the client side
  2744. * [r5336] src/winscard.c: SCardListReaders() and SCardCancel() are
  2745. implemented on the client side
  2746. * [r5335] src/winscard.c: SCardDisconnect(): if
  2747. DISABLE_AUTO_POWER_ON is defined then do not power on the card if
  2748. SCARD_UNPOWER_CARD is used.
  2749. * [r5334] src/eventhandler.c, src/pcscd.h.in: Move
  2750. DISABLE_ON_DEMAND_POWER_ON and DISABLE_AUTO_POWER_ON defines from
  2751. eventhandler.c to pcscd.h.in so they are visible by all the .c
  2752. files
  2753. * [r5333] src/winscard.c: SCardConnect(): remove debug log
  2754. 2010-10-21 Ludovic Rousseau
  2755. * [r5332] src/eventhandler.c: If DISABLE_AUTO_POWER_ON is defined
  2756. then do not automatically power on the card. The card will be
  2757. powered on on the first SCardConnect()
  2758. * [r5331] src/readerfactory.c: Remove extra parenthesis We are
  2759. using C not Lisp :-)
  2760. * [r5328] TODO, src/PCSC/ifdhandler.h, src/eventhandler.c,
  2761. src/eventhandler.h, src/pcscd.h.in, src/readerfactory.c,
  2762. src/readerfactory.h, src/winscard.c: Power on the card _only_ if
  2763. an application requests a connection see Alioth bug #301965
  2764. You can disable the feature using DISABLE_ON_DEMAND_POWER_ON in
  2765. src/eventhandler.c
  2766. 2010-10-17 Ludovic Rousseau
  2767. * [r5324] src/Makefile.am: PCSC/reader.h is no more generated from
  2768. PCSC/reader.h.in Directly use the filename in
  2769. nobase_include_HEADERS
  2770. 2010-10-15 Ludovic Rousseau
  2771. * [r5323] UnitaryTests/SCardStatus.py: Add a call to
  2772. SCardDisconnect() before SCardReleaseContext()
  2773. * [r5322] src/eventhandler.h, src/winscard.c, src/winscard_clnt.c:
  2774. Rename the sharing states unsing the PCSCLITE_SHARING_ prefix
  2775. Doxygen: document the READER_STATE structure
  2776. * [r5321] src/PCSC/ifdhandler.h, src/eventhandler.c,
  2777. src/ifdwrapper.c, src/ifdwrapper.h, src/readerfactory.c,
  2778. src/readerfactory.h: Remove the support of IFDHandler v1 API. I
  2779. don't know any driver using this API.
  2780. We can now simplify the API of IFDStatusICC() and remove the ATR
  2781. related parameters. These paremeters were only used by the
  2782. IFDHandler v1 API.
  2783. diffstat says: 6 files changed, 51 insertions(+), 335
  2784. deletions(-)
  2785. 2010-10-14 Ludovic Rousseau
  2786. * [r5317] src/hotplug_libhal.c: ifdCapabilities driver feature is
  2787. not used with libhal (and has never been). Remove dead/unused
  2788. code.
  2789. 2010-10-13 Ludovic Rousseau
  2790. * [r5316] src/winscard.c: Reformat
  2791. * [r5315] src/readerfactory.c, src/winscard.c: Use the simpler form
  2792. of IFDPowerICC(..., IFD_POWER_DOWN, ...) introduced in revision
  2793. 5314
  2794. * [r5314] src/ifdwrapper.c: IFDPowerICC(): allow to use NULL for
  2795. pucAtr and pdwAtrLen to make power down easy with
  2796. IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL);
  2797. * [r5313] src/winscard.c: Correctly set dwAtrLen to the sizeof the
  2798. ATR array before calling IFDPowerICC().
  2799. Some drivers do not write more that dwAtrLen bytes in cardAtr
  2800. array.
  2801. 2010-10-12 Ludovic Rousseau
  2802. * [r5308] src/winscard_msg.h: Doxygen: SCARD_GET_STATUS_CHANGE is
  2803. not used anymore
  2804. * [r5307] src/winscard.c: Remove SCardStatus() (dead code) on the
  2805. server side.
  2806. * [r5306] src/winscard.c: SCardEndTransaction(): use the same code
  2807. to reset a card as in revision 5301
  2808. * [r5305] src/winscard.c: SCardReconnect(), SCardDisconnect() and
  2809. SCardEndTransaction(): reset the value of dwAtrLen before the
  2810. second call to IFDPowerICC() so that the driver gets a correct
  2811. value if the first call to IFDPowerICC(IFD_POWER_DOWN) set
  2812. dwAtrLen=0
  2813. Thanks to Frank Morgner for the bug report Closes: [#312754]
  2814. IFDHPowerICC is called with IFD_POWER_UP and *AtrLength==0
  2815. * [r5304] src/pcsc-wirecheck-gen.c, src/winscard.c,
  2816. src/winscard_clnt.c, src/winscard_msg.h, src/winscard_svc.c: A
  2817. large part of SCardStatus() is done on the client side using
  2818. readerStates[]. So remove a few lines of dead code on the server
  2819. side.
  2820. * [r5303] UnitaryTests/SCardStatus.py: Call SCardStatus() a second
  2821. time after a keypress
  2822. * [r5302] UnitaryTests/SCardStatus.py: Unit test for SCardStatus()
  2823. * [r5301] src/winscard.c: SCardReconnect(): Reorganize the code to
  2824. manage ATR and readerState after a power up. Remove a call to
  2825. IFDStatusICC() to know if a card is present or not since
  2826. IFDPowerICC() already gives us this information.
  2827. SCardDisconnect(): Use the same code as above
  2828. * [r5300] src/eventhandler.c, src/winscard.c, src/winscard_clnt.c:
  2829. Use uint32_t readerState instead of DWORD dwStatus to store the
  2830. state of the reader. DWORD and uint32_t may be different.
  2831. * [r5299] src/winscard.c: SCardReconnect(): return
  2832. SCARD_E_NO_SMARTCARD when card is removed and
  2833. SCARD_W_UNRESPONSIVE_CARD when card is unresponsive instead of
  2834. SCARD_E_PROTO_MISMATCH
  2835. * [r5298] src/winscard_msg.h: Increment minor version because of
  2836. changes in revision 5290
  2837. * [r5297] doc/Makefile.am, doc/ifdhandler-3.tex: Remove the
  2838. deprecated LaTeX version of IFDHandler documentation
  2839. 2010-10-11 Ludovic Rousseau
  2840. * [r5296] src/configfile.l: evaluatetoken(): the CHANNELID
  2841. parameter can also be a decimal number.
  2842. * [r5294] src/PCSC/ifdhandler.h, src/configfile.l: reader.conf
  2843. configuration: If you want to use IFDHCreateChannel() instead of
  2844. IFDHCreateChannelByName() then do not use any DEVICENAME line in
  2845. the configuration file. IFDHCreateChannel() will then be called
  2846. with the CHANNELID parameter.
  2847. Closes: [#312749] Should call IFDHCreateChannel for serial driver
  2848. with DEVICENAME /dev/null
  2849. * [r5293] src/readerfactory.c, src/winscard_clnt.c,
  2850. src/winscard_svc.c: list_* functions return an decimal integer so
  2851. use %d insteaf of %X to log the error value.
  2852. * [r5292] src/readerfactory.c: Add a "0x" before hex displays
  2853. 2010-10-10 Ludovic Rousseau
  2854. * [r5291] src/winscard_clnt.c: Doxygen SCardStatus(): *pdwState
  2855. also contains a number of events
  2856. * [r5290] src/eventhandler.c, src/eventhandler.h,
  2857. src/winscard_clnt.c: Split the card event counter out of the card
  2858. event state on the pcscd side to simplify the code in
  2859. EHStatusHandlerThread()
  2860. The two information are combined on the client side in
  2861. SCardGetStatusChange() and SCardStatus()
  2862. * [r5289]
  2863. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_loop.py:
  2864. Exit the endless loop in case of error
  2865. * [r5288] src/PCSC/pcsclite.h.in: struct SCARD_READERSTATE: use
  2866. "DWORD" instead of "unsigned long" type for the fields
  2867. dwCurrentState, dwEventState and cbAtr
  2868. This is compliant to the Windows definition and allows to
  2869. redefine DWORD to something other than unsigned long, like
  2870. uint32_t
  2871. * [r5287] src/PCSC/pcsclite.h.in, src/error.c:
  2872. pcsc_stringify_error(): Use "LONG" instead of "long" as parameter
  2873. type to reflect the return type from winscard.h
  2874. The LONG type may be redefined in PCSC/wintypes.h to int32_t for
  2875. example
  2876. 2010-10-05 Ludovic Rousseau
  2877. * [r5281] src/winscard_clnt.c: Doxygen: do not document unused
  2878. SCARD_STATE_ATRMATCH and SCARD_STATE_PRESENT states in
  2879. SCardGetStatusChange()
  2880. Thanks to Martin Paljak for the patch
  2881. * [r5280]
  2882. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_loop.py:
  2883. Call SCardGetStatusChange() in a endless loop
  2884. * [r5279] src/tokenparser.l: Doxygen: fix documentation of
  2885. LTPBundleFindValueWithKey()
  2886. * [r5278] src/winscard_clnt.c: SCardGetStatusChange(): include the
  2887. event counter in dwEventState even if dwCurrentState contains a
  2888. counter at 0 (default).
  2889. * [r5277] doc/doxygen.conf.in: Update from Doxygen 1.5.5 to 1.7.1
  2890. warning: Tag `DETAILS_AT_TOP' at line 163 of file
  2891. doc/doxygen.conf has become obsolete. To avoid this warning
  2892. please update your configuration file using "doxygen -u"
  2893. 2010-10-01 Ludovic Rousseau
  2894. * [r5275] src/pcscdaemon.c: main(): do not limit rights if run as
  2895. root
  2896. 2010-09-19 Ludovic Rousseau
  2897. * [r5262] src/Makefile.am: Do not change the access rights of pcscd
  2898. in the install rule but in another one. This is needed when
  2899. building the package in a system without the pcscd group.
  2900. 2010-09-14 Ludovic Rousseau
  2901. * [r5256] configure.in: Do not generate src/PCSC/reader.h from
  2902. src/PCSC/reader.h.in any more
  2903. * [r5255] src/PCSC/reader.h: HOST_TO_CCID_16() and
  2904. HOST_TO_CCID_32() are now identity functions
  2905. Since CCID 1.4.1 (revision 5252) the byte order is no more
  2906. important
  2907. * [r5254] src/PCSC/reader.h, src/PCSC/reader.h.in: Rename
  2908. reader.h.in in reader.h
  2909. 2010-09-04 Ludovic Rousseau
  2910. * [r5245] src/Makefile.am: Install pcscd as sgid pcscd instead of
  2911. suid root
  2912. * [r5241] src/hotplug_libhal.c: HPReadBundleValues(): do not fail
  2913. if the key "CFBundleName" is not found in a driver Info.plist.
  2914. This key should only be defined for the CCID class driver.
  2915. 2010-09-03 Ludovic Rousseau
  2916. * [r5231] src/winscard_msg.c: Doxygen: remove documentation about
  2917. the (now removed) timeOut parameter of MessageSend() and
  2918. MessageSendWithHeader()
  2919. 2010-09-02 Ludovic Rousseau
  2920. * [r5227] src/winscard_clnt.c: Doxygen: clarify the use of one
  2921. different SCARDCONTEXT per thread and the expection for
  2922. SCardCancel()
  2923. * [r5226] src/winscard_svc.c: Remove protocol_major, protocol_minor
  2924. fields from struct _psContext since they are not used.
  2925. * [r5225] src/winscard_msg.h: update PROTOCOL_VERSION_MINOR since
  2926. struct pubReaderStatesList changed (readerID removed)
  2927. * [r5224] src/winscard_svc.c: ContextThread(): check that the
  2928. procotol major.minor is the same for the daemon and lib. If not
  2929. just fail. We are not backward compatible.
  2930. * [r5219] src/winscard_clnt.c: Complete change in revision 5212
  2931. SCardGetStatusChange() and SCardListReaders() were broken.
  2932. * [r5218] src/ifdwrapper.c, src/readerfactory.c,
  2933. src/readerfactory.h: Rename lpcLibrary in library and lpcDevice
  2934. in device
  2935. * [r5217] src/eventhandler.c, src/eventhandler.h, src/pcscdaemon.c,
  2936. src/readerfactory.c, src/readerfactory.h: Wait until all
  2937. connected readers have a chance to power up a possibly inserted
  2938. card.
  2939. This is needed when auto start is used and a card is already
  2940. present in a USB reader. The reader presence is correctly
  2941. reported to libpcsclite but the power up has not yet happen. So
  2942. the ATR is not yet available.
  2943. * [r5216] src/eventhandler.c, src/readerfactory.c,
  2944. src/readerfactory.h, src/winscard_clnt.c: Rename lpcReaderName in
  2945. readerName and use (char *) instead of LPSTR
  2946. * [r5215] src/eventhandler.c, src/readerfactory.c,
  2947. src/readerfactory.h, src/winscard.c: Get rid of the lpcReader[]
  2948. field in struct ReaderContext
  2949. The reader name is already present in readerState->readerName
  2950. linked from struct ReaderContext
  2951. Gain: MAX_READERNAME*PCSCLITE_MAX_READERS_CONTEXTS = 100*16 =
  2952. 1600 bytes fo RAM on pcscd
  2953. * [r5214] src/winscard.c: SCardStatus(): remove a useless test
  2954. lpcReader can't be larger than MAX_BUFFER_SIZE (264) since its
  2955. buffer is only MAX_READERNAME (100) bytes long. And I don't see
  2956. why we need this test anyway.
  2957. * [r5213] src/eventhandler.c, src/winscard.c: Complete change
  2958. started in revision 5212
  2959. rContext->readerState is never NULL now. So do not even check its
  2960. value.
  2961. * [r5212] src/eventhandler.c, src/eventhandler.h,
  2962. src/pcsc-wirecheck-gen.c, src/readerfactory.c,
  2963. src/winscard_clnt.c: Get rid of the readerID field in struct
  2964. pubReaderStatesList
  2965. * [r5211] src/readerfactory.c, src/readerfactory.h: Remove unused
  2966. RFSuspendAllReaders() and RFAwakeAllReaders()
  2967. 2010-08-31 Ludovic Rousseau
  2968. * [r5204] src/eventhandler.c: Reformat
  2969. 2010-08-30 Ludovic Rousseau
  2970. * [r5202] src/winscard_msg_srv.c: InitializeSocket(): do not set
  2971. the execution bit on the socket file. It is useless.
  2972. 2010-08-27 Ludovic Rousseau
  2973. * [r5196] src/debug.c, src/error.c, src/utils.c, src/utils.h: svn
  2974. propset svn:keywords 'Author Date Id Revision'
  2975. * [r5195] src/utils.c: GetDaemonPid(): use open(3) instead of
  2976. fopen(3) to avoid an internal malloc() call and gain some CPU
  2977. cycles
  2978. * [r5194] src/hotplug_libhal.c: HPAddDevice(): wait 1 millisecond
  2979. instead of 1 second until the device is visible to libusb/etc.
  2980. 2010-08-25 Ludovic Rousseau
  2981. * [r5183] src/winscard_clnt.c: Doxygen:
  2982. SCardCheckDaemonAvailability() do not invalidate handles after a
  2983. fork() any more
  2984. 2010-08-23 Ludovic Rousseau
  2985. * [r5179] src/hotplug_libusb.c: HPReadBundleValues(): use the new
  2986. Info.plist parsing API.
  2987. Parsing the CCID Info.plist (159 readers supported) was on a ARM9
  2988. machine 13193049 µs and is now 258262 µs => gain x51 or 5008%
  2989. * [r5178] src/readerfactory.c: RFBindFunctions(): rename rv in rvl
  2990. to avoid warnings warning: declaration of ‘rv’ shadows a previous
  2991. local
  2992. Also change type from DWORD to int since DYN_GetAddress() returns
  2993. an int
  2994. * [r5177] src/readerfactory.c: RFLoadReader(): optimize the
  2995. detection of Ifd Handler version by checking for
  2996. "IFDHCreateChannelByName", "IFDHCreateChannel" and then
  2997. "IO_Create_Channel" instead of the 3 symbols at once.
  2998. Also suppress the error message suppression. Ifd handler v2 or v1
  2999. will display one or two errors for symbols not found.
  3000. * [r5175] src/hotplug_libhal.c: HPReadBundleValues(): duplicate the
  3001. readerName and CFBundleName strings since the originals are
  3002. destroyed by bundleRelease() later
  3003. The reader names were corrupted.
  3004. 2010-08-18 Ludovic Rousseau
  3005. * [r5160] ChangeLog: Fix typo
  3006. 2010-08-17 Ludovic Rousseau
  3007. * [r5157] src/hotplug_libhal.c: HPReadBundleValues(): use the new
  3008. Info.plist parsing API.
  3009. Parsing the CCID Info.plist (159 readers supported) was on a i386
  3010. machine 264306 µs and is now 5547 µs => gain x47 or 4600%
  3011. * [r5156] src/parser.h, src/tokenparser.l: parse the Info.plist
  3012. file only once and generate a list of key/values
  3013. * [r5152] src/hotplug_libusb.c: HPSearchHotPluggables(): create the
  3014. synchronisation pipe only if the HPEstablishUSBNotifications
  3015. thread is created. Avoids to leak resources.
  3016. * [r5151] src/hotplug_libusb.c: HPSearchHotPluggables(): wait for
  3017. initial readers to setup only if HPEstablishUSBNotifications is
  3018. created. Otherwise the process is blocked for ever.
  3019. * [r5150] src/hotplug_libhal.c: HPRegisterForHotplugEvents():
  3020. having no bundle for USB readers is not an error. USB
  3021. support/hotplug is just disabled.
  3022. * [r5149] src/pcscdaemon.c: main(): Log a message if
  3023. HPRegisterForHotplugEvents() fails
  3024. * [r5148] src/hotplug_libusb.c: Do not hardcode the libusb-1.0
  3025. include header path (remove the libusb-1.0/ part)
  3026. 2010-08-16 Ludovic Rousseau
  3027. * [r5147] configure.in: Do not hardcode the libusb.h path.
  3028. See Debian bug #591782 ccid: FTBFS on kfreebsd-*: configure:
  3029. error: libusb.h not found
  3030. * [r5146] c.sh: add --sysconfdir=/etc
  3031. * [r5145] src/pcscdaemon.c: Do not allow restricting defaults
  3032. values of --max-thread, --max-card-handle-per-thread or
  3033. --max-card-handle-per-reader when restricted
  3034. * [r5144] src/pcscdaemon.c: Do not allow APDU logging when
  3035. restricted
  3036. * [r5143] src/pcscdaemon.c: If the process is setuid or setgid it
  3037. may have some restrictions
  3038. Do not allow to specify a configuration file when restricted
  3039. 2010-08-15 Ludovic Rousseau
  3040. * [r5138] ChangeLog, configure.in: release 1.6.4
  3041. * [r5137] configure.in: Do not use sysconfdir as configuration
  3042. directory but ${sysconfdir}/reader.conf.d instead.
  3043. Use --enable-confdir=DIR if you want to set a specific value
  3044. without the reader.conf.d appended.
  3045. Thanks to Kalev Lember for the bug report
  3046. http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0150.html
  3047. * [r5135] ChangeLog, configure.in: release 1.6.3
  3048. * [r5134] src/PCSC/pcsclite.h.in, src/PCSC/winscard.h: Define
  3049. LPSCARD_READERSTATE since this is used in the MSDN prototype.
  3050. Use LPSCARD_READERSTATE in winscard.h instead of
  3051. (SCARD_READERSTATE *) to mimic the MSDN API.
  3052. This partly reverts changeset 5096
  3053. 2010-08-13 Ludovic Rousseau
  3054. * [r5130] UnitaryTests/SCard_fork.py: Also call SCardDisconnect()
  3055. and SCardReleaseContext() in the forked process
  3056. * [r5129] src/winscard_svc.c: ContextThread(): goto exit if
  3057. MSGCheckHandleAssociation() fails instead of just returning no
  3058. error.
  3059. Something wrong happened on the client side (like a fork) and the
  3060. client needs to call SCardEstablishContext() to create a new
  3061. connection.
  3062. * [r5128] src/winscard_svc.c: ContextThread(): fix goto label when
  3063. it _is_ an overflow
  3064. * [r5127] src/winscard_svc.c: ContextThread(): fix goto label when
  3065. it is not an overflow
  3066. * [r5126] src/winscard_clnt.c: Revert changeset 5102 to add
  3067. profiling on the client side again.
  3068. ltrace(1) can't be used with a dynamically loaded (dlopen(3))
  3069. library like it is the case with the majority of PKCS#11 client
  3070. application.
  3071. * [r5125] src/simclist.c: Reset mid field when the list is empty to
  3072. avoid assert() errors
  3073. * [r5124] src/winscard_svc.c: MSGCheckHandleAssociation(): check
  3074. that the context handle is still valid. Calling a PC/SC function
  3075. after SCardReleaseContext() is not supported.
  3076. * [r5123] src/eventhandler.c: Fix typo in comment
  3077. 2010-08-05 Ludovic Rousseau
  3078. * [r5118] configure.in: remove debug line
  3079. * [r5117] configure.in: "/reader.conf.d" is only appended to
  3080. sysconfdir if no value of sysconfdir is provided
  3081. Thanks to Patrice Angelini for the bug report
  3082. * [r5114] src/hotplug_libusb.c: HPAddHotPluggable(): do not use
  3083. libusb_strerror() since it is not yet available in current stable
  3084. libusb (1.0.8)
  3085. * [r5113] src/ifdwrapper.c: Fix compilation warnings
  3086. ifdwrapper.c:166:7: warning: "IFDHANDLERv2" is not defined
  3087. ifdwrapper.c:589:7: warning: "IFDHANDLERv2" is not defined
  3088. ifdwrapper.c:640:7: warning: "IFDHANDLERv3" is not defined
  3089. * [r5112] src/ifdwrapper.c: Check that either IFDHANDLERv1,
  3090. IFDHANDLERv2 or IFDHANDLERv3 is defined if PCSCLITE_STATIC_DRIVER
  3091. is used
  3092. * [r5111] c.sh: No need to use -D_REENTRANT. It was needed for
  3093. LinuxThreads but we do not use LinuxThreads since a long time.
  3094. See Debian bug #475101 "Remove obsolete -D_REENTRANT requirement"
  3095. 2010-08-04 Ludovic Rousseau
  3096. * [r5107] ChangeLog, configure.in: release 1.6.2
  3097. * [r5106] src/Makefile.am: Remove useless $(COREFOUNDATION) from
  3098. libpcsclite_la_LIBADD The library has no Mac OS X specific code.
  3099. * [r5105] src/Makefile.am: Remove undefined $(LIBSMARTCARD) from
  3100. libpcsclite_la_LIBADD
  3101. * [r5104] src/Makefile.am: libpcsclite does not use dlopen() so no
  3102. need to link with $(LIBDL)
  3103. 2010-08-03 Ludovic Rousseau
  3104. * [r5102] src/winscard_clnt.c: Remove client side profiling since
  3105. we can use ltrace(1) with better results
  3106. * [r5098] configure.in: Remove 2 debug traces
  3107. 2010-08-02 Ludovic Rousseau
  3108. * [r5097] src/PCSC/winscard.h, src/winscard.c, src/winscard_clnt.c:
  3109. Use "SCARD_IO_REQUEST *" instead of LPSCARD_IO_REQUEST and "const
  3110. SCARD_IO_REQUEST *" instead of "LPCSCARD_IO_REQUEST
  3111. Should make the code more easy to read
  3112. * [r5096] doc/example/pcsc_demo.c, src/PCSC/pcsclite.h.in,
  3113. src/PCSC/winscard.h, src/testpcsc.c, src/utils/formaticc.c,
  3114. src/winscard.c, src/winscard_clnt.c: Use SCARD_READERSTATE
  3115. instead of SCARD_READERSTATE_A
  3116. Remove definitions of SCARD_READERSTATE_A PSCARD_READERSTATE_A
  3117. and LPSCARD_READERSTATE_A types
  3118. * [r5093] configure.in: Use $libdir instead of $prefix/lib to set
  3119. the default value of usbdropdir
  3120. " Fedora uses /usr/lib on 32 bit and /usr/lib64 on 64 bit
  3121. multilib platforms. "
  3122. Thanks to Kalev Lember for the idea.
  3123. http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0108.html
  3124. * [r5092] c.sh: sysconfdir=/etc by default if prefix=/usr so remove
  3125. the --sysconfdir line
  3126. * [r5091] UnitaryTests/SCardBeginTransaction_Disconnect.py,
  3127. UnitaryTests/SCardConnect_DIRECT.py,
  3128. UnitaryTests/SCardConnect_DIRECT2.py,
  3129. UnitaryTests/SCardExclusiveBehaviour.py,
  3130. UnitaryTests/SCardReconnect.py, UnitaryTests/reset_card.py: Do
  3131. not duplicate the reader index to avoids problems when I want to
  3132. change it.
  3133. 2010-08-01 Ludovic Rousseau
  3134. * [r5082] configure.in: Set sysconfdir to /etc if prefix=/usr
  3135. You should have a default working configuration only with
  3136. --prefix=/usr
  3137. 2010-07-31 Ludovic Rousseau
  3138. * [r5081] c.sh: --enable-muscledropdir is no more supported by
  3139. pcsc-lite since a long time. So remove the line.
  3140. * [r5080] c.sh: --enable-usbdropdir=/usr/lib/pcsc/drivers is now
  3141. the default value. So remove the line.
  3142. * [r5079] configure.in: Default value of usbdropdir is now
  3143. $prefix/lib/pcsc/drivers instead of $prefix/pcsc/drivers
  3144. The new path is the path used on Debian (with prefix-/usr). So no
  3145. need to change the default value.
  3146. 2010-07-27 Ludovic Rousseau
  3147. * [r5073] src/Makefile.am: Create empty directories used by drivers
  3148. Thanks to Kalev Lember for the patch
  3149. http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0065.html
  3150. 2010-07-26 Ludovic Rousseau
  3151. * [r5071] src/hotplug_libhal.c, src/pcscdaemon.c, src/utils.c,
  3152. src/winscard.c: Do not affect and check a variable on the same
  3153. line
  3154. * [r5070] src/readerfactory.c: reformat
  3155. * [r5069] src/winscard.c: Get the value of rContext before its use.
  3156. A simple call to SCardTransmit() crashed with a NULL pointer.
  3157. 2010-07-08 Ludovic Rousseau
  3158. * [r5066] src/readerfactory.c: fix crash with empty config dir
  3159. Thanks to Kalev Lember for the patch
  3160. http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0017.html
  3161. pcscd attempts to read uninitialized memory and free an invalid
  3162. pointer when its configuration directory is empty.
  3163. The patch fixes this by initializing reader_list to NULL.
  3164. ==2658== Conditional jump or move depends on uninitialised
  3165. value(s) ==2658== at 0x40A2EF: RFStartSerialReaders
  3166. (readerfactory.c:1324) ==2658== by 0x40743F: main
  3167. (pcscdaemon.c:522) ==2658== ==2658== Use of uninitialised value
  3168. of size 8 ==2658== at 0x40A2F5: RFStartSerialReaders
  3169. (readerfactory.c:1327) ==2658== by 0x40743F: main
  3170. (pcscdaemon.c:522) ==2658== ==2658== Conditional jump or move
  3171. depends on uninitialised value(s) ==2658== at 0x4C26D25: free
  3172. (vg_replace_malloc.c:325) ==2658== by 0x40A404:
  3173. RFStartSerialReaders (readerfactory.c:1348) ==2658== by 0x40743F:
  3174. main (pcscdaemon.c:522) ==2658== ==2658== Invalid free() / delete
  3175. / delete[] ==2658== at 0x4C26D72: free (vg_replace_malloc.c:325)
  3176. ==2658== by 0x40A404: RFStartSerialReaders (readerfactory.c:1348)
  3177. ==2658== by 0x40743F: main (pcscdaemon.c:522) ==2658== Address
  3178. 0x4222148 is not stack'd, malloc'd or (recently) free'd
  3179. --- pcsc-lite-1.6.1/src/readerfactory.c.orig2010-07-04
  3180. 23:42:14.000000000 +0300 +++
  3181. pcsc-lite-1.6.1/src/readerfactory.configuration2010-07-04
  3182. 23:42:23.000000000 +0300 @@ -1312,7 +1312,7 @@ void
  3183. RFCleanupReaders(void) #ifdef USE_SERIAL int
  3184. RFStartSerialReaders(const char *readerconf) {
  3185. -readerconfSerialReader *reader_list; +reader_listSerialReader
  3186. *reader_list = NULL; int i, rv; /* remember the configuration
  3187. filename for * RFReCheckReaderConf() */
  3188. * [r5065] c.sh, configure.in, src/pcscd.h.in: more idiomatic
  3189. sysconfdir usage
  3190. Thanks to Kalev Lember for the patch
  3191. http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0015.html
  3192. > URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5060 > Log:
  3193. set --sysconfdir=/etc/reader.conf.d so that we parse any file in
  3194. > this directory > > [...] > - --sysconfdir=/etc \ > +
  3195. --sysconfdir=/etc/reader.conf.d \
  3196. It's more common to set sysconfdir to /etc and have configure
  3197. script figure out the subdirectory. The configure script should
  3198. always default to sane values when no arguments are specified.
  3199. The default value for sysconfdir is /usr/local/etc; so the
  3200. configure script should just append /reader.conf.d to that. Right
  3201. now if the user doesn't override sysconfdir, pcsc will try to go
  3202. through every .conf file in /usr/local/etc, and I don't think
  3203. anything good will come out of that.
  3204. I have a patch attached which should make it more idiomatic:
  3205. default to $sysconfdir/reader.conf.d directory.
  3206. 2010-07-02 Ludovic Rousseau
  3207. * [r5062] src/pcscd.h.in: remove PCSCLITE_READER_CONFIG now useless
  3208. * [r5061] src/pcscdaemon.c: main(): use PCSCLITE_CONFIG_DIR instead
  3209. of PCSCLITE_READER_CONFIG to use the directory configured using
  3210. --sysconfdir=...
  3211. * [r5060] c.sh: set --sysconfdir=/etc/reader.conf.d so that we
  3212. parse any file in this directory
  3213. * [r5059] src/configfile.l: DBGetReaderListDir(): add a log line
  3214. when parsing a directory (containing config files)
  3215. * [r5058] src/readerfactory.c, src/readerfactory.h, src/winscard.c:
  3216. RFCheckSharing(), RFLockSharing(), RFUnlockSharing() &
  3217. RFUnlockAllSharing(): add the READER_CONTEXT * rContext parameter
  3218. to avoid recomputing it internally (gain a few CPU cycles)
  3219. 2010-06-29 Ludovic Rousseau
  3220. * [r5047] src/configfile.h, src/configfile.l, src/debuglog.c,
  3221. src/dyn_hpux.c, src/dyn_macosx.c, src/dyn_unix.c,
  3222. src/eventhandler.c, src/eventhandler.h, src/hotplug_generic.c,
  3223. src/hotplug_libhal.c, src/hotplug_libusb.c, src/hotplug_linux.c,
  3224. src/hotplug_macosx.c, src/ifdwrapper.c, src/ifdwrapper.h,
  3225. src/pcscdaemon.c, src/readerfactory.c, src/readerfactory.h,
  3226. src/sys_generic.h, src/sys_unix.c, src/testpcsc.c,
  3227. src/winscard.c, src/winscard_clnt.c, src/winscard_msg.h,
  3228. src/winscard_svc.c, src/winscard_svc.h: update copyright date
  3229. * [r5046] src/hotplug_libusb.c: Remove declaration of 3 static
  3230. functions since they are defined before use. Declaration is then
  3231. useless.
  3232. * [r5045] configure.in: check for libusb-1.0 instead of libusb-0.1
  3233. * [r5044] src/hotplug_libusb.c: port from libusb-0.1 to libusb-1.0
  3234. 2010-06-25 Ludovic Rousseau
  3235. * [r5040] UnitaryTests/MCT_ReaderDirect.py,
  3236. UnitaryTests/control_get_firmware.py,
  3237. UnitaryTests/control_switch_interface.py,
  3238. UnitaryTests/stress_get_firmware.py: use readers() from
  3239. smartcard.System instead of smartcard.pcsc.PCSCReader
  3240. readers() method is now a staticmethod of the PCSCReader class
  3241. since pyscard subversion revision 500.
  3242. 2010-06-24 Ludovic Rousseau
  3243. * [r5039] src/pcscdaemon.c: signal_trap(): implement a "Forced
  3244. suicide" mechanism.
  3245. After 3 Ctrl-C without much reaction from pcscd (in fact the
  3246. drivers) we force the suicide. Sometimes libusb is blocked in a
  3247. kind of dead-lock and kill -9 was the only option.
  3248. * [r5038] UnitaryTests/stress_apdu.py,
  3249. UnitaryTests/stress_get_firmware.py: - better display the list of
  3250. available readers - display the command duration and log to
  3251. stderr if the duration is more than 1 second indicating a problem
  3252. * [r5037] UnitaryTests/stress_get_firmware.py: get firmware version
  3253. of Gemalto readers in loop
  3254. * [r5036] UnitaryTests/stress_apdu.py: send an apdu in loop
  3255. 2010-06-22 Ludovic Rousseau
  3256. * [r5032] src/PCSC/debuglog.h: Add Log5() function
  3257. * [r5031] src/PCSC/ifdhandler.h: fix a comment
  3258. * [r5029] src/PCSC/ifdhandler.h, src/eventhandler.c: Add support of
  3259. TAG_IFD_STOP_POLLING_THREAD to request the stop of the driver
  3260. polling function.
  3261. 2010-06-21 Ludovic Rousseau
  3262. * [r5023] configure.in: Use AC_CHECK_FUNCS() instead of
  3263. AC_CHECK_FUNC() to have HAVE_PTHREAD_CANCEL defined when needed.
  3264. AC_CHECK_FUNC() defined nothing so HAVE_PTHREAD_CANCEL was not
  3265. defined even if pthread_cancel() was available.
  3266. 2010-06-17 Ludovic Rousseau
  3267. * [r5009] src/pcscdaemon.c: main(): in case of auto exit create a
  3268. new session so that Ctrl-C on the application will not also quit
  3269. pcscd
  3270. Thanks to Thierry Fabre for reporting the bug
  3271. 2010-06-13 Ludovic Rousseau
  3272. * [r4992] src/winscard_msg.h: typo in comment
  3273. 2010-06-12 Ludovic Rousseau
  3274. * [r4991] UnitaryTests/SCardBeginTransaction_Disconnect.py,
  3275. UnitaryTests/SCardBlockingBehaviourTest.py,
  3276. UnitaryTests/SCardCancel.py, UnitaryTests/SCardConnect_DIRECT.py,
  3277. UnitaryTests/SCardConnect_DIRECT2.py,
  3278. UnitaryTests/SCardExclusiveBehaviour.py,
  3279. UnitaryTests/SCardGetAttrib.py, UnitaryTests/SCardReconnect.py,
  3280. UnitaryTests/SCard_fork.py, UnitaryTests/ThreadSafe.py,
  3281. UnitaryTests/ThreadSafeConnect.py, UnitaryTests/reset_card.py:
  3282. return exception from smartcard.pcsc.PCSCExceptions when
  3283. appropriate
  3284. 2010-06-09 Ludovic Rousseau
  3285. * [r4986] src/simclist.c: Avoid a division by 0. Closes [#312555]
  3286. simclist bug in pcsc-lite
  3287. * [r4985] src/simclist.c, src/simclist.h: update to version version
  3288. 1.4.4rc4 Apr 2010
  3289. 2010-06-07 Ludovic Rousseau
  3290. * [r4983] src/winscard_clnt.c: SCardEstablishContext(): if pcscd is
  3291. stared by libpcsclite then close all file handles except stdin,
  3292. stdout and stderr so that pcscd does not confiscate ressources
  3293. allocated by the application
  3294. Thanks to Thierry Fabre for the bug report
  3295. 2010-06-04 Ludovic Rousseau
  3296. * [r4978] configure.in: release 1.6.1
  3297. * [r4977] ChangeLog: release 1.6.1
  3298. 2010-06-01 Ludovic Rousseau
  3299. * [r4974] src/misc.h, src/strlcpycat.h, src/tokenparser.l: update
  3300. copyright date
  3301. * [r4969] src/pcscdaemon.c, src/sys_unix.c: pcscd: do not return
  3302. before most of the initialisation are done correctly. The idea is
  3303. that pcscd can return an error code if the daemon fails to start
  3304. correctly (hald not started for example).
  3305. Before the patch pcscd became a daemon, then returned 0 (success)
  3306. and then continued with the initialisation. If the initialisation
  3307. failed it was too late to return an error code. The
  3308. /etc/init.d/pcscd script was not aware of the failure.
  3309. Closes https://bugzilla.redhat.com/show_bug.cgi?id=580321
  3310. "/usr/sbin/pcscd exit codes broken"
  3311. 2010-05-31 Ludovic Rousseau
  3312. * [r4968] src/pcscdaemon.c: main(): return EXIT_FAILURE instead of
  3313. EXIT_SUCCESS if a unknown argument is passed
  3314. 2010-05-29 Ludovic Rousseau
  3315. * [r4967] src/winscard_msg.h, src/winscard_svc.c: Avoids a crash if
  3316. a client sends a unknown command.
  3317. Thanks to Martin Vogt for the bug report
  3318. http://archives.neohapsis.com/archives/dev/muscle/2010-q2/0096.html
  3319. 2010-05-27 Ludovic Rousseau
  3320. * [r4964] src/winscard.c: SCardControl(): do not check for card
  3321. events since we are talking to the reader not the card. A smart
  3322. card removal should not make SCardControl() fail with
  3323. SCARD_W_REMOVED_CARD
  3324. 2010-05-20 Ludovic Rousseau
  3325. * [r4957] UnitaryTests/SCardGetAttrib.py: get
  3326. SCARD_ATTR_VENDOR_IFD_SERIAL_NO PC/SC attribute
  3327. 2010-05-18 Ludovic Rousseau
  3328. * [r4954] src/PCSC/reader.h.in: Add
  3329. PCSCv2_PART10_PROPERTY_bPPDUSupport
  3330. * [r4953]
  3331. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange.py,
  3332. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py:
  3333. Also display the return value of SCardReleaseContext()
  3334. * [r4952] src/pcscd.h.in, src/winscard_clnt.c, src/winscard_msg.c,
  3335. src/winscard_msg.h, src/winscard_svc.c: MessageSend(),
  3336. MessageReceive() & MessageSendWithHeader() do not timeout any
  3337. more. If the other side of the socket dies we will get an error
  3338. from the kernel.
  3339. Add a new MessageReceiveTimeout() to implement
  3340. SCardGetStatusChange() with a timeout.
  3341. The constants PCSCLITE_WRITE_TIMEOUT & PCSCLITE_READ_TIMEOUT are
  3342. now also removed.
  3343. The problem was that if a client does nothing during
  3344. PCSCLITE_READ_TIMEOUT (120 seconds by default) then pcscd
  3345. considers it as a dead client and closes the connection. I guess
  3346. this problem was present since the first version of pcsc-lite but
  3347. nobody complained before.
  3348. Thanks to Thierry Fabre for the bug report.
  3349. * [r4951] src/pcscdaemon.c, src/winscard_clnt.c,
  3350. src/winscard_msg.c, src/winscard_msg.h, src/winscard_msg_srv.c,
  3351. src/winscard_svc.c: rename SHMfoobar() functions in foobar()
  3352. since we do not use shared memory (SHM) anymore
  3353. 2010-05-17 Ludovic Rousseau
  3354. * [r4949] src/hotplug_libusb.c: Add a synchronisation so that if
  3355. pcscd is auto started the initial reader list is available before
  3356. the server takes commands from clients.
  3357. Before the change early calls of SCardListReaders() returned an
  3358. empty list of readers even if a reader was connected.
  3359. Thanks to Patrice Angelini for the bug report
  3360. * [r4948] etc: Remove etc directory completely - serial readers are
  3361. rare => no need for /etc/reader.conf.d/ - pcscd now autostarts =>
  3362. no need for /etc/init.d/pcscd script or equivalent
  3363. * [r4947] Makefile.am, configure.in: Do not install files in /etc
  3364. any more. Serial drivers are rare now.
  3365. * [r4946] etc/Makefile.am: Use $(sysconfdir_exp) instead of
  3366. (removed) $(confdir_exp)
  3367. Fixes [#312498] Wrong installation path for reader.conf.d
  3368. 2010-05-11 Ludovic Rousseau
  3369. * [r4941] UnitaryTests/SCardConnect_DIRECT2.py: Unitary test for
  3370. bug fixed in revision 4940
  3371. * [r4940] src/winscard.c: SCardConnect() & SCardReconnect(): do not
  3372. reset the cardProtocol in SCARD_SHARE_DIRECT case since the card
  3373. have _not_ been reseted. A new PPS negociation would fail.
  3374. See SCardConnect_DIRECT2.py for a Unitary Test
  3375. 2010-05-05 Ludovic Rousseau
  3376. * [r4921] ChangeLog: update date and release for 1.6.0
  3377. * [r4920] ChangeLog, configure.in: release 1.6.0
  3378. 2010-05-04 Ludovic Rousseau
  3379. * [r4918] src/pcscdaemon.c: ExitValue default value is now
  3380. EXIT_FAILURE instead of EXIT_SUCCESS
  3381. * [r4917] src/pcscdaemon.c: main(): remove dead code "used" when no
  3382. reader.conf file is found
  3383. 2010-05-03 Ludovic Rousseau
  3384. * [r4913] src/winscard_clnt.c: SCardEstablishContext(): also log
  3385. the binary name if execl() fails
  3386. * [r4912] src/eventhandler.c: EHDestroyEventHandler(): use
  3387. pthread_cancel() only if it is present (not the case on Android)
  3388. * [r4911] configure.in: Add a check for pthread_cancel() (not
  3389. present on Android)
  3390. * [r4910] src/readerfactory.h: Add missing #include <pthread.h>
  3391. Compilation failed on Android but not on my Debian as the libC is
  3392. different on the two systems. On Debian sys/types.h defines
  3393. pthread types
  3394. 2010-04-29 Ludovic Rousseau
  3395. * [r4906] src/strlcpycat.h: #include <string.h> on plateform that
  3396. have strlcpy() to avoid a warning (Mac OS X and Android)
  3397. error.c: In function ‘pcsc_stringify_error’: error.c:64: warning:
  3398. implicit declaration of function ‘strlcpy’ error.c:64: warning:
  3399. nested extern declaration of ‘strlcpy’
  3400. * [r4905] src/hotplug_linux.c: #include <pthread.h>
  3401. Declare pthread_mutex_* functions
  3402. * [r4904] src/hotplug_linux.c: #include "utils.h"
  3403. Fix hotplug_linux.c:391: error: ‘THREAD_ATTR_DETACHED’ undeclared
  3404. (first use in this function)
  3405. * [r4903] src/hotplug_libusb.c: HPEstablishUSBNotifications(): do
  3406. not call RFReCheckReaderConf if USE_SERIAL is defined. The
  3407. function is not defined in this case.
  3408. * [r4901] configure.in, src/Makefile.am, src/hotplug_libhal.c,
  3409. src/pcscdaemon.c, src/readerfactory.c: Add --disable-serial and
  3410. --disable-usb options
  3411. --disable-serial removes support of /etc/reader.conf gain: 8.0kB
  3412. of .text (12%) and 160 bytes of .bss (4%) for pcscd
  3413. --disable-usb removes support of USB hotplug gain: 9.7kB of .text
  3414. (14%) and 960 bytes of .bss (23%) for pcscd
  3415. If you use both options (and use a static driver configuration)
  3416. gain: 17.7kB of .text (26%) and 1152 bytes of .bss (28%) for
  3417. pcscd
  3418. * [r4900] src/error.c: Define a minimal pcsc_stringify_error() if
  3419. NO_LOG is defined. Only the error code in hex is displayed in
  3420. this case.
  3421. Gain: 2kB of .text (10%) for libpcsclite
  3422. * [r4899] src/pcscdaemon.c: main(): fork() only in case of auto
  3423. exit to not detach from the terminal if launched in stand alone
  3424. forground mode ("pcscd -fda" for example)
  3425. 2010-04-22 Ludovic Rousseau
  3426. * [r4889] src/pcscdaemon.c: main(): always fork() so that pcscd
  3427. always return in --auto-exit mode but do not close stdout yet
  3428. since we may need to send logs
  3429. * [r4888] src/winscard_clnt.c: SCardEstablishContext(): call
  3430. waitpid() to avoid having a defunct pcscd process when pcscd is
  3431. auto started by the client.
  3432. The process becomes defunct because pcscd calls daemon() and
  3433. daemon() does fork() and exit() in the father. The father death
  3434. must then be reclaimed by libpcsclite.
  3435. Thanks to Patrice Angelini for the bug report
  3436. 2010-04-18 Ludovic Rousseau
  3437. * [r4885] src/Makefile.am, src/eventhandler.c,
  3438. src/hotplug_libhal.c, src/hotplug_libusb.c, src/hotplug_linux.c,
  3439. src/ifdwrapper.c, src/pcscdaemon.c, src/readerfactory.c,
  3440. src/readerfactory.h, src/thread_generic.h, src/thread_unix.c,
  3441. src/winscard.c, src/winscard_clnt.c, src/winscard_svc.c: Directly
  3442. use pthread_mutex_* fucntions instead of using wrappers Remove
  3443. thread_unix.c and thread_generic.h now useless
  3444. * [r4884] src/hotplug_libhal.c, src/hotplug_libusb.c,
  3445. src/hotplug_linux.c, src/hotplug_macosx.c, src/readerfactory.h,
  3446. src/utils.c, src/winscard_svc.c: Use pthread_t instead of
  3447. PCSCLITE_THREAD_T
  3448. * [r4883] src/thread_generic.h, src/utils.h: move thread related
  3449. definition from thread_generic.h to utils.h
  3450. * [r4882] src/eventhandler.c, src/hotplug_libhal.c,
  3451. src/hotplug_libusb.c, src/hotplug_linux.c, src/hotplug_macosx.c,
  3452. src/thread_generic.h, src/thread_unix.c, src/utils.c,
  3453. src/utils.h, src/winscard_svc.c: Directly use pthread_* instead
  3454. of SYS_Thread* indirection
  3455. Move SYS_ThreadCreate in utils.c. This function is not just one
  3456. pthread_* call
  3457. 2010-04-16 Ludovic Rousseau
  3458. * [r4877] src/thread_unix.c: SYS_ThreadExit(): remove dead code
  3459. From Sun Studio CC "thread_unix.c", line 108: warning: statement
  3460. not reached
  3461. * [r4875] bootstrap: update versions of autotools used
  3462. 2010-04-15 Ludovic Rousseau
  3463. * [r4874] src/simclist.c: remove ; at end of a { } block defined by
  3464. a macro. The Solaris compiler complains with: "simclist.c", line
  3465. 1317: warning: syntax error: empty declaration
  3466. Thanks to Jörg Schilling for the bug report
  3467. * [r4873] src/sys_unix.c: use fork(), close() and chdir() instead
  3468. of SYS_Fork(), SYS_CloseFile() and SYS_Chdir() in SYS_Daemon() if
  3469. HAVE_DAEMON is not defined (Solaris)
  3470. Thanks to Jörg Schilling for the bug report
  3471. 2010-04-09 Ludovic Rousseau
  3472. * [r4867] src/winscard_svc.c: Log the command return code using
  3473. DEBUG (SCARD_S_SUCCESS) or ERROR (every thing else) level
  3474. 2010-04-08 Ludovic Rousseau
  3475. * [r4866] UnitaryTests/reset_card.py: reset a card using
  3476. SCardDisconnect (default) or SCardReconnect (if an argument is
  3477. passed)
  3478. * [r4865] UnitaryTests/transmit_loop.py: call SCardTransmit in an
  3479. endless loop
  3480. * [r4864] src/winscard.c: SCardReconnect(): mimic the code from
  3481. SCardDisconnect() regarding card event state notifications
  3482. (changed in revision 4862).
  3483. * [r4863] UnitaryTests/Makefile: no more pcsc_demo target
  3484. * [r4862] src/winscard.c: SCardDisconnect(): Set the card event
  3485. state to SCARD_RESET _before_ doing the reset.
  3486. This will avoid an SCardTransmit from another application between
  3487. the card reset and the card event state change. In the
  3488. problematic case the SCardTransmit was sending an APDU in T=1 to
  3489. a reseted card but not yet configured (IFDHSetProtocolParameters
  3490. was not yet called) and still in T=0 (default)
  3491. * [r4861] src/winscard.c: SCardConnect() & SCardReconnect():
  3492. correctly log SCARD_PROTOCOL_RAW protocol instead of "unknown"
  3493. 2010-04-07 Ludovic Rousseau
  3494. * [r4859] src/winscard_msg.c, src/winscard_msg_srv.c: Fix copyright
  3495. name and date
  3496. * [r4858] src/winscard_msg.c: Doxygen: document SHMMessageReceive()
  3497. command argument added in revision 4718
  3498. * [r4857] src/winscard_clnt.c: Doxygen:
  3499. SCARD_ATTR_DEVICE_FRIENDLY_NAME is implemented by
  3500. SCardGetAttrib() if the IFD Handler (driver) returns
  3501. IFD_ERROR_TAG. pcsc-lite then returns the same reader name as
  3502. returned by SCardListReaders.
  3503. 2010-04-01 Ludovic Rousseau
  3504. * [r4851] src/PCSC/reader.h.in: Add PCSCv2_PART10_PROPERTY_*
  3505. defines
  3506. 2010-03-30 Ludovic Rousseau
  3507. * [r4845] src/winscard_clnt.c: SCardEstablishContext(): try to
  3508. relaunch pcscd if SCardCheckDaemonAvailability() succeeds but
  3509. SCardEstablishContextTH() fails. This happens if pcscd crashed
  3510. without cleaning /var/run/pcscd/pcscd.comm
  3511. 2010-03-26 Ludovic Rousseau
  3512. * [r4843] src/PCSC/reader.h.in: add FEATURE_GET_TLV_PROPERTIES and
  3513. FEATURE_CCID_ESC_COMMAND from PC/SC part 10 v2.02.07 March 2010
  3514. 2010-03-22 Ludovic Rousseau
  3515. * [r4839] src/pcscdaemon.c: Call at_exit() instead of exit() since
  3516. the libC of Android is bogus and atexit() does not work as it
  3517. should.
  3518. Thanks to Patrice Angelini for the bug report.
  3519. * [r4838] src/winscard_clnt.c: SCardCheckDaemonAvailability(): use
  3520. stat(2) instead of the now removed SYS_Stat()
  3521. 2010-03-19 Ludovic Rousseau
  3522. * [r4836] src/configfile.l, src/pcscdaemon.c, src/sys_generic.h,
  3523. src/sys_unix.c, src/winscard_msg.c, src/winscard_msg_srv.c,
  3524. src/winscard_svc.c: Remove the one line wrappers from sys_unix.c
  3525. and use directly the POSIX functions instead.
  3526. 2010-03-16 Ludovic Rousseau
  3527. * [r4825] src/Makefile.am: Install pcscd as suid so that autostart
  3528. works correctly (as root)
  3529. * [r4824] TODO: done: remove as much text messages (logs) as
  3530. possible
  3531. * [r4823] configure.in: Display PCSCLITE_FEATURES
  3532. * [r4822] configure.in: Add --enable-embedded (default is no) to
  3533. build pcsc-lite for an embedded system. This will activate the
  3534. NO_LOG option to disable logging and limit RAM and disk
  3535. consumption.
  3536. * [r4821] src/PCSC/debuglog.h, src/debug.c, src/debuglog.c,
  3537. src/hotplug_libhal.c, src/winscard_svc.c: If NO_LOG is defined
  3538. then no log are displayed. The idea is to limit the binaries size
  3539. on disk and RAM consumption at execution time.
  3540. With NO_LOG defined we gain 26% (17 kB) for the .text segment of
  3541. pcscd and 15% (4 kB) for the .text segment of libpcsclite.so (for
  3542. i386)
  3543. * [r4820] src/utils.c: Include config.h before the other header
  3544. files so the configuration set in config.h can be used in the
  3545. other header files (NO_LOG for example)
  3546. * [r4819] src/configfile.l: Include config.h before the other
  3547. header files so the configuration set in config.h can be used in
  3548. the other header files (NO_LOG for example)
  3549. * [r4818] src/Makefile.am, src/debug.c, src/debug.h,
  3550. src/dyn_hpux.c, src/dyn_macosx.c, src/dyn_unix.c, src/sys_unix.c,
  3551. src/tokenparser.l, src/utils.c, src/winscard_clnt.c,
  3552. src/winscard_msg.c: Remove debug.h and use debuglog.h instead.
  3553. They both define the same log API.
  3554. 2010-03-12 Ludovic Rousseau
  3555. * [r4813] UnitaryTests/ThreadSafe.py,
  3556. UnitaryTests/ThreadSafeConnect.py: revert change in revision 4812
  3557. since the problem is now solved in pyscard (revision 382)
  3558. * [r4812] UnitaryTests/ThreadSafe.py,
  3559. UnitaryTests/ThreadSafeConnect.py: do not initialise the library
  3560. in a thread as it crashed on Mac OS X
  3561. 2010-03-09 Ludovic Rousseau
  3562. * [r4809] src/winscard_svc.c: read only accesses to contextsList
  3563. list shall also be protected by a mutex
  3564. * [r4808] src/readerfactory.c: read only accesses to handlesList
  3565. list shall also be protected by a mutex
  3566. * [r4807] src/readerfactory.c, src/readerfactory.h: manipulations
  3567. of handlesList field of ReaderContext should now be thread safe
  3568. * [r4806] src/winscard_svc.c: MSGRemoveContext(): correctly indent
  3569. a line
  3570. * [r4805] src/winscard_svc.c: manipulations of cardsList should now
  3571. be thread safe
  3572. * [r4804] src/winscard_svc.c: remove extra tab
  3573. * [r4803] UnitaryTests/ThreadSafeConnect.py: add more logging
  3574. * [r4802] UnitaryTests/ThreadSafeConnect.py: stress thread safeness
  3575. of SCardConnect/SCardDisconnect
  3576. * [r4801] src/winscard_svc.c: manipulations of contextsList should
  3577. now be thread safe
  3578. * [r4800] UnitaryTests/ThreadSafe.py: stress thread safeness
  3579. 2010-03-04 Ludovic Rousseau
  3580. * [r4793] UnitaryTests/SCardBlockingBehaviourTest.py,
  3581. UnitaryTests/SCardExclusiveBehaviour.py: make pylint happier
  3582. * [r4792] UnitaryTests/MCT_ReaderDirect.py: make pylint happier
  3583. * [r4791] UnitaryTests/control_get_firmware.py: make pylint happy
  3584. * [r4790] UnitaryTests/control_get_firmware.py: remove useless
  3585. import
  3586. * [r4789] UnitaryTests/MCT_ReaderDirect.py,
  3587. UnitaryTests/control_get_firmware.py,
  3588. UnitaryTests/control_switch_interface.py: use list comprehension
  3589. instead of map() (more efficient and pylint does not like map())
  3590. 2010-03-03 Ludovic Rousseau
  3591. * [r4788] UnitaryTests/control_switch_interface.py: make pylint
  3592. happier
  3593. 2010-03-02 Ludovic Rousseau
  3594. * [r4784] src/debuglog.c: debuglog.c is only used by pcscd. So no
  3595. need to use #ifdef PCSCD
  3596. 2010-03-01 Ludovic Rousseau
  3597. * [r4783] TODO: fix typo
  3598. 2010-02-26 Ludovic Rousseau
  3599. * [r4779] configure.in, doc/Makefile.am,
  3600. doc/update-reader.conf.8.in, etc/Makefile.am,
  3601. etc/update-reader.conf.in, src/configfile.h, src/configfile.l,
  3602. src/readerfactory.c: Add the ability to parse all the
  3603. configuration files of a directory instead of just one
  3604. configuration file. update-reader.conf is then now obsolete.
  3605. See Debian bug #565896 http://bugs.debian.org/565896
  3606. 2010-02-25 Ludovic Rousseau
  3607. * [r4778] src/pcscdaemon.c: update copyright
  3608. 2010-02-23 Ludovic Rousseau
  3609. * [r4769] src/winscard_clnt.c: SCardEstablishContextTH() &
  3610. SCardGetStatusChange(): completly initialize structures sent to
  3611. the daemon to avoid a valgrind warning: Syscall param
  3612. socketcall.send(msg) points to uninitialised byte(s)
  3613. * [r4768] UnitaryTests/SCardBlockingBehaviourTest.py: As of
  3614. revision r4719 Linux is now Windows "compatible"
  3615. 2010-02-21 Ludovic Rousseau
  3616. * [r4766] src/misc.h: " The gcc on Solaris 10 combined with the Sun
  3617. loader appears to not handle the gcc visibility attribute
  3618. correctly. The sparc version says it is ignored, the x86 version
  3619. gives linker error. The attached patch sun.gcc.1.5.6-svn-477.txt
  3620. tries to test for gcc on Sun and not use the visibility
  3621. attribute. If on a sun and the compiler is not GCC, try and use
  3622. the Sun __global and __hidden instead. (I did not try the Sun
  3623. Studio compiler with this.) "
  3624. Thanks to Douglas E. Engert for the patch
  3625. http://archives.neohapsis.com/archives/dev/muscle/2010-q1/0127.html
  3626. * [r4765] doc/pcscd.8.in: use @sysconfdir_exp@ instead of (removed)
  3627. @confdir@
  3628. 2010-02-12 Ludovic Rousseau
  3629. * [r4758] src/readerfactory.c: RFStartSerialReaders(): typo in
  3630. comment
  3631. * [r4756] src/configfile.l, src/tokenparser.l: Fix 2 compilation
  3632. warnings
  3633. configfile.c:1151: warning: ‘input’ defined but not used
  3634. tokenparser.c:1167: warning: ‘input’ defined but not used
  3635. * [r4755] src/lassert.h: Fix splint error
  3636. src/pcsc-wirecheck-dist.c:19:164: Body of if clause of if
  3637. statement is empty
  3638. * [r4754] src/hotplug_libhal.c: HPAddDevice(): fix a memory leak
  3639. * [r4753] src/readerfactory.c: RFRemoveReader(): simplify/factorise
  3640. the resources deallocation
  3641. 2010-02-10 Ludovic Rousseau
  3642. * [r4751] etc/update-reader.conf.in: use @sysconfdir@ instead of
  3643. (the now removed) @confdir@
  3644. Thanks to Sébastien Lorquet for the bug report
  3645. http://archives.neohapsis.com/archives/dev/muscle/2010-q1/0098.html
  3646. 2010-02-09 Ludovic Rousseau
  3647. * [r4744] src/readerfactory.c, src/readerfactory.h: use a dynamic
  3648. instead of static allocation for lpcDevice
  3649. * [r4743] src/readerfactory.c: RFAddReader(): allocate an int
  3650. instead of a DWORD for pFeeds
  3651. The patch in revision 4741 was not complete
  3652. * [r4742] src/readerfactory.c, src/readerfactory.h: In struct
  3653. ReaderContext rename pdwMutex to pMutex and change type from
  3654. PDWORD to int *
  3655. * [r4741] src/readerfactory.c, src/readerfactory.h: In struct
  3656. ReaderContext rename pdwFeeds to pFeeds and change type from
  3657. PDWORD to int *
  3658. * [r4740] src/readerfactory.c, src/readerfactory.h: In struct
  3659. ReaderContext remove the now useless dwBlockStatus field
  3660. * [r4739] src/eventhandler.c, src/ifdwrapper.c,
  3661. src/readerfactory.c, src/readerfactory.h, src/winscard.c: In
  3662. struct ReaderContext rename dwSlot to slot and change type from
  3663. DWORD to int
  3664. * [r4738] src/ifdwrapper.c, src/readerfactory.c,
  3665. src/readerfactory.h, src/winscard.c: In struct ReaderContext
  3666. rename dwVersion to version and change type from DWORD to int
  3667. * [r4737] src/ifdwrapper.c, src/readerfactory.c,
  3668. src/readerfactory.h: In struct ReaderContext change dwPort from
  3669. DWORD to int and rename it to port
  3670. Fix a compiler warning readerfactory.c: In function
  3671. ‘RFReCheckReaderConf’: readerfactory.c:1393: warning: comparison
  3672. between signed and unsigned
  3673. * [r4736] src/tokenparser.l: Fix compiler warning
  3674. tokenparser.l: In function ‘tperrorCheck’: tokenparser.l:102:
  3675. warning: unused parameter ‘token_error’
  3676. * [r4735] src/configfile.l, src/readerfactory.c,
  3677. src/readerfactory.h: In struct SerialReader rename dwChannelId in
  3678. channelId since it is an int and no more a DWORD
  3679. * [r4734] src/eventhandler.c: Fix a compiler warning
  3680. eventhandler.c: In function ‘EHStatusHandlerThread’:
  3681. eventhandler.c:494: warning: comparison between signed and
  3682. unsigned
  3683. * [r4733] src/winscard_clnt.c: do not use the uint32_t rv structure
  3684. field but copy it into rv first to avoid a compiler warning
  3685. winscard_clnt.c: In function ?SCardReconnect?:
  3686. winscard_clnt.c:1035: warning: comparison between signed and
  3687. unsigned winscard_clnt.c: In function ?SCardBeginTransaction?:
  3688. winscard_clnt.c:1254: warning: comparison between signed and
  3689. unsigned winscard_clnt.c: In function ?SCardStatus?:
  3690. winscard_clnt.c:1657: warning: comparison between signed and
  3691. unsigned winscard_clnt.c: In function ?SCardTransmit?:
  3692. winscard_clnt.c:2939: warning: comparison between signed and
  3693. unsigned
  3694. * [r4732] src/PCSC/pcsclite.h.in: force the return codes SCARD_* to
  3695. be long since the SCard* functions return a LONG type
  3696. * [r4731] src/eventhandler.c, src/readerfactory.c,
  3697. src/readerfactory.h, src/winscard.c, src/winscard_svc.c: In
  3698. struct ReaderContext dwLockId is used to store a SCARDHANDLE so
  3699. change its type from DWORD to SCARDHANDLE and rename the field to
  3700. hLockId
  3701. Fix 2 compiler warning: winscard.c: In function
  3702. 'SCardDisconnect': winscard.c:847: warning: comparison between
  3703. signed and unsigned winscard_svc.c: In function
  3704. 'MSGRemoveContext': winscard_svc.c:807: warning: comparison
  3705. between signed and unsigned
  3706. * [r4730] src/winscard_msg.c: fix a compilation warning
  3707. winscard_msg.c: In function ‘SHMMessageReceive’:
  3708. winscard_msg.c:252: warning: unused parameter ‘command’
  3709. * [r4729] src/winscard_svc.c: fix 2 compilation warnings
  3710. winscard_svc.c: In function ‘MSGRemoveContext’:
  3711. winscard_svc.c:776: warning: comparison between signed and
  3712. unsigned winscard_svc.c: In function ‘MSGAddHandle’:
  3713. winscard_svc.c:848: warning: comparison between signed and
  3714. unsigned
  3715. * [r4728] src/eventhandler.h, src/winscard_clnt.c: Use READER_STATE
  3716. * instead of PREADER_STATE to make it explicit it is a pointer
  3717. * [r4727] src/eventhandler.c, src/eventhandler.h, src/ifdwrapper.c,
  3718. src/ifdwrapper.h, src/readerfactory.c, src/readerfactory.h,
  3719. src/winscard.c, src/winscard_svc.c: Use READER_CONTEXT * instead
  3720. of PREADER_CONTEXT to make it explicit it is a pointer
  3721. * [r4726] src/readerfactory.c: Fix a compilation warning
  3722. readerfactory.c: In function ‘RFAddReaderHandle’:
  3723. readerfactory.c:1125: warning: comparison between signed and
  3724. unsigned
  3725. * [r4725] src/eventhandler.c, src/readerfactory.c,
  3726. src/readerfactory.h, src/winscard.c: In struct ReaderContext
  3727. rename "dwContexts" to "contexts" since it is no more a DWORD but
  3728. a int32_t
  3729. * [r4724] src/winscard_clnt.c: Fix a compilation warning
  3730. winscard_clnt.c: In function ‘SCardListReaderGroups’:
  3731. winscard_clnt.c:3258: warning: comparison between signed and
  3732. unsigned
  3733. * [r4723] src/pcscd.h.in, src/readerfactory.c, src/readerfactory.h:
  3734. Use dynamic instead of static allocation for the driver library
  3735. filename. The filename is no more limited to 100 characters.
  3736. Closes: [#312332] MAX_LIBNAME too short?
  3737. * [r4722] src/pcscdaemon.c, src/winscard_svc.c, src/winscard_svc.h:
  3738. use int instead of unsigned int for customMaxThreadCounter,
  3739. customMaxReaderHandles and customMaxThreadCardHandles since
  3740. list_size() returns an int and we compare the two values (avoid
  3741. sign mismatch)
  3742. * [r4721] src/winscard_svc.c: fix 2 compilation warnings
  3743. winscard_svc.c: In function ‘CreateContextThread’:
  3744. winscard_svc.c:146: warning: comparison between signed and
  3745. unsigned winscard_svc.c: In function ‘MSGAddHandle’:
  3746. winscard_svc.c:856: warning: comparison between signed and
  3747. unsigned
  3748. 2010-02-08 Ludovic Rousseau
  3749. * [r4720] src/winscard_clnt.c: SCardGetStatusChange(): fix 4
  3750. compilation warnings
  3751. winscard_clnt.c: In function ‘SCardGetStatusChange’:
  3752. winscard_clnt.c:1864: warning: comparison between signed and
  3753. unsigned winscard_clnt.c:1875: warning: comparison between signed
  3754. and unsigned winscard_clnt.c:1911: warning: comparison between
  3755. signed and unsigned winscard_clnt.c:2189: warning: comparison
  3756. between signed and unsigned
  3757. * [r4719] src/winscard_clnt.c: Make SCardReconnect(), SCardStatus()
  3758. and SCardTransmit() block instead of returning
  3759. SCARD_E_SHARING_VIOLATION immediately. These functions will then
  3760. behave like on Windows.
  3761. This can happen if these functions are called when the reader is
  3762. locked by a PCSC transaction
  3763. (SCardBeginTransaction/SCardEndTransaction).
  3764. You can define the environment variable PCSCLITE_NO_BLOCKING to
  3765. use the old behavior.
  3766. Thanks to Jean-Luc Giraud for the patch.
  3767. http://archives.neohapsis.com/archives/dev/muscle/2010-q1/0041.html
  3768. * [r4718] src/winscard_clnt.c, src/winscard_msg.c,
  3769. src/winscard_msg.h, src/winscard_svc.c: add a command parameter
  3770. to SHMMessageReceive() to be able log the ongoing command in case
  3771. of problem
  3772. 2010-02-05 Ludovic Rousseau
  3773. * [r4717] UnitaryTests/SCardExclusiveBehaviour.py: Check the return
  3774. value of SCardConnect() on a reader already used in
  3775. SCARD_SHARE_EXCLUSIVE mode
  3776. * [r4716] src/winscard.c: fix a bug introduced by the previous
  3777. revision
  3778. * [r4715] src/winscard.c: SCardGetAttrib(): check for buffer
  3779. overflow with SCARD_ATTR_DEVICE_FRIENDLY_NAME
  3780. Thanks to Jean-Luc Giraud for complete
  3781. SCARD_ATTR_DEVICE_FRIENDLY_NAME patch
  3782. 2010-02-04 Ludovic Rousseau
  3783. * [r4710] src/PCSC/pcsclite.h.in, src/winscard_clnt.c: add a
  3784. copyright for Martin Paljak
  3785. 2010-02-03 Ludovic Rousseau
  3786. * [r4708] configure.in, src/pcscd.h.in: Use the standard
  3787. --sysconfdir=DIR ($prefix/etc by default) instead of
  3788. --enable-confdir=DIR for defining the directory containing
  3789. reader.conf
  3790. * [r4707] configure.in: sysconfdir_exp is a configuration directory
  3791. not configuration file
  3792. 2010-02-02 Ludovic Rousseau
  3793. * [r4705] src/winscard.c: SCardStatus(): returns
  3794. SCARD_E_SHARING_VIOLATION if the reader is already used More
  3795. conform to Windows
  3796. * [r4704] UnitaryTests/SCardBlockingBehaviourTest.py: allow to use
  3797. any reader and not just the first one
  3798. * [r4703] src/testpcsc.c: test SCARD_ATTR_DEVICE_FRIENDLY_NAME
  3799. * [r4702] src/winscard.c: SCardGetAttrib(): add support of
  3800. SCARD_ATTR_DEVICE_FRIENDLY_NAME as it is better implemented in
  3801. pcscd (it knows the friendly name)
  3802. * [r4701] src/winscard_clnt.c: SCardEstablishContext(): set
  3803. PCSCLITE_PCSCD_ARGS with the argument you want to pass to pcscd
  3804. in autostart Only one argument is passed. The space character is
  3805. not a separator. example: export PCSCLITE_PCSCD_ARGS=-dfa
  3806. * [r4700] src/pcscd.h.in, src/pcscdaemon.c, src/winscard_clnt.c,
  3807. src/winscard_svc.c: pcscd will suicide itself after 60 seconds of
  3808. inactivity if it is started using --auto-exit This is the default
  3809. behavior when pcscd is started by libpcsclite
  3810. * [r4699] src/pcscdaemon.c: do not ignore the SIGALRM signal any
  3811. more since we need it for the auto exit feature
  3812. 2010-01-22 Ludovic Rousseau
  3813. * [r4685] configure.in: add $host to the PCSCLITE_FEATURES
  3814. definition (available with "pcscd -v") to display the CPU
  3815. architecture host is something like x86_64-unknown-linux-gnu
  3816. * [r4683] configure.in: use LT_INIT(disable-static) instead of the
  3817. deprecated AM_DISABLE_STATIC
  3818. Thanks to Roumen Petrov
  3819. 2010-01-21 Ludovic Rousseau
  3820. * [r4682] UnitaryTests/MCT_ReaderDirect.py,
  3821. UnitaryTests/control_get_firmware.py,
  3822. UnitaryTests/control_switch_interface.py: do not try to reset the
  3823. card on exit. We are talking to the reader. A card may NOT be
  3824. present.
  3825. * [r4681] configure.in, src/Makefile.am: Do not completely disable
  3826. building the static version of the library but just disable it by
  3827. default
  3828. Use AM_DISABLE_STATIC in configure.in instead of -shared in
  3829. Makefile.am
  3830. 2010-01-16 Ludovic Rousseau
  3831. * [r4674] UnitaryTests/SCardBlockingBehaviourTest.py: Check the
  3832. behavior of PCSC functions when a PCSC transaction is ongoing
  3833. Thanks to Jean-Luc Giraud for the original code
  3834. * [r4673] src/Makefile.am: use -shared to only provide a shared
  3835. library. If you need to use the static .a library you just need
  3836. to remove -shared
  3837. 2010-01-15 Ludovic Rousseau
  3838. * [r4672] UnitaryTests/control_switch_interface.py: parse error
  3839. code
  3840. * [r4671] UnitaryTests/control_switch_interface.py: improve
  3841. documentation and output
  3842. * [r4670] src/winscard_clnt.c: Only call SCardCheckSameProcess() if
  3843. DO_CHECK_SAME_PROCESS is defined (default is not defined).
  3844. Some thread libraries (on embedded systems for example) have a
  3845. different pid for each thread of a same process. So the check
  3846. using getpid() is wrong and handles are invalidated when they
  3847. should not. The PC/SC function returned SCARD_E_INVALID_HANDLE
  3848. * [r4669] src/winscard_clnt.c: define and use the
  3849. CHECK_SAME_PROCESS macro instead of calling
  3850. SCardCheckSameProcess() directly
  3851. 2010-01-14 Ludovic Rousseau
  3852. * [r4668] src/winscard_clnt.c: Doxygen: update
  3853. SCardGetStatusChange() doc. The function returns on any events,
  3854. not just those specified in dwCurrentState
  3855. * [r4667] TODO: For embedded/constained systems
  3856. - remove as much text messages (logs) as possible to limit the
  3857. size of the binaries (pcscd and libpcsclite)
  3858. - use static driver instead of reader polling and dynamic driver
  3859. loading
  3860. 2010-01-08 Ludovic Rousseau
  3861. * [r4646] src/readerfactory.c: RFInitializeReader(): do not
  3862. dynamically load the driver if PCSCLITE_STATIC_DRIVER is defined
  3863. * [r4645] src/ifdwrapper.c: better support of
  3864. PCSCLITE_STATIC_DRIVER.
  3865. This is used to statically link the reader driver to pcscd. Since
  3866. the link is static you must define the IFDHandler API version at
  3867. compilation time. Either define IFDHANDLERv1, IFDHANDLERv2 or
  3868. IFDHANDLERv3
  3869. * [r4644] src/dyn_unix.c: fix a warning when compiling with
  3870. PCSCLITE_STATIC_DRIVER defined
  3871. dyn_unix.c: In function ‘DYN_CloseLibrary’: dyn_unix.c:47:
  3872. warning: unused variable ‘ret’
  3873. 2010-01-03 Ludovic Rousseau
  3874. * [r4635] src/hotplug_macosx.c: hotplug_macosx.c: In function
  3875. ‘HPDeviceAppeared’: hotplug_macosx.c:70: warning: unused
  3876. parameter ‘refCon’ hotplug_macosx.c: In function
  3877. ‘HPDeviceDisappeared’: hotplug_macosx.c:85: warning: unused
  3878. parameter ‘refCon’
  3879. 2010-01-02 Ludovic Rousseau
  3880. * [r4634] src/simclist.c: fix a compilation warning
  3881. simclist.c:1335: warning: unused parameter ‘el’
  3882. * [r4633] src/error.c: pcsc_stringify_error(): spelling error
  3883. (detected by lintian(1))
  3884. 2010-01-01 Ludovic Rousseau
  3885. * [r4630] src/ifdwrapper.c: add #include <unistd.h> to declare the
  3886. timeval structure
  3887. In file included from ifdwrapper.c:31: utils.h:26: warning:
  3888. ‘struct timeval’ declared inside parameter list utils.h:26:
  3889. warning: its scope is only this definition or declaration, which
  3890. is probably not what you want
  3891. * [r4629] src/dyn_unix.c, src/ifdwrapper.c, src/pcscdaemon.c:
  3892. better handling of PCSCLITE_STATIC_DRIVER as can be used on
  3893. plateforms using µClinux (without dynamic loader)
  3894. Thanks to Guo Wenxue for a proto-patch
  3895. * [r4628] src/hotplug_generic.c, src/hotplug_linux.c,
  3896. src/hotplug_macosx.c: ReCheckSerialReaders variable is not used
  3897. anymore
  3898. * [r4627] src/winscard_msg_srv.c: ReCheckSerialReaders variable
  3899. from hotplug_* is not used anymore
  3900. 2009-12-18 Ludovic Rousseau
  3901. * [r4621] src/winscard_svc.c: typo in log message
  3902. 2009-12-15 Ludovic Rousseau
  3903. * [r4616] src/atrhandler.c: ATRDecodeAtr(): reformat
  3904. * [r4615] src/atrhandler.c: ATRDecodeAtr(): check for TA2 (specific
  3905. mode) even if TD2 is not present "3F 80 10 01" was not parsed
  3906. correctly for example and T=0 was used instead of T=1 (specific
  3907. mode)
  3908. * [r4613] UnitaryTests/MCT_ReaderDirect.py: rename
  3909. FEATURE_MCT_READERDIRECT in FEATURE_MCT_READER_DIRECT
  3910. * [r4612] src/PCSC/reader.h.in: rename FEATURE_MCT_READERDIRECT in
  3911. FEATURE_MCT_READER_DIRECT to be conform with ch. 2.3 of PCSC v2
  3912. part 10
  3913. 2009-12-14 Ludovic Rousseau
  3914. * [r4611] UnitaryTests/SCard_fork.py: Unitary Test for fork()
  3915. detection
  3916. 2009-12-11 Ludovic Rousseau
  3917. * [r4608] src/winscard_clnt.c: Doxygen: add missing error codes
  3918. * [r4607] src/winscard_svc.c: ContextThread(): SCARD_CANCEL return
  3919. SCARD_E_INVALID_HANDLE instead of SCARD_E_INVALID_VALUE if the
  3920. handle is invalid
  3921. * [r4606] src/winscard_clnt.c: Doxygen: document 2 missing
  3922. SCARD_F_COMM_ERROR possible return values
  3923. * [r4605] src/winscard_clnt.c: Doxygen: document 3 missing error
  3924. codes for SCardConnect()
  3925. * [r4604] src/PCSC/pcsclite.h.in: reformat
  3926. * [r4603] src/winscard_clnt.c: use sizeof(SCARD_IO_REQUEST) instead
  3927. of 8 for the .cbPciLength field This is the correct value on
  3928. 64-bit system.
  3929. * [r4602] src/pcscdaemon.c, src/winscard.c: g_rgSCard*Pci are not
  3930. used on the server side
  3931. * [r4601] src/pcscdaemon.c: SIGHUP signal has already been set to
  3932. SIG_IGN. No need to quit on SIGHUP.
  3933. * [r4600] src/pcscdaemon.c: revert revision 4599 and remove the
  3934. second call to signal() instead of the first one. We need to
  3935. clean-up as soon as we created the files.
  3936. * [r4599] src/pcscdaemon.c: remove duplicate calls to signal()
  3937. 2009-12-03 Ludovic Rousseau
  3938. * [r4587] src/winscard_clnt.c: Doxygen: SCardConnect() value 0 for
  3939. dwPreferredProtocols valid only if dwShareMode is
  3940. SCARD_SHARE_DIRECT
  3941. * [r4585] src/winscard_clnt.c: use the more efficient
  3942. SCardCheckSameProcess() instead of SCardCheckDaemonAvailability()
  3943. to detect use of the API after a fork()
  3944. 2009-12-02 Ludovic Rousseau
  3945. * [r4583] src/winscard_clnt.c: Doxygen: SCardEstablishContext()
  3946. Each thread of an application shall use its own SCARDCONTEXT. On
  3947. Windows the same SCARDCONTEXT can be shared by different threads
  3948. of same application.
  3949. 2009-11-27 Ludovic Rousseau
  3950. * [r4580] src/winscard_clnt.c: SCardEstablishContext(): try to
  3951. start the pcscd daemon if not already running
  3952. * [r4579] configure.in: define PCSCD_BINARY
  3953. * [r4577] src/pcscdaemon.c: improve the checking of an already
  3954. running pcscd
  3955. * [r4576] src/winscard_clnt.c: Doxygen: For historical reasons the
  3956. value of SCARD_E_UNSUPPORTED_FEATURE is 0x8010001F in pcsc-lite
  3957. but 0x80100022 in Windows WinSCard
  3958. * [r4575] src/PCSC/pcsclite.h.in: SCARD_E_UNSUPPORTED_FEATURE is
  3959. not a PC/SC Lite specific extension, but its numerical value is
  3960. different on Windows
  3961. 2009-11-26 Ludovic Rousseau
  3962. * [r4574] src/PCSC/pcsclite.h.in, src/error.c: remove pcsc-lite
  3963. specific SCARD_W_INSERTED_CARD code
  3964. SCARD_W_INSERTED_CARD value 0x8010006A was also in collision with
  3965. SCARD_W_SECURITY_VIOLATION
  3966. * [r4573] src/error.c: reorder error codes
  3967. 2009-11-24 Ludovic Rousseau
  3968. * [r4570] src/winscard_clnt.c: do not declare the SCardUnload()
  3969. function removed in revision 4435
  3970. * [r4569] src/winscard_clnt.c: create a SCardInvalidateHandles()
  3971. function from SCardCheckDaemonAvailability() code
  3972. * [r4568] src/winscard_clnt.c: SCardCheckDaemonAvailability(): do
  3973. not delete the context since it is already done by
  3974. SCardCleanContext()
  3975. * [r4567] src/winscard_clnt.c: SCardCleanContext(): deallocate the
  3976. context memory
  3977. 2009-11-23 Ludovic Rousseau
  3978. * [r4566] src/winscard_clnt.c: Doxygen: update SCardControl() list
  3979. of possible error codes partly revert revision 4558
  3980. Thanks to Martin Paljak for the bug report
  3981. http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0079.html
  3982. 2009-11-19 Ludovic Rousseau
  3983. * [r4562] src/eventhandler.c, src/readerfactory.c,
  3984. src/winscard_clnt.c, src/winscard_svc.c: use list_delete()
  3985. instead of list_locate() + list_delete_at()
  3986. * [r4561] src/simclist.c, src/simclist.h: add list_delete()
  3987. "expunge the first found given element from the list"
  3988. 2009-11-18 Ludovic Rousseau
  3989. * [r4560] UnitaryTests/MCT_ReaderDirect.py,
  3990. UnitaryTests/SCardBeginTransaction_Disconnect.py,
  3991. UnitaryTests/SCardCancel.py, UnitaryTests/SCardConnect_DIRECT.py,
  3992. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange.py,
  3993. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py,
  3994. UnitaryTests/SCardReconnect.py,
  3995. UnitaryTests/control_get_firmware.py,
  3996. UnitaryTests/control_switch_interface.py: reformat to make
  3997. pep8(1) happy
  3998. * [r4559] src/winscard_clnt.c: Doxygen improvement
  3999. * [r4558] src/winscard_clnt.c: Doxygen: update SCardControl() list
  4000. of possible error codes
  4001. * [r4554] src/readerfactory.c, src/winscard_clnt.c,
  4002. src/winscard_svc.c: add Jean-Luc Giraud in copyright holders
  4003. because of his patch in revision 4553
  4004. 2009-11-17 Ludovic Rousseau
  4005. * [r4553] src/Makefile.am, src/pcscd.h.in, src/pcscdaemon.c,
  4006. src/readerfactory.c, src/readerfactory.h, src/winscard_clnt.c,
  4007. src/winscard_svc.c, src/winscard_svc.h: Use lists instead of
  4008. fixed size arrays to store handles.
  4009. It is now possible to have: - 200 simultaneous PC/SC clients
  4010. instead of 16 - 200 SCardConnect per client instead of 16 - 200
  4011. clients per reader instead of 16
  4012. The default value of 200 can be changed by giving an argument to
  4013. pcscd --max-thread --max-card-handle-per-thread
  4014. --max-card-handle-per-reader
  4015. Thanks to Jean-Luc Giraud for the big patch
  4016. * [r4552] src/readerfactory.c: RFCreateReaderHandle(): add a
  4017. comment that a 16-bit random is not secure enough
  4018. 2009-11-16 Ludovic Rousseau
  4019. * [r4549] UnitaryTests/SCardReconnect.py: SCardReconnect() should
  4020. block instead of returning SCARD_E_SHARING_VIOLATION
  4021. * [r4548] UnitaryTests/SCardConnect_DIRECT.py: typo in text
  4022. * [r4547] src/winscard_svc.c: remove printf() for debug from
  4023. READ_BODY() macro
  4024. 2009-11-12 Ludovic Rousseau
  4025. * [r4544] UnitaryTests/BufferOverflow.c, src/PCSC/ifdhandler.h,
  4026. src/PCSC/pcsclite.h.in, src/PCSC/reader.h.in,
  4027. src/PCSC/winscard.h, src/PCSC/wintypes.h, src/atrhandler.c,
  4028. src/atrhandler.h, src/configfile.h, src/configfile.l,
  4029. src/debug.c, src/debug.h, src/debuglog.c, src/dyn_generic.h,
  4030. src/dyn_hpux.c, src/dyn_unix.c, src/error.c, src/eventhandler.c,
  4031. src/eventhandler.h, src/hotplug.h, src/hotplug_libhal.c,
  4032. src/hotplug_libusb.c, src/hotplug_linux.c, src/ifdwrapper.c,
  4033. src/ifdwrapper.h, src/lassert.h, src/misc.h, src/parser.h,
  4034. src/pcsc-wirecheck-gen.c, src/pcscd.h.in, src/pcscdaemon.c,
  4035. src/powermgt_generic.c, src/readerfactory.c, src/readerfactory.h,
  4036. src/strlcpycat.h, src/sys_generic.h, src/sys_unix.c,
  4037. src/thread_generic.h, src/thread_unix.c, src/tokenparser.l,
  4038. src/utils.c, src/utils.h, src/utils/formaticc.c,
  4039. src/utils/installifd.c, src/winscard.c, src/winscard_clnt.c,
  4040. src/winscard_msg.c, src/winscard_msg.h, src/winscard_msg_srv.c,
  4041. src/winscard_svc.c, src/winscard_svc.h: update copyright dates
  4042. 2009-11-07 Ludovic Rousseau
  4043. * [r4540] src/winscard_svc.c: remove ducplicate READ_BODY() and
  4044. WRITE_BODY() macros
  4045. 2009-11-06 Ludovic Rousseau
  4046. * [r4538] src/winscard_clnt.c: remove useless PCHANNEL_MAP type
  4047. definition
  4048. * [r4537] src/winscard_clnt.c: remove extra spaces at end of line
  4049. * [r4536] src/hotplug_libusb.c: reindent
  4050. * [r4535] src/hotplug_linux.c: reindent
  4051. * [r4534] src/ifdwrapper.c: reindent
  4052. * [r4533] src/readerfactory.c: RFAddReader(): make comment more
  4053. clear for TAG_IFD_SLOT_THREAD_SAFE
  4054. * [r4532] src/readerfactory.c: RFAddReader(): make comment more
  4055. clear for TAG_IFD_THREAD_SAFE
  4056. 2009-11-05 Ludovic Rousseau
  4057. * [r4531] src/winscard_msg.c, src/winscard_msg_srv.c: use PF_*
  4058. instead of AF_* for socket(2) argument
  4059. Thanks to Sébastien Lorquet for the bug report
  4060. http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0039.html
  4061. * [r4530] src/winscard_msg.c, src/winscard_msg_srv.c: Revert change
  4062. in revision 4395. Solaris does not have (Posix) AF_LOCAL
  4063. Thanks to Douglas E. Engert for the bug report
  4064. http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0038.html
  4065. 2009-11-03 Ludovic Rousseau
  4066. * [r4529] src/readerfactory.h: remove useless pointer types
  4067. 2009-11-02 Ludovic Rousseau
  4068. * [r4528] src/winscard_clnt.c: SCardConnect(), SCardDisconnect() &
  4069. SCardReleaseContext(): correctly handle error cases profiling
  4070. 2009-10-28 Ludovic Rousseau
  4071. * [r4527] src/readerfactory.h, src/thread_generic.h,
  4072. src/thread_unix.c, src/winscard_clnt.c: remove the type
  4073. PCSCLITE_MUTEX_T and use an explicit pointer type (PCSCLITE_MUTEX
  4074. *) instead
  4075. This should avoid bugs like the one corrected in revision 4525
  4076. * [r4525] src/eventhandler.c: correctly use the lock API for
  4077. ClientsWaitingForEvent_lock
  4078. * [r4524] src/pcscdaemon.c, src/readerfactory.c,
  4079. src/readerfactory.h: call exit() in SVCServiceRunLoop() instead
  4080. of RFCleanupReaders() and remove the RFCleanupReaders() parameter
  4081. * [r4523] src/readerfactory.c: use return() instead of exit() if
  4082. DYN_GetAddress() fails
  4083. * [r4522] src/eventhandler.c: explicitly use (void)fct() to ignore
  4084. the returned value
  4085. 2009-10-27 Ludovic Rousseau
  4086. * [r4520] src/eventhandler.c: EHStatusHandlerThread(): call
  4087. EHSignalEventToClients() _after_ logging "Card inserted into ..."
  4088. * [r4519] src/winscard_svc.c: ContextThread(): add the client ID to
  4089. the command log message
  4090. * [r4518] src/winscard_clnt.c: SCardGetStatusChange(): use
  4091. SCARD_*_CONTEXT constants instead of numerical values
  4092. * [r4517] src/eventhandler.h, src/winscard.c: move SCARD_*_CONTEXT
  4093. from winscard.c to eventhandler.h
  4094. * [r4516] src/winscard.c: remove useless SCARD_NO_LOCK define
  4095. * [r4515] src/eventhandler.c: update comment
  4096. * [r4514] src/winscard_clnt.c, src/winscard_msg.c,
  4097. src/winscard_svc.c: SHMMessageReceive() now returns -2 in case of
  4098. timeout and -1 in case of other error
  4099. This is used to correctly handle timeouts in
  4100. SCardGetStatusChange()
  4101. * [r4513] src/winscard_svc.c: ContextThread(): when a client dies
  4102. call EHTryToUnregisterClientForEvent() to unregister it if needed
  4103. * [r4512] src/eventhandler.c, src/eventhandler.h: add
  4104. EHTryToUnregisterClientForEvent()
  4105. 2009-10-18 Ludovic Rousseau
  4106. * [r4497] src/winscard_msg.c: SHMMessageSend(): document the use of
  4107. MSG_NOSIGNAL to ignore SIGPIPE signal
  4108. 2009-10-13 Ludovic Rousseau
  4109. * [r4491] src/Makefile.am: do not use PCSC_CLIENT_SRC variable
  4110. anymore since SCF support has been removed
  4111. * [r4490] src/Makefile.am: libpcsclite does not need to have
  4112. dyn_hpux.c, dyn_macosx.c or dyn_unix.c. These files define
  4113. DYN_LoadLibrary/DYN_CloseLibrary/DYN_GetAddress
  4114. * [r4489] pbx, pcsc.pbproj: remove Xcode files. Apple has its own
  4115. version of pcsc-lite for Mac OS X
  4116. * [r4488] src/winscard_clnt.c: Doxygen(): better documentation for
  4117. SCardCheckDaemonAvailability()
  4118. * [r4487] src/winscard_clnt.c: revert changeset 4485.
  4119. SCardCheckDaemonAvailability() is also used to invalidate the
  4120. PC/SC handles after a fork or a pcscd restart
  4121. * [r4486] configure.in, src/Makefile.am, src/winscard_scf.c: remove
  4122. SCF support (PC/SC over Smart Card Framework). I never used this
  4123. feature and SCF is now dead and replaced by JSR 268
  4124. (javax.smartcardio)
  4125. 2009-10-12 Ludovic Rousseau
  4126. * [r4485] src/winscard_clnt.c: SCardReleaseContext(),
  4127. SCardConnect(), SCardReconnect(), SCardDisconnect(),
  4128. SCardBeginTransaction(), SCardEndTransaction(),
  4129. SCardCancelTransaction(), SCardStatus(), SCardGetStatusChange(),
  4130. SCardControl(), SCardGetSetAttrib(), SCardTransmit(),
  4131. SCardListReaders(), SCardFreeMemory()SCardListReaderGroups(),
  4132. SCardIsValidContext(): do not SCardCheckDaemonAvailability()
  4133. since we will try to talk to the server later. Any communication
  4134. problem will be reported by SHMMessageSendWithHeader()
  4135. * [r4484] src/winscard_clnt.c: SCardDisconnect(): factorize exit
  4136. code
  4137. * [r4483] src/winscard_clnt.c: SCardReconnect(): factorize exit
  4138. code
  4139. * [r4482] src/winscard_clnt.c: SCardConnect(): factorize exit code
  4140. * [r4481] src/winscard_clnt.c: SCardReleaseContext(): release
  4141. context even if communication with the server fails
  4142. * [r4480] src/winscard_msg.c: SHMMessageSend(): use send(...,
  4143. MSG_NOSIGNAL) instead of write(...) to avoid receiving a SIGPIPE
  4144. signal if pcscd has exited. We just get EPIPE as return value
  4145. * [r4479] src/winscard_clnt.c: SCardReconnect(),
  4146. SCardBeginTransaction(), SCardEndTransaction(),
  4147. SCardCancelTransaction(), SCardControl(), SCardGetSetAttrib() and
  4148. SCardTransmit(): do not "synchronize reader states with daemon"
  4149. since reader availability checks are done on the server side.
  4150. 2009-10-09 Ludovic Rousseau
  4151. * [r4476] src/winscard_clnt.c: Doxygen improvement
  4152. * [r4474] src/PCSC/ifdhandler.h: Doxygen: define an IFDHandler
  4153. group
  4154. * [r4473] src/PCSC/ifdhandler.h: Add Doxygen documentation of the
  4155. IFD Handler API
  4156. * [r4472] src/PCSC/ifdhandler.h: remove IFD_Handler 1.0 functions
  4157. prototypes
  4158. * [r4471] src/winscard_clnt.c: Doxygen: use @param[in,out] for in
  4159. and out parameters
  4160. 2009-10-08 Ludovic Rousseau
  4161. * [r4468] doc/example/pcsc_demo.c: cleanly exits in case of unknown
  4162. protocol
  4163. * [r4467] doc/example/pcsc_demo.c: use SCARD_AUTOALLOCATE for
  4164. SCardListReaders()
  4165. * [r4466] src/simclist.c, src/simclist.h: remove svn:executable
  4166. property on source files
  4167. * [r4465] src/sys_generic.h, src/sys_unix.c: Define SYS_Fork() only
  4168. if used (if HAVE_DAEMON is not set)
  4169. * [r4464] src/sys_generic.h, src/sys_unix.c: Remove useless
  4170. SYS_GetPageSize(), SYS_MemoryMap(), SYS_PublicMemoryMap(),
  4171. SYS_PublicMemoryUnmap() and SYS_MMapSynchronize()
  4172. * [r4463] src/sys_generic.h, src/sys_unix.c: Remove useless
  4173. SYS_ReadFile()
  4174. * [r4462] src/sys_generic.h, src/sys_unix.c: Remove useless
  4175. SYS_SeekFile()
  4176. * [r4461] src/sys_generic.h: Remove SYS_ChangePermissions()
  4177. prototype (the function is NOT defined anywhere)
  4178. * [r4460] src/sys_generic.h, src/sys_unix.c: Remove useless
  4179. SYS_GetUID() & SYS_GetGID()
  4180. * [r4459] src/sys_generic.h, src/sys_unix.c: Remove useless
  4181. SYS_GetPID()
  4182. * [r4458] src/sys_generic.h, src/sys_unix.c, src/winscard_clnt.c:
  4183. SYS_Initialize() does nothing. Remove it.
  4184. * [r4457] src/readerfactory.c: Comment out RFSuspendAllReaders()
  4185. and RFAwakeAllReaders(). We do not yet support suspend/resume on
  4186. Linux
  4187. * [r4456] src/readerfactory.c, src/readerfactory.h: remove useless
  4188. RFListReaders()
  4189. * [r4455] src/readerfactory.c, src/readerfactory.h: remove useless
  4190. RFUnblockContext()
  4191. * [r4454] src/readerfactory.c, src/readerfactory.h, src/winscard.c:
  4192. remove useless RFUnblockReader()
  4193. * [r4453] src/pcscd.h.in, src/readerfactory.c, src/winscard_clnt.c:
  4194. do not use contextBlockStatus tpo block/unblock a context. We now
  4195. use SCardCancel() on the server side to unblock
  4196. SCardGetStatusChange()
  4197. * [r4452] doc/Makefile.am, doc/pcsc-lite.bib, doc/pcsc-lite.tex:
  4198. The .tex documentation is no more maintained. The reference
  4199. WinSCard API documentation is from Doxygen now.
  4200. * [r4451] UnitaryTests/SCardConnect_DIRECT.py: add documentation
  4201. * [r4447] src/ifdwrapper.c: IFDControl(): return
  4202. SCARD_E_INSUFFICIENT_BUFFER if the driver returns
  4203. IFD_ERROR_INSUFFICIENT_BUFFER
  4204. * [r4445] src/winscard.c: SCardGetAttrib(): return
  4205. SCARD_E_INSUFFICIENT_BUFFER if the driver returns
  4206. IFD_ERROR_INSUFFICIENT_BUFFER
  4207. Thanks to Emmanuel Deloget for the bug report
  4208. http://archives.neohapsis.com/archives/dev/muscle/2009-q4/0003.html
  4209. * [r4444] src/PCSC/ifdhandler.h: add IFD_ERROR_INSUFFICIENT_BUFFER
  4210. * [r4443] src/winscard.c: SCardReconnect(): log the selected
  4211. protocol (as done in SCardConnect())
  4212. * [r4442] src/winscard_clnt.c: SCardReconnect(): return
  4213. SCARD_E_SHARING_VIOLATION instead of blocking if the reader
  4214. cannot be shared.
  4215. This change was made in revision 2475 but I don't remember why.
  4216. Thanks to Paul Klissner for the bug report
  4217. http://archives.neohapsis.com/archives/dev/muscle/2009-q3/0106.html
  4218. 2009-10-06 Ludovic Rousseau
  4219. * [r4438] src/winscard_clnt.c, src/winscard_msg.h: remove typedefs
  4220. and explicitly use struct for structures
  4221. * [r4437] src/pcsc-wirecheck-gen.c: update to the new client/server
  4222. ABI
  4223. * [r4436] src/utils.c, src/utils.h: remove now useless
  4224. StatSynchronize() and StatSynchronizeContext()
  4225. * [r4435] src/winscard_clnt.c: remove now useless SCardUnload()
  4226. * [r4434] src/eventhandler.c, src/pcscd.h.in, src/pcscdaemon.c,
  4227. src/readerfactory.c, src/winscard.c, src/winscard_clnt.c,
  4228. src/winscard_msg.c, src/winscard_msg.h, src/winscard_msg_srv.c,
  4229. src/winscard_svc.c: redesign the client/server communication: -
  4230. no more shared memory used (allow pcscd and libpcsclite1.so to be
  4231. on different computer and talk over a network) - no more
  4232. difference between short and extended APDU - no more use of a
  4233. /var/run/pcscd/pcscd.events/ directory. events are sent through
  4234. the socket - simpler command format between client and server
  4235. The side effect is that you are not able to mix an old pcscd with
  4236. a new libpcsclite1.so or the reverse. SCardEstablishContext()
  4237. will fail unless you update both sides of the communication.
  4238. * [r4433] src/winscard_msg.c: reformat comment
  4239. * [r4432] src/winscard_svc.c, src/winscard_svc.h: add
  4240. MSGSignalClient()
  4241. * [r4431] src/winscard_msg.h: add struct wait_reader_state_change
  4242. * [r4430] src/pcscd.h.in: add PCSCLITE_WRITE_TIMEOUT and
  4243. PCSCLITE_READ_TIMEOUT
  4244. * [r4429] src/winscard_msg.c: reformat comments
  4245. * [r4428] src/eventhandler.c, src/eventhandler.h: add
  4246. EHRegisterClientForEvent(), EHUnregisterClientForEvent() and
  4247. EHSignalEventToClients()
  4248. * [r4427] src/Makefile.am: add simclist.{c,h} to pcscd dependencies
  4249. * [r4426] src/simclist.c, src/simclist.h: Library to manage lists
  4250. Fetched from http://mij.oltrelinux.com/devel/simclist/
  4251. 2009-10-05 Ludovic Rousseau
  4252. * [r4425] UnitaryTests/SCardCancel.py: display return values even
  4253. if no error returned
  4254. 2009-10-03 Ludovic Rousseau
  4255. * [r4419] src/winscard_clnt.c: Doxygen document SCardConnect()
  4256. difference with Windows for SCARD_SHARE_DIRECT
  4257. 2009-10-02 Ludovic Rousseau
  4258. * [r4418] src/winscard_clnt.c: add Doxygen section: Known
  4259. differences with Microsoft Windows WinSCard implementation
  4260. 2009-09-29 Ludovic Rousseau
  4261. * [r4408] src/pcscdaemon.c: main(): check RFAllocateReaderSpace()
  4262. returned value
  4263. * [r4407] src/winscard_clnt.c: SCardGetStatusChange(): Calling with
  4264. cReaders == 0 will now just return SCARD_S_SUCCESS
  4265. Use the special reader name "\\?PnP?\Notification" to wait for a
  4266. reader event notification
  4267. * [r4406] src/pcscd.h.in: remove comment about PCSCLITE_MAX_READERS
  4268. * [r4405] src/pcscd.h.in: remove useless PCSCLITE_MAX_THREADS
  4269. definition
  4270. * [r4404] src/pcscd.h.in: remove useless
  4271. PCSCLITE_TRANSACTION_TIMEOUT definition
  4272. * [r4403] src/utils.c, src/utils.h, src/winscard.c,
  4273. src/winscard_clnt.c: move time_sub() in utils.c
  4274. * [r4402] src/pcsc-wirecheck-gen.c, src/pcscd.h.in,
  4275. src/winscard_msg.c, src/winscard_msg.h: remove useless
  4276. key[PCSCLITE_MSG_KEY_LEN] field
  4277. 2009-09-28 Ludovic Rousseau
  4278. * [r4400] src/winscard.c: SCardTransmit(): do not limit the minimum
  4279. size of an APDU to 4 bytes. non ISO 7816-4 compliant cards (like
  4280. Mifare DESFIRE) may use shorter commands
  4281. Thanks to Björn Kupfer for the bug report
  4282. * [r4399] src/winscard.c: SCardTransmit(): call IFDControl_v2
  4283. instead of IFDTransmit only if dwProtocol == SCARD_PROTOCOL_RAW
  4284. _and_ ifdhandler is v2.0
  4285. Thanks to Björn Kupfer for the patch
  4286. 2009-09-23 Ludovic Rousseau
  4287. * [r4395] src/winscard_msg.c, src/winscard_msg_srv.c: use the POSIX
  4288. name AF_LOCAL instead of AF_UNIX
  4289. 2009-09-21 Ludovic Rousseau
  4290. * [r4388] src/pcscd.h.in: remove unsuned #define
  4291. PCSCLITE_RW_ATTEMPTS
  4292. 2009-09-17 Ludovic Rousseau
  4293. * [r4387] src/winscard_clnt.c: typo in Doxygen comment
  4294. 2009-09-15 Ludovic Rousseau
  4295. * [r4386] src/winscard_clnt.c: SCardReleaseContext(),
  4296. SCardControl(), SCardTransmit() and SCardListReaders(): add a
  4297. call to PROFILE_END() before exiting with SCARD_E_INVALID_HANDLE
  4298. error code to have a better profiling output
  4299. * [r4385] src/winscard.c:
  4300. SCardEstablishContext()/SCardReleaseContext(): log context value
  4301. in hexadecimal instead of decimal
  4302. * [r4384] src/winscard_msg.c: rename argument blockAmount in
  4303. timeOut to better reflect its function
  4304. 2009-09-08 Ludovic Rousseau
  4305. * [r4378] src/PCSC/reader.h.in: update sruct
  4306. PIN_PROPERTIES_STRUCTURE to be conform with Revision 2.02.06,
  4307. April 2009 of PCSCv2 part 10
  4308. Fields wLcdMaxCharacters and wLcdMaxLines have been removed
  4309. 2009-09-01 Ludovic Rousseau
  4310. * [r4375] src/pcscdaemon.c: signal_reload(): reenable the signal
  4311. handler. This is needed on Solaris and HPUX.
  4312. Thanks to Douglas E. Engert for the patch
  4313. http://archives.neohapsis.com/archives/dev/muscle/2009-q3/0061.html
  4314. 2009-08-31 Ludovic Rousseau
  4315. * [r4374] src/ifdwrapper.c, src/winscard.c: typo in comments
  4316. 2009-08-28 Ludovic Rousseau
  4317. * [r4371] src/hotplug_libhal.c, src/hotplug_libusb.c,
  4318. src/hotplug_linux.c, src/pcscdaemon.c: move definition of
  4319. usbNotifierMutex in the underlying layers where it is used
  4320. 2009-08-27 Ludovic Rousseau
  4321. * [r4367] src/ifdwrapper.c: IFDControl(): return
  4322. SCARD_E_UNSUPPORTED_FEATURE if the driver returned
  4323. IFD_ERROR_NOT_SUPPORTED or IFD_NOT_SUPPORTED
  4324. This is used to separate an unsupported value of ControlCode from
  4325. a general error
  4326. 2009-07-31 Ludovic Rousseau
  4327. * [r4359] UnitaryTests/control_switch_interface.py: switch
  4328. interface on the GemProx DU
  4329. * [r4357] UnitaryTests/control_get_firmware.py: get firmware
  4330. version of Gemalto readers
  4331. 2009-07-30 Ludovic Rousseau
  4332. * [r4354] src/ifdwrapper.c: remove extra spaces at end of line
  4333. * [r4353] src/configfile.l: reformat
  4334. * [r4352] src/configfile.l: remove extra spaces
  4335. 2009-07-28 Ludovic Rousseau
  4336. * [r4349] ChangeLog, configure.in: release 1.5.5
  4337. * [r4344] src/atrhandler.c: remove empty last list
  4338. 2009-07-21 Ludovic Rousseau
  4339. * [r4334] src/winscard_svc.c: MSGFunctionDemarshall(): correctly
  4340. check for buffer overflow in case of SCardControl()
  4341. Bug introduced in revision 4208 included in pcsc-lite 1.5.4
  4342. * [r4333] src/winscard_clnt.c: SCardConnect(): document
  4343. SCARD_SHARE_DIRECT access mode
  4344. * [r4332] src/winscard.c: SCardConnect() and SCardReconnect(): set
  4345. pdwActiveProtocol to SCARD_PROTOCOL_UNDEFINED if
  4346. SCARD_SHARE_DIRECT is used (conform to MSDN)
  4347. * [r4331] UnitaryTests/SCardConnect_DIRECT.py: Unitary test for
  4348. SCardConnect in DIRECT mode
  4349. 2009-07-20 Ludovic Rousseau
  4350. * [r4328] src/testpcsc.c: support SCARD_PROTOCOL_RAW
  4351. * [r4327] src/testpcsc.c: use test_rv() to check SCardTransmit()
  4352. result
  4353. * [r4326] src/winscard.c: SCardTransmit(): if the lower level call
  4354. fails then return the error code instead of always
  4355. SCARD_E_NOT_TRANSACTED
  4356. For example SCARD_E_UNSUPPORTED_FEATURE is returned if
  4357. SCARD_PROTOCOL_RAW is not supported
  4358. 2009-07-17 Ludovic Rousseau
  4359. * [r4321] src/pcsc-wirecheck-gen.c, src/winscard_clnt.c,
  4360. src/winscard_msg.h, src/winscard_svc.c: remove the p in the
  4361. structure field names pioSendPciProtocol, pioSendPciLength,
  4362. pioRecvPciProtocol and pioRecvPciLength since they are not
  4363. pointers
  4364. * [r4320] src/pcsc-wirecheck-gen.c, src/winscard_clnt.c,
  4365. src/winscard_msg.h, src/winscard_svc.c: remove the p in the
  4366. structure field names pdwActiveProtocol, pdwState, pdwProtocol,
  4367. pdwBytesReturned since they are not pointers
  4368. * [r4319] src/pcsc-wirecheck-gen.c, src/winscard_clnt.c,
  4369. src/winscard_msg.h, src/winscard_svc.c: rename structure fields
  4370. phCard and phContext into hCard and hContext since they are not
  4371. pointers
  4372. 2009-07-16 Ludovic Rousseau
  4373. * [r4316] src/PCSC/pcsclite.h.in: #define SCARD_P_SHUTDOWN
  4374. 2009-07-03 Ludovic Rousseau
  4375. * [r4299] UnitaryTests/SCardCancel.py: do not raise an exception if
  4376. the return code is the expected SCARD_E_CANCELLED
  4377. * [r4298] src/pcscdaemon.c: clean_temp_files(): give some time to
  4378. clients to remove their event files before removing the event
  4379. directory
  4380. * [r4297] src/hotplug_libhal.c, src/readerfactory.c: do not try to
  4381. open a device using the libusb scheme if opening it with the
  4382. libhal scheme returns IFD_NO_SUCH_DEVICE
  4383. The device may be composite and the interface found is not CCID
  4384. (HID for example). Just skip this interface and try the next one.
  4385. * [r4296] src/hotplug_libhal.c: HPAddDevice(): add the reader
  4386. interface name if provided by the device
  4387. * [r4294] src/tokenparser.l: LTPBundleFindValueWithKey(): do not
  4388. log an error if no more values are found
  4389. * [r4293] src/tokenparser.l: use '\0' instead of 0
  4390. 2009-07-01 Ludovic Rousseau
  4391. * [r4291] src/atrhandler.h: use int instead of DWORD for Length and
  4392. HistoryLength in _ATR structure to gain 12 bytes on _ATR (and 16
  4393. bytes on _SMARTCARD_EXTENSION). Thanks to pahole(1)
  4394. * [r4290] src/atrhandler.h: reorder fields in the _ATR structure of
  4395. _SMARTCARD_EXTENSION Structure is now 8 bytes shorter on 64-bits
  4396. CPU Thanks to pahole(1)
  4397. * [r4289] src/readerfactory.h: reorder ReaderContext fields to
  4398. avoid padding holes in the strucutre Structure size is now 8
  4399. bytes smaller on 64-bits CPU
  4400. 2009-06-26 Ludovic Rousseau
  4401. * [r4283] UnitaryTests/MCT_ReaderDirect.py: test secoder support
  4402. (using FEATURE_MCT_READERDIRECT)
  4403. 2009-06-24 Ludovic Rousseau
  4404. * [r4272] ChangeLog, configure.in: release 1.5.4
  4405. 2009-06-23 Ludovic Rousseau
  4406. * [r4271] src/winscard_clnt.c: SCardGetStatusChange(): fix in
  4407. revision r4269 was not correct.
  4408. Thanks (again) to Toon Claes for the bug report
  4409. * [r4270] src/winscard_clnt.c: SCardGetStatusChange(): add debug to
  4410. know why the function returns
  4411. 2009-06-22 Ludovic Rousseau
  4412. * [r4269] src/winscard_clnt.c: SCardGetStatusChange(): only check
  4413. the event counter if current state is not SCARD_STATE_EMPTY
  4414. Closes [#311772] "SCardGetStatusChange only works the first time
  4415. after starting pcscd"
  4416. 2009-06-11 Ludovic Rousseau
  4417. * [r4252] UnitaryTests/Makefile: add a clean rule
  4418. 2009-06-05 Ludovic Rousseau
  4419. * [r4249] src/hotplug.h, src/hotplug_libhal.c: give a higher
  4420. priority to a specific driver over the CCID Class driver
  4421. * [r4248] src/parser.h, src/tokenparser.l: add
  4422. LTPBundleFindOptionalValueWithKey() to look for an optional key
  4423. No error is logged if the key is not found
  4424. 2009-06-02 Ludovic Rousseau
  4425. * [r4241] src/debuglog.c: log APDU and SW (--apdu) even if --debug
  4426. is not used
  4427. * [r4240] src/hotplug_libhal.c: HPAddDevice(): use NULL instead of
  4428. an libhal error field since we do not use the error value
  4429. * [r4239] src/hotplug_libhal.c: if RFAddReader() fails with the
  4430. libhal scheme then we try with the (old) libusb scheme.
  4431. This patch should allow proprietary drivers to work even if
  4432. pcsc-lite is compiled with libhal support.
  4433. * [r4238] src/winscard_clnt.c: WaitForPcscdEvent(): check mkfifo(3)
  4434. succeeds
  4435. Thanks to Steve Grubb for the bug report
  4436. 2009-06-01 Ludovic Rousseau
  4437. * [r4237] src/pcscdaemon.c: main(): create the PCSCLITE_EVENTS_DIR
  4438. directory with the sticky bit so only root or the owner of the
  4439. file can remove it
  4440. Thanks to Tomas Mraz for the bug report
  4441. * [r4236] src/utils.c: StatSynchronizeContext(): do not call
  4442. mkfifo(3) since the fifo file is already created by another
  4443. thread.
  4444. 2009-05-28 Ludovic Rousseau
  4445. * [r4234] src/winscard_clnt.c, src/winscard_msg.h,
  4446. src/winscard_svc.c: use a union to avoid "warning: dereferencing
  4447. pointer 'veStr' does break strict-aliasing rules" warnings with
  4448. gcc 4.4
  4449. Thanks to Stanislav Brabec for the patch
  4450. * [r4233] src/testpcsc.c: use a union of fields with different
  4451. types instead of casts to avoid testpcsc.c:313: warning:
  4452. dereferencing type-punned pointer will break strict-aliasing
  4453. rules testpcsc.c:323: warning: dereferencing type-punned pointer
  4454. will break strict-aliasing rules
  4455. Thanks to Stanislav Brabec for the patch
  4456. * [r4232] NEWS: fix musclecard URL
  4457. Thanks to Stanislav Brabec for the patch
  4458. 2009-05-25 Ludovic Rousseau
  4459. * [r4223] Makefile.am, configure.in: generate a .bz2 archive only
  4460. 2009-05-22 Ludovic Rousseau
  4461. * [r4222] src/ifdwrapper.c: IFDControl(): use %LX instead of %Lx in
  4462. a log format
  4463. 2009-05-19 Ludovic Rousseau
  4464. * [r4213] src/pcscdaemon.c: main(): force access rights on
  4465. /var/run/pcscd to be sure it can be used by a libpcsclite client
  4466. without privileges
  4467. Thanks to Sébastien Lorquet for the bug report
  4468. 2009-05-15 Ludovic Rousseau
  4469. * [r4211] UnitaryTests/BufferOverflow.c, UnitaryTests/Makefile,
  4470. UnitaryTests/SCardBeginTransaction.c: port to Mac OS X
  4471. 2009-05-14 Ludovic Rousseau
  4472. * [r4210] src/PCSC/reader.h.in: add Doxygen documentation
  4473. * [r4209] UnitaryTests/BufferOverflow.c, UnitaryTests/Makefile,
  4474. UnitaryTests/SCardBeginTransaction.c: new files
  4475. * [r4208] src/winscard_svc.c: MSGFunctionDemarshall(): detect
  4476. buffer overflows
  4477. Thanks to Sebastian Krahmer for the bug report
  4478. * [r4207] src/winscard_clnt.c: SCardGetAttrib() & SCardSetAttrib():
  4479. debug Doxygen examples
  4480. 2009-05-13 Ludovic Rousseau
  4481. * [r4206] src/pcscdaemon.c: main(): wrong mode file comment
  4482. 2009-05-12 Ludovic Rousseau
  4483. * [r4201] src/utils/formaticc.c: cppcheck: (error) Resource leak:
  4484. fp
  4485. * [r4200] src/utils/formaticc.c: cppcheck: (error) Resource leak:
  4486. fp
  4487. 2009-05-08 Ludovic Rousseau
  4488. * [r3499] src/winscard_clnt.c: SCardEstablishContext(): Doxygen:
  4489. each thread of an application shall use its own SCARDCONTEXT.
  4490. 2009-04-29 Ludovic Rousseau
  4491. * [r3470] ChangeLog, configure.in: release 1.5.3
  4492. 2009-04-27 Ludovic Rousseau
  4493. * [r3469] UnitaryTests/SCardBeginTransaction_Disconnect.py: A bug
  4494. has been corrected in revision 3467 The problem occurs if
  4495. SCardBeginTransaction() are made without corresponding
  4496. SCardEndTransaction(). OpenSC "pkcs11-tool -I" exhibits such a
  4497. behavior.
  4498. * [r3467] src/winscard.c: CardDisconnect(): call
  4499. RFUnlockAllSharing() instead of RFUnlockSharing() to release all
  4500. nested locks. The problem occurs if SCardBeginTransaction() are
  4501. made without corresponding SCardEndTransaction(). OpenSC
  4502. "pkcs11-tool -I" exhibits such a behavior.
  4503. Thanks to Marc Rios Valles for the bug report
  4504. * [r3466] src/readerfactory.c, src/readerfactory.h: add
  4505. RFUnlockAllSharing()
  4506. * [r3465] src/debuglog.c: change default log level from
  4507. PCSC_LOG_INFO to PCSC_LOG_ERROR to limit syslog pollution
  4508. 2009-04-17 Ludovic Rousseau
  4509. * [r3457] UnitaryTests/SCardCancel.py: use SCARD_S_SUCCESS instead
  4510. of 0
  4511. 2009-04-14 Ludovic Rousseau
  4512. * [r3450] src/utils.c: StatSynchronize(): remove event fifo files
  4513. only if they are 60 seconds old. The normal case is for the
  4514. client to remove its one event file after use. The daemon sould
  4515. only remove files from dead clients.
  4516. * [r3449] src/utils.c: StatSynchronize(): use S_ISFIFO() macro
  4517. * [r3448] UnitaryTests/SCardCancel.py: DeprecationWarning: raising
  4518. a string exception is deprecated
  4519. * [r3447] UnitaryTests/SCardCancel.py,
  4520. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange.py,
  4521. UnitaryTests/SCardGetStatusChange/SCardGetStatusChange_PnP.py:
  4522. add license information
  4523. * [r3446] src/winscard_clnt.c: WaitForPcscdEvent(): avoid a
  4524. possible crash due to a race condition
  4525. Thanks to Matheus Ribeiro for the patch
  4526. * [r3445] src/readerfactory.c: #include "utils.h"
  4527. * [r3444] src/readerfactory.c: RFRemoveReader(): call
  4528. StatSynchronize() after a reader removal to signal the event to
  4529. clients
  4530. 2009-04-07 Ludovic Rousseau
  4531. * [r3412] src/Makefile.am, src/powermgt_generic.c,
  4532. src/powermgt_macosx.c: remove powermgt_macosx.c since it is using
  4533. APSL version 1.1 instead of the BSD-like licence like the other
  4534. files
  4535. Thanks to Stanislav Brabec for the bug report
  4536. 2009-03-21 Ludovic Rousseau
  4537. * [r3355] src/PCSC/reader.h.in: add PIN_PROPERTIES_STRUCTURE
  4538. structure and FEATURE_IFD_PIN_PROPERTIES
  4539. Thanks to Martin Paljak for the patch
  4540. 2009-03-20 Ludovic Rousseau
  4541. * [r3352] src/PCSC/pcsclite.h.in: add URL of the error code
  4542. reference (MSDN)
  4543. 2009-03-02 Ludovic Rousseau
  4544. * [r3334] src/PCSC/pcsclite.h.in, src/PCSC/wintypes.h, src/debug.c,
  4545. src/debuglog.c, src/thread_generic.h: remove support of WIN32
  4546. * [r3333] src/PCSC/pcsclite.h.in: add URL of error codes origines
  4547. (MSDN)
  4548. 2009-03-01 Ludovic Rousseau
  4549. * [r3332] src/PCSC/pcsclite.h.in: do not use /* inside a comment
  4550. * [r3331] src/PCSC/pcsclite.h.in: add missing defines according to
  4551. http://msdn.microsoft.com/en-us/library/aa924526.aspx
  4552. 2009-02-09 Ludovic Rousseau
  4553. * [r3314] src/winscard_clnt.c: Comment revision 3313 patch
  4554. * [r3313] src/winscard_clnt.c: SCardEstablishContextTH(): check we
  4555. do not reuse an already allocated hContext
  4556. Thanks to Daniel Nobs for the bug report and patch Closes:
  4557. [#311455] Error in SCardEstablishContext
  4558. 2009-02-06 Ludovic Rousseau
  4559. * [r3306] ChangeLog, configure.in: release 1.5.2
  4560. * [r3305] src/eventhandler.c: EHStatusHandlerThread(): call
  4561. StatSynchronize() before exiting the thread. Without this
  4562. SCardGetStatusChange() may not return.
  4563. Thanks to Roberto Rizza for the bug report and patch.
  4564. * [r3304] src/hotplug_libhal.c, src/pcsc-wirecheck-gen.c,
  4565. src/pcsc-wirecheck-main.c, src/pcscdaemon.c, src/readerfactory.c,
  4566. src/testpcsc.c, src/winscard.c, src/winscard_clnt.c: use
  4567. (void)param; for unused function parameters to avoid compiler
  4568. warnings
  4569. 2009-02-05 Ludovic Rousseau
  4570. * [r3303] src/readerfactory.c: reformat comments
  4571. 2009-02-04 Ludovic Rousseau
  4572. * [r3298] TODO: do not open the reader USB device if no client is
  4573. using the reader
  4574. 2009-01-29 Ludovic Rousseau
  4575. * [r3295] src/readerfactory.c: RFLockSharing() & RFUnlockSharing():
  4576. add a mutex to avoid a race condition
  4577. Closes: [#311377] Race condition in SCardBeginTransaction
  4578. 2009-01-28 Ludovic Rousseau
  4579. * [r3294] src/ifdwrapper.c: log TxBuffer and RxBuffer if the
  4580. SCardControl() command failed.
  4581. Closes: [#311376] PCSC_LOG_VERBOSE via -dd; print details of
  4582. "Card not transacted"
  4583. 2009-01-24 Ludovic Rousseau