From 4dae83f550fa8b8d0915f2c82b9780b1d80e9845 Mon Sep 17 00:00:00 2001 From: aet Date: Fri, 11 Feb 2005 10:05:54 +0000 Subject: [PATCH] - A fix for ISO 7816-15 cards I'm playing with. No feedback received about the patch, let's move on. The patch shouldn't affect any current behaviour. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2179 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/pkcs15.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libopensc/pkcs15.c b/src/libopensc/pkcs15.c index b8ad6b77..3d3de14f 100644 --- a/src/libopensc/pkcs15.c +++ b/src/libopensc/pkcs15.c @@ -505,6 +505,16 @@ static int sc_pkcs15_bind_internal(sc_pkcs15_card_t *p15card) /* Check if pkcs15 directory exists */ card->ctx->suppress_errors++; err = sc_select_file(card, &p15card->file_app->path, NULL); +#if 1 + /* 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)) { + sc_format_path("3F00", &p15card->file_app->path); + err = SC_NO_ERROR; + } +#endif card->ctx->suppress_errors--; if (err < 0) goto end;