libcacard: use INSTALL_DATA for data
Signed-off-by: Brad Smith <brad@comstyle.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix spelling in comments and debug messages (recieve -> receive)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Reviewed-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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 thelibcacard/Makefile. From looking at the code it doesn't seem this is necessaryanyway. Robert Relyea seems to think it most likely isn't necessary....
Improvements to libtool support.
Improvements to the libtool support in QEMU. Replace hard codedlibtool in the infrastructure with $(LIBTOOL) and allowoverriding the libtool binary used via the configurescript.
Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de>...
build: list libraries after objects, for proper linkage
Without this change, when using -Wl,--as-needed with GNU linker, thelibraries would be discarded.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove remenants of qemu_malloc
This covers the various check commands
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Make glib mandatory and fixup utils appropriately
Signed-off-by: Alon Levy <alevy@redhat.com>
libcacard: add pc file, install it + includes
Additionally: + add --includedir configure parameters + make install-libcacard install vscclient as well
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>
libcacard: add libcacard.la target
No flag to configure is required. Instead, added a libcacard.la target thatis not built by default, only when requested explicitly via:
mkdir buildcd build../configuremake libcacard.lamake install-libcacard
Uses libtool to do actual linking of object files and shared library, and...
libcacard: add correct subdirectory dependencies
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: qemu-trivial@nongnu.orgSigned-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix typos in comments (existance -> existence)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix typo in comment (consistant -> consistent)
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: add vscclient
client to talk to ccid-card-passthru and use smartcard on client toperform 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
introduce libcacard/vscard_common.h
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...
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>...