Generic CCID driver 1.1.0: How to detect the version?

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

Generic CCID driver 1.1.0: How to detect the version?

Martin Preuss-2
Hi,

Sorry, this is more of a CCID driver-related question but I noticed that these
are sometimes discussed here as well.


Since 1.1.0 the endianess of the control codes returned by the control command
CM_IOCTL_GET_FEATURE_REQUEST has changed.

However, on some systems older versions (pre 1.1.0) are still in use, so I'd
like to be able to detect whether the ccid driver currently in use on the
running system is pre or post 1.1.0.

Is there a way to query the driver name/version of a ccid driver? Currently
I'm just parsing the drivers log messages until I stumble upon the version
string, but this is just an ugly hack...


Regards
Martin

--
"Things are only impossible until they're not"

AqBanking - http://www.aqbanking.de/
LibChipcard - http://www.libchipcard.de/
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Generic CCID driver 1.1.0: How to detect the version?

Ludovic Rousseau
On 16/09/06, Martin Preuss <[hidden email]> wrote:
> Hi,

Hello,

> Since 1.1.0 the endianess of the control codes returned by the control command
> CM_IOCTL_GET_FEATURE_REQUEST has changed.
>
> However, on some systems older versions (pre 1.1.0) are still in use, so I'd
> like to be able to detect whether the ccid driver currently in use on the
> running system is pre or post 1.1.0.

That is a legitimate question. pre-1.1.0 versions are buggy and I did
not tried to be backward compatible. So I did not implement anything
like what you need.

> Is there a way to query the driver name/version of a ccid driver?

No. But I can add a SCardControl command to do that. That command
would only be available in post-1.1.0 versions so that will not
completely solve your problem.

> Currently
> I'm just parsing the drivers log messages until I stumble upon the version
> string, but this is just an ugly hack...

You can also parse the driver Info.plist file
(/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist in my case)
and look for the ifdProductString string.

Bye,

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

Re: Generic CCID driver 1.1.0: How to detect the version?

Ludovic Rousseau
On 18/09/06, Ludovic Rousseau <[hidden email]> wrote:
> On 16/09/06, Martin Preuss <[hidden email]> wrote:
> > Is there a way to query the driver name/version of a ccid driver?
>
> No. But I can add a SCardControl command to do that. That command
> would only be available in post-1.1.0 versions so that will not
> completely solve your problem.

I implemented two new SCardGetAttrib() tags in my CCID driver. You can
now get the driver version using SCARD_ATTR_VENDOR_IFD_VERSION and the
vendor name using SCARD_ATTR_VENDOR_NAME.
The format of the ifd version is the same as described in [1]. The
vendor name is "Ludovic Rousseau" since I could not find a better
vendor name :-)

I patched testpcsc.c [2] from pcsc-lite to test these two new tags.

Regards,

[1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/scardgetattrib.asp
[2] http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/testpcsc.c?op=file&rev=0&sc=0

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

Re: Generic CCID driver 1.1.0: How to detect the version?

Martin Preuss-2
Hi,

On Wednesday 20 September 2006 16:04, Ludovic Rousseau wrote:
[...]
> I implemented two new SCardGetAttrib() tags in my CCID driver. You can
> now get the driver version using SCARD_ATTR_VENDOR_IFD_VERSION and the
> vendor name using SCARD_ATTR_VENDOR_NAME.
> The format of the ifd version is the same as described in [1]. The
> vendor name is "Ludovic Rousseau" since I could not find a better
> vendor name :-)
[...]

Thank you very much. I will implement this in the upcoming libchipcard3.


Regards
Martin

--
"Things are only impossible until they're not"

AqBanking - http://www.aqbanking.de/
LibChipcard - http://www.libchipcard.de/
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-devel