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.
br, Thomas
--- 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)
LOG_TEST_RET(ctx, err, "unable to enumerate apps");
}
p15card->file_app = sc_file_new();
@@ -764,7 +764,7 @@
/* If the above test failed on cards without EF(DIR),
* try to continue read ODF from 3F005031. -aet
*/
- if ((err == SC_ERROR_FILE_NOT_FOUND) && (card->app_count < 1)) {
+ if ((err == SC_ERROR_FILE_NOT_FOUND || err ==
SC_ERROR_DATA_OBJECT_NOT_FOUND) && (card->app_count < 1)) {
sc_format_path("3F00", &p15card->file_app->path);
err = SC_SUCCESS;
}
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel