List Info

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




Generic CCID driver 1.1.0: How to detect the version?
user name
2006-09-15 22:59:31
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
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel
Generic CCID driver 1.1.0: How to detect the version?
user name
2006-09-18 06:25:26
On 16/09/06, Martin Preuss <martinaquamaniac.de> 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
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel
Generic CCID driver 1.1.0: How to detect the version?
user name
2006-09-20 14:04:38
On 18/09/06, Ludovic Rousseau <ludovic.rousseaugmail.com> wrote:
> On 16/09/06, Martin Preuss <martinaquamaniac.de> 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/secaut
hn/security/scardgetattrib.asp
[2] http://svn.debian.org/ws
vn/pcsclite/trunk/PCSC/src/testpcsc.c?op=file&rev=0&
sc=0

-- 
  Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel
Generic CCID driver 1.1.0: How to detect the version?
user name
2006-09-20 14:18:18
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
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )