Hi,

I actually found what the problem was... it is in the client-side RPC
SCardStatus function.  After receiving the response from the server
(SCARD_S_SUCCESS), the SCardStatusTH function in winscard_clnt.c does its
own check for the buffer length of both the reader name and the attribute
list.  If either of those is too short, it returns
SCARD_E_INSUFFICIENT_BUFFER.

The problem in my case is that there was a bug in testpcsc.c, since the
attribute buffer size passed to SCardStatus was 0 instead of MAX_ATR_SIZE,
as it should be.

So based on this, there may be 3 changes necessary to PCSClite, if they
haven't already been done:

1)  Documentation needs to be changed for the SCardStatus function to say
[1] instead of [2].

2)  The line [3] needs to be added to testpcsc.c before SCardStatus is
called.

3)  There should be some debugging output if debugging is turned on to say
why "Insufficient buffer" was returned (i.e. was it for insufficient reader
name buffer or insufficient attribute list buffer).

Again, these comments are valid for 1.2.0 so they may already be fixed for
the 1.2.9 series.

Regards,
Mladen
----- Original Message ----- 
From: "Ludovic Rousseau" <[EMAIL PROTECTED]>
To: "MUSCLE" <[EMAIL PROTECTED]>
Sent: Tuesday, November 23, 2004 2:00 PM
Subject: Re: [Muscle] Success is impossible: very odd problem with
pcsclite1.2.0


Le Monday 22 November 2004 � 14:31:15, Mladen Gavrilovic a �crit:
> Hello all,

Hi,

> I have a very odd problem with pcsclite 1.2.0 that prevents
SCARD_S_SUCCESS
> from being returned by the SCardStatus function.

[...]

> Does anyone know what is the issue here?

Try to use pcsc-lite 1.2.9-beta6
https://alioth.debian.org/project/showfiles.php?group_id=30105

Bye,

-- 
 Dr. Ludovic Rousseau                        [EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle

_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to