Invalidate the secure channel when switching applications

git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@20 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
henryk 2005-09-29 20:00:37 +00:00
parent 93f380859c
commit 9fb1f2863b
1 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,12 @@ class Cyberflex_Card(Java_Card):
return True
def select_application(self, aid):
result = Java_Card.select_application(self, aid)
if self.last_sw == self.SW_OK and aid[:5] != DEFAULT_CARD_MANAGER_AID[:5]:
self.secure_channel_state = SECURE_CHANNEL_NONE
return result
def get_status(self, reference_control=0x20):
"""Sends a GetStatus APDU und returns the result.
reference_control is either: