From 9fb1f2863b73ee1b612b67381a8e7ad2743997a9 Mon Sep 17 00:00:00 2001 From: henryk Date: Thu, 29 Sep 2005 20:00:37 +0000 Subject: [PATCH] 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 --- cards/cyberflex_card.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cards/cyberflex_card.py b/cards/cyberflex_card.py index 969ba35..c0b4131 100644 --- a/cards/cyberflex_card.py +++ b/cards/cyberflex_card.py @@ -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: