-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Derive dwMaxAPDUDataSize from dwMaxCCIDMessageLength #27
Comments
dwMaxAPDUDataSize
from dwMaxCCIDMessageLength
The CCID driver is using chaining to split a big APDU using shorter CCID messages. Why do you need to know the dwMaxCCIDMessageLength value? |
It's a typical problem in OpenSC (see OpenSC/OpenSC#942, for example) to know how many bytes we can transmit to the card. I'm not talking about the message size between the driver and the reader. I'm talking about the length of APDUs, the reader is able to transmit to the card. Here, your CCID chaining won't help. Hmm, reading the CCID standard it isn't really clear whether |
I suspect that @gdsotirov is using the HID Omnikey proprietary driver. I need his results first. |
@LudovicRousseau You suspect correctly :-) |
I also suspect that the HID Omnikey proprietary driver does not implement The problem is not in my CCID driver. This driver is not used in OpenSC/OpenSC#942 |
@LudovicRousseau In fact, now that you point this out, I checked and apparently I stopped using your driver about 6 years ago (after suggestion from my certificate provider to use the proprietary driver). I remember the problem was that my bank switched to 2048 bit keys and they didn't worked with |
@gdsotirov I need the pcscd logs to provide a correct answer. |
OK. I'll provide them as soon as possible. |
@LudovicRousseau Here's the log from PCSC daemon after plugging my device OmniKey CardMan 6121 reader and using the proprietary driver (see gdsotirov/pcscd.log). |
You are using this CardMan 6121 https://pcsclite.alioth.debian.org/ccid/shouldwork.html#0x076B0x6622 But you are using the You can try the following patch with my CCID driver. This may add support of extended APDU to your reader:
|
@gdsotirov, have you tried to use my CCID driver with the patch above? |
I haven't had the time, but I'll try to check it this weekend and I'll report back. |
OK. I've managed to rebuild also pcsc-tools (and even made LudovicRousseau/pcsc-tools/pull/5), which gives me:
I started by removing the proprietary CCID driver, installed CCID 1.4.26, restarted PCSC daemon and got this as result:
Then, I applied the patch suggested by @LudovicRousseau in his comment from 2017-01-18 and I got a slightly different result (note that PIN is correctly entered):
What's the next step? |
@gdsotirov Good to know that my patch has an effect. |
Sorry, for not providing the log before and sorry for the delay. The new log is new_pcscd.log and after connecting the reader the messages started repeating, so I killed the daemon after few seconds. |
@gdsotirov the patch does not work to add support of extended APDU.
The reader does not understand the extended APDU You are condemned to use the proprietary driver. Sorry. |
As I wrote in #27 (comment) |
Currently, the value of
MaxAPDUDataSize
(PCSCv2_PART10_PROPERTY_dwMaxAPDUDataSize
) is either0
(only short APDUs) or0x10000
(ccid_descriptor -> dwFeatures & CCID_CLASS_EXTENDED_APDU
). However, the actual value is present in the USB descriptor asdwMaxCCIDMessageLength
:Please propagate the actual value correctly to the PC/SC application, thanks.
The text was updated successfully, but these errors were encountered: