Hello Douglas,

(filed it as #244 to make sure it will not slip through fingers)

On Jun 17, 2010, at 00:03 , Douglas E. Engert wrote:
> This problem comes down to the fact that OpenSC now has an
> internal_reader.h that does not match the pcsc-lite reader.h
> (reader.h.in) in a number of places.
> 
> On June 19, 2007 pcsc-lite reader.h.in was modified to treat the sun
> like the APPLE when defining the #pragma pack commands. This change
> was not in the opensc internal_reader.h
> 
> So on the sun, pcscd has sizeof(PCSC_TLV_STRUCTURE) = 6, (unaligned)
> but opensc thinks sizeof(PCSC_TLV_STRUCTURE) = 8. (aligned)
> 
> In addition the PIN_PROPERTIES_STRUCTURE is different in both
> having two extra  values in the OpenSC internal_reader.h
> 
> (ANy chance of going back to using the pcsc-lite version of
> reader.h, at least on Unix?)

I need to doublecheck but if reader.h is available, it should be used even now?

I don't think that reverting it totally would do any good now, the structures 
as defined in the internal header need updating (to support the latest spec) 
and to be really usable, I know that there are drivers out there (on windows) 
that use the PIN_PROPERTIES_STRUCTURE as it is in the old definition and work, 
so ideally both (the one with extra values and without them) should be 
recognized by OpenSC.

The PC/SC feature detection code in OpenSC needs and update.


> 
> The cardctl.h has the same issue with #pragma pack(push, 1)
> but will also fail on APPLE.
> 
> The svn version of reader-pcsc.c now does more feature checks
> and this alignment and size differences now cause a failure.
> 
> There is also some missing code in reader-pcsc.c as it
> sets display_ioctl for the FEATURE_IFD_PIN_PROPERTIES feature
> then can not get the display propriety.
Looks like a messup, will investigate.


> Attached are two diff files to fix these two issues in the three files.
Will apply ASAP.


-- 
Martin Paljak
@martinpaljak.net
+3725156495

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to