diff options
author | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-01-12 11:28:16 +0000 |
---|---|---|
committer | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-01-12 11:28:16 +0000 |
commit | c19a06d7f145f744c44bfe77f3e09f099174ec4b (patch) | |
tree | 7703826778e8b01c2a475e9cb129f547b3d57ba8 /cards/iso_7816_4_card.py | |
parent | ec3cb54a7fa56a4fbfbc5faadf9a83a9f21428f5 (diff) |
Factor out P2 parameter of SELECT
Add TCOS 3.0 ATR
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@157 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'cards/iso_7816_4_card.py')
-rw-r--r-- | cards/iso_7816_4_card.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cards/iso_7816_4_card.py b/cards/iso_7816_4_card.py index 101c98c..23033e2 100644 --- a/cards/iso_7816_4_card.py +++ b/cards/iso_7816_4_card.py @@ -8,6 +8,8 @@ class ISO_7816_4_Card(Card): DRIVER_NAME = "ISO 7816-4" FID_MF = "\x3f\x00" + SELECT_P2 = 0x0 + ## def can_handle(cls, card): ## return True ## can_handle = classmethod(can_handle) @@ -22,9 +24,9 @@ class ISO_7816_4_Card(Card): def change_dir(self, fid = None): "Change to a child DF. Alternatively, change to MF if fid is None." if fid is None: - return self.select_file(0x00, 0x00, "") + return self.select_file(0x00, self.SELECT_P2, "") else: - return self.select_file(0x01, 0x00, fid) + return self.select_file(0x01, self.SELECT_P2, fid) def cmd_cd(self, dir = None): "Change into a DF, or into the MF if no dir is given" @@ -41,7 +43,7 @@ class ISO_7816_4_Card(Card): def open_file(self, fid): "Open an EF under the current DF" - return self.select_file(0x02, 0x00, fid) + return self.select_file(0x02, self.SELECT_P2, fid) def cmd_open(self, file): "Open a file" |