<html><head></head><body><div>On Thu, 2017-07-20 at 15:42 +0200, David Jaša wrote:</div><blockquote type="cite"><div>Hi Oscar,</div><div><br></div><div>spice client uses on Windows also NSS library to access smart cards, so you need to tell NSS where to look for library that provides pkcs#11 interface (or "smart card middleware") for your smart card. Once you know the .dll, you can create the nssdb and add the library there:</div><pre><br></pre><pre>mkdir %PROGRAMFILES%\nssdb</pre><pre>%PROGRAMFILES%\VirtViewer*\bin\certutil -d %PROGRAMFILES%\nssdb -N</pre><div><pre>%PROGRAMFILES%\VirtViewer*\bin\modutil -dbdir %PROGRAMFILES%\nssdb -add "my smartcard middleware" -libfile C:\...\my_middleware_pkcs11_library.dll</pre></div></blockquote><div><br></div><div>The path for nssdb should be actually %PROGRAMDATA%\nssdb, so on most systems C:\ProgramData\nssdb. Sorry for the mistake.</div><div><br></div><div>David</div><div><br></div><blockquote type="cite"><div><br></div><div>With these steps taken, remote-viewer should pick you smartcard and expose it in the guest.</div><div><br></div><div>HTH,</div><div><br></div><div>David</div><div><br></div><div><br></div><div>On Mon, 2017-05-08 at 13:48 +0200, Oscar Segarra wrote:</div><blockquote type="cite"><div dir="ltr">Hi, <div><br></div><div>In my environment I have a Windows 10 guest and a Windows 10 client.<br><div><br></div><div>I have configured smartcard as it is suggested in documentation:</div><div><br></div><div><a href="https://www.spice-space.org/spice-user-manual.html">https://www.spice-space.org/spice-user-manual.html</a><br></div><div><br></div><div><pre style="font-size:13px;box-sizing:border-box;overflow:auto;font-family:menlo,monaco,consolas,"courier new",monospace;padding:9.5px;margin-top:0px;margin-bottom:10px;line-height:1.42857;color:rgb(51,51,51);word-break:break-all;word-wrap:break-word;background-color:rgb(245,245,245);border:1px solid rgb(204,204,204);border-radius:4px"><tt style="box-sizing:border-box"><span style="box-sizing:border-box;font-weight:bold"><span style="box-sizing:border-box;color:rgb(0,0,255)"><controller</span></span> <span style="box-sizing:border-box;color:rgb(0,153,0)">type</span><span style="box-sizing:border-box;color:rgb(153,0,0)">=</span><span style="box-sizing:border-box;color:rgb(255,0,0)">'ccid'</span> <span style="box-sizing:border-box;color:rgb(0,153,0)">index</span><span style="box-sizing:border-box;color:rgb(153,0,0)">=</span><span style="box-sizing:border-box;color:rgb(255,0,0)">'0'</span><span style="box-sizing:border-box;font-weight:bold"><span style="box-sizing:border-box;color:rgb(0,0,255)">/></span></span>
<span style="box-sizing:border-box;font-weight:bold"><span style="box-sizing:border-box;color:rgb(0,0,255)"><smartcard</span></span> <span style="box-sizing:border-box;color:rgb(0,153,0)">mode</span><span style="box-sizing:border-box;color:rgb(153,0,0)">=</span><span style="box-sizing:border-box;color:rgb(255,0,0)">'passthrough'</span> <span style="box-sizing:border-box;color:rgb(0,153,0)">type</span><span style="box-sizing:border-box;color:rgb(153,0,0)">=</span><span style="box-sizing:border-box;color:rgb(255,0,0)">'spicevmc'</span><span style="box-sizing:border-box;font-weight:bold"><span style="box-sizing:border-box;color:rgb(0,0,255)">></span></span>
<span style="box-sizing:border-box;font-weight:bold"><span style="box-sizing:border-box;color:rgb(0,0,255)"><address</span></span> <span style="box-sizing:border-box;color:rgb(0,153,0)">type</span><span style="box-sizing:border-box;color:rgb(153,0,0)">=</span><span style="box-sizing:border-box;color:rgb(255,0,0)">'ccid'</span> <span style="box-sizing:border-box;color:rgb(0,153,0)">controller</span><span style="box-sizing:border-box;color:rgb(153,0,0)">=</span><span style="box-sizing:border-box;color:rgb(255,0,0)">'0'</span> <span style="box-sizing:border-box;color:rgb(0,153,0)">slot</span><span style="box-sizing:border-box;color:rgb(153,0,0)">=</span><span style="box-sizing:border-box;color:rgb(255,0,0)">'0'</span><span style="box-sizing:border-box;font-weight:bold"><span style="box-sizing:border-box;color:rgb(0,0,255)">/></span></span>
<span style="box-sizing:border-box;font-weight:bold"><span style="box-sizing:border-box;color:rgb(0,0,255)"></smartcard></span></span></tt></pre></div><div>I can see on virt-manager the controller and the devices correctly added. Even in guest Windows 10 appears the ccid smartcard reader device.</div><div><br></div><div>I launch my remote-viewer.exe with the following parameters:</div><div><br></div><div><span style="font-size:12.8px;font-family:monospace,monospace">remote-viewer.e<font color="#000000">xe -f </font></span><span style="font-size:12.8px;font-family:monospace,monospace">--spice-smartcard</span><br></div><div><br></div><div>But when I connect my smartcard in the client, it is not redirected to the guest.</div><div><br></div><div>Is there any documentation about how to redirect my smartcard with authentication/sign certificate?</div><div><br></div><div>Thanks a lot.</div><div> </div></div><div><br></div><div><br></div></div>
<pre>_______________________________________________
Spice-devel mailing list
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a>
</pre></blockquote><pre>_______________________________________________
Spice-devel mailing list
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a>
</pre></blockquote></body></html>