Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some workarounds to make VMWARE CCID work #24

Closed
wants to merge 2 commits into from

Conversation

mickflemm
Copy link

Add some workarounds to make the emulated CCID reader presented by the VMWare hypervisor to the guests, work properly. Tested on a VMWare Fusion guest, running Gentoo linux.

…e VMWare hypervisor to the guests, work

properly. Tested on a VMWare Fusion guest, running Gentoo linux.
@mickflemm
Copy link
Author

Ah forgot to include the changes from ccid.h...
#define VMWARE_CCID 0x0E0F0004

@LudovicRousseau
Copy link
Owner

I do not plan to add a a workaround in the CCID driver because another software is bogus. The problem is not in a reader firmware you can't change.

Vmware should fix the issue. Or you use another virtual machine software.

@mickflemm
Copy link
Author

mickflemm commented Oct 24, 2016

Normally I'd agree with you but upgrading this software to the newest version sometimes is more expensive than buying a new reader plus the choice of hypervisor is not up to me. Also have in mind that the windows driver and the open source driver that comes with gnupg both work without any modifications so I don't see VMWare fixing this anytime soon. Anyway I'll send them a mail and see how it goes.

@Alex1130
Copy link

Alex1130 commented Mar 20, 2017

@mickflemm I applied your patch to libccid 1.4.26.
As the patch basically does what I already used on application level as a workaround (when an error occurs ( "The smart card has been reset, so any shared state information is invalid.","Protocol not supported" ), I wait for 1500ms and then try it again (never more than once)).
As it didn't solve my issue I changed:
ccid_descriptor->readTimeout = 150;
to
ccid_descriptor->readTimeout = 1500;
but, alas, still the same.
I guess that my errors occur on a different level, or even have another reason.

@mickflemm
Copy link
Author

Are you also using VMWare Fusion ? This patch still works for me on the latest version for multiple readers. I also started a thread on VMWare's forum but no one answered (https://communities.vmware.com/message/2627443#2627443).

@Alex1130
Copy link

Alex1130 commented Mar 20, 2017

No, I'm using VMware Workstation 12 Player, Version 12.5...
Hosts are Ubuntu 12.04 64bit and Ubuntu 16.04 64bit. Guests are Windows 32bit.
@mickflemm
But Workstation 12 uses the same id.
#define VMWARE_CCID 0x0E0F0004

@Alex1130
Copy link

@mickflemm I compared my log.txt to yours. Your pcsd connects to "VMware Virtual USB CCID" so I assume pcsd is running in the guest system? My pcsd runs on the host and connects to "Gemalto PC Twin Reader". I don't suppose that the hardware or the driver for "Gemalto..." is faulty, so I probably will stick to catch the exception on application level.

@mickflemm
Copy link
Author

Yup VMWare Fusion runs only on OS X/macOS, guest is a gentoo hardened linux. Let's hope someone at VMWare will fix this mess...

@Alex1130
Copy link

@LudovicRousseau there is a discussion about this topic at vmWare Communities - could take a look and point to the right direction?

@LudovicRousseau
Copy link
Owner

It looks like vmware is working on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants