Statistics
| Branch: | Revision:

root / libcacard @ 26ca8c06

# Date Author Comment
992aeb8e 01/12/2013 07:42 pm Paolo Bonzini

libcacard: rewrite Makefile in non-recursive style

Signed-off-by: Paolo Bonzini <>

26ca8c06 01/12/2013 07:42 pm Paolo Bonzini

libcacard: link vscclient to dynamic library

There is no reason for vscclient to duplicate the code. rules.mak
takes care of invoking libtool to do the link.

Signed-off-by: Paolo Bonzini <>

af0c8e9f 01/12/2013 06:19 pm Paolo Bonzini

libcacard: use per-target variable definitions

This lets the libcacard Makefile use more rules.mak magic.

Signed-off-by: Paolo Bonzini <>

5018f1cc 01/12/2013 06:19 pm Paolo Bonzini

libcacard: add list of exported symbols

Do not export internal QEMU symbols.

Signed-off-by: Paolo Bonzini <>

e832341b 01/12/2013 06:19 pm Alon Levy

libcacard: fix missing symbol in libcacard.so

Before patch:
$ make libcacard.la
$ nm ./libcacard/.libs/libcacard.so.0.0.0 | grep " U " | \
egrep -v "(g_)|(GLIBC)|(SECMOD)|(PK11)|(CERT)|(NSS)|(PORT)|(PR)"
U error_set

Signed-off-by: Alon Levy <>...

b6fc675b 01/12/2013 06:19 pm Paolo Bonzini

libcacard: require libtool to build it

Do not fail at build time, instead just disable the library if libtool
is not present.

Signed-off-by: Paolo Bonzini <>

591eca67 01/12/2013 06:19 pm Paolo Bonzini

libcacard: prepare to use -y trick in the Makefile

Rename variables to follow the conventions of the rest of the build
systems.

Signed-off-by: Paolo Bonzini <>

21655882 01/12/2013 06:19 pm Paolo Bonzini

build: support linking with libtool objects/libraries

This patch moves the complication of using libtool to the generic
rules.mak file.

Signed-off-by: Paolo Bonzini <>

f141ccfa 01/12/2013 06:19 pm Paolo Bonzini

build: make libtool verbose when making with V=1

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

a636be69 11/19/2012 11:48 am Paolo Bonzini

libcacard: link in stubs

Signed-off-by: Paolo Bonzini <>

31a32289 11/19/2012 11:48 am Paolo Bonzini

libcacard: make unnesting rules available to Makefile.objs

Signed-off-by: Paolo Bonzini <>

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

2e679780 10/05/2012 03:58 pm Jim Meyering

libcacard/vcard_emul_nss: use pstrcpy in place of strncpy

Replace strncpy+NUL-terminate use with use of pstrcpy.
This requires linking with cutils.o (or else vssclient doesn't link),
so add that in the Makefile.

Acked-by: Alon Levy <>
Signed-off-by: Jim Meyering <>...

47ecbdf0 06/21/2012 11:04 pm Blue Swirl

libcacard: build fixes

Link trace objects to fix these errors:
LINK vscclient
oslib-posix.o: In function `trace_qemu_vfree':
/src/qemu/obj-amd64/./trace.h:39: undefined reference to `trace1'
oslib-posix.o: In function `trace_qemu_memalign':
/src/qemu/obj-amd64/./trace.h:31: undefined reference to `trace3'...

00c705fb 06/07/2012 10:21 am Paolo Bonzini

build: libcacard Makefile cleanups

Build vscclient from toplevel Makefile, limit usage of vpath.

Signed-off-by: Paolo Bonzini <>

1b902f7d 03/26/2012 07:39 pm Alon Levy

libcacard/vcard_emul_nss: don't stop thread when there are no slots

Signed-off-by: Alon Levy <>

4e339882 03/26/2012 07:39 pm Alon Levy

libcacard/vcard_emul_nss: handle no readers at startup

When starting with no readers, coolkey should show no slots (with
RHBZ 806038 fixed). Fix initialization to launch the event handling
thread for each module that isn't the internal module regardless of the...

6f06f178 03/26/2012 07:39 pm Alon Levy

libcacard/vcard_emul_nss: add warning for old coolkey

Older coolkey versions (before the future fix of RHBZ 802435) have
a fake card reader created if no reader is detected during module
initialization. Warn libcacard users if the faulty coolkey is detected...

dac6b1b2 03/09/2012 08:30 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    configure: Quote the configure args printed in config.log
    osdep: Remove local definition of macro offsetof
    libcacard: Spelling and grammar fixes in documentation...
02021812 03/09/2012 03:02 pm Hans de Goede

libcacard: Fix compilation with gcc-4.7

VCARD_ATR_PREFIX is used as part of an array initializer so it should
not have () around it, so far this happened to work, but gcc-4.7 does
not like it.

Signed-off-by: Hans de Goede <>
Signed-off-by: Anthony Liguori <>

ba79c886 03/08/2012 05:22 pm Stefan Weil

libcacard: Use format specifier %u instead of %d for unsigned values

splint reported warnings for those code statements.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

93148aa5 03/08/2012 05:22 pm Stefan Weil

Spelling fixes in comments (it's -> its)

  • it's -> its (fixed for all files)
  • dont -> don't (only fixed in a line which was touched by the previous fix)
  • distrub -> disturb (fixed in the same line)

Reviewed-by: Andreas Färber <>
Signed-off-by: Stefan Weil <>...

0082f433 02/27/2012 02:37 pm Alon Levy

libcacard: fix reported ATR length

Signed-off-by: Alon Levy <>
Signed-off-by: Gerd Hoffmann <>

57c83dac 02/09/2012 06:44 pm Stefan Weil

make: Remove duplicate use of GLIB_CFLAGS

Makefile, Makefile.hw, Makefile.target and libcacard/Makefile
added GLIB_CFLAGS to QEMU_CFLAGS.

Makefile.objs does this, too, and is included by all other
Makefiles, so GLIB_CFLAGS were added twice (reported by malc)....

cba919da 12/02/2011 12:50 pm Dong Xu Wang

fix spelling in libcacard sub directory

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

d9676f82 10/25/2011 04:44 pm Stefan Weil

libcacard: Fix wrong assertion (reported by cppcheck)

assert("...") will never do anything. This assertion handles a case
which should never occur, so it must be assert(!"...").

Cc: Alon Levy <>
Signed-off-by: Stefan Weil <>

7fc7e584 10/25/2011 04:44 pm Alon Levy

libcacard/cac: fix typo in cac_delete_pki_applet_private

Signed-off-by: Alon Levy <>

e7c5e893 10/25/2011 04:44 pm Alon Levy

libcacard/vscclient: fix error paths for socket creation

Signed-off-by: Alon Levy <>

c2162a8b 09/21/2011 12:49 pm Jan Kiszka

Silence make if nothing is to do for libcacard

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

9f4facbc 09/02/2011 01:08 pm Brad Smith

libcacard: use INSTALL_DATA for data

Signed-off-by: Brad Smith <>
Signed-off-by: Stefan Hajnoczi <>

2542bfd5 08/29/2011 01:47 pm Stefan Weil

Fix spelling in comments and debug messages (recieve -> receive)

Signed-off-by: Stefan Weil <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Stefan Hajnoczi <>

0fc6b582 08/27/2011 06:42 pm Brad

Fix build on OpenBSD with BSD userland emu and smartcard NSS enabled

The first issue is the hard coded POSIX Real Time extensions library in the
libcacard/Makefile. From looking at the code it doesn't seem this is necessary
anyway. Robert Relyea seems to think it most likely isn't necessary....

3f534581 08/22/2011 06:20 pm Brad

Improvements to libtool support.

Improvements to the libtool support in QEMU. Replace hard coded
libtool in the infrastructure with $(LIBTOOL) and allow
overriding the libtool binary used via the configure
script.

Reviewed-by: Andreas F=E4rber <>...

1f22a6bc 08/22/2011 06:19 pm Diego Elio Pettenò

build: list libraries after objects, for proper linkage

Without this change, when using -Wl,--as-needed with GNU linker, the
libraries would be discarded.

Signed-off-by: Diego Elio Pettenò <>
Signed-off-by: Anthony Liguori <>

92f562ec 08/21/2011 04:37 pm Anthony Liguori

Remove remenants of qemu_malloc

This covers the various check commands

Signed-off-by: Anthony Liguori <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

14015304 08/21/2011 07:01 am Anthony Liguori

Make glib mandatory and fixup utils appropriately

Signed-off-by: Anthony Liguori <>

4995f0d6 08/02/2011 02:57 pm Alon Levy

libcacard: use INSTALL_DATA for data

Signed-off-by: Alon Levy <>

0f94d6da 07/26/2011 10:42 am Alon Levy

libcacard: add pc file, install it + includes

Additionally:
+ add --includedir configure parameters
+ make install-libcacard install vscclient as well

010debef 07/22/2011 06:05 pm Robert Relyea

libcacard/vcard_emul_nss: support cards lying about CKM_RSA_X_509 support

Some tokens claim to do CKM_RSA_X_509, but then choke when they try to do the
actual operations. Try to detect those cases and treat them as if the token
didn't claim support for X_509....

ee83d414 07/22/2011 06:05 pm Christophe Fergeau

libcacard: don't leak vcard_emul_alloc_arrays mem

vcard_emul_mirror_card and vcard_emul_init use
vcard_emul_alloc_arrays to allocate memory for temporary arrays
which will contain elements that in the end will be used one by
one in cac_card_init. The arrays themselves are never stored...

00965167 07/22/2011 06:05 pm Christophe Fergeau

libcacard: s/strip(args++)/strip(args+1)

vcard_emul_options used args = strip(args++) a few times, which
was not returning the expected result since the rest of the code
expected args to be increased by at least 1, which is not the case
if *args is not a blank space when this function is called....

a5aa842a 07/22/2011 06:05 pm Christophe Fergeau

libcacard: fix soft=... parsing in vcard_emul_options

The previous parser had copy and paste errors when computing
vname_length and type_params_length, "name" was used instead
of respectively vname and type_params. This led to length that could
be bigger than the input string, and to access out of the array...

d246b3cf 07/22/2011 06:05 pm Christophe Fergeau

libcacard: introduce NEXT_TOKEN macro

vcard_emul_options now has repetitive code to read the current
token and advance to the next. After the previous changes,
this repetitive code can be moved in a NEXT_TOKEN macro to
avoid having this code duplicated.
...

2b56cb87 07/22/2011 06:05 pm Christophe Fergeau

libcacard: replace copy_string with strndup

copy_string reimplements strndup, this commit removes it and
replaces all copy_string uses with strndup.

Signed-off-by: Christophe Fergeau <>
Reviewed-by: Alon Levy <>

44dc0ca3 06/14/2011 05:34 pm Alon Levy

libcacard: add libcacard.la target

No flag to configure is required. Instead, added a libcacard.la target that
is not built by default, only when requested explicitly via:

mkdir build
cd build
../configure
make libcacard.la
make install-libcacard

Uses libtool to do actual linking of object files and shared library, and...

6774e44a 05/08/2011 01:44 pm Paolo Bonzini

libcacard: add correct subdirectory dependencies

Signed-off-by: Paolo Bonzini <>
Cc:
Signed-off-by: Stefan Hajnoczi <>

0cf818c4 05/08/2011 12:02 pm Stefan Weil

Fix typos in comments (existance -> existence)

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

fc27eefe 05/08/2011 12:02 pm Stefan Weil

Fix typo in comment (consistant -> consistent)

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

685ff50f 04/17/2011 09:40 pm Alon Levy

libcacard: fix opposite usage of isspace

Signed-off-by: Alon Levy <>
Tested-by: Hans de Goede <>
Signed-off-by: Aurelien Jarno <>

2ac85b93 04/02/2011 03:07 am Robert Relyea

libcacard: add vscclient

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

0c165247 04/02/2011 03:07 am Alon Levy

introduce libcacard/vscard_common.h


Signed-off-by: Alon Levy <>

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...

111a38b0 04/02/2011 03:07 am Robert Relyea

libcacard: initial commit

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: Alon Levy <>...