From c19a06d7f145f744c44bfe77f3e09f099174ec4b Mon Sep 17 00:00:00 2001 From: hploetz Date: Fri, 12 Jan 2007 11:28:16 +0000 Subject: 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 --- cards/iso_7816_4_card.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cards/iso_7816_4_card.py') 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" -- cgit v1.2.3