Re: [opensc-devel] removing trailing spaces and tabs

2006-04-27 Thread Nils Larsch
Ludovic Rousseau wrote: Hello, I remarked that "some" files have spaces or tabs just before the end of line. You generally do not see them in your editor but it does not hurt to remove them either. This will generate a rather large patch (11424 lines for opensc and 712 lines for openct) so I do

[opensc-devel] Re: secure pin verify fails with pcsc reader (fix)

2006-04-27 Thread Mika Sorsa
On Thursday 27 April 2006 11:45, Martin Paljak wrote: > > What card are you using? An older FINEID card, opensc-tools says SetCOS. I believe it follows the fineid application 1.x specification (see www.fineid.fi), not the later version 2. > I *think* the apdu data sent to reader-pcsc.c > shou

Re: [opensc-devel] memory leak in reader-pcsc.c and reader-ctapi.c?

2006-04-27 Thread Andreas Jellinghaus
Am Donnerstag, 27. April 2006 12:04 schrieb Ludovic Rousseau: > I propose the attached patch. go ahead :) Andreas p.s. trunk only or opensc-0.11.0 also? I guess it is an old bug and noone had a real problem with it so far, so touching opensc-0.11.0 is not necessary. _

Re: [opensc-devel] removing trailing spaces and tabs

2006-04-27 Thread Andreas Jellinghaus
Hi Ludovic, fine with me. maybe even indent the whole file to fix other stuff as well? I prefer the linux kernel version "Lindent" or: indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs however you can't run that on all files - some code is very nested and becomes unreadable with that indentati

[opensc-devel] memory leak in reader-pcsc.c and reader-ctapi.c?

2006-04-27 Thread Ludovic Rousseau
Hello, I propose the attached patch. The idea is to not directly return if sc_apdu_set_resp() returns an error but release the allocated memory first. reader-openct.c does NOT have this bug and contains: /* set response */ r = sc_apdu_set_resp(reader->ctx, apdu, rbuf, rsize); out: if

[opensc-devel] removing trailing spaces and tabs

2006-04-27 Thread Ludovic Rousseau
Hello, I remarked that "some" files have spaces or tabs just before the end of line. You generally do not see them in your editor but it does not hurt to remove them either. This will generate a rather large patch (11424 lines for opensc and 712 lines for openct) so I do not want to send it here

Re: [opensc-devel] Re: [opensc-commits] svn opensc changed [2914] make sure buffer is 0 terminated.

2006-04-27 Thread Ludovic Rousseau
On 26/04/06, Nils Larsch <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Revision: 2914 > > Author: aj > > Date: 2006-04-26 10:08:09 + (Wed, 26 Apr 2006) > > > > Log Message: > > --- > > make sure buffer is 0 terminated. > > > > Modified Paths: > > -- > >

Re: [opensc-devel] opensc / pkcs11 / pcsc-lite locking

2006-04-27 Thread Ludovic Rousseau
On 26/04/06, Juergen Ludyga <[EMAIL PROTECTED]> wrote: > Hello, Hi, > >if C_Initialize is called the second card blocks if there is already an > open session. C_Initialize looks at all readers, whether in use or not. > >The calling chain is: > >C_Initialize > >-> __card_detect_all > >-> card_dete

Re: [opensc-devel] secure pin verify fails with pcsc reader (fix)

2006-04-27 Thread Martin Paljak
On 26.04.2006, at 23:35, Mika Sorsa wrote: I checked out the opensc svn sources and made a small fix to the src/libopensc/reader-pcsc.c for myself: +++ my/src/libopensc/reader-pcsc.c 2006-04-26 19:40:26.0 +0300 @@ -911,6 +911,9 @@ /* Copy data if not Case 1 */ if (data->

Re: [opensc-devel] svn opensc changed [2912] fix a memory leak.

2006-04-27 Thread Ludovic Rousseau
On 26/04/06, Andreas Jellinghaus <[EMAIL PROTECTED]> wrote: > not sure the code is now 100% correct. > the old code looks wrong to me, it could have > let towards accessing a buffer beyond its length. I don't see what the bug was. The problem was with memcpy()? > but: do we need to add some error

[opensc-devel] secure pin verify fails with pcsc reader (fix)

2006-04-27 Thread Mika Sorsa
Hello, The latest opensc (svn) secure pin verify does not work at least with my fineid card and the Chipdrive/SPR532 reader. My setup is pcsclite 1.3.1 and libccid 1.0.1 driver in Linux (I installed just the debian packages). So I use the pcsc reader (I have not installed openct). However, ther