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 too large PC/SC buffer values #5

Merged
merged 1 commit into from
Dec 31, 2015
Merged

Conversation

saper
Copy link
Contributor

@saper saper commented Nov 15, 2015

pcsc-lite starting from 1.8.14 provides 65548 byte
receive buffers to IFDHTransmitToICC(), which is
a maximal extended APDU size. Unfortunately this
is more than CT API can use (16 bits).

If more than 65536 bytes are about to be sent,
return IFD_PROTOCOL_NOT_SUPPORTED.

Receive at most 65536 bytes. pcsc-lite will always
specify 65548 buffer, even if the client application
requests less; therefore we cannot return an error
in this case.

Discussion:
https://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20151109/000493.html

pcsc-lite starting from 1.8.14 provides 65548 byte
receive buffers to IFDHTransmitToICC(), which is
a maximal extended APDU size. Unfortunately this
is more than CT API can use (16 bits).

If more than 65536 bytes are about to be sent,
return IFD_PROTOCOL_NOT_SUPPORTED.

Receive at most 65536 bytes. pcsc-lite will always
specify 65548 buffer, even if the client application
requests less; therefore we cannot return an error
in this case.

Discussion:
https://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20151109/000493.html
@marckleinebudde
Copy link

Any news on this? I've tested the patch and it works for me.

@LudovicRousseau
Copy link
Member

OpenCT is not actively maintained any more (latest commit in 2013).

Maybe @alonbl can review your patch. He is the latest active OpenCT maintainer.

@marckleinebudde
Copy link

Any news on this?

@saper saper merged commit 3a3921d into OpenSC:master Dec 31, 2015
@saper
Copy link
Contributor Author

saper commented Dec 31, 2015

@alonbl do you think we should make a new release with this change? I will be testing recent commits to master as well, maybe #3 can be solved as well.

@saper saper added this to the 0.6.21 milestone Dec 31, 2015
@alonbl
Copy link
Member

alonbl commented Dec 31, 2015

Hi @saper, I can release, no problem, I could no verify his one...

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