blocking C_WaitForSlotEvent()

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

blocking C_WaitForSlotEvent()

Jakub Jelen
Hello all,

The source of the pkcs11-global.c [1] says that the blocking call does
not work in some pcsc-lite versions. From the git/svn history [2], the
versions are before pcsc-lite 1.5.3, the changelog points more to the
version 1.5.4 fixing various use cases of the SCardGetStatusChange() calls.

I tested with current pcsc-lite and with the condition removed and basic
use case with waiting for slot status change from PKCS#11 in single
thread worked flawlessly.

Is there something more needed than adding a check for pcsc-lite 1.6 in
the configure scripts to allow this functionality again? Are there any
test cases to make sure it works fine with Firefox for example?

[1]
https://github.com/OpenSC/OpenSC/blob/master/src/pkcs11/pkcs11-global.c#L645
[2]
https://github.com/OpenSC/OpenSC/commit/8af1b60afdad95f569279528ff96dda9d1d4e9f8
[3]
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pcsclite/PCSC.git;a=blob;f=ChangeLog;hb=HEAD#l535

Kind regards,

--
Jakub Jelen
Software Engineer
Security Technologies
Red Hat


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: blocking C_WaitForSlotEvent()

Martin Paljak-4
I think it is time to assume it is working correctly on all recent versions and increase the minimal required version of pcsc-lite, if that exists.

On Tue, 8 Nov 2016 at 15:40 Jakub Jelen <[hidden email]> wrote:
Hello all,

The source of the pkcs11-global.c [1] says that the blocking call does
not work in some pcsc-lite versions. From the git/svn history [2], the
versions are before pcsc-lite 1.5.3, the changelog points more to the
version 1.5.4 fixing various use cases of the SCardGetStatusChange() calls.

I tested with current pcsc-lite and with the condition removed and basic
use case with waiting for slot status change from PKCS#11 in single
thread worked flawlessly.

Is there something more needed than adding a check for pcsc-lite 1.6 in
the configure scripts to allow this functionality again? Are there any
test cases to make sure it works fine with Firefox for example?

[1]
https://github.com/OpenSC/OpenSC/blob/master/src/pkcs11/pkcs11-global.c#L645
[2]
https://github.com/OpenSC/OpenSC/commit/8af1b60afdad95f569279528ff96dda9d1d4e9f8
[3]
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pcsclite/PCSC.git;a=blob;f=ChangeLog;hb=HEAD#l535

Kind regards,

--
Jakub Jelen
Software Engineer
Security Technologies
Red Hat


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: blocking C_WaitForSlotEvent()

Jakub Jelen
On 11/09/2016 08:45 AM, Martin Paljak wrote:

> I think it is time to assume it is working correctly on all recent
> versions and increase the minimal required version of pcsc-lite, if
> that exists.
>
> On Tue, 8 Nov 2016 at 15:40 Jakub Jelen <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello all,
>
>     The source of the pkcs11-global.c [1] says that the blocking call does
>     not work in some pcsc-lite versions. From the git/svn history [2], the
>     versions are before pcsc-lite 1.5.3, the changelog points more to the
>     version 1.5.4 fixing various use cases of the
>     SCardGetStatusChange() calls.
>
>     I tested with current pcsc-lite and with the condition removed and
>     basic
>     use case with waiting for slot status change from PKCS#11 in single
>     thread worked flawlessly.
>
>     Is there something more needed than adding a check for pcsc-lite
>     1.6 in
>     the configure scripts to allow this functionality again? Are there any
>     test cases to make sure it works fine with Firefox for example?
>
>     [1]
>     https://github.com/OpenSC/OpenSC/blob/master/src/pkcs11/pkcs11-global.c#L645
>     [2]
>     https://github.com/OpenSC/OpenSC/commit/8af1b60afdad95f569279528ff96dda9d1d4e9f8
>     [3]
>     https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pcsclite/PCSC.git;a=blob;f=ChangeLog;hb=HEAD#l535
>
Grepping through the code revelase another soft dependencies on
pcsc-lite version so we can assume 1.6.5 is the minimal version OpenSC
can support:
src/libopensc/reader-pcsc.c:                    /* Requires pcsc-lite
1.6.5+ to function properly */

I filled a pull request [1] removing this restriction and adding the
configure-time check for the package version. Comments welcomed.

[1] https://github.com/OpenSC/OpenSC/pull/899

Regards,

--
Jakub Jelen
Software Engineer
Security Technologies
Red Hat


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel