- 09 Oct, 2015 14 commits
-
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
So the whole project use the same log domain. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
A top-level header file is often easier to deal with for programs Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
It was not in the exported symbols, so it shouldn't hurt to remove it now. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Thomas Huth authored
'smatch' complains about two bugs and one style issue in card_7816.c: libcacard/card_7816.c:273 vcard_apdu_set_length() warn: should this be a bitwise op? libcacard/card_7816.c:295 vcard_apdu_set_length() warn: should this be a bitwise op? libcacard/card_7816.c:661 vcard7816_vm_process_apdu() warn: inconsistent indenting ... and indeed, the code seems to be wrong here. Let's fix this by using a bitwise OR instead of logical OR and by indenting the code with the right level. Signed-off-by:
Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Jeremy White authored
USE_PASSTHRU was not implemented and -p was useless. That option can be achieved using -e "use_hw=yes hw_type=passthru" Signed-off-by:
Jeremy White <jwhite@codeweavers.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Jeremy White authored
Enable support for passthru (e.g. direct to pcsc) smart cards in the emul_options entry point in libcacard. Signed-off-by:
Jeremy White <jwhite@codeweavers.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Jeremy White authored
This uses libpcsclite to provide direct communication with a smartcard. Signed-off-by:
Jeremy White <jwhite@codeweavers.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Jeremy White authored
Also add an alias of 'nssemul' for the default card of hw=yes hw_type=cac. This allows the spice-gtk client to take a more human friendly set of arguments and relay them through to this code. Signed-off-by:
Jeremy White <jwhite@codeweavers.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Jeremy White authored
As far as I can tell, the vreader_remove_reader function is not presently in use anywhere; I have an upcoming patch set that uses it. Signed-off-by:
Jeremy White <jwhite@codeweavers.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
(alternatively, we could simply require this to be installed, but it's very recent and the autofoo error is unfriendly) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Reported by Michael Tokarev. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
- 08 Oct, 2015 4 commits
-
-
Fabiano Fidêncio authored
Otherwise the following errors can be faced: src/vscclient-vscclient.o: In function `send_msg': /home/ffidenci/src/upstream/libcacard/src/vscclient.c:122: undefined reference to `_imp__htonl@4' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:124: undefined reference to `_imp__htonl@4' src/vscclient-vscclient.o: In function `on_host_init': /home/ffidenci/src/upstream/libcacard/src/vscclient.c:260: undefined reference to `_imp__ntohl@4' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:273: undefined reference to `_imp__ntohl@4' src/vscclient-vscclient.o: In function `do_socket_read': /home/ffidenci/src/upstream/libcacard/src/vscclient.c:332: undefined reference to `_imp__ntohl@4' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:333: undefined reference to `_imp__ntohl@4' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:334: undefined reference to `_imp__ntohl@4' src/vscclient-vscclient.o: In function `connect_to_qemu': /home/ffidenci/src/upstream/libcacard/src/vscclient.c:615: undefined reference to `_imp__socket@12' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:628: undefined reference to `_imp__getaddrinfo@16' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:636: undefined reference to `_imp__connect@12' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:645: undefined reference to `_imp__freeaddrinfo@4' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:650: undefined reference to `_imp__freeaddrinfo@4' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:652: undefined reference to `_imp__closesocket@4' src/vscclient-vscclient.o: In function `main': /home/ffidenci/src/upstream/libcacard/src/vscclient.c:676: undefined reference to `_imp__WSAStartup@8' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:677: undefined reference to `_imp__WSAGetLastError@0' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:778: undefined reference to `_imp__htonl@4' /home/ffidenci/src/upstream/libcacard/src/vscclient.c:791: undefined reference to `_imp__closesocket@4' collect2: error: ld returned 1 exit status Makefile:656: recipe for target 'vscclient.exe' failed make[2]: *** [vscclient.exe] Error 1 make[2]: Leaving directory '/home/ffidenci/src/upstream/libcacard' Makefile:774: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/ffidenci/src/upstream/libcacard' Makefile:495: recipe for target 'all' failed make: *** [all] Error 2
-
Fabiano Fidêncio authored
This header has the definition of getaddrinfo, according to: https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520(v=vs.85).aspx
-
Fabiano Fidêncio authored
Otherwise the following problem can be faced: src/vscclient.c: In function 'connect_to_qemu': src/vscclient.c:642:16: error: unknown conversion type character 'z' in format [-Werror=format=] printf("Connected (sizeof Header=%zd)!\n", sizeof(VSCMsgHeader)); ^ src/vscclient.c:642:16: error: too many arguments for format [-Werror=format-extra-args]
-
Fabiano Fidêncio authored
Without removing cac_is_cac_card the following error can be faced: Cannot export cac_is_cac_card: symbol not defined collect2: error: ld returned 1 exit status Found a not so old QEMU thread about this: https://www.mail-archive.com/qemu-devel%40nongnu.org/msg291698.html
-
- 22 Sep, 2015 2 commits
-
-
Marc-André Lureau authored
-
Marc-André Lureau authored
vscclient needs gthread-2.0, and fails to link on rhel6 without it. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
- 21 Sep, 2015 2 commits
-
-
Marc-André Lureau authored
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
- 15 Sep, 2015 6 commits
-
-
Marc-André Lureau authored
autofoo-ize Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Veres Lajos authored
Signed-off-by:
Veres Lajos <vlajos@gmail.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Daniel P. Berrange authored
Many source files have doubled words (eg "the the", "to to", and so on). Most of these can simply be removed, but a couple were actual mis-spellings (eg "to to" instead of "to do"). There was even one triple word score "to to to" :-) Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- 23 Jun, 2015 1 commit
-
-
Michael Tokarev authored
libcacard.pc file lists only one package in Requires field, which is nss, while glib-2.0 is also a requiriment. Furthermore, for libraries used internally by the library (this is the way nss and glib are used by libcacard), Requires.private shold be used instead of Requires. Fix both issues. This does not affect linking of qemu because it links with objects from libcacard directly. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- 22 May, 2015 1 commit
-
-
John Snow authored
Since we're bumping the version to 2.22+, remove the now-stale compat functions. Signed-off-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-id: 1431469140-22208-2-git-send-email-jsnow@redhat.com
-
- 08 May, 2015 1 commit
-
-
Michael Tokarev authored
include/glib-compat.h defines a bunch of functions based on glib primitives, and uses assert() without including assert.h. Replace assert() with g_assert() to make the file more self-contained, and to fix compilation breakage after 28507a415a9b1e. Reported-by:
Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Tested-by:
Laurent Desnogues <laurent.desnogues@gmail.com>
-
- 30 Apr, 2015 2 commits
-
-
Michael Tokarev authored
Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
This is a small step towards making libcacard standalone. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- 02 Apr, 2015 1 commit
-
-
Commit 89b516d8b9444ece8ccabb322a9389587c7a7b83 ("glib: add compatibility interface for g_get_monotonic_time()") aimed at making qemu build with old glib versions. At least SLES11SP3, however, contains a backport of g_get_monotonic_time() while keeping the reported glib version at 2.22. Let's work around this by a strategically placed #define. Signed-off-by:
Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1427987865-433-2-git-send-email-cornelia.huck@de.ibm.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- 10 Feb, 2015 1 commit
-
-
Building QEMU results in a libcacard.so that links against practically the entire world linux-vdso.so.1 => (0x00007fff71e99000) libssl3.so => /usr/lib64/libssl3.so (0x00007f49f94b6000) libsmime3.so => /usr/lib64/libsmime3.so (0x00007f49f928e000) libnss3.so => /usr/lib64/libnss3.so (0x00007f49f8f67000) libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f49f8d3b000) libplds4.so => /usr/lib64/libplds4.so (0x00007f49f8b36000) libplc4.so => /usr/lib64/libplc4.so (0x00007f49f8931000) libnspr4.so => /usr/lib64/libnspr4.so (0x00007f49f86f2000) libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f49f84ed000) libm.so.6 => /usr/lib64/libm.so.6 (0x00007f49f81e5000) libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007f49f7fe3000) librt.so.1 => /usr/lib64/librt.so.1 (0x00007f49f7dda000) libz.so.1 => /usr/lib64/libz.so.1 (0x00007f49f7bc4000) libcap-ng.so.0 => /usr/lib64/libcap-ng.so.0 (0x00007f49f79be000) libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f49f77b8000) libgnutls.so.28 => /usr/lib64/libgnutls.so.28 (0x00007f49f749a000) libSDL-1.2.so.0 => /usr/lib64/libSDL-1.2.so.0 (0x00007f49f71fd000) libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f49f6fe0000) libvte.so.9 => /usr/lib64/libvte.so.9 (0x00007f49f6d3f000) libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f49f6b2d000) libgtk-x11-2.0.so.0 => /usr/lib64/libgtk-x11-2.0.so.0 (0x00007f49f64a0000) libgdk-x11-2.0.so.0 => /usr/lib64/libgdk-x11-2.0.so.0 (0x00007f49f61de000) libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007f49f5fd1000) libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007f49f5daa000) libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007f49f5a9d000) libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0 (0x00007f49f5878000) libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007f49f5500000) libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0 (0x00007f49f52eb000) libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007f49f50a0000) libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007f49f4e4e000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f49f4b15000) libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f49f48d6000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f49f462b000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f49f42e8000) libxenstore.so.3.0 => /usr/lib64/libxenstore.so.3.0 (0x00007f49f40de000) libxenctrl.so.4.4 => /usr/lib64/libxenctrl.so.4.4 (0x00007f49f3eb6000) libxenguest.so.4.4 => /usr/lib64/libxenguest.so.4.4 (0x00007f49f3c8b000) libseccomp.so.2 => /usr/lib64/libseccomp.so.2 (0x00007f49f3a74000) librdmacm.so.1 => /usr/lib64/librdmacm.so.1 (0x00007f49f385d000) libibverbs.so.1 => /usr/lib64/libibverbs.so.1 (0x00007f49f364a000) libutil.so.1 => /usr/lib64/libutil.so.1 (0x00007f49f3447000) libc.so.6 => /usr/lib64/libc.so.6 (0x00007f49f3089000) /lib64/ld-linux-x86-64.so.2 (0x00007f49f9902000) libp11-kit.so.0 => /usr/lib64/libp11-kit.so.0 (0x00007f49f2e23000) libtspi.so.1 => /usr/lib64/libtspi.so.1 (0x00007f49f2bb2000) libtasn1.so.6 => /usr/lib64/libtasn1.so.6 (0x00007f49f299f000) libnettle.so.4 => /usr/lib64/libnettle.so.4 (0x00007f49f276d000) libhogweed.so.2 => /usr/lib64/libhogweed.so.2 (0x00007f49f2545000) libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f49f22cd000) libncurses.so.5 => /usr/lib64/libncurses.so.5 (0x00007f49f20a5000) libtinfo.so.5 => /usr/lib64/libtinfo.so.5 (0x00007f49f1e7a000) libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007f49f1c76000) libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f49f1a6f000) libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f49f1865000) libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007f49f1662000) libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f49f1452000) libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f49f1247000) libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f49f103c000) libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007f49f0e39000) libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f49f0c35000) libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f49f09dd000) libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007f49f072f000) libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f49f0505000) libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f49f02d2000) libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007f49f00cd000) libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007f49efec3000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f49efca1000) libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f49efa06000) libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f49ef7fe000) libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007f49ef5d8000) libresolv.so.2 => /usr/lib64/libresolv.so.2 (0x00007f49ef3be000) libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f49ef193000) libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f49eef83000) libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f49eed6c000) liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f49eeb46000) libnl-route-3.so.200 => /usr/lib64/libnl-route-3.so.200 (0x00007f49ee8e2000) libnl-3.so.200 => /usr/lib64/libnl-3.so.200 (0x00007f49ee6c4000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f49ee2d6000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f49ee067000) libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f49ede48000) libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f49edc46000) libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 (0x00007f49eda41000) libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007f49ed838000) libxcb-shape.so.0 => /usr/lib64/libxcb-shape.so.0 (0x00007f49ed634000) libgbm.so.1 => /usr/lib64/libgbm.so.1 (0x00007f49ed426000) libwayland-client.so.0 => /usr/lib64/libwayland-client.so.0 (0x00007f49ed217000) libwayland-server.so.0 => /usr/lib64/libwayland-server.so.0 (0x00007f49ed005000) libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007f49ecddb000) libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007f49ecbce000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f49ec9ca000) libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0 (0x00007f49ec7b0000) libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0 (0x00007f49ec5ad000) libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0 (0x00007f49ec3aa000) libxcb-randr.so.0 => /usr/lib64/libxcb-randr.so.0 (0x00007f49ec19b000) libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 (0x00007f49ebf94000) libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 (0x00007f49ebd91000) libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007f49ebb8a000) libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f49eb91d000) libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f49eb6cf000) libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f49eb3ec000) libcom_err.so.2 => /usr/lib64/libcom_err.so.2 (0x00007f49eb1e8000) libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f49eafb4000) libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f49eada5000) libkeyutils.so.1 => /usr/lib64/libkeyutils.so.1 (0x00007f49eaba0000) All libcacard actually needs are the NSS libs. Linking against the entire world is a regression caused by commit 9d171bd9375e4d08feff9adda15163e0811f5f42 Author: Michael Tokarev <mjt@tls.msk.ru> Date: Thu May 8 16:48:27 2014 +0400 libcacard: remove libcacard-specific CFLAGS and LIBS from global vars Which removed the setting of the LIBS variable in libcacard/Makefile. Adding it back as an empty assignment brings the linked libs back to a more reasonable set linux-vdso.so.1 => (0x00007fff575c1000) libssl3.so => /usr/lib64/libssl3.so (0x00007f7f753b1000) libsmime3.so => /usr/lib64/libsmime3.so (0x00007f7f75189000) libnss3.so => /usr/lib64/libnss3.so (0x00007f7f74e62000) libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f7f74c36000) libplds4.so => /usr/lib64/libplds4.so (0x00007f7f74a31000) libplc4.so => /usr/lib64/libplc4.so (0x00007f7f7482c000) libnspr4.so => /usr/lib64/libnspr4.so (0x00007f7f745ed000) libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f7f743d0000) libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f7f741cc000) libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007f7f73fca000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f7f73c90000) libc.so.6 => /usr/lib64/libc.so.6 (0x00007f7f738d3000) libz.so.1 => /usr/lib64/libz.so.1 (0x00007f7f736bd000) librt.so.1 => /usr/lib64/librt.so.1 (0x00007f7f734b4000) /lib64/ld-linux-x86-64.so.2 (0x00007f7f757fd000) Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Cc: <qemu-stable@nongnu.org> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- 14 Nov, 2014 1 commit
-
-
zhanghailiang authored
In function connect_to_qemu(), getaddrinfo() will allocate memory that is stored into server, it should be freed by using freeaddrinfo() before connect_to_qemu() return. Cc: qemu-stable@nongnu.org Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 28 Oct, 2014 3 commits
-
-
commit 57f97834efe0c208ffadc9d2959f3d3d55580e52 cleaned up the cac_applet_pki_process_apdu function to have a single exit point. Unfortunately, that commit introduced a bug where the sign buffer can get free'd and nullified while it's still being used. This commit corrects the bug by introducing a boolean to track whether or not the sign buffer should be freed in the function exit path. Signed-off-by:
Ray Strode <rstrode@redhat.com> Reviewed-by:
Alon Levy <alon@pobox.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
When a process in a guest uses an emulated smartcard, libcacard running on the host passes the PIN from the guest to the PK11_Authenticate NSS function. The first time PK11_Authenticate is called the passed in PIN is used to unlock the certificate database. Subsequent calls to PK11_Authenticate will transparently succeed, regardless of the passed in PIN. This is a convenience for applications provided by NSS. Of course, the guest may have many applications using the one emulated smart card all driven from the same host QEMU process. That means if a user enters the right PIN in one program in the guest, and then enters the wrong PIN in another program in the guest, the wrong PIN will still successfully unlock the virtual smartcard. This commit forces the NSS certificate database to be locked anytime an applet is selected on an emulated smartcard by calling vcard_emul_logout. Signed-off-by:
Ray Strode <rstrode@redhat.com> Reviewed-By:
Robert Relyea <rrelyea@redhat.com> Reviewed-By:
Alon Levy <alevy@redhat.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
vcard_emul_reset currently only logs NSS out, but there is a TODO for potentially sending insertion/removal events when powering down or powering up. For clarity, this commit moves the current guts of vcard_emul_reset to a new vcard_emul_logout function which will never send insertion/removal events. The vcard_emul_reset function now just calls vcard_emul_logout, but also retains its TODO for watching power state transitions and sending insertion/removal events. Signed-off-by:
Ray Strode <rstrode@redhat.com> Reviewed-By:
Robert Relyea <rrelyea@redhat.com> Reviewed-By:
Alon Levy <alevy@redhat.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- 16 Oct, 2014 1 commit
-
-
This patch fixes compilation errors when building against glib < 2.16.0 due to the missing g_strcmp0() function. Suggested-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Message-id: 1413457177-10132-1-git-send-email-arei.gonglei@huawei.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-