Re: [opensc-devel] Fix a crash when trying to list objects via opensc-pkcs11

2012-05-04 Thread Nguyễn Hồng Quân
Thanks Viktor, I found the defect at the function pgp_get_blob() in card-openpgp.c. There are lines: if (child->id == id) { (void) pgp_read_blob(card, child); *ret = child; return SC_SUCCESS; The problem is either: 1. The c

Re: [opensc-devel] Fix a crash when trying to list objects via opensc-pkcs11

2012-05-04 Thread Viktor Tarasov
Hello Nguyễn, On Fri, May 4, 2012 at 12:04 PM, Nguyễn Hồng Quân wrote: > The case in this log is that the card is not initialised. It contains > no key. That is the reason why > the blob read failed, the file length is zero, the read binary returned > zero and final, a key with zero length modu

Re: [opensc-devel] Buffer is not sufficient for extended APDU

2012-05-04 Thread Martin Paljak
Hello, On Fri, May 4, 2012 at 8:05 AM, Nguyễn Hồng Quân wrote: > Hello all, > > I tried to send extend APDU in opensc-explorer with this command: > apdu 00CA0065000800 > and found that the command failed due to insufficient buffer, which had > been automatically allocated: It has not been autoamti

Re: [opensc-devel] Fix a crash when trying to list objects via opensc-pkcs11

2012-05-04 Thread Nguyễn Hồng Quân
Hi Viktor, The case in this log is that the card is not initialised. It contains no key. That is the reason why the blob read failed, the file length is zero, the read binary returned zero and final, a key with zero length modulus. I think what behavior for this case is conventional. When the c