Re: [Muscle] pcsc-lite with openct

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

Re: [Muscle] pcsc-lite with openct

Ludovic Rousseau
Hello,

2010/4/10 Kevin Redon <[hidden email]>:

> I'm using openCT for my phoenix SC reader, but openCT also uses my CCID
> reader. Thus when usind pcscd, the device can not be registered because
> busy.
> On the openSC wiki, it says openCT provides an ifdhandler that pcsc-lite
> could use.
> I compiled openct 0.6.20 with pcsc, and pcsc-lite 1.5.5, but the problem
> remains.
> PCSC lite says : pcscd: utils.c:208:CheckForOpenCT() Remove OpenCT and
> try again
> and I can't list the readers using the PCSC interface.
> Is there a way to configure pcsc to use openct ?

You have to configure OpenCT to be used by pcsc-lite. But I have no
idea how to do that. You should as on the opensc-user mailing list [1]
(in copy).

Another idea is to disable the CCID driver in OpenCT. I don't know if
it is possible.

Maybe OpenCT should support (by default) only the CCID readers not
supported by my CCID driver to avoid collision? Does OpenCT support
CCID reader not supported by my CCID driver? If yes which ones?

Bye

[1] http://www.opensc-project.org/contacts.html

--
 Dr. Ludovic Rousseau
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [Muscle] pcsc-lite with openct

Kevin REDON-2
I can prevent openCT to use the CCID readers, also by first starting
pcscd, then openct (the readers will be busy, thus unavailable to
openCT).

I don't know if one CCID driver supports more readers then the other, my
2 readers (cardman 5321 and alcor AU9520) are supported by both of them.

But openCT adds support for the Phoenix serial reader
(http://www.circuitsarchive.org/index.php/SmartCard_PC_Serial_Reader_/_Writer_%28Phoenix%29) through its ifdhandler. My wish would be to access the reader this way : me->PCSC->pcscd->ifdhandler->openct->ifdhandler for phoenix->phoenix card reader.
I don't care which CCID driver handles my 2 CCID readers

In the opensc wiki it says to be supported (but not very well tested),
and the only compile option for openct is "--enable-pcsc", but it seems
pcsc does not find the ifdhandler openCT offers (as far as I
understand).

thanks,
Kevin

On Sat, 2010-04-10 at 15:45 +0200, Ludovic Rousseau wrote:

> Hello,
>
> 2010/4/10 Kevin Redon <[hidden email]>:
> > I'm using openCT for my phoenix SC reader, but openCT also uses my CCID
> > reader. Thus when usind pcscd, the device can not be registered because
> > busy.
> > On the openSC wiki, it says openCT provides an ifdhandler that pcsc-lite
> > could use.
> > I compiled openct 0.6.20 with pcsc, and pcsc-lite 1.5.5, but the problem
> > remains.
> > PCSC lite says : pcscd: utils.c:208:CheckForOpenCT() Remove OpenCT and
> > try again
> > and I can't list the readers using the PCSC interface.
> > Is there a way to configure pcsc to use openct ?
>
> You have to configure OpenCT to be used by pcsc-lite. But I have no
> idea how to do that. You should as on the opensc-user mailing list [1]
> (in copy).
>
> Another idea is to disable the CCID driver in OpenCT. I don't know if
> it is possible.
>
> Maybe OpenCT should support (by default) only the CCID readers not
> supported by my CCID driver to avoid collision? Does OpenCT support
> CCID reader not supported by my CCID driver? If yes which ones?
>
> Bye
>
> [1] http://www.opensc-project.org/contacts.html
>


_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [Muscle] pcsc-lite with openct

Alon Bar-Lev
In reply to this post by Ludovic Rousseau
the openct framework is much lighter and better designed. It does not
use busy loops and threading, supports hibernation better, least
privilege mode, and much simpler implementation for the task at hand.
So I prefer using openct ccid.

On 4/10/10, Ludovic Rousseau <[hidden email]> wrote:

> Hello,
>
> 2010/4/10 Kevin Redon <[hidden email]>:
>> I'm using openCT for my phoenix SC reader, but openCT also uses my CCID
>> reader. Thus when usind pcscd, the device can not be registered because
>> busy.
>> On the openSC wiki, it says openCT provides an ifdhandler that pcsc-lite
>> could use.
>> I compiled openct 0.6.20 with pcsc, and pcsc-lite 1.5.5, but the problem
>> remains.
>> PCSC lite says : pcscd: utils.c:208:CheckForOpenCT() Remove OpenCT and
>> try again
>> and I can't list the readers using the PCSC interface.
>> Is there a way to configure pcsc to use openct ?
>
> You have to configure OpenCT to be used by pcsc-lite. But I have no
> idea how to do that. You should as on the opensc-user mailing list [1]
> (in copy).
>
> Another idea is to disable the CCID driver in OpenCT. I don't know if
> it is possible.
>
> Maybe OpenCT should support (by default) only the CCID readers not
> supported by my CCID driver to avoid collision? Does OpenCT support
> CCID reader not supported by my CCID driver? If yes which ones?
>
> Bye
>
> [1] http://www.opensc-project.org/contacts.html
>
> --
>  Dr. Ludovic Rousseau
> _______________________________________________
> opensc-user mailing list
> [hidden email]
> http://www.opensc-project.org/mailman/listinfo/opensc-user
>
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [Muscle] pcsc-lite with openct

Martin Paljak-2
On Apr 10, 2010, at 19:05 , Alon Bar-Lev wrote:
> the openct framework is much lighter and better designed. It does not
> use busy loops and threading, supports hibernation better, least
> privilege mode, and much simpler implementation for the task at hand.
> So I prefer using openct ccid.

I remember you talked about writing a PC/SC compatible interface for OpenCT once. What has become of this idea?

--
Martin Paljak
http://martin.paljak.pri.ee
+3725156495

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [Muscle] pcsc-lite with openct

Alon Bar-Lev
On Sat, Apr 10, 2010 at 8:59 PM, Martin Paljak <[hidden email]> wrote:
> On Apr 10, 2010, at 19:05 , Alon Bar-Lev wrote:
>> the openct framework is much lighter and better designed. It does not
>> use busy loops and threading, supports hibernation better, least
>> privilege mode, and much simpler implementation for the task at hand.
>> So I prefer using openct ccid.
>
> I remember you talked about writing a PC/SC compatible interface for OpenCT once. What has become of this idea?
>

There is no sense in maintaining two competing solutions.
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [Muscle] pcsc-lite with openct

Andreas Jellinghaus-2
In reply to this post by Alon Bar-Lev
Am Samstag 10 April 2010 19:05:41 schrieb Alon Bar-Lev:
> the openct framework is much lighter and better designed. It does not
> use busy loops and threading, supports hibernation better, least
> privilege mode, and much simpler implementation for the task at hand.
> So I prefer using openct ccid.

also openct is great for sharing code among many differnt drivers:
some simple token drivers have only about 20 lines of code, the rest
is generic infrastructure.

still the libccid driver for pcsc is much better than the simple openct
ccid driver, it has a great maintainer, is tested very, very well,
and supports more features. for example openct doesn't have any working
pin code as far as I know.

openct was the right thing many years ago, when pcsc-lite was not
maintained very much and had issues. but since then development
of openct pretty much erroded to null, while ludovic picked up
pcsc-lite, improved it and maintains it very well.

too bad it doesn't seem easy to port remaining openct drivers
to libccid or a new pcsc-lite driver. it would be usefull not
to duplicate all the code and work that went into libccid as
the best driver for pcsc-lite, only because there is a small
difference in the usb interface for tokens.

so I still use openct, because all my tokens and readers
work with it (except pinpad support), and it is easier for me
to have once subsystem instead of two.

but if I had no readers or tokens, my suggestion would be to buy
only ccid/iccd readers fully supported by the open source default
libccid + pcsc-lite combination, without any changes or special
configuration or version necessary.

Regards, Andreas
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [Muscle] pcsc-lite with openct

Andreas Jellinghaus-2
In reply to this post by Ludovic Rousseau
Am Samstag 10 April 2010 15:45:13 schrieb Ludovic Rousseau:
> > and I can't list the readers using the PCSC interface.
> > Is there a way to configure pcsc to use openct ?
>
> You have to configure OpenCT to be used by pcsc-lite. But I have no
> idea how to do that. You should as on the opensc-user mailing list [1]
> (in copy).

openct has an ifdhandler for pcsc-lite, that accepts calls from
pcscd and translates them into a call for the openct middleware.

but it should only be used with applications that use pcsc only.
for opensc it is best to use opensc->openct directly.

also the code is very old, hasn't been tested much even then.
and since then pcsc-lite has evolved and improved a lot, especially
in the usb section. in the same time openct hasn't been changed,
not even seen much maintenance, so no idea if that code still
works. I think it was more of a "proof of concept" and "works for
me" but not much used.

> Another idea is to disable the CCID driver in OpenCT. I don't know if
> it is possible.

edit udev rules and openct.conf and remove the reference that matches
your driver (e.g. the general rule for the interface type, or the
product/vendor matches). then openct won't know about that reader.
however I'm not sure about the generic match for the ccid interface
type - maybe that one isn't configureable but build in :(

still if you start pcscd first, then pcscd+ccid should always win.
openct has a one second sleep to allow pcscd+ccid precendece. it
will log one or two lines with a warning, but not cause any issues
or interfere with pcscd+ccid.

> Maybe OpenCT should support (by default) only the CCID readers not
> supported by my CCID driver to avoid collision? Does OpenCT support
> CCID reader not supported by my CCID driver? If yes which ones?

I don't think anyone has a collection of readers like you have, so
this is hard to compare.

openct with ccid driver is still useful, if you want only one subsystem.
for many old tokens there is no pcsc-lite driver, and writing one would
be a lot of work, unless we can somehow copy or integrate all the
infrastructure that your ccid driver contains. for example copying
t=1 protocoll and maintaining many copies would be a waste of time
and energy - maybe the original reason for "usbtoken" and later "openct".
same with all the work for usb scanning, hotplugging, supporting several
tokens (in several threads, several processes or with appropriate
multiplexing technique (not sure what pcsc-lite uses exactly these
days, I guess threads)). all that infrastructure would be the real
work for writing a driver. for example "aladdin etoken" only needs
that, a few IDs to identify it, and 4 lines or so that take the
frame from t=1 and pass it via usb control transfer to the kernel,
and back. add generic open/close/reset and the driver is done.
same with several other drivers.

if we could port such drivers, openct could become obsolete and
the we could suggest to migrate completely to pcsc-lite plus drivers.

Regards, Andreas
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [Muscle] pcsc-lite with openct

Martin Paljak-2
In reply to this post by Kevin REDON-2
On Apr 10, 2010, at 19:27 , Kevin REDON wrote:

> I can prevent openCT to use the CCID readers, also by first starting
> pcscd, then openct (the readers will be busy, thus unavailable to
> openCT).
>
> I don't know if one CCID driver supports more readers then the other, my
> 2 readers (cardman 5321 and alcor AU9520) are supported by both of them.
>
> But openCT adds support for the Phoenix serial reader
> (http://www.circuitsarchive.org/index.php/SmartCard_PC_Serial_Reader_/_Writer_%28Phoenix%29) through its ifdhandler. My wish would be to access the reader this way : me->PCSC->pcscd->ifdhandler->openct->ifdhandler for phoenix->phoenix card reader.
> I don't care which CCID driver handles my 2 CCID readers
>
> In the opensc wiki it says to be supported (but not very well tested),
> and the only compile option for openct is "--enable-pcsc", but it seems
> pcsc does not find the ifdhandler openCT offers (as far as I
> understand).

You need to configure the OpenCT ifdhandler, as described here:

http://www.opensc-project.org/opensc/wiki/e-gate



--
Martin Paljak
http://martin.paljak.pri.ee
+3725156495

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user