-
Notifications
You must be signed in to change notification settings - Fork 711
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
reader configuration partially skipped If SCardControl missing #3006
Comments
For the record apple has switched to their CCID driver and they did not support SCardControl in 14.0/14.1. |
does dlopen on macOS' pcsc implementation yield NULL when requesting SCardControl or do they implement it by always returning an error? In the former case, this may be the reason for #2788 ... |
They return SCARD_E_NOT_TRANSACTED (https://blog.apdu.fr/posts/2023/09/macos-sonoma-bug-scardcontrol-returns-scard_e_not_transacted/) |
then this is not related to the segfault, thanks |
@LudovicRousseau Today are there any readers that do not support extended APDU? If we can not get Is there any reader command to get the max size or at least show if extend is supported? Could a mod be added to apdu.c that if card supports extended but a command requesting extended fails because the reader does not support extended, apdu.c or the card driver could reset the sizes and try again without extended? |
Apple made some progress in the |
Yes. See https://ccid.apdu.fr/select_readers/?dwFeatures=13 I would say most of these readers are "old" but may still be used in the field.
I think that is a safe choice.
Not at the PC/SC level except
You can try something like that. |
When
SCardControl(card_handle, CM_IOCTL_GET_FEATURE_REQUEST,...
fails at:https://github.com/OpenSC/OpenSC/blob/master/src/libopensc/reader-pcsc.c#L1153
the 178 lines of code:
https://github.com/OpenSC/OpenSC/blob/master/src/libopensc/reader-pcsc.c#L1158-L1337
are not executed, which includes:
part10_detect_pace_capabilities(reader, card_handle);
max_send_size = max_recv_size = part10_detect_max_data(reader, card_handle);
set max_send_size
andmax_recv_size
which may end in "Assuming that the reader supports sending short length APDUs only"This results in a card driver like
card-sc-hsm.c
expects the reader in the token to support extended APDUs that the reader does not.This lack of the features from PCSClite in the Windows implementation could be addressed if OpenSC took some of the changes from PCSClite to fill in info for readers. Or at least look in
opensc.conf
This problem may be the same problem as in #3004 and other card drivers may have similar problems.
(I actually found that building OpenSC from github using Cygwin was easy and could debug using
gdb
)Originally posted by @dengert in #2944 (comment)
The text was updated successfully, but these errors were encountered: