Hello, I am trying to use a PKCS#15 using OpenSC and I discovered that OpenSC hardcodes "3F005015" in src/libopensc/pkcs15.c. Unfortunately my card uses "3F005000" instead.
This path is available in EF(DIR) and is already parsed by OpenSC so why not use it? The patch is really simple (maybe too simple) and I ask for comments. --- src/libopensc/pkcs15.c (révision 3011) +++ src/libopensc/pkcs15.c (copie de travail) @@ -510,7 +510,11 @@ static int sc_pkcs15_bind_internal(sc_pk err = SC_ERROR_OUT_OF_MEMORY; goto end; } - sc_format_path("3F005015", &p15card->file_app->path); + /* use the path found in EF(DIR) */ + if (card->app_count > 0) + p15card->file_app->path = card->app[0]->path; + else + sc_format_path("3F005015", &p15card->file_app->path); if (card->app_count > 0) { const sc_app_info_t *info; OpenSC still does not work but at least the execution fails later in the code. Expect some other patches soon :-) Bye, -- Dr. Ludovic Rousseau _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel