Ludovic Rousseau a écrit :
>
>
> I just say the reference implementation is winscard in Windows. If
> pcsc-lite is different then pcsc-lite must be corrected (unless it is
> a bug on the Windows side)
>
> Regards,
>
>   

Hi Ludovic (and other members of this list),

Your statement is somewhat interesting given the fact that as of today
there are a few differences between pcsc-lite and winscard which (in my
opinion) should be addressed in order to enhance  source compatibility
with existing Windows code. The problem is that some of them might also
break existing pcsc-lite based applications, so it's kinda hard to
decide what shall be done in these cases.

1) regarding SCardStatus(): (*pdwState) is filled with a bit field in
pcsc-lite and an enumeration in winscard. It make sense to tranform the
internal state bitfield to an enumeration before returning it since the
card cannot be in two different states at the same time. Unfortunately,
I believe that such a change would greatly impact existing pcsc-lite
applications in a subtle way - existing source would appear to be valid
(compile with no warning or error) but would contain logical errors.

2) regarding return codes: when writing an ifd handler, it's quite
difficult (if not impossible) to make sure that a specific error
condition in the handler will trigger a specific error code on the
pcsc-lite side. A typical example is SCardGetAttrib() which translate to
IFDHGetCapabilities() (which, according to
http://pcsclite.alioth.debian.org/ifdhandler-3/node15.html, can only
return IFD_SUCCESS, IFD_ERROR_TAG or IFD_NO_SUCH_DEVICE). How do we
ensure that pcsc-lite would return (for example)
SCARD_E_INSUFFICIENT_BUFFER when the output buffer is too small ?

3) SCARD_E_UNSUPPORTED_FEATURE: functions that return this error code
shall return ERROR_NOT_SUPPORTED instead. This is just a change in the
error name and value, but such change would enhance source compatibility
with Windows application - and would break source compatibility with
existing pcsc-lite applications as well.

There are many other cases - I can't list them all right now.

Best regards,

-- Emmanuel Deloget
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to