1. 04 4月, 2011 26 次提交
  2. 03 4月, 2011 7 次提交
  3. 02 4月, 2011 7 次提交
    • A
      ccid: add docs · 1056c02b
      Alon Levy 提交于
      Add documentation for the usb-ccid device and accompanying two card
      devices, ccid-card-emulated and ccid-card-passthru.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      1056c02b
    • A
      ccid: add ccid-card-emulated device · 585738a6
      Alon Levy 提交于
      This devices uses libcacard (internal) to emulate a smartcard conforming
      to the CAC standard. It attaches to the usb-ccid bus. Usage instructions
      (example command lines) are in the following patch in docs/ccid.txt. It
      uses libcacard which uses nss, so it can work with both hw cards and
      certificates (files).
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      changes from v20->v21: (Jes Sorenson review)
       * cosmetics
       * use qemu-thread and qemu_malloc/qemu_free
      
      changes from v19->v20:
       * checkpatch.pl
      
      changes from v18->v19:
       * add qdev.desc
       * backend: drop the enumeration property, back to using a string one.
      
      changes from v16->v17:
       * use PROP_TYPE_ENUM for backend
      
      changes from v15->v16:
       * fix error reporting in initfn
       * bump copyright year
       * update copyright license
      
      changes from v1:
       * remove stale comments, use only c-style comments
       * bugfix, forgot to set recv_len
       * change reader name to 'Virtual Reader'
      585738a6
    • R
      libcacard: add docs · 65794b43
      Robert Relyea 提交于
      65794b43
    • R
      libcacard: add vscclient · 2ac85b93
      Robert Relyea 提交于
      client to talk to ccid-card-passthru and use smartcard on client to
      perform actual operations.
      
      v23->v24 changes: (Jes Sorensen review 2)
       * use qemu_socket instead of socket
       * use fprintf(stderr,..) for errors
       * remove unneccessary includes since using qemu_common.h
      2ac85b93
    • R
      libcacard: initial commit · 111a38b0
      Robert Relyea 提交于
      libcacard emulates a Common Access Card (CAC) which is a standard
      for smartcards. It is used by the emulated ccid card introduced in
      a following patch. Docs are available in docs/libcacard.txt
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      changes from v24->v25:
       * Fix out of tree builds.
       * Fix build with linux-user targets.
      
      changes from v23->v24: (Jes Sorensen review 2)
       * Makefile.target: use obj-$(CONFIG_*) +=
       * remove unrequired includes, include qemu-common before qemu-thread
        * required adding #define NO_NSPR_10_SUPPORT (harmless)
      
      changes from v22->v23:
       * configure fixes: (reported by Stefan Hajnoczi)
        * test a = b, not a == b (second isn't portable)
        * quote $source_path in case it contains spaces
         - this doesn't really help since there are many other places
           that need similar fixes, not introduced by this patch.
      
      changes from v21->v22:
       * fix configure to not link libcacard if nss not found
          (reported by Stefan Hajnoczi)
       * fix vscclient linkage with simpletrace backend
          (reported by Stefan Hajnoczi)
       * card_7816.c: add missing break in ERROR_DATA_NOT_FOUND
          (reported by William van de Velde)
      
      changes from v20->v21: (Jes Sorensen review)
       * use qemu infrastructure: qemu-thread, qemu-common (qemu_malloc
        and qemu_free), error_report
       * assert instead of ASSERT
       * cosmetic fixes
       * use strpbrk and isspace
       * add --disable-nss --enable-nss here, instead of in the final patch.
       * split vscclient, passthru and docs to following patches.
      
      changes from v19->v20:
       * checkpatch.pl
      
      changes from v15->v16:
      
      Build:
       * don't erase self with distclean
       * fix make clean after make distclean
       * Makefile: make vscclient link quiet
      
      Behavioral:
       * vcard_emul_nss: load coolkey in more situations
       * vscclient:
        * use hton,ntoh
        * send init on connect, only start vevent thread on response
        * read payload after header check, before type switch
        * remove Reconnect
        * update for vscard_common changes, empty Flush implementation
      
      Style/Whitespace:
       * fix wrong variable usage
       * remove unused variable
       * use only C style comments
        * add copyright header
        * fix tabulation
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      libcacard: fix out of tree builds
      111a38b0
    • A
      ccid: add passthru card device · edbb2136
      Alon Levy 提交于
      The passthru ccid card is a device sitting on the usb-ccid bus and
      using a chardevice to communicate with a remote device using the
      VSCard protocol defined in libcacard/vscard_common.h
      
      Usage docs available in following patch in docs/ccid.txt
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      Changes from v23->v24:
       * fixed double license line in header.
      
      Changes from v20->v21: (Jes Sorensen review)
       * add reference to COPYING in header
       * long comment reformatting
      
      Changes from v19->v20:
       * checkpatch.pl
      
      Changes from v18->v19:
       * add qdev.desc
       * remove .qdev.unplug (no hot unplug support for ccid bus)
      
      Changes from v16->v17:
       * fix wrong cast when receiving VSC_Error
       * ccid-card-passthru: force chardev user wakeup by sending Init
         see lengthy comment below.
      
      Changes from v15->v16:
      
      Behavioral changes:
       * return correct size
       * return error instead of assert if client sent too large ATR
       * don't assert if client sent too large a size, but add asserts for indices to buffer
       * reset vscard_in indices on chardev disconnect
       * handle init from client
       * error if no chardev supplied
       * use ntoh, hton
       * eradicate reader_id_t
       * remove Reconnect usage (removed from VSCARD protocol)
       * send VSC_SUCCESS on card insert/remove and reader add/remove
      
      Style fixes:
       * width of line fix
       * update copyright
       * remove old TODO's
       * update file header comment
       * use macros for debug levels
       * c++ style comment replacement
       * update copyright license
       * fix ATR size comment
       * fix whitespace in struct def
       * fix DPRINTF prefix
       * line width fix
      
      ccid-card-passthru: force chardev user wakeup by sending Init
      
      The problem: how to wakeup the user of the smartcard when the smartcard
      device is initialized?
      
      Long term solution: have a callback interface. This was done via
      the deprecated so called chardev ioctl interface.
      
      Short term solution: do a write. Specifically we write an Init message.
      And we change the client to send it's own Init message regardless of
      receiving this one. Additional Init messages will be regarded as
      acceptable, the first one received after connection establishment is
      the determining one wrt capabilities.
      edbb2136
    • A
      introduce libcacard/vscard_common.h · 0c165247
      Alon Levy 提交于
      ---
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      v20->v21 changes: (Jes Sorensen review)
       * license set to 2+
       * long comment fixes, remove empty line at eof.
       * add reference to COPYING
      
      v19->v20 changes:
       * checkpatch.pl
      
      v15->v16 changes:
      
      Protocol change:
       * VSCMsgInit capabilities and magic
       * removed ReaderResponse, will use Error instead with code==VSC_SUCCESS.
       * adaded Flush and FlushComplete, remove Reconnect.
       * define VSCARD_MAGIC
       * added error code VSC_SUCCESS.
      
      Fixes:
       * update VSCMsgInit comment
       * fix message type enum
       * remove underscore from wrapping define
       * update copyright
       * updated comments.
       * Header comment updated
       * remove C++ style comment
       * fix comment for VSCMsgError
       * give names to enums in typedefs
      0c165247