aboutsummaryrefslogtreecommitdiff
path: root/libcacard
AgeCommit message (Collapse)Author
2013-04-24libcacard/cac: change big switch functions to single return pointAlon Levy
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard: move atr setting from macro to functionAlon Levy
Only because qemu's checkpatch complains about it. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard/vreader: add debugging messages for apduAlon Levy
Using g_debug with log domain libcacard Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard: change default ATRAlon Levy
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard: remove default libcoolkey loadingMarc-André Lureau
Use only the modules defined in the NSS database. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: remove sql: prefixMarc-André Lureau
For some reason, with sql:/ prefix, the PKCS11 modules are not loaded. This patch goes on top of Alon smartcard series. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: teach vscclient to use GMainLoop for portabilityMarc-André Lureau
This version handles non-blocking sending and receiving from the socket. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: vscclient to use QemuThread for portabilityMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: split vscclient main() from socket readingMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: use system config directory for nss db on win32Marc-André Lureau
It's a bit nicer to look for default database under CSIDL_COMMON_APPDATA\pki\nss rather that /etc/pki/nss. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: correct T0 historical bytes sizeMarc-André Lureau
The VCARD_ATR_PREFIX macro adds a prefix of 6 characters only. pcsc_scan was complaining before the patch: + Historical bytes: 56 43 41 52 44 5F 4E 53 53 ERROR! ATR is truncated: 2 byte(s) is/are missing Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-01-30libcacard: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster
Note that we already free with g_free(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-12build: fold trace-obj-y into libqemuutil.aPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: move libqemuutil.a components to util/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12libcacard: list oslib-obj-y file explicitlyPaolo Bonzini
We will grow the list of files in the next patches, but libcacard should remain slim. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12libcacard: link vscclient to dynamic libraryPaolo Bonzini
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 <pbonzini@redhat.com>
2013-01-12libcacard: rewrite Makefile in non-recursive stylePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12libcacard: add list of exported symbolsPaolo Bonzini
Do not export internal QEMU symbols. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12libcacard: use per-target variable definitionsPaolo Bonzini
This lets the libcacard Makefile use more rules.mak magic. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12libcacard: prepare to use -y trick in the MakefilePaolo Bonzini
Rename variables to follow the conventions of the rest of the build systems. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12libcacard: require libtool to build itPaolo Bonzini
Do not fail at build time, instead just disable the library if libtool is not present. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12libcacard: fix missing symbol in libcacard.soAlon Levy
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 <alevy@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: support linking with libtool objects/librariesPaolo Bonzini
This patch moves the complication of using libtool to the generic rules.mak file. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: make libtool verbose when making with V=1Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-19libcacard: link in stubsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-19libcacard: make unnesting rules available to Makefile.objsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-06Merge branch 'trivial-patches' of git://github.com/stefanha/qemuAurelien Jarno
* '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 hw: Add missing 'static' attribute for QEMUMachine cleanup useless return sentence qemu-sockets: Fix compiler warning (regression for MinGW) vnc: Fix spelling (hellmen -> hellman) in comment slirp: Fix spelling in comment (enought -> enough, insure -> ensure) tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code cpu: Add missing 'static' attribute to qemu_global_mutex configure: Support empty target list (--target-list=) hw: Fix return value check for bdrv_read, bdrv_write
2012-10-05cleanup useless return sentenceAmos Kong
This patch cleans up return sentences in the end of void functions. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2012-10-05libcacard/vcard_emul_nss: use pstrcpy in place of strncpyJim Meyering
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 <alevy@redhat.com> Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-21libcacard: build fixesBlue Swirl
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' oslib-posix.o: In function `trace_qemu_vmalloc': /src/qemu/obj-amd64/./trace.h:35: undefined reference to `trace2' Add LDFLAGS to vscclient link command. Clean up also in subdirectories of libcacard. Use quiet-command for sed invocation. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Alon Levy <alevy@redhat.com>
2012-06-07build: libcacard Makefile cleanupsPaolo Bonzini
Build vscclient from toplevel Makefile, limit usage of vpath. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-26libcacard/vcard_emul_nss: add warning for old coolkeyAlon Levy
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 by checking for the fake reader name "E-Gate 0 0". Signed-off-by: Alon Levy <alevy@redhat.com>
2012-03-26libcacard/vcard_emul_nss: handle no readers at startupAlon Levy
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 number of slots detected for it at initialization time, since slot number may start as 0 and is dynamic. RHBZ: 802435 Signed-off-by: Alon Levy <alevy@redhat.com>
2012-03-26libcacard/vcard_emul_nss: don't stop thread when there are no slotsAlon Levy
Signed-off-by: Alon Levy <alevy@redhat.com>
2012-03-09Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori
* 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 Spelling fixes in comments (it's -> its) vnc: Add break statement libcacard: Use format specifier %u instead of %d for unsigned values Fix sign of sscanf format specifiers block/vmdk: Fix warning from splint (comparision of unsigned value) qmp: Fix spelling fourty -> forty qom: Fix spelling in documentation sh7750: Remove redundant 'struct' from MemoryRegionOps
2012-03-09libcacard: Fix compilation with gcc-4.7Hans de Goede
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 <hdegoede@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-08Spelling fixes in comments (it's -> its)Stefan Weil
* 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 <afaerber@suse.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-08libcacard: Use format specifier %u instead of %d for unsigned valuesStefan Weil
splint reported warnings for those code statements. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-27libcacard: fix reported ATR lengthAlon Levy
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-09make: Remove duplicate use of GLIB_CFLAGSStefan Weil
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). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: malc <av1474@comtv.ru>
2011-12-02fix spelling in libcacard sub directoryDong Xu Wang
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-25libcacard: Fix wrong assertion (reported by cppcheck)Stefan Weil
assert("...") will never do anything. This assertion handles a case which should never occur, so it must be assert(!"..."). Cc: Alon Levy <alevy@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de>
2011-10-25libcacard/vscclient: fix error paths for socket creationAlon Levy
Signed-off-by: Alon Levy <alevy@redhat.com>
2011-10-25libcacard/cac: fix typo in cac_delete_pki_applet_privateAlon Levy
Signed-off-by: Alon Levy <alevy@redhat.com>
2011-09-21Silence make if nothing is to do for libcacardJan Kiszka
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-02libcacard: use INSTALL_DATA for dataBrad Smith
Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-29Fix spelling in comments and debug messages (recieve -> receive)Stefan Weil
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>
2011-08-27Fix build on OpenBSD with BSD userland emu and smartcard NSS enabledBrad
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. The second issue was the missing exclusion of the BSD userland binary builds from the addition of this Makefile target for the smartcard NSS code which breaks the builds if smartcard NSS support is enabled. pastebin clip of the build failure.. http://pastebin.com/raw.php?i=BLCKd3s6 Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-22Improvements to libtool support.Brad
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 <andreas.faerber@web.de> Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>