Heh, Sorry, forgot the references. The original message follows with references below:
----- Original Message ----- From: "Mladen Gavrilovic" <[EMAIL PROTECTED]> To: "MUSCLE" <[EMAIL PROTECTED]> Sent: Tuesday, November 23, 2004 2:21 PM Subject: Re:SOLVED -- [Muscle] Success is impossible: very odd problem withpcsclite1.2.0 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 [1] "pcchReaderLen will be the size of the allocated buffer for szReaderName, while pcbAtrLen will be the size of the allocated buffer for pbAtr. If either of these is too small, the function will return SCARD_E_INSUFFICIENT_BUFFER. In the case of insufficient szReaderName buffer, the function will return with the necessary size in pcchReaderLen." NOTE: It would be logical if it returned with the necessary size in pcbAtrLen in case of insufficient pbAtr buffer, as well. [2] "pcchReaderLen will be the size of the allocated buffer for szReaderName. If this is too small, the function will return with the necessary size in pcchReaderLen." [3] dwAtrLen = MAX_ATR_SIZE; ----- 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
