Moi,
On Thu, Jun 30, 2011 at 08:11, Thomas Grenman <tgren...@aalto.fi> wrote:
> Hello
>
> Please consider including the patch below into upcoming versions of
> OpenSC. This patch will make OpenSC work with my fairly new FINEID-card
> (http://www.opensc-project.org/opensc/wiki/FinnishEid). My particular card
> is not for private citizens but for organisations.
> I have only modified 'libopensc/pkcs15.c' but there might be a need to add
> the ATR somewhere as well. I guess the correct place would be
> 'libopensc/card-setcos.c'. Please let me know if you need any more
> information. The ATR is 3b:7b:18:00:00:80:62:01:54:56:46:69:6e:45:49:44.

Yes, the card seems to be unknown to the OSS community [1], do you
have more information about it?


> --- opensc-0.12.1/src/libopensc/pkcs15.c        2011-05-17 20:07:00.000000000 
> +0300
> +++ opensc-0.12.1/src/libopensc/pkcs15.c.fineid 2011-06-18 23:43:16.519340431 
> +0300
> @@ -723,7 +723,7 @@
>        /* Enumerate apps now */
>        if (card->app_count < 0) {
>                err = sc_enum_apps(card);
> -               if (err != SC_ERROR_FILE_NOT_FOUND)
> +               if (err != SC_ERROR_FILE_NOT_FOUND && err != 
> SC_ERROR_DATA_OBJECT_NOT_FOUND)

Looking at sc_enum_apps content, I don't see where that specific
function would return SC_ERROR_DATA_OBJECT_NOT_FOUND. Could you
provide the log with the original error included in the call stack?
This patch might fix the problem, but I'm not sure this is the
entirely correct way of fixing it. IMHO the translation of the return
code should be done, if necessary, earlier and not in pkcs15.c.

[1] 
http://smartcard-atr.appspot.com/parse?ATR=3b:7b:18:00:00:80:62:01:54:56:46:69:6e:45:49:44
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to