Hi,

I've done some tests, thanks to  David Corcoran and
Tommaso Cucinotta, I've modified the ReadBinary() function in smartsign.
If I try to read 0xFF bytes at once I get an error .

By now, I've changed the ReadBinary() function in the smart_util.c
in this way:

while (len > 0) {
    if (len <= 253)
      partial = len;
    else
        // before 
      // partial = 255;

        // now
        partial=253; 


I've tried differents values for "partial", "253" is the highest that worked.
with 254 I would get the same error. Why does this happen?



        Christian 



> >David Corcoran wrote:
> > You might try modifying the code to try and read binary smaller amounts
> > instead of FF you might try a lower number just to try and track down the
> > problem.

> Tommaso Cucinotta wrote:
> You can try this modifying the ReadBinary() function in smart_util.c
> There you have a loop in which 0xFF bytes are read at once, modify the
> value to something smallest. Please, consider that you should (perhaps)
> modify WriteBinary() too, if it worked.
> 
> Please, let me know if that works, bye,
> 
>       Tommaso.
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************

Reply via email to