diff options
author | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2006-05-19 00:19:08 +0000 |
---|---|---|
committer | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2006-05-19 00:19:08 +0000 |
commit | 455428f0cd7f6d85c06cbd9c6523da21c68cb81e (patch) | |
tree | b5c4e6b298aa49284a4a721d65409985abe8bc48 /cards/iso_7816_4_card.py | |
parent | 0701d2612d895625267277c07caad5f70d3e38b1 (diff) |
ATR reorganisation and extension
initial TCOS code
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@57 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'cards/iso_7816_4_card.py')
-rw-r--r-- | cards/iso_7816_4_card.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cards/iso_7816_4_card.py b/cards/iso_7816_4_card.py index 5feec1d..7725829 100644 --- a/cards/iso_7816_4_card.py +++ b/cards/iso_7816_4_card.py @@ -5,9 +5,9 @@ class ISO_7816_4_Card(Card): APDU_SELECT_FILE = C_APDU("\x00\xa4\x00\x00") DRIVER_NAME = "ISO 7816-4" - def can_handle(cls, card): - return True - can_handle = classmethod(can_handle) +## def can_handle(cls, card): +## return True +## can_handle = classmethod(can_handle) def select_file(self, p1, p2, fid): result = self.send_apdu( @@ -29,7 +29,13 @@ class ISO_7816_4_Card(Card): print TLV_utils.decode(result.data) def cmd_parsetlv(self): - print BER_utils.decode(self.last_result) + "Decode the TLV data in the last response" + print TLV_utils.decode(self.last_result) + + ATRS = list(Card.ATRS) + ATRS.extend( [ + (".*", None), ## For now we accept any card + ] ) COMMANDS = dict(Card.COMMANDS) COMMANDS.update( { |