From 0f4e79db17a223322e2cb534791c8e294a287171 Mon Sep 17 00:00:00 2001 From: Daniel SUTTO Date: Fri, 5 Jan 2018 15:25:11 +0100 Subject: [PATCH] Fix SFID parameter in FCP template In FCP SFID tag bits 8 to 4 encode the short EF identifier. --- .../src/vpicc/virtualsmartcard/SmartcardFilesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py index 477af74..ff416c3 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py @@ -594,7 +594,7 @@ class MF(DF): # TODO filesize and data objects if isinstance(file, EF): if hasattr(file, 'shortfid'): - fdm.append("%c\x01%c" % (TAG["SHORTFID"], file.shortfid)) + fdm.append("%c\x01%c" % (TAG["SHORTFID"], file.shortfid << 3)) else: fdm.append("%c\x00" % TAG["SHORTFID"])