[patch] new dbus control interface method: setSmartcardModules

David Smith dds at google.com
Sat Apr 19 14:50:05 EDT 2008


Hi all,

I'm attempting to add smartcard support to network manager and this has 
required adding a way to set pkcs11 and opensc configuration parameters over 
dbus. I've written a patch that adds a new method, setSmartcardModules, to 
accomplish this. Before reading the patch, you can get the idea by this test 
output:

<console 1: python dbus session>
>>> wpasupplicant.setSmartcardModules({'pkcs11_engine_path': 
dbus.String('/usr/lib/engines/engine_pkcs11.so', 
variant_level=1), 'pkcs11_module_path':dbus.String('/usr/lib/opencryptoki/libopencryptoki.so', 
variant_level=1)}, 
dbus_interface='fi.epitest.hostap.WPASupplicant.Interface')
dbus.UInt32(1L)

<console 2: wpa_suplicant -u -dd in gdb>
Breakpoint 3, wpas_dbus_iface_set_smartcard_modules (message=0x80a2d00, 
wpa_s=0x80a4ce0) at ctrl_iface_dbus_handlers.c:1201
(gdb) c
Continuing.
ENGINE: Loading dynamic engine
ENGINE: Loading pkcs11 Engine from /usr/lib/engines/engine_pkcs11.so
ENGINE: 'SO_PATH' '/usr/lib/engines/engine_pkcs11.so'
ENGINE: 'ID' 'pkcs11'
ENGINE: 'LIST_ADD' '1'
ENGINE: 'LOAD' '(null)'
ENGINE: 'MODULE_PATH' '/usr/lib/opencryptoki/libopencryptoki.so'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: disable timer tick  C-c C-c

I tried to follow the existing coding style and keep everything tidy so I hope 
this patch can be included at your earliest convenience.

Cheers,
dds
-- 
man perl | tail -6 | head -2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-setSmartcardModules-DBus-message-to-set-pkcs11-a.patch
Type: text/x-diff
Size: 4788 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20080420/96975a06/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part.
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20080420/96975a06/attachment.pgp 


More information about the HostAP mailing list