aboutsummaryrefslogtreecommitdiffstats
path: root/cards
diff options
context:
space:
mode:
authorhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2006-06-16 22:02:20 +0000
committerhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2006-06-16 22:02:20 +0000
commit08ca2ee282e2a36005cb80882083ee99030e5415 (patch)
treeb342ec87fa2aa1fee36ef5233dc5ecb70a5ab609 /cards
parent4ae6e05dcc246c48c1a4256a8177148a77e648e6 (diff)
MTCOS
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@91 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'cards')
-rw-r--r--cards/building_blocks.py2
-rw-r--r--cards/mtcos_card.py16
-rw-r--r--cards/tcos_card.py3
3 files changed, 19 insertions, 2 deletions
diff --git a/cards/building_blocks.py b/cards/building_blocks.py
index 48d0a7f..9fa3efe 100644
--- a/cards/building_blocks.py
+++ b/cards/building_blocks.py
@@ -4,6 +4,8 @@ from utils import C_APDU, R_APDU
import utils, TLV_utils
class Card_with_80_aa:
+ APDU_LIST_X = C_APDU("\x80\xaa\x01\x00\x00")
+
def list_x(self, x):
"Get a list of x objects, where x is one of 1 (DFs) or 2 (EFs) or 3 (DFs and EFs)"
result = self.send_apdu(C_APDU(self.APDU_LIST_X, p1=x))
diff --git a/cards/mtcos_card.py b/cards/mtcos_card.py
new file mode 100644
index 0000000..e4335cf
--- /dev/null
+++ b/cards/mtcos_card.py
@@ -0,0 +1,16 @@
+import utils, TLV_utils
+from iso_7816_4_card import *
+import building_blocks
+
+class MTCOS_Card(ISO_7816_4_Card,building_blocks.Card_with_80_aa):
+ DRIVER_NAME = "MTCOS"
+
+ ATRS = [
+ ("3bfe9100ff918171fe40004120001177b1024d54434f537301cf", None),
+ ]
+
+ COMMANDS = {
+ "list_dirs": building_blocks.Card_with_80_aa.cmd_listdirs,
+ "list_files": building_blocks.Card_with_80_aa.cmd_listfiles,
+ "ls": building_blocks.Card_with_80_aa.cmd_list,
+ }
diff --git a/cards/tcos_card.py b/cards/tcos_card.py
index 3e43cc5..044f66b 100644
--- a/cards/tcos_card.py
+++ b/cards/tcos_card.py
@@ -4,8 +4,7 @@ import building_blocks
class TCOS_Card(ISO_7816_4_Card,building_blocks.Card_with_80_aa):
DRIVER_NAME = "TCOS"
- APDU_LIST_X = C_APDU("\x80\xaa\x01\x00\x00")
-
+
ATRS = [
("3bba96008131865d0064057b0203318090007d", None),
]