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

Handle reader going missing #1615

Merged
merged 3 commits into from Mar 7, 2019
Merged

Conversation

CendioOssman
Copy link
Contributor

Make sure we report properly to the upper layers if PC/SC is reporting that the reader has gone missing. Otherwise applications won't be properly notified that something has happened.

Checklist
  • PKCS#11 module is tested
  • Windows minidriver is tested
  • macOS tokend is tested

@CendioOssman
Copy link
Contributor Author

Argh. It seems I used an out of date master for this. Some work has been done to handle this case, but not this specific error code. I'll update the patch.

src/libopensc/reader-pcsc.c Outdated Show resolved Hide resolved
It might just be this specific reader going missing, and not all
of them.
Older PC/SC doesn't have the code SCARD_E_NO_READERS_AVAILABLE, so fix
the code to handle such systems as well.
The code already removes all active cards when the service goes
away, but it doesn't remove the reader. This can be a bit confusing
since they will still be polled and listed.
@CendioOssman
Copy link
Contributor Author

We found some more issues on this theme when we did further testing, so I'd like to suggest these two commits as well.

@martinpaljak martinpaljak merged commit bc4eeda into OpenSC:master Mar 7, 2019
@martinpaljak
Copy link
Member

Thanks, these look like useful fixes!

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

4 participants