Skip to content
Snippets Groups Projects
  1. Apr 10, 2025
  2. Mar 28, 2025
  3. Mar 27, 2025
  4. Mar 25, 2025
  5. Mar 19, 2025
  6. Mar 05, 2025
  7. Feb 28, 2025
    • Ludovic Rousseau's avatar
      65dc3d60
    • Ludovic Rousseau's avatar
      SetParameters: use a larger buffer for the answer · 8feee6a2
      Ludovic Rousseau authored
      The Protocol Data Structure is:
      - 5 bytes long for a T=0 card
      - 7 bytes long for a T=1 card
      
      It may happen that the driver sends parameters for a T=0 card (5 bytes)
      but the reader answers with a T=1 buffer (7 bytes).
      The buffer is then too small for libusb and we get a LIBUSB_ERROR_OVERFLOW
      error.
      
      This should not happen in normal use but may happen with my HandlerTest
      tool when I insert a T=1 card and ask for a T=0 communication. Some
      reader (like the Cherry Smart Terminal 1150) may answer with a T=1
      Protocol Data Structure.
      8feee6a2
  8. Feb 25, 2025
    • Ludovic Rousseau's avatar
      Add HSIC CCID-Reader · db1d5928
      Ludovic Rousseau authored
      db1d5928
    • Ludovic Rousseau's avatar
      InterruptRead: do not talk to disconnected interfaces · a2d26838
      Ludovic Rousseau authored
      This happened on composite devices with 2 or more CCID interfaces.
      
      When the device is removed the first interface is correctly stopped but
      the driver and pcsc-lite are still trying to use the other CCID
      interfaces. We then get libusb errors:
      00000025 [139657349199552] ../src/ccid_usb.c:1614:InterruptRead() libusb_submit_transfer failed: LIBUSB_ERROR_NO_DEVICE
      a2d26838
    • Ludovic Rousseau's avatar
      Disconnect all the interfaces on device removal · 76d8f7d8
      Ludovic Rousseau authored
      When a device is removed (unplugged) we must mark disconnected all the
      CCID interfaces and not just all the slots.
      
      On a composite device (2 or more CCID interfaces) the driver was still
      trying to talk to the second (or more) CCID interface and generated
      libusb errors LIBUSB_ERROR_NO_DEVICE.
      76d8f7d8
  9. Feb 09, 2025
  10. Feb 08, 2025
  11. Jan 24, 2025
  12. Jan 13, 2025
  13. Dec 15, 2024
  14. Dec 13, 2024
    • Ran Benita's avatar
      Don't assume that all notifications are NotifySlotChange · 8bd1acf4
      Ran Benita authored
      CCID defines another type of message type on the interrupt pipe,
      HardwareError, and others may also be conceivably sent. So check the
      message type instead of assuming it's a NotifySlotChange.
      
      While at it, I added debug logging of HardwareError, it might be useful
      for someone.
      8bd1acf4
    • Ran Benita's avatar
      Add bMessageType constants · 111824c3
      Ran Benita authored
      This is somewhat nice for readability, but will be useful for the next
      commit.
      111824c3
  15. Dec 11, 2024
  16. Nov 26, 2024
  17. Oct 24, 2024
    • Maksim Ivanov's avatar
      Mark suitable variables and functions static · bbc733fe
      Maksim Ivanov authored and Ludovic Rousseau's avatar Ludovic Rousseau committed
      It seems generally useful to mark "local" things as static, so that they
      can't cause symbol collision between different source files.
      bbc733fe
    • Ludovic Rousseau's avatar
      Hide unexported symbols · 42270064
      Ludovic Rousseau authored
      We now have:
      $ nm -g --defined-only libccid.so
      000000000000bf90 T IFDHCloseChannel
      000000000000ea40 T IFDHControl
      000000000000bf80 T IFDHCreateChannel
      000000000000bf70 T IFDHCreateChannelByName
      0000000000010ad0 T IFDHGetCapabilities
      0000000000010880 T IFDHICCPresence
      000000000000c1b0 T IFDHPowerICC
      000000000000c030 T IFDHSetCapabilities
      000000000000c5d0 T IFDHSetProtocolParameters
      000000000000e260 T IFDHTransmitToICC
      
      Thanks to Maksim Ivanov for the idea
      " Mark suitable variables and functions static #147 "
      https://github.com/LudovicRousseau/CCID/pull/147
      42270064
    • Ludovic Rousseau's avatar
      Fix compiler warning: variable may be used uninitialized · ab307eaa
      Ludovic Rousseau authored
      ../src/commands.c: In function ‘CmdEscapeCheck’:
      ../src/commands.c:1057:48: warning: ‘old_read_timeout’ may be used uninitialized [-Wmaybe-uninitialized]
       1057 |                 ccid_descriptor -> readTimeout = old_read_timeout;
            |                                                ^
      ../src/commands.c:948:13: note: ‘old_read_timeout’ was declared here
        948 |         int old_read_timeout;
            |             ^
      ab307eaa
  18. Oct 10, 2024
  19. Sep 06, 2024
  20. Aug 16, 2024
  21. Aug 08, 2024
  22. Jul 17, 2024
  23. Jul 05, 2024
  24. Jun 23, 2024
  25. Jun 17, 2024
    • Ludovic Rousseau's avatar
      meson: parse depends on pthread · 7ae4a5c1
      Ludovic Rousseau authored
      Fix link issue on Ubuntu 20.04
      
      $ ninja
      [32/33] Linking target parse.
      FAILED: parse
      cc  -o parse 'parse@exe/meson-generated_tokenparser.c.o' 'parse@exe/src_parse.c.o' 'parse@exe/src_debug.c.o' 'parse@exe/src_ccid_usb.c.o' 'parse@exe/src_sys_unix.c.o' 'parse@exe/src_strlcpy.c.o' 'parse@exe/src_simclist.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib/x86_64-linux-gnu/libusb-1.0.so /usr/lib/x86_64-linux-gnu/libz.so -Wl,--end-group
      /usr/bin/ld: parse@exe/src_ccid_usb.c.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
      /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
      collect2: error: ld returned 1 exit status
      [33/33] Generating Info.plist with a meson_exe.py custom command.
      ninja: build stopped: subcommand failed.
      
      Thanks to Peter Helcmanovsky for the bug report and patch.
      7ae4a5c1
  26. Jun 11, 2024
  27. Jun 07, 2024
    • Ludovic Rousseau's avatar
      github actions: compile also using clang · 56673026
      Ludovic Rousseau authored
      56673026
    • Ludovic Rousseau's avatar
      Fix build issue on Ubuntu 22.04 · 3a179d98
      Ludovic Rousseau authored
      The error was:
      [30/32] Linking target parse
      FAILED: parse
      cc  -o parse parse.p/meson-generated_tokenparser.c.o parse.p/src_parse.c.o parse.p/src_debug.c.o parse.p/src_ccid_usb.c.o parse.p/src_sys_unix.c.o parse.p/src_simclist.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib/x86_64-linux-gnu/libusb-1.0.so /usr/lib/x86_64-linux-gnu/libz.so -Wl,--end-group
      /usr/bin/ld: parse.p/src_debug.c.o: in function `log_xxd':
      /home/user/workspace/CCID/builddir/../src/debug.c:221: undefined reference to `strlcpy'
      collect2: error: ld returned 1 exit status
      
      Thanks to Jahns Ralf for the bug report.
      3a179d98
  28. Jun 05, 2024
    • Ludovic Rousseau's avatar
      GetSetNAD: fix Python warnings · 1b5f11e1
      Ludovic Rousseau authored
      ./GetSetNAD.py:35: SyntaxWarning: "is" with a literal. Did you mean "=="?
        if status is 0:
      ./GetSetNAD.py:51: SyntaxWarning: "is" with a literal. Did you mean "=="?
        if status is 0:
      1b5f11e1
Loading