1. 15 Aug, 2018 1 commit
  2. 08 Aug, 2018 1 commit
  3. 06 Aug, 2018 1 commit
    • Jakub Jelen's avatar
      tests: Create separate hardware tests · 5cdc91f9
      Jakub Jelen authored
       * These tests are supposed to run against existing CAC card
         connected to local computer, which should be presenting
         certificates with 1024 b keys.
      
       * These tests are skipped in case there is no card available.
      
       * This also extends the existing testsuite with tests for
         various empty applets
      
       * The setup-softhsm2 script goes through the whole setting of
         environment, soft token, generating testing keys, certificates.
      
       * The NSS DB needs to be created under tests/hwdb/ and local
         pkcs#11 module needs to be added to the database
      Signed-off-by: 's avatarJakub Jelen <jjelen@redhat.com>
      Reviewed-by: 's avatarRobert Relyea <rrelyea@redhat.com>
      [ Marc-André - various fixes for make check & distcheck ]
      Signed-off-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      5cdc91f9
  4. 02 Aug, 2018 3 commits
    • Jakub Jelen's avatar
      tests: Test previously introduced applets · 65750119
      Jakub Jelen authored
       * Make sure the GET PROPERTIES APDU returns something that can be parsed
         by our SimpleTLV parser
      
       * Make sure the GET ACR APDU returns something reasonable on ACA applet
         with valid and invalid parameters
      
       * Make sure the READ BUFFER APDU returns valid buffers
      
       * Validate PKI properties buffer matches the expected key size
      
       * Separate test for  GET RESPONSE APDU
      Signed-off-by: 's avatarJakub Jelen <jjelen@redhat.com>
      Reviewed-by: 's avatarRobert Relyea <rrelyea@redhat.com>
      Message-Id: <20180802094407.4104-8-jjelen@redhat.com>
      65750119
    • Jakub Jelen's avatar
      ACA Applet · c130d6ca
      Jakub Jelen authored
       * The Access Control Applet is used to discover other applets
         in the card, discover Access Control Rules for various opperations
         and provides information about authentication mechanisms.
      
       * The ACA provides many structures that are quite independent from
         the rest of CAC so it is implemented in separate file.
      
       * All the structures are annotated with the references to specifications
      
       * Implements structures and access functions in ACA Applet
         * Access Control Rules table
         * Applet/Object Access Control Rules table
         * Access Method Provider table
         * Service Applet Table
      
         (from "5.3.3.5 Get ACR APDU" of GSC-IS 2.1)
      Signed-off-by: 's avatarJakub Jelen <jjelen@redhat.com>
      Reviewed-by: 's avatarRobert Relyea <rrelyea@redhat.com>
      Message-Id: <20180802094407.4104-7-jjelen@redhat.com>
      c130d6ca
    • Jakub Jelen's avatar
      Card Manager Applet · b2023ced
      Jakub Jelen authored
       * The card manager applet from Global Platform is common in
         Java Cards.
       * This commit fixes its location and implement appropriate
         responses to APDUs in separate independent file which can
         be used in other cards in future.
       * The responses to SELECT APDU are still handled in
         the generic ISO 7816 code, but the responses are improved.
       * This affects also the existing testsuite, which needs
         adjustments, since the SELECT APDU retunrs different data.
       * This loads the GP applet separately from CAC applet
      Signed-off-by: 's avatarJakub Jelen <jjelen@redhat.com>
      Reviewed-by: 's avatarRobert Relyea <rrelyea@redhat.com>
      Message-Id: <20180802094407.4104-6-jjelen@redhat.com>
      b2023ced
  5. 31 Jul, 2018 4 commits
  6. 24 Nov, 2015 1 commit
  7. 19 Nov, 2015 1 commit
  8. 14 Oct, 2015 1 commit
  9. 13 Oct, 2015 1 commit
  10. 12 Oct, 2015 1 commit
  11. 09 Oct, 2015 6 commits
  12. 08 Oct, 2015 2 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: 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
  13. 22 Sep, 2015 2 commits
  14. 21 Sep, 2015 1 commit
  15. 15 Sep, 2015 1 commit