Skip to content
Snippets Groups Projects
  1. Mar 01, 2017
  2. Feb 22, 2017
  3. Aug 16, 2016
    • 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. Mar 03, 2016
  5. Dec 03, 2015
  6. Nov 24, 2015
  7. Nov 19, 2015
  8. Oct 14, 2015
  9. Oct 13, 2015
  10. Oct 12, 2015
  11. Oct 09, 2015
  12. Oct 08, 2015
    • 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. Sep 22, 2015
  14. Sep 21, 2015
Loading