[Spice-devel] smartcard usage

william kc at cobradevil.org
Thu Feb 24 05:30:18 PST 2011


On 02/24/2011 12:09 PM, Alon Levy wrote:
> On Thu, Feb 24, 2011 at 10:17:21AM +0100, kc at cobradevil.org wrote:
>> Dear list,
>>
>> i have tried to get smartcard support running but i'm a bit lost :)
>> probably because it's not finished yet.
>>
>> we have smartcards with certificates like us dod and i would like to use
>> those from a client on a remote server for authentication and such.
>> I have followed the build instructions:
>> http://spice-space.org/page/Building_Instructions on a ubuntu system and
>> have managed to get those compiled.
>>
>> But when i try to start a vm with smartcard passthrough it asks me to give
>> a driver name?
>>
>> ./x86_64-softmmu/qemu-system-x86_64 -chardev
>> socket,server,host=0.0.0.0,port=2001,id=ccid,nowait -device
>> ccid-card-passthru,chardev=ccid -drive
>> file=/var/lib/libvirt/images/test.img,if=ide -soundhw ac97 -L pc-bios
>> -nographic -vga qxl -spice port=5930,disable-ticketing  -usbdevice tablet
>> -enable-kvm -m 512
>>
>> do_spice_init: starting 0.6.3
>> spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
>> spice_server_add_interface: SPICE_INTERFACE_MOUSE
>> spice_server_add_interface: SPICE_INTERFACE_QXL
>> red_worker_main: begin
>> spice_server_add_interface: SPICE_INTERFACE_RECORD
>> spice_server_add_interface: SPICE_INTERFACE_PLAYBACK
>> qemu-system-x86_64: -device ccid-card-passthru,chardev=ccid: Parameter
>> 'driver' expects a driver name
>> Try with argument '?' for a list.
>>
>> Am i starting the vm the right way or am i missing something?
> You are doing the right steps with the wrong qemu. To be explicit: qemu hasn't
> accepted the patches for the smartcard devices yet, so I don't know where you
> got the qemu executable but unless you built it by hand and applied the patches
> on the list, or easier used the pull url I provide in the patches I sent (like v20
> git://anongit.freedesktop.org/~alon/qemu usb_ccid.v20) you won't have them.

ah ok :)

got the one above but cannot compile this one:

after
#./configure --enable-spice
i get this during make:

CC x86_64-softmmu/qxl-logger.o
CC x86_64-softmmu/qxl-render.o
CC x86_64-softmmu/spice-vmc.o
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:38: error: expected 
specifier-qualifier-list before ‘SpiceVDIPortInstance’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:46: error: expected ‘)’ 
before ‘*’ token
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:69: error: expected ‘)’ 
before ‘*’ token
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:89: error: expected ‘=’, 
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmc_interface’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function 
‘vmc_register_interface’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:100: error: 
‘SpiceVirtualChannel’ has no member named ‘active’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:103: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:104: error: 
‘SpiceVirtualChannel’ has no member named ‘sin’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:104: error: 
‘vmc_interface’ undeclared (first use in this function)
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:104: error: (Each 
undeclared identifier is reported only once
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:104: error: for each 
function it appears in.)
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:105: error: 
‘SpiceVirtualChannel’ has no member named ‘sin’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:106: error: 
‘SpiceVirtualChannel’ has no member named ‘active’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function 
‘vmc_unregister_interface’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:111: error: 
‘SpiceVirtualChannel’ has no member named ‘active’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:114: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:115: error: 
‘SpiceVirtualChannel’ has no member named ‘sin’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:116: error: 
‘SpiceVirtualChannel’ has no member named ‘active’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function 
‘vmc_change_state_handler’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:124: error: 
‘SpiceVirtualChannel’ has no member named ‘active’
cc1: warnings being treated as errors
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:125: error: implicit 
declaration of function ‘spice_server_vdi_port_wakeup’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:125: error: 
‘SpiceVirtualChannel’ has no member named ‘sin’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function 
‘vmc_guest_open’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:137: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function 
‘vmc_guest_close’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:145: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function 
‘vmc_guest_ready’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:153: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:154: error: 
‘SpiceVirtualChannel’ has no member named ‘active’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:155: error: 
‘SpiceVirtualChannel’ has no member named ‘sin’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function 
‘vmc_have_data’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:162: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:163: error: 
‘SpiceVirtualChannel’ has no member named ‘datalen’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:164: error: 
‘SpiceVirtualChannel’ has no member named ‘bufsize’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:165: error: 
‘SpiceVirtualChannel’ has no member named ‘bufsize’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:166: error: 
‘SpiceVirtualChannel’ has no member named ‘buffer’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:166: error: 
‘SpiceVirtualChannel’ has no member named ‘buffer’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:166: error: 
‘SpiceVirtualChannel’ has no member named ‘bufsize’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:168: error: 
‘SpiceVirtualChannel’ has no member named ‘buffer’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:169: error: 
‘SpiceVirtualChannel’ has no member named ‘datapos’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:169: error: 
‘SpiceVirtualChannel’ has no member named ‘buffer’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:170: error: 
‘SpiceVirtualChannel’ has no member named ‘datalen’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:172: error: 
‘SpiceVirtualChannel’ has no member named ‘sin’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function ‘vmc_initfn’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:183: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: In function ‘vmc_exitfn’:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:196: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c: At top level:
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:214: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:214: error: 
‘SpiceVirtualChannel’ has no member named ‘debug’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:214: error: type 
defaults to ‘int’ in declaration of ‘type name’
/usr/src/ff/ff/alon/usb_ccid.v20/hw/spice-vmc.c:214: error: invalid 
operands to binary - (have ‘uint32_t *’ and ‘int *’)
make[1]: *** [spice-vmc.o] Error 1
make: *** [subdir-x86_64-softmmu] Error 2

Any ideas?

With kind regards

William van de Velde


> Alon
>
>> With kind regards
>>
>> William
>>
>>
>>
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list