Statistics
| Branch: | Revision:

root / libcacard / vcard_emul_nss.c @ 7fc7e584

History | View | Annotate | Download (37.1 kB)

# Date Author Comment
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 <>

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

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

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