1. 01 Mar, 2017 1 commit
  2. 22 Feb, 2017 1 commit
  3. 16 Aug, 2016 1 commit
    • Jakub Jelen's avatar
      Do not fail, if the caller didn't pick up response from previous call · ad591057
      Jakub Jelen authored
      
      
      During our testing of a new CAC driver in OpenSC, with this library, we
      encountered a problem with |libcacard| failing and the driver returning
      only a fraction of the requested objects.
      
      The problem is that the Emulator wants to return the data (properly
      signalized by 61 (RESPONSE BYTES) in SW1), but this is ignored for some
      reason in some of our calls from OpenSC. The Emulator should not fail
      hard for the next independent request, rather silently drop the buffer
      and serve the ongoing APDU request (I would left for consideration to
      somehow log such problem).
      
      Patch was successfully tested on Fedora 24 host and solves our problem
      (though we worked around the problem already in the driver too).
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      ad591057
  4. 03 Mar, 2016 2 commits
  5. 03 Dec, 2015 1 commit
  6. 24 Nov, 2015 4 commits
  7. 19 Nov, 2015 3 commits
  8. 14 Oct, 2015 2 commits
  9. 13 Oct, 2015 1 commit
  10. 12 Oct, 2015 2 commits
  11. 09 Oct, 2015 14 commits
  12. 08 Oct, 2015 4 commits
    • Fabiano Fidêncio's avatar
      mingw: include <winsock2.h> and link to ws2_32 · e47693ef
      Fabiano Fidêncio authored
      Otherwise the following errors can be faced:
      src/vscclient-vscclient.o: In function `send_msg':
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:122: undefined
      reference to `_imp__htonl@4'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:124: undefined
      reference to `_imp__htonl@4'
      src/vscclient-vscclient.o: In function `on_host_init':
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:260: undefined
      reference to `_imp__ntohl@4'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:273: undefined
      reference to `_imp__ntohl@4'
      src/vscclient-vscclient.o: In function `do_socket_read':
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:332: undefined
      reference to `_imp__ntohl@4'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:333: undefined
      reference to `_imp__ntohl@4'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:334: undefined
      reference to `_imp__ntohl@4'
      src/vscclient-vscclient.o: In function `connect_to_qemu':
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:615: undefined
      reference to `_imp__socket@12'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:628: undefined
      reference to `_imp__getaddrinfo@16'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:636: undefined
      reference to `_imp__connect@12'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:645: undefined
      reference to `_imp__freeaddrinfo@4'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:650: undefined
      reference to `_imp__freeaddrinfo@4'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:652: undefined
      reference to `_imp__closesocket@4'
      src/vscclient-vscclient.o: In function `main':
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:676: undefined
      reference to `_imp__WSAStartup@8'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:677: undefined
      reference to `_imp__WSAGetLastError@0'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:778: undefined
      reference to `_imp__htonl@4'
      /home/ffidenci/src/upstream/libcacard/src/vscclient.c:791: undefined
      reference to `_imp__closesocket@4'
      collect2: error: ld returned 1 exit status
      Makefile:656: recipe for target 'vscclient.exe' failed
      make[2]: *** [vscclient.exe] Error 1
      make[2]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
      Makefile:774: recipe for target 'all-recursive' failed
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
      Makefile:495: recipe for target 'all' failed
      make: *** [all] Error 2
      e47693ef
    • Fabiano Fidêncio's avatar
      mingw: include ws2tcpip header · 3a1dd01c
      Fabiano Fidêncio authored
      This header has the definition of getaddrinfo, according to:
      https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520(v=vs.85).aspx
      3a1dd01c
    • Fabiano Fidêncio's avatar
      mingw: avoid problems for using %zd (C99) · f59be583
      Fabiano Fidêncio authored
      Otherwise the following problem can be faced:
      src/vscclient.c: In function 'connect_to_qemu':
      src/vscclient.c:642:16: error: unknown conversion type character 'z' in format [-Werror=format=]
               printf("Connected (sizeof Header=%zd)!\n", sizeof(VSCMsgHeader));
                               ^
      src/vscclient.c:642:16: error: too many arguments for format [-Werror=format-extra-args]
      f59be583
    • Fabiano Fidêncio's avatar
      mingw: remove cac_is_cac_card dead code · 99caa07a
      Fabiano Fidêncio authored
      Without removing cac_is_cac_card the following error can be faced:
      
      Cannot export cac_is_cac_card: symbol not defined
      collect2: error: ld returned 1 exit status
      
      Found a not so old QEMU thread about this:
      https://www.mail-archive.com/qemu-devel%40nongnu.org/msg291698.html
      99caa07a
  13. 22 Sep, 2015 2 commits
  14. 21 Sep, 2015 2 commits