From a0763976715817c7a14c390b33da29a78ef5f6f3 Mon Sep 17 00:00:00 2001 From: vtarasov Date: Mon, 14 Mar 2011 18:13:38 +0000 Subject: [PATCH] pkcs15: without AID specified return the first available PKCS#15 application ... revert accidential commit, thanks to Pierre Ossman. http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016149.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5232 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/pkcs15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libopensc/pkcs15.c b/src/libopensc/pkcs15.c index 573f62f1..09c0a349 100644 --- a/src/libopensc/pkcs15.c +++ b/src/libopensc/pkcs15.c @@ -675,7 +675,7 @@ struct sc_app_info * sc_find_app(struct sc_card *card, struct sc_aid *aid) return NULL; if (!aid || !aid->len) - return card->app[card->app_count - 1]; + return card->app[0]; for (ii=0; ii < card->app_count; ii++) { if (card->app[ii]->aid.len != aid->len)