qemu-patch-raspberry4/libcacard
Ray Strode 1223bc4cee libcacard: Lock NSS cert db when selecting an applet on an emulated card
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>
2014-10-28 11:38:18 +01:00
..
cac.c libcacard: Drop superfluous conditionals around g_free() 2014-06-10 19:39:34 +04:00
cac.h libcacard/vreader: add debugging messages for apdu 2013-04-24 11:48:02 +03:00
card_7816.c libcacard: Drop superfluous conditionals around g_free() 2014-06-10 19:39:34 +04:00
card_7816.h fix spelling in libcacard sub directory 2011-12-02 10:50:56 +00:00
card_7816t.h misc: Fix some typos in names and comments 2013-09-01 18:59:24 +04:00
event.c libcacard: replace qemu thread primitives with glib ones 2014-06-10 07:44:01 +02:00
eventt.h libcacard: initial commit 2011-04-01 19:07:48 -05:00
libcacard.pc.in libcacard: add pc file, install it + includes 2011-07-26 10:42:13 +03:00
libcacard.syms libcacard: add list of exported symbols 2013-01-12 17:19:39 +01:00
link_test.c libcacard: initial commit 2011-04-01 19:07:48 -05:00
Makefile libcacard: actually use symbols file 2014-06-10 07:44:01 +02:00
vcard.c libcacard: Lock NSS cert db when selecting an applet on an emulated card 2014-10-28 11:38:18 +01:00
vcard.h libcacard: initial commit 2011-04-01 19:07:48 -05:00
vcard_emul.h libcacard: introduce new vcard_emul_logout 2014-10-28 11:38:18 +01:00
vcard_emul_nss.c libcacard: introduce new vcard_emul_logout 2014-10-28 11:38:18 +01:00
vcard_emul_type.c libcacard: initial commit 2011-04-01 19:07:48 -05:00
vcard_emul_type.h libcacard: initial commit 2011-04-01 19:07:48 -05:00
vcardt.c libcacard: move atr setting from macro to function 2013-04-24 11:48:03 +03:00
vcardt.h libcacard: move atr setting from macro to function 2013-04-24 11:48:03 +03:00
vcardt_internal.h libcacard: move atr setting from macro to function 2013-04-24 11:48:03 +03:00
vevent.h libcacard: initial commit 2011-04-01 19:07:48 -05:00
vreader.c Merge remote-tracking branch 'remotes/bonzini/configure' into staging 2014-06-11 15:36:48 +01:00
vreader.h libcacard: initial commit 2011-04-01 19:07:48 -05:00
vreadert.h libcacard: initial commit 2011-04-01 19:07:48 -05:00
vscard_common.h fix spelling in libcacard sub directory 2011-12-02 10:50:56 +00:00
vscclient.c vscclient: Add required headers to fix build on FreeBSD 2014-06-24 20:01:24 +04:00