Permalink
Browse files

pkcs15: throw an error when trying to read from DF

Change-Id: Ifac6777436f889393e3d3981d98a78149fd6cb17
  • Loading branch information...
viktorTarasov committed Apr 9, 2012
1 parent cb13633 commit 66aa2b389654146294ba8deb6e2fcccbdea6c61b
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/libopensc/pkcs15.c
View
@@ -1875,6 +1875,10 @@ int sc_pkcs15_read_file(struct sc_pkcs15_card *p15card,
r = sc_select_file(p15card->card, in_path, &file);
if (r)
goto fail_unlock;
+ if (file->type == SC_FILE_TYPE_DF) {
+ r = SC_ERROR_NOT_SUPPORTED;
+ goto fail_unlock;
+ }
/* Handle the case where the ASN.1 Path object specified
* index and length values */

0 comments on commit 66aa2b3

Please sign in to comment.