History | View | Annotate | Download (37.1 kB)
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 theactual operations. Try to detect those cases and treat them as if the tokendidn't claim support for X_509....
libcacard: don't leak vcard_emul_alloc_arrays mem
vcard_emul_mirror_card and vcard_emul_init usevcard_emul_alloc_arrays to allocate memory for temporary arrayswhich will contain elements that in the end will be used one byone in cac_card_init. The arrays themselves are never stored...
libcacard: s/strip(args++)/strip(args+1)
vcard_emul_options used args = strip(args++) a few times, whichwas not returning the expected result since the rest of the codeexpected args to be increased by at least 1, which is not the caseif *args is not a blank space when this function is called....
libcacard: fix soft=... parsing in vcard_emul_options
The previous parser had copy and paste errors when computingvname_length and type_params_length, "name" was used insteadof respectively vname and type_params. This led to length that couldbe bigger than the input string, and to access out of the array...
libcacard: introduce NEXT_TOKEN macro
vcard_emul_options now has repetitive code to read the currenttoken and advance to the next. After the previous changes,this repetitive code can be moved in a NEXT_TOKEN macro toavoid having this code duplicated....
libcacard: replace copy_string with strndup
copy_string reimplements strndup, this commit removes it andreplaces all copy_string uses with strndup.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>Reviewed-by: Alon Levy <alevy@redhat.com>
Fix typo in comment (consistant -> consistent)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
libcacard: fix opposite usage of isspace
Signed-off-by: Alon Levy <alevy@redhat.com>Tested-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
libcacard: initial commit
libcacard emulates a Common Access Card (CAC) which is a standardfor smartcards. It is used by the emulated ccid card introduced ina following patch. Docs are available in docs/libcacard.txt
Signed-off-by: Alon Levy <alevy@redhat.com>...