Go to file
Michael Tokarev c4c452ff5e remove Reqires.private from libcacard.pc
Bug-Debian: http://bugs.debian.org/804289

Since we're not providing static library, Requires.private is not used.
But pkg-config complains about missing dependensies even if they're not
used.


Gbp-Pq: Name remove-requires.private.patch
2024-05-17 14:16:15 +08:00
build-aux Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
debian refresh remove-requires.private.patch 2024-05-17 14:16:09 +08:00
docs Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
fuzz Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
m4 Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
src Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
tests Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
.tarball-version Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
CONTRIBUTING.md Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
COPYING Import Upstream version 2.6.1 2022-11-15 17:13:15 +08:00
ChangeLog Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
NEWS Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
README.md Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
libcacard.pc.in remove Reqires.private from libcacard.pc 2024-05-17 14:16:15 +08:00
meson.build Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00
meson_options.txt Import Upstream version 2.8.0 2024-05-17 14:12:37 +08:00

README.md

libcacard

pipeline status coverage report cii best practices Fuzzing Status

CAC (Common Access Card) library

This library provides emulation of smart cards to a virtual card reader running in a guest virtual machine.

It implements DoD CAC standard with separate pki containers (compatible with coolkey and OpenSC), using certificates read from NSS.

Documentation

The API documentation is available in docs/libcacard.txt file.

The libcacard is internally used by spice to emulate and share smart cards from client system to local or remote VMs. The whole integration image of smart card sharing can look like this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       ~~~~~~~~~~~~~~~~~~~~
~                                                 ~                       ~                  ~
~   +-----+                                       ~                       ~                  ~
~   |     |                   Client              ~                       ~      Server      ~
~   |Smart|                                       ~                       ~                  ~
~ +-|Card |-+                                     ~                       ~                  ~
~ | |     | |                                     ~                       ~ +--------------+ ~
~ | ------- |                                     ~                       ~ |      VM      | ~
~ |  Reader |                                     ~                       ~ | +---------+  | ~
~ +---------+                                     ~                       ~ | | virtual |  | ~
~      |                                          ~                       ~ | |  CCID   |  | ~
~      |                                          ~                       ~ | | device  |  | ~
~ +---------+  +--------+  +-----+  +-----------+ ~                       ~ | +---------+  | ~
~ |  pcscd  |--| OpenSC |--| NSS |--| libcacard | ~                       ~ |   qemu-kvm   | ~
~ +---------+  +--------+  +-----+  +-----------+ ~                       ~ +--------------+ ~
~                                         |       ~                       ~      |           ~
~                                         |       ~                       ~      |           ~
~             +---------------+  +--------------+ ~                       ~ +--------------+ ~
~             | remote-viewer |--| spice-client | ~ <=[ spice channel ]=> ~ | spice-server | ~
~             +---------------+  +--------------+ ~                       ~ +--------------+ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       ~~~~~~~~~~~~~~~~~~~~

In case of smart card emulation, the client side smart card stack is not needed:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       ~~~~~~~~~~~~~~~~~~~~
~                                     ~                       ~                  ~
~                 Client              ~                       ~      Server      ~
~                                     ~                       ~                  ~
~                                     ~                       ~ +--------------+ ~
~                                     ~                       ~ |      VM      | ~
~                                     ~                       ~ | +---------+  | ~
~                                     ~                       ~ | | virtual |  | ~
~                                     ~                       ~ | |  CCID   |  | ~
~                                     ~                       ~ | | device  |  | ~
~              +-----+  +-----------+ ~                       ~ | +---------+  | ~
~              | NSS |--| libcacard | ~                       ~ |   qemu-kvm   | ~
~              +-----+  +-----------+ ~                       ~ +--------------+ ~
~                             |       ~                       ~      |           ~
~                             |       ~                       ~      |           ~
~ +---------------+  +--------------+ ~                       ~ +--------------+ ~
~ | remote-viewer |--| spice-client | ~ <=[ spice channel ]=> ~ | spice-server | ~
~ +---------------+  +--------------+ ~                       ~ +--------------+ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       ~~~~~~~~~~~~~~~~~~~~

The virtual machine can access the shared or emulated smart card as any other smart card connected to the system through USB reader. There is no additional software nor drivers needed so this can work regardless operating system (assuming there is a driver understanding PC/SC and appropriate middleware understanding GSC-IS 2.1 CAC specification).

More information about libcacard, see the following links to the SPICE documentation:

There is also documentation in qemu repository, describing how CCID device emulation works inside of the QEMU:

Contributing

To read how to submit a bug or contribute your changes to libcacard, see the CONTRIBUTING.md in this repository.

History

This project used to be part of qemu until version 2.5. The history has been preserved and it inherits the tags and version.

Authors

This project was originally developed by:

Extended to new GSC-IS 2.1 standard by: