Tell the server that smartcard is redirected
authorOndrej Holy <oholy@redhat.com>
Tue, 26 Nov 2019 15:57:21 +0000 (16:57 +0100)
committerArmin Novak <armin.novak@thincast.com>
Wed, 18 Dec 2019 11:22:11 +0000 (12:22 +0100)
commit053162482615fe989ae7797ebb7b6c6a8d34bd95
treecf9c196ac166e3b5f03fb203e09035126044439b
parent2e1d719ab1b6f2163dd945c5eb39621201271d5b
Tell the server that smartcard is redirected

There were server-side changes on Windows 2012 and newer regarding
smartcards, namely the Smart Card Service start and stop behavior:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh849637(v%3Dws.11)#smart-card-service-start-and-stop-behavior

Some people see "No valid certificates were found on this smart card",
when the Smart Card Service is not running and has to use various
workarounds to start the service manually, e.g.:
http://blogs.danosaab.com/2016/12/using-smart-card-with-remote-desktop-connection-on-mac-osx/
http://www.edugeek.net/forums/windows-server-2012/161255-smart-card-service-issue-windows-server-2012r2-terminal-services-hyperv.html

I've been looking at RDP specifications and found that
REDIRECTED_SMARTCARD should be probably specified in TS_UD_CS_CLUSTER
block flags when the smartcard is redirected, but it is not currently:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/d68c629f-36a1-4a40-afd0-8b3e56d29aac

This might be the reason, why the Smart Card Service is not
autostarted for some people. Let's try to set this flag and see what
will happens...

https://github.com/FreeRDP/FreeRDP/issues/4743
Signed-off-by: Armin Novak <armin.novak@thincast.com>
libfreerdp/core/gcc.c